Repository navigation
fix: reconcile declared flag inventory count - #25355
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Git-on-my-level
added a commit
that referenced
this pull request
Nov 15, 2026
…25345) ## What changed and why SCA-2283 requires application source `0714c5198be8f0183c8fd7dd3810d53c91af17a4` to stage integration at zero traffic, verify 25% for five minutes, then promote to 100% with twenty minutes of observation. The existing deploy workflow otherwise promotes all four services directly to 100%. Add this finite exact-source path inside the existing production workflow and concurrency/approval boundary. Clone integration from its actual retained serving revision, compose native ops/fresh queues and exact stamps before traffic, preserve sidecars/resources/secret references, use resourceVersion CAS and durable private mutation intent, and independently verify candidate/source/configuration and requested plus observed traffic. Other three services retain normal deployment and native recovery. Manual recovery also runs for cancelled traffic/verification steps. Serving projection and Firestore read ops prefixes are carried into the rendered candidate; retired sync references are removed. Composer and validator imports stay at module scope. The existing desktop production workflow stages the renderer's new pure composition dependency alongside its other immutable controls. The existing isolated staging regression executes those exact copy commands without a runtime checkout; this closes the import failure found by Static Contracts and backend unit shard 1. The scoped connector repair validates workflow reconstruction against the composed canary manifest and bound admitted source, normalizes Cloud Run's omitted empty literal values consistently during preparation and template comparisons, and pins positive `latestRevision` tag aliases to their original serving revision before candidate creation. Focused regressions exercise the full renderer/validator with live-ops fixture overrides, reject incorrect state/workflow provenance, retain malformed/secret-reference refusals, and preserve tag bindings through staging, promotion and rollback. All three connector findings are fixed, with no waiver. The rollout lead requested review of only this fix delta from `5e39512f55576071b954057524f093baea0df433`, rather than another full controller review. Authenticated bounded Monitoring reads enforce the actual 30-minute preflight, complete post-warmup ten-minute rollback windows, and sparse foreground observation. Incomplete evidence refuses. Strict fixed-origin registry reads hash original bytes and preserve the existing source-tag/role policy; redirects refuse. No production invocation, snapshot access, index write, GKE/GPU/worker change, application repin, new workflow or credential change was performed. ## Product invariants affected Current main integration merges `65f46cce8306794cc7f2a5eff6cda7c285f4fe8b` without modifying any of this PR's 15 own files. The full flag names map is preserved (295/295, budget 161). The captain's test-only review carry remains applicable; fresh successor CI is required. Deployment scope limitation: this executable path still admits only exact application source `0714c5198be8f0183c8fd7dd3810d53c91af17a4`. It does not yet implement the subsequent first-green-main pin, explicit integration sweep/tick override removal for source defaults 100/20, or a pause between delivery-consumer rollout and integration promotion for a separate listen move. Native rollback retains the saved provfix revision, but the new post-cursor-wrap 30-minute discovery guard has no controller transport. These later requirements need a separately qualified delta; merging current main does not enable them. No operator invocation for those unsupported requirements is claimed. - INV-DATA-1 ## How it was verified Worker-host offline controller/workflow/snapshot tests pass all 119 cases through the native selected-file `backend/test.sh` runner, including real capped/stalled subprocess cleanup. They exercise the finite complete rollout, CAS conflicts/lost responses, drift, recovery, malformed/incomplete Monitoring pages, weighted error windows, CPU distributions, deadlines, caps, serving-template cloning, configuration composition, shell promotion/recovery branches and receipt redaction. Existing renderer/runtime validator/release-vector tests also pass (438 cases). Actionlint and shared concurrency policy pass. CPU distributions are combined before percentile alignment, using the documented [Monitoring aggregation contract](https://docs.cloud.google.com/monitoring/api/v3/aggregation). The follow-up repair suite passes 274 tests, including actual cancelled/failure outcome matrices, supported ops preservation, workflow contracts and the permanent-dark legacy ratchet. Normal `make preflight` and pre-push checks run before publication; exact results are reported in the issue receipt. Independent executable review found the recovery, prefix and import findings addressed here; the goal owner authorized these scoped repairs without another review round. The earlier offline temporal-contract SHIP covers that contract only. Green required CI, normal merge/admission and scoped release-owner go-ahead remain necessary before invocation. No live transport compatibility or production acceptance is inferred. The latest connector-delta suite passes 614 tests through the native selected-file backend runner: 100 controller, 33 workflow/composition, 275 runtime-validator, 97 renderer, 7 snapshot and 102 shared workflow-contract cases. The canonical manifest used by the full-validator regression is byte-identical to application pin `0714` (SHA256 `f02265fd39cc850d412b8a956bb1acbe85dacbb004b66a951825ae3ce9835782`). These are offline configuration/controller proofs, not production acceptance. CI at `88ff65bf` passed all 33 workflow behavior assertions but its three full-validator cases exceeded the unchanged 1.0-second call-phase CPU guard. The successor changes only test setup: a module fixture parses the immutable repository input closure once through the real normalized YAML loader, and each validation load receives a fresh deep copy. Unknown inputs still use the real loader. All three tests retain their full-validator calls and positive/negative provenance assertions; production files, markers, allowlists and timing limits are unchanged. This follows the existing renderer suite's parsed-manifest fixture pattern and removes repeated parsing instead of waiving the guard. The shared pre-existing flag-count inconsistency was repaired separately in reviewed PR #25355, canonically merged as `d3004f3bae579206da0b6db3b7834bd096bcfe8a`. This branch now incorporates that main commit: declared count and registered names are both 287, with the enforced budget still 161. The count file has no difference from main in this PR. Application pin `0714c5198be8f0183c8fd7dd3810d53c91af17a4` remains fixed. New-head CI and normal release-owner admission remain required. ## Tests `backend/tests/unit/test_integration_canary_controller.py` and `test_integration_canary_workflow.py` cover the core path and refusal/recovery boundaries. Existing `test_cloud_run_traffic_snapshot.py`, `test_render_backend_runtime_env.py`, `test_backend_runtime_env_validator.py` and `test_verify_backend_release_vector.py` cover the shared controls. ## UI evidence UI-Evidence: none -- deployment controller and workflow tooling only. ## Failure class (fixes) Failure-Class: none
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.
What changed and why
The shared backend flag-budget guard fails because its declared inventory count is 286 while
namescontains 287 entries. Update onlybackend/config/flag_budget.json.countto 287 so the existing consistency assertion reflects the registered inventory.The enforced
budgetremains 161. Names, owner exceptions, expiry dates, scope and retirement policy are unchanged. This is the separate minimal correction requested on SCA-2225 for the SCA-2283/SCA-2288 release dependencies; it does not expand controller PR #25345's review scope.Product invariants affected
none
How it was verified
Compare parsed JSON against the base and assert that
countis the only changed field, equalslen(names), andbudgetremains 161. Run the existingtest_flag_budget.pysuite through the native selected-file backend runner, then the normal preflight and pre-push checks. The existingtest_budget_file_declares_scope_and_countis the regression test for this discrepancy.Tests
BACKEND_UNIT_TEST_FILE_LIST=<file listing tests/unit/test_flag_budget.py> bash backend/test.sh(run from backend with the absolute list path).UI evidence
UI-Evidence: none -- inventory metadata consistency only.
Failure class (fixes)
Failure-Class: none
Admission
Independent review, green required CI and normal merge admission remain necessary. Preserve the quality lead's written-OK requirement for this covered seal path while the freeze remains in force. No production action or merge is part of this change.