Skip to content

Infra CI3 C5: a deliberate PR proves the selector can't hide a real change #783

Closed

Description

@jparker2006

Parent

Ticket C5 of spec #780 (Infra; no milestone, ADR 0010).

What to build

A deliberate proof that the selector can't lie: one PR hides a real change from the selector, and CI goes red.

  • Pick a file whose tests are reached only through the selection map (not by sitting in the same folder), and make a real behaviour change there that one of those tests catches. Prefer a skills or tools file, where selection is newest. The PR shows nothing else: no test, CI or path change that would make the selector run everything.
  • Open it as a draft PR titled as the proof, let CI run once, and record the red run: which test caught it and that the selection planned that test. Close the PR unmerged.
  • Add the same edit as a case in the existing offline planted proof, so the proof keeps holding.
  • Record the proof in the selection README: the PR, the red run, the case.
  • If CI goes green, that is a selector bug: file it with a failing test first (T5), block this ticket on it, and rerun the proof after the fix.

Owned paths

  • ci/select/planted.py (shared: one new case row only)
  • ci/select/README.md (shared: a new proof section only)
  • the throwaway draft PR's branch (closed unmerged; never merged)

Relies on: contracts/ci-selection.v1.md

Links

Acceptance criteria

  • A draft PR with one hidden real change, closed unmerged, whose CI run went red on the test that catches it.
  • The planted proof catches the same edit offline.
  • The selection README links the PR, the run and the case.

Proof

CI3-S: the deliberate PR's red CI run, then the planted case red on the edit and green without it.

