Repository navigation
fix(governance/receipt): let real-budget tests lift the production observation budget (CHE-1578) [squash] - #295
Merged
Merged
Conversation
added 3 commits
October 17, 2026 06:35
…ower than the production budget (CHE-1578)
…servation budget (CHE-1578)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status: OPEN/draft. Base
main03404c0cfcbff3730ad29a25d85906be8c59cd77. Head524363e27cf28fb4bdaa24d56f0497fa0a875427, treed6d050ce553e655fbe12aaf21adcd51e278cf54b. The head merges currentmaininto the branch and adds no code. The receipt diff is unchanged: 3 files.Change:
Observeclamps every deadline to the 50 msBudget. The test helperobserveRealBudgetpassed a 5 sInput.Deadline, and the clamp discarded it. A cold reserve on a real database can then take longer than 50 ms and sheds the observation asbudget_exceeded. This hits the create observation (receipt_budget_test.go:169) and the edit observation (:178).Observer.observationBudgetfield replacesBudgetwhen set. Production code never sets it, so the default stays the 50 msBudget(CHE-946 clamp preserved). The helper sets it to its existing 5 srealBudgetBound.Evidence:
f1b6494ea83189e633ff0f804e692d908e45708fadds onlyreceipt_budget_slow_reserve_test.go.TestObserveRealBudgetHelperToleratesReserveSlowerThanBudgetfails withshed budget_exceeded, 20 of 20 runs, against the parent. Fix commit3eed799ddc63fc7995e6a3441202ec2a194727d7leaves that test unchanged and it passes.TestObserveProductionBudgetStillShedsSlowReserveguards the clamp and passes before and after. Before the fix,mainfailed 30 of 40 on the edit test.524363e27cf28fb4bdaa24d56f0497fa0a875427on X99 (task-owned loopback PostgreSQL 17, migrated):go test -race -count=40 -v ./internal/governance/receipt/...exit 0. 840 top-level PASS, 0 FAIL.TestObserve_EditAfterSettledCreateIsAdmittedAgainstRealBudgetServicepassed 40 of 40.TestObserveRealBudgetHelperToleratesReserveSlowerThanBudgetpassed 40 of 40.01a15dac-6908-75e1-a371-4b822e2b40d0, manual code-scope P0/P1 PASS at the earlier head9388aa0cbf92a7f61401065993ef8204dca5c3a5. No P0 or P1. Exact-pair OCR failed, soocr_status=NOT-RUNwith the manual fallback in comment01a15dcf-0d88-77f7-943f-6e416a3da9fc. The head since then adds only amainmerge.make testof 21 Oct 2026 (head9388aa0cbf92a7f61401065993ef8204dca5c3a5,exit=1) is unrelated to the receipt package. The receipt package passed in that run. Failing packages:cmd/multicaandinternal/daemon/execenv(agent-runtime environment variables and a missing task/tmpdirectory),internal/service(timeout under host load 28 to 46), plus downstream[build failed]packages from missing Go$WORKartifacts. An earlier run also hitinternal/realtimeTestMembershipBurstDoesNotRejectValidWriters, which fails on puremainunder load. Not waived.Changelog: none
Closes CHE-1578