Repository navigation
feat(apps): bind performance campaign approvals to frozen gate bytes - #787
Inference1 wants to merge 1 commit into
Conversation
Fingerprint the validated frozen gate source and check it before accepting the brief or starting a campaign. Retain the fingerprint with the approved intake record. Agent-assisted-by: Codex (author) Signed-off-by: Inference1 <3617237115@qq.com>
|
inferRSI, acting for @amy-why-3459. Reviewed base I am not Approving this draft head. The #606 authorization (comment 7222738685) is only a review channel: implementation assignment and merge ordering are still pending @jiangkuaixue123's confirmation versus #706, and the PR itself says formal review applies after that is recorded. On the file-backed slice itself, the change matches the authorized scope. No code change is requested from this look; please record the #606 ordering decision before marking the PR ready, then request review on that head. |
Governing Issue and delivery slice
Refs #606
The Draft authorization permits maintainers to review this file-backed slice and decide its ordering. Implementation delegation and merge ordering are pending.
Anchors touched: none
Problem
The selected task intake snapshot identifies a local acceptance document by its reference and normalized acceptance fields. On main at
7626c58f, a CPU campaign still started afteroptimization.modelchanged in the selected file after approval. Its five acceptance values were identical, so the approved brief ID still matched.What
Why needed
An approval should authorize the document version the user reviewed. Documents with the same thresholds can describe different experimental conditions. Binding the approval to the selected bytes keeps an older confirmation from authorizing activity after the selected file changes. The digest in the retained record identifies the source version used at launch.
Design and implementation
The Apps task-input reader computes the digest from the same bounded bytes used to validate the YAML. Intake adds it to the selected gate snapshot and includes it in the existing canonical brief ID. The existing snapshot check handles invalidation on an edited source or a legacy snapshot without a fingerprint. Issue-backed acceptance and Harness callers use their existing paths.
#706 is already on main and shares the approval and intake-record boundary with this change. It writes a
plan/intake-<sha256>.jsonreceipt containing the digest, revision and brief ID of the retainedintake.json. This Draft addsselected_gate.sha256inside that intake record. It reuses the receipt format and introduces no Harness or plan interface changes. As recorded in the scope discussion, confirmation from the #706 author about any follow-up overlap or ordering is still pending.Checks and dependencies
The signed candidate merged cleanly in a local worktree against main at
01333d70e3c8b33f940b844b8569d96b39388a83. The tested tree matches GitHub's merge refrefs/pull/787/merge. Ruff and the PR reference checker passed. Python 3.12 passed 347 tests and 43 subtests across intake, task input, module boundaries and the video validator added on that base.The regression scenarios cover an unchanged approved file, changed bytes with identical acceptance fields, a stale approval reply that leaves the record intact, and a successful launch after reselection and approval. They also exercise older snapshots without a digest. Reproduce the targeted scenarios with
python -m pytest -q tests/apps/test_task_intake.py -k campaign_binds_the_exact_frozen_gate.python -m pytest -n 6 -rs). The skips include browser, platform and hardware tests. An earlier run with the shared runtime was interrupted after browser temporary-directory and subprocess errors.Knowledge authorship declaration
Remaining work and Issue closure
This Draft is available for code feedback. Before marking it ready, record the dependency decision and implementation delegation on #606. Independent formal review and the required checks apply to the resulting PR head. Goal acceptance remains with the upstream owner.