Repository navigation
Description
Part of #2934 (Phase A). Implements questions 1, 2 and 4 of the #2939 ruling.
Context
Drafts run cheap gates only, and complete affected proof runs only on a ready event that, by policy, needs the repository-wide reservation (docs/decisions/ci-utility.md, "Scheduling and selection" and "Exact-candidate integration reservation"). Agents therefore run long native, runtime and browser suites locally, where concurrent agents choke the host and skip checks. The maintainer ruled that an agent may request its PR's affected heavy categories on a draft head, without the reservation, as feedback that never counts as proof. The request is a workflow_dispatch with the PR number and head SHA, sent through a repository script. The workflow refuses when the live head differs. At most one draft heavy run is in flight per PR, and a new push or request cancels the earlier one. Ready confirmations take priority.
Today .github/workflows/ci.yml declares a bare workflow_dispatch that runs exhaustive discovery, and scripts/ci-plan.ts:394-416 zeroes every heavy selection for draft cadence.
Scope
- A new workflow, or a new
ci.ymldispatch input set, takingprandhead_sha. Its first job reads the live PR and refuses unless it is open, a draft, from this repository and at exactlyhead_sha. It then plans the PR's affected selection against the PR base, with a newfeedback-heavycadence, and runs the selected heavy categories with the same jobs and pins as confirmation. - Its aggregate check is named
draft heavy feedback, neverproof.integrate.tsand the candidate gate never accept it as proof. - Concurrency group per PR,
cancel-in-progress: true, so a new request cancels the earlier one. A push to the PR also cancels its in-flight feedback run. bun scripts/request-heavy-feedback.ts <pr>reads the live head, dispatches with it and prints the run URL;--jsonprints the run identity.- Ready confirmation priority: the feedback workflow's heavy jobs wait for, or yield to, ready confirmation through a documented mechanism, measured under ci: keep job creation time and report runner-slot wait #2952. If GitHub offers no priority primitive, the decision amendment records the chosen approximation, for example a cap on concurrent feedback runs repository-wide.
- Red-main refusal: the run's first job applies the same red-main gate as PR runs (ci: record a red main centrally, stop doomed proof and file one incident issue #2942). Whichever of the two tasks lands second wires the gate into the other's workflow.
- Update
work-issueand the CI/merge reference to use the request for heavy iteration.
Out of scope
- Changing what counts as merge evidence; exact-head ready confirmation stays the only
proof. - Local admission (ci: admit heavy local test commands through a host-wide ledger with priority and preemption #2943) and runner-slot wait reporting (ci: keep job creation time and report runner-slot wait #2952).
Acceptance criteria
- The planner returns non-empty heavy selections for
feedback-heavycadence on a changedpackages/ui-serverfile and empty ones for draft cadence. Proven by a test that fails before the change. - The live-head check refuses a mismatched SHA, a ready PR and a closed PR. Each is proven by a test with an injected API.
- The candidate/merge gate refuses a PR whose only heavy evidence is a
draft heavy feedbackrun. Proven by a test and a restored mutation receipt. - The workflow declares per-PR concurrency with cancellation. A workflow-structure test asserts the group key and that the aggregate name is not
proof. - One recorded dispatch run on a real draft PR, linked in the PR, shows the heavy categories ran and the aggregate was not named
proof.
Verification
Focused planner, request-script and integration tests, workflow-structure assertions, the mutation receipt and the recorded dispatch run.
Contract impact
None: repository workflow and script.
Activity
schlessera commentedon Nov 2, 2026
Claimed while working epic #2934 end to end (claim token
wi-20261102-fd2d2f21). Intended branch:feat/3272-draft-heavy-feedback.feat(ci): let a draft PR request its affected heavy categories as hos…
docs(ci): record how draft heavy feedback runs and route heavy iterat…
feat(ci): let a draft PR request its affected heavy categories as hos…
docs(ci): record how draft heavy feedback runs and route heavy iterat…
schlessera commentedon Nov 2, 2026
Progress (claim
wi-20261102-fd2d2f21): implementation is in draft #3278, head1831fa777160506e7d5409e7f96668e88f1f014e, rebased ontob228b1f21. Localcheck:prpasses. The failing-first and mutation receipts are in the PR.Waiting on the proof-system stability window, not on a defect.
bun scripts/proof-system.ts classifymarks #3278 as a proof-system change. #3275, also a proof-system change, merged at2efe3fa1c. Its own main run is green, and the next main run (b228b1f21, #3276) is green. Ruling 2 needs one more green main run before another proof-system change merges, and nothing has merged to main for about 2 hours.Exact next action: once a main commit after
b228b1f21has a green CI push run, and no other proof-system change merged in between (that would reset the window):bun run check:pr --base origin/main.bun scripts/integrate.ts confirm 3278 --issues schlessera/brain-kit#3272.After merge, dispatch
bun scripts/request-heavy-feedback.ts <draft-pr>on a real draft PR. Record that run here and close this issue with it. The workflow only dispatches once it is on the default branch.Already verified on a real push: run https://github.com/schlessera/brain-kit/actions/runs/41428436823 (pull_request synchronize on #3278) ran only
supersede. Every category job anddraft heavy feedbackwere skipped, and noproofcheck was produced.fix(ci): compare the generated feedback workflow by structure, not bytes
feat(ci): let a draft PR request its affected heavy categories as hos…
docs(ci): record how draft heavy feedback runs and route heavy iterat…
fix(ci): compare the generated feedback workflow by structure, not bytes
feat(ci): let a draft PR request its affected heavy categories as hos…
docs(ci): record how draft heavy feedback runs and route heavy iterat…
fix(ci): compare the generated feedback workflow by structure, not bytes
feat(ci): let a draft PR request its affected heavy categories as hos…
docs(ci): record how draft heavy feedback runs and route heavy iterat…
fix(ci): compare the generated feedback workflow by structure, not bytes
feat(ci): let a draft PR request its affected heavy categories as hos…