Skip to content

refactor(ci): clear the R2 pass leftovers across lane workflows - #16006

Merged
kyle-sexton merged 3 commits into
mainfrom
refactor/r2-3-pass-leftovers
Nov 13, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
refactor/r2-3-pass-leftovers

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #15966

session: Simplify E2 A

Summary

Clears the leftovers the R2 restructuring pass found across lane workflows (R2-3). Each change keeps step names, ids, triggers and outputs.

Fix

  • Credit-stop marker (eval-browser-dispatch, eval-hill-climb-pass, intake-triage, pr-unblock): "Write the key's credit-stop marker" drops rm -rf "${RUNNER_TEMP:?}/key-credit-stop". RUNNER_TEMP starts empty in each job and no earlier step writes that directory.
  • Shared shfmt action (eval-browser-dispatch): the three legs' "Install pinned shfmt for guardrails" steps use ./.base/.github/actions/setup-pinned-shfmt with bin-dir: /opt/tools/bin. The action runs the same steps: v3.14.1 with the same Linux SHA-256, sha256sum -c, the directory added to PATH, and a --version check. Name and if: are unchanged, and the three legs stay equal (callers.test.mjs).
  • Refine legs (intake-triage): CONTEXT_FILE and REPO_DIR are substituted once, after the size-split if, instead of in both branches. The DOMAINS substitution stays in the refine branch. The three legs stay equal.
  • Lane-sweep schema (maintenance-audit-lane-runs): the three judge legs' inline claim=/finding=/printf lines become jq -c . .base/.github/scripts/maintenance-audit-lane-runs/lane-sweep.schema.json >"$SCHEMA_FILE", reading the new pretty-printed schema file.
  • Comments: pr-review-main drops "as before" in five comments; pr-run-activity-read says "Every local action".

Verification

  • Schema bytes: the inline lines run in bash and jq -c . of the new file produce identical output (787 bytes, compared byte for byte).
  • actionlint on the seven workflows: clean. node scripts/check-artifact-retention.mjs: 152 upload steps match.
  • node --test --test-concurrency=4 on the node test files that name these workflows or the shfmt action: 3865/3865 pass.
  • test_merge_holds_sync.py: 21 passed.
  • Left to CI: the full .github suite (ci-status).

Related

Part of #15695 (R2). Uses the action from #15957.

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits November 13, 2026 10:54
- Write the key's credit-stop marker: drop the rm -rf of a directory
  that nothing earlier in the job creates (RUNNER_TEMP starts empty).
- intake-triage refine legs: substitute CONTEXT_FILE and REPO_DIR once,
  after the size-split branch, instead of in both branches.
- maintenance-audit-lane-runs judge legs: read the findings schema from
  lane-sweep.schema.json (jq -c gives the same bytes the inline printf
  wrote) instead of three inline copies.
- Install pinned shfmt for guardrails in eval-browser-dispatch: use the
  shared setup-pinned-shfmt action.
- Comment fixes in pr-review-main and pr-run-activity-read.

Closes #15966

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…action

The three legs' "Install pinned shfmt for guardrails" steps use
setup-pinned-shfmt with bin-dir /opt/tools/bin, and the credit-stop
marker step drops its rm -rf.

Refs #15966

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 13, 2026 19:04
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T19:06:26.333198Z ed3ed64 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed ed3ed64812d2064abfe2557712b967dce50d7366: read 8 of 8 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #16006 (refactor(ci): clear the R2 pass leftovers across lane workflows)

I found no security issues. I read all 8 changed files in full. Every workflow change is on a trusted path, so I read its whole change and what it gates.

  • Shared shfmt action (eval-browser-dispatch.yml, all three legs): the inline download is replaced by ./.base/.github/actions/setup-pinned-shfmt.
    • .base is the default-branch checkout, not PR code. It is checked out with ref: ${{ github.event_name == 'pull_request' && steps.tip.outputs.sha || github.sha }} and persist-credentials: false (eval-browser-dispatch.yml#L235-L241).
    • The action keeps the same pin: version=v3.14.1, Linux sum=76e77641…a7bf, then sha256sum -c and a --version check (action.yml#L30-L64).
    • bin-dir is a literal /opt/tools/bin and goes in through env:, not an inline expression.
    • Result: the supply-chain pin is not loosened and no new input path is added.
  • Credit-stop marker (eval-browser-dispatch, eval-hill-climb-pass, intake-triage, pr-unblock): the rm -rf before mkdir -p is removed.
    • The step then writes $GITHUB_RUN_ID into run-id, and the upload steps send only ${{ runner.temp }}/key-credit-stop/run-id.
    • Anything left over in that directory would never be uploaded, and run-id is always overwritten, so the marker cannot be forged or carry stale data.
    • The kill-switch and credit-stop logic is unchanged.
  • intake-triage substitutions: CONTEXT_FILE and REPO_DIR are now substituted after the if/fi, so DOMAINS is expanded first.
    • domains is a hard-coded constant list (intake-triage.yml#L992) and contains neither placeholder, so the new order lets no untrusted text into the prompt.
  • Lane-sweep schema (maintenance-audit-lane-runs): the output schema now comes from .base/.github/scripts/maintenance-audit-lane-runs/lane-sweep.schema.json, which is in the trusted base checkout.
    • It is the same structure as the inline JSON it replaces, still additionalProperties: false, and the slice enum is unchanged.
    • It is passed only to jq -c, with no interpolation.
  • Comment-only edits (pr-review-main.yml, pr-run-activity-read.yml): no change to behaviour.

Trust controls: none is widened. I found no change to the trusted-trigger check, the lane token's scope, the kill switch, a merge hold, permissions:, triggers or if: conditions.

Instruction-surface lens: not applicable. No standing instruction is deleted or softened.

Spend: none. The change alters no model, turn limit, schedule or billed resource.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed ed3ed64812d2064abfe2557712b967dce50d7366: read 8 of 8 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #16006, refactor(ci): clear the R2 pass leftovers across lane workflows

I found no problems. I read every hunk of all 8 changed files in .claude-lane/pr.diff. Six of the workflows match a trusted-path glob, so I also read the code their changed steps call.

What I checked, by reading the code (I could not run anything):

  • shfmt steps (eval-browser-dispatch.yml, all three legs): .github/actions/setup-pinned-shfmt/action.yml is already on the base branch, since the PR does not add it. It does what the removed inline steps did:
    • It pins v3.14.1 with the same Linux SHA-256 (76e776…).
    • It downloads with curl --retry 7 --retry-all-errors and checks the file with sha256sum -c.
    • It runs chmod +x, adds bin-dir to $GITHUB_PATH, and checks --version.
    • With bin-dir: /opt/tools/bin, mkdir -p makes the same directory as before.
    • Each job checks out the default branch to .base long before the step, so ./.base/... resolves. Step names and if: conditions are unchanged.
  • Credit-stop marker (4 files): in each job, no step other than the marker step itself writes $RUNNER_TEMP/key-credit-stop. The other key-credit-stop-* paths in pr-unblock.yml are separate directories. So the removed rm -rf had nothing to remove.
  • Refine legs (intake-triage.yml, all three legs): CONTEXT_FILE and REPO_DIR are now substituted once, after the fi, so they apply to whichever prompt the branch picked. DOMAINS still applies only to the refine prompt. The new order changes the result only if $DATA or $REPO_DIR contained the word DOMAINS, or a domain name contained a placeholder. Neither happens for these workspace paths and domain names.
  • Lane-sweep schema (maintenance-audit-lane-runs.yml, all three judge legs): I compared lane-sweep.schema.json key by key with the removed claim=/finding=/printf lines. The key order, enum, required lists, additionalProperties and ["integer","null"] all match. jq -c . keeps key order and ends with a newline, as printf '%s\n' did, so the written bytes should match. The step reads .base/... from the workspace, the same way it already reads prompt.md. No test parses the old inline lines.
  • Comments (pr-review-main.yml, pr-run-activity-read.yml): these are YAML comment edits only, and no test checks for the "as before" wording.

Closing issue #15966, criteria:

  • Met: the four rm -rf lines are removed, and both shfmt steps call the shared action with the same names and if: conditions.
  • Met, identical in all three legs: the single CONTEXT_FILE/REPO_DIR substitution in each refine leg.
  • Met: the schema is loaded from the new file, the comment wording is fixed, and no step name, if:, job id, trigger or permission changed.
  • Met: only the listed files changed, and the diff is well under 400 lines.
  • Partly met: the issue asks for proof with cmp in the PR body. The body says the outputs were "compared byte for byte (787 bytes)" but does not show a cmp command or its output. My own structural comparison found them equivalent, but the byte check itself is the author's claim and I have not confirmed it.
  • Not checked by me: the author says actionlint is clean and 3865/3865 node tests pass. "ci-status is green" is left to CI.

Each of these criteria makes a cleanup with no behaviour change. If one were undone, nothing would break that a test could catch, so I did not count any missing tests as gaps.

No paid charges or added credit use: the change runs nothing new and changes no model or schedule settings.

Verifier dropped 0 of 0 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 0bcb603 Nov 13, 2026
90 checks passed
@kyle-sexton
kyle-sexton deleted the refactor/r2-3-pass-leftovers branch November 13, 2026 19:25
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove dead credit-marker cleanup and tidy leg leftovers across workflows

1 participant