Activity

  1. added
    ready-for-agent
    on Nov 15, 2026
  2. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: start checked, branch room/783-ci3-c5-selector-proof

  3. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    Builder question: C5's throwaway PR cannot be a draft and still test the selector.

    Found:

    • A draft gets no plan: decide.sh fails changes ("PR is a draft: the acceptance set does not run"), and contracts/ci-selection.v1.md says the same. A red run on a draft proves nothing about selection.
    • Only a ready PR's first ordinary attempt (opened/synchronize, not ready_for_review) can narrow. Draft-then-ready runs everything.
    • The selector diffs from the signed map's commit to the tested merge, so drift on main counts. The cached map's commit is 13 CI-touching commits behind main, so every PR now runs full (recent PR runs say Full run: ci_change). A narrowed run is possible only after the 09:23 UTC nightly re-signs the map and before the next CI-path merge.

    Options:

    1. Open the throwaway PR ready, titled C5 selector proof: do not merge, timed just after a nightly map signing, then close it unmerged. The proof is valid only if its changes log says CI selection: selected and plans the catching test; otherwise close it and retry after the next nightly.
    2. Keep it a draft as the body says. It goes red only from the draft rule, so it can't meet acceptance criterion 1.
    3. Hold C5 until pushes to main sign maps again.

    Recommendation: 1. It needs only "draft" read as "ready", and changes no path or other criterion. Candidate edit: tools/install/platform/security.py, which only rust:test:cli-agent and rust:test:proof read through the map (in map.json). I'll confirm no folder rule or tools suite also picks it before using it.

    Until this is answered I'll build only the offline planted case and the README section (they don't depend on this answer).

  4. added
    needs-info
    on Nov 16, 2026
  5. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: asked the orchestrator
    The builder's question: C5's throwaway pull request cannot be a draft and still test the selector (options 1–3, recommending 1): #783 (comment)

  6. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    Orchestrator ruling: option 1 granted. Read the ticket's draft as ready for this one throwaway pull request: open it ready, titled C5 selector proof: do not merge, just after a nightly map signing, and close it unmerged. The proof counts only if its changes log says CI selection: selected and plans the catching test; otherwise close it and retry after the next nightly. It gets no reviewer and is never queued; say so in its body, and the fleet records nothing for it but its closure. Confirm first that no folder rule or tools suite also picks up the candidate file. Build the offline planted case and the README section meanwhile.

  7. removed
    needs-info
    on Nov 16, 2026
  8. added 2 commits that reference this issue on Nov 16, 2026
  9. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: look: the throwaway selector-proof PR waits for a nightly map signing, and none has run today: ci.yml's schedule (23 9 * * *) has one scheduled run on record, 2026-11-15T16:28Z, and none on 2026-11-16 by 13:25Z. Since #744 only the nightly's select-map signs the map, so a PR opened now runs the full suite and proves nothing. Asked the orchestrator.

  10. added a commit that references this issue on Nov 16, 2026
  11. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    Orchestrator ruling: both (a) and (b). GitHub's schedule is late, not broken (yesterday's run came about 7 hours after its time and its select-map job passed), so if a scheduled run signs a map first, run the proof then. But a signing that can only happen once a day, hours late, leaves every pull request running the full suite after any CI change, so C5 also adds a manual trigger:

    • workflow_dispatch on ci.yml, and the select-map signing step treats a dispatch on refs/heads/main exactly like the schedule. No other job changes its conditions; toolkit-nightly stays schedule-only.
    • A dispatch from any other ref signs nothing; prove that with a failing-first check in the workflow's own tests.
    • The reviewer confirms at the exact head that only someone with write access, on main, can cause a signing, the same trust as the schedule.
    • Update the one sentence that says only the nightly signs (wording, where CI: stop re-running the full suite on main for commits the merge queue already tested #744 recorded it).
      After it merges, tell me and I dispatch one signing run; then run the throwaway proof.
  12. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    Builder question on (b), the manual signing trigger: two extra paths, which copy of the sentence, and how to split.

    1. Paths beyond ci.yml and its tests (.github/workflows/ci.test.mjs). A dispatch that only reaches the signing step can't sign: select-map runs only when changes says trace=true, and ci/select/job.py's traces() returns true only for TRUSTED_EVENTS = ('push', 'schedule') on refs/heads/main. The same tuple is the PR-side trust check, which would refuse a dispatch-signed map (event_name is 'workflow_dispatch', not a push or the nightly run). So I need:

    • ci/select/job.py: add 'workflow_dispatch' to TRUSTED_EVENTS (one line, plus the refusal message). The token check still demands ref == refs/heads/main and workflow_ref == …/ci.yml@refs/heads/main, so a dispatch token from another ref stays untrusted.
    • ci/select/test_job.py: failing-first cases. A dispatch on main traces and its token is trusted. A dispatch on another ref neither traces nor is trusted.

    No change needed: decide.sh already runs everything for an event it doesn't name. ci/hosted/guard.sh already trusts workflow_dispatch, with the other caches restore-only. toolkit-nightly and every other job condition stay as they are.

    2. The sentence. #744's "only the nightly signs" is in three places: the ci.yml header comment, AGENTS.md (Commands), and docs/agents/fleet.md (CI checks, the #744 bullet). Recommendation: change the fleet.md bullet (where #744 recorded it) and the ci.yml comment, plus the same words in AGENTS.md, so they don't disagree.

    3. Split. Closes #783 would close the ticket before the proof exists. Recommendation:

    • PR A, #783 (b): sign the selector map on a manual dispatch from main, says Refs #783, not Closes. It holds ci.yml, ci.test.mjs, job.py, test_job.py and the sentence, and is pushed as Jake's account.
    • The throwaway proof runs after A merges and the orchestrator dispatches one signing run.
    • PR B says Closes #783. It holds the planted case, the README proof section with its links, the evidence and the registry row (already on its branch).

    Answer: 1 yes/no, 2 which copies, 3 yes or another split.

  13. 22 remaining items

  14. added a commit that references this issue on Nov 17, 2026
  15. added
    held
    and removed
    ready-for-agent
    on Nov 18, 2026
  16. jparker2006 commented on Nov 18, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: waiting for #1097

    Plan revision 4 adds the planted-mode budget fix before this ticket's final PR #1094. Keep the current branch and proof evidence; no pushes or reruns while the fix and its plan approval are pending. The fleet will resume this builder after #1097 has a verified merge. Attempt 2 failed in the new-thread target after 8m07s; the original attempt 1 supplies the separate 56-minute budget-overrun evidence.

  17. added
    ready-for-agent
    and removed
    held
    on Nov 18, 2026
  18. jparker2006 commented on Nov 18, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: resume sent 6966884766 for #1097

  19. added a commit that references this issue on Nov 18, 2026
  20. added
    needs-info
    on Nov 18, 2026
  21. jparker2006 commented on Nov 18, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: asked the orchestrator

    Fresh-head #1094 CI is blocked by the separate messaging m06 failure filed as #1122, with a bounded unchanged-head reproduction in PR comment 6973377263. Awaiting current-run recovery disposition; no rerun, new head or outside-scope Rust fix is assumed.

  22. jparker2006 commented on Nov 18, 2026

    @jparker2006
    MemberAuthor

    Orchestrator ruling: yes, one full rerun of run 44258375576 at 6a7ef24 under the filed-flake rule (gh run rerun 44258375576, no --failed). The failure is in messaging m06, outside this pull request's paths, filed as #1122, and passes 3/3 locally. If it fails the same way again, stop and say so; #1122 then gets a fix ticket first. #1122 joins the J130 flake-fix list either way.

  23. removed
    needs-info
    on Nov 18, 2026
  24. jparker2006 commented on Nov 18, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: archived

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions