You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prerequisites: current origin/main; gh CLI with authenticated read access for the inventory
tool; no external dataset, checkpoint, scheduler, or private service. The one PR-body edit is
permitted only after exact-head and changed-path revalidation per Part B.
Goal
Add a read-only, testable inventory for PR contract versions, migrate one representative non-research PR from the compatibility body to a valid pr-contract.v2 block, and record the live validation/CI behavior. Preserve every existing hard gate and all human-readable information.
Accept a repository name and obtain open PR metadata through gh or a supplied JSON fixture.
Reuse scripts/dev/pr_contract_v2.py; do not duplicate the parser.
Classify each PR as:
v2_valid;
v2_invalid;
v1_compatibility (no v2 marker);
body_missing or another explicit unavailable state.
Record PR number, URL, author, draft state, head SHA, contract class when valid, and a credential-free remediation summary.
Support deterministic JSON output and a fail-closed --check mode.
Never edit a PR, expose tokens, or infer scientific validity.
Permit offline tests using fixture JSON; tests must not require network access.
--check should fail when any v2 marker is malformed. It may report v1-compatible PRs without failing during the compatibility period. Add an explicit option or policy constant for later retirement, but do not enable retirement behavior in this issue.
Require the exact head to remain 5b1308eb9d4015232200d99d5f7cd37d4e27e1de, or stop and post the changed head/body to this issue for re-admission.
Re-check its changed paths. Stop if the scope is no longer workflow/tooling/docs/tests only.
Save a SHA-256 digest of the pre-edit body in the issue-scoped receipt; do not commit the full volatile body twice.
Prepend a valid v2 block while preserving the complete existing human body. The intended declaration is:
change_class: toolinglinked_issues:
closes: []relates:
- 7665
- <this issue number>deferred_work:
status: openissues: []reason: "After merge and observation on main, a maintainer must separately apply the reviewed main-protection ruleset change requiring merge-queue-gate. This issue does not authorize that ruleset change."evidence:
applicability: natier: nullresult: nadomain_approval:
required: falsestatus: not_requireddomains: []note: "NA - control-plane workflow/tooling change; no simulation, benchmark, metric, model, safety, or publication claim."performance:
claimed: falseexact_head: 5b1308eb9d4015232200d99d5f7cd37d4e27e1de
Use the exact schema shape required by pr_contract_v2.py. Validate the complete proposed body locally before gh pr edit or an equivalent authenticated edit. Do not remove or rewrite the human Summary, Issue, Validation, or Follow-up sections except for a minimal correction required to avoid contradiction.
Part C — Live observation receipt
Add a compact, versioned receipt under an issue-scoped path such as:
the proposed block cannot preserve its deferred follow-up under the current schema;
the canonical validator changes and the migration requires weakening a hard gate;
another open PR implements the same inventory and live-migration receipt;
authenticated PR-body edit permission is unavailable.
Completion handoff
The implementation PR must use Closes #<this issue> and Relates #7665. After merge, post the merged commit, inventory command, receipt path, #7343 body-edit timestamp/digests, and observed check run IDs to #7665. Keep #7665 parked. A separate author decision is required before any v1 retirement or branch-protection change.
Parent and dispatch role
pr-contract:v2.5b1308eb9d4015232200d99d5f7cd37d4e27e1de.change_class: tooling.Agent execution contract
Inputs
Affected files:
scripts/dev/audit_pr_contract_versions.py(new inventory tool)scripts/dev/pr_contract_v2.py(reuse; no duplicate parser)scripts/dev/check_pr_followups.py(reuse)tests/dev/test_audit_pr_contract_versions.py(new tests)tests/dev/test_check_pr_followups.pytests/test_ci_script_contract.pydocs/context/evidence/issue_<this issue>_pr_contract_v2_live_migration/(receipt)docs/context/issue_7665_pr_contract_v2.md.github/PULL_REQUEST_TEMPLATE/pr_default.mdPrerequisites: current
origin/main;ghCLI with authenticated read access for the inventorytool; no external dataset, checkpoint, scheduler, or private service. The one PR-body edit is
permitted only after exact-head and changed-path revalidation per Part B.
Goal
Add a read-only, testable inventory for PR contract versions, migrate one representative non-research PR from the compatibility body to a valid
pr-contract.v2block, and record the live validation/CI behavior. Preserve every existing hard gate and all human-readable information.Read first
scripts/dev/pr_contract_v2.py;scripts/dev/check_pr_followups.py;tests/dev/test_check_pr_followups.py;docs/context/issue_7665_pr_contract_v2.md;.github/PULL_REQUEST_TEMPLATE/pr_default.md;Part A — Read-only inventory tool
Add one small tool, suggested path:
The tool must:
ghor a supplied JSON fixture.scripts/dev/pr_contract_v2.py; do not duplicate the parser.v2_valid;v2_invalid;v1_compatibility(no v2 marker);body_missingor another explicit unavailable state.--checkmode.--checkshould fail when any v2 marker is malformed. It may report v1-compatible PRs without failing during the compatibility period. Add an explicit option or policy constant for later retirement, but do not enable retirement behavior in this issue.Part B — Migrate live PR #7343
Before any write:
5b1308eb9d4015232200d99d5f7cd37d4e27e1de, or stop and post the changed head/body to this issue for re-admission.Prepend a valid v2 block while preserving the complete existing human body. The intended declaration is:
Use the exact schema shape required by
pr_contract_v2.py. Validate the complete proposed body locally beforegh pr editor an equivalent authenticated edit. Do not remove or rewrite the human Summary, Issue, Validation, or Follow-up sections except for a minimal correction required to avoid contradiction.Part C — Live observation receipt
Add a compact, versioned receipt under an issue-scoped path such as:
Record:
edited, state this explicitly and run the canonical remote/body validator without claiming hosted-CI coverage;Do not copy credentials, webhook URLs, local absolute paths, or unrelated PR body contents into the receipt.
Acceptance criteria
--check; a valid v2 block is parsed with field-specific output.tooling, non-evidence-bearing, non-performance, and records the deferred branch-protection action without authorizing it.Validation
Also record the exact live inventory and PR-body validation commands. Use the actual new test path if repository conventions require a different name.
Non-goals
Stop conditions
Stop and apply
state:blockedwhen:Completion handoff
The implementation PR must use
Closes #<this issue>andRelates #7665. After merge, post the merged commit, inventory command, receipt path, #7343 body-edit timestamp/digests, and observed check run IDs to #7665. Keep #7665 parked. A separate author decision is required before any v1 retirement or branch-protection change.