Skip to content

fix(planning): fail align's browser skip under CI and cache Chromium for bash legs - #11744

Merged
kyle-sexton merged 8 commits into
mainfrom
fix/align-ci-skip-and-chromium-cache
Nov 1, 2026
Merged

kyle-sexton merged 8 commits into
mainfrom
fix/align-ci-skip-and-chromium-cache

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #8498

Summary

Two things change, as the decision record set out:

  • align.test.sh no longer passes a browser skip under CI.
  • The bash test legs stop downloading Chromium on every run.

Fix

  • plugins/planning/shared/tests/align.test.sh:
    • Under CI=true, a missing node, or a last line SKIP: …needs playwright-core or SKIP: no Chromium to launch, now fails. It uses the same pattern as ui-run.sh.
    • Locally, both skips still pass.
  • New align-require-browser.test.sh: a stub test shaped like ui-require-browser.test.sh, with eight cases.
  • pr-require-checks.yml, test-bash job:
    • It restores ~/.cache/ms-playwright on legs that need browser or animation, with the test-python job's exact key, so both jobs share one cache entry.
    • On a hit it skips the Chromium download.
    • It saves only on main, on a miss, after a download, the same condition test-python uses.

Verification

  • align-require-browser.test.sh 8/8.
  • align.test.sh 552/552 locally with Chromium.
  • shellcheck, shfmt and actionlint are clean.
  • The cache path runs for the first time in this PR's CI.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits October 31, 2026 19:38
…for bash legs

align.test.sh now fails under CI=true when node is missing or align.js
ends with a SKIP line for missing playwright-core or Chromium, matching
ui-run.sh. Local runs still skip green. align-require-browser.test.sh
proves both paths against a stub align.js.

The test-bash legs that install Chromium (animation or browser needs)
now restore ~/.cache/ms-playwright under test-python's key, skip the
download on a hit, and save the entry only on main after a download.

Closes #8498

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 31, 2026 23:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T23:40:38.256570Z ca97451 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

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review (incremental, 55ffddb → 7a7c8a3)

I found no security issues in the incremental change.

I read every hunk of .claude-lane/incremental.diff across all four files in scope.

  • .github/workflows/pr-require-checks.yml (trusted path; I read the whole change and what it gates):
    • The test-bash and test-python jobs now set a job-level BROWSER_CACHE_KEY: ${{ needs.select-tests.outputs.playwright_cache_key }}. Their actions/cache/restore steps now read key: ${{ env.BROWSER_CACHE_KEY }} instead of the needs output.
    • Where the value comes from: the select-tests step playwright_key builds it (L917-L921) as playwright-${{ runner.os }}-only-shell-chromium-${{ hashFiles('package-lock.json') }}. No pull-request text (title, branch name, body) feeds it.
    • Where it goes: the new env var only reaches a with: key: input. It is not expanded into any run: block, so this adds no injection surface.
    • Who can write the cache: both save steps still run only on main (if: github.ref == 'refs/heads/main' && ...cache-hit != 'true' && ...browser_downloaded == 'true', L3513 and L3701). A pull request leg can restore the shared entry but cannot write it, so this change opens no cache-poisoning path.
    • No permissions:, token request, trigger or ci-status hold step changes in this increment.
  • scripts/check-docs-only-gate.sh and scripts/check-docs-only-gate.test.sh: these add the playwright_cache_key output to the list of select-tests outputs the gate check expects, plus the matching test fixture line. The change is structural only and touches no trust surface.
  • scripts/ci-test-node-stop-commands.test.sh: the structural test now expects ${{ env.BROWSER_CACHE_KEY }} on the restore steps. It also checks that each job's env sets BROWSER_CACHE_KEY to the select-tests output. Test-only.

None of this widens a trust control: no trusted-actor, token-scope or kill-switch path is touched, and no merge hold changes. No plugin manifest changed. No instruction surface (CLAUDE.md, AGENTS.md, a rules file, a skill or agent body) was deleted or softened. The PR context file contains no embedded directives aimed at the review lane.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on ca97451771ddccaf49b908773ac5dd26937dc7e3; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread .github/workflows/pr-require-checks.yml Resolved
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review (incremental since 55ffddb): no findings

I read every hunk of the four files in this change, and they agree with each other.

What changed. In both test-bash and test-python, the job env now sets the Playwright cache key as BROWSER_CACHE_KEY: ${{ needs.select-tests.outputs.playwright_cache_key }}. Both "Restore the Playwright browser" steps read ${{ env.BROWSER_CACHE_KEY }} instead of the needs expression. The docs-only gate's DATA_TABLE and its test fixture now list playwright_cache_key.

What I checked:

  • Why the move to env is needed. scripts/check-docs-only-gate.sh does two things:

    • Its fail-closed rule rejects any resolver output that neither table names (L745-L751).
    • It allows a data output to be read only as a whole env entry KEY: ${{ needs.select-tests.outputs.<name> }} (is_data_read, L585-L595).

    The old with: key: read would have failed the "ONE CONSUMER FORM" check. The new job-level env entries match the exact shape the gate expects.

  • Gate table and published output agree. The new DATA_TABLE row playwright_cache_key\t${{ steps.playwright_key.outputs.key }} is the same expression select-tests publishes at pr-require-checks.yml:911. The fixture output added in check-docs-only-gate.test.sh keeps the gate's passing fixture in step with the table.

  • Restore and save use the same key. Both save steps still use steps.playwright_cache.outputs.cache-primary-key (L3517, L3705). Each save therefore writes under exactly the key its restore resolved from the env.

  • The test now covers the new layout. ci-test-node-stop-commands.test.sh checks that each job's env sets BROWSER_CACHE_KEY to the select-tests output and that the restore reads env.BROWSER_CACHE_KEY. Breaking either link would fail the test.

Closing issue #8498. The cache criterion ("bash test legs that need browser restore ~/.cache/ms-playwright, keyed on the locked Playwright version… save it only on main after a download") is still met after this refactor. It is still guarded by the test above.

I ran no commands; this lane has no shell. The author says the cache path runs for the first time in this PR's CI. That claim is the author's and I have not verified it.

The PR context file contains no embedded instructions aimed at this lane.

kyle-sexton and others added 2 commits October 31, 2026 19:45
…ser cache on install args

align.test.sh fails any SKIP last line under CI=true, since align.js
prints SKIP only for a missing playwright-core or Chromium. The stub
test now takes its skip lines from align.js and fails when it finds
none, so a reworded skip cannot leave a stale stub.

The Playwright cache key in test-bash and test-python now names the
install arguments (only-shell chromium), so changing them misses the
cache instead of restoring the wrong browser.

align-require-browser.test.sh and ui-require-browser.test.sh join the
Windows-inert paths beside align.test.sh.

Refs: #8498

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 2ce402274514929d89c9231a80e71e005d41fd49; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread .github/workflows/pr-require-checks.yml Resolved
kyle-sexton and others added 4 commits October 31, 2026 20:07
select-tests now names the Playwright browser cache key as a job
output, and test-bash and test-python restore under it. Workflow- and
job-level env allow neither runner nor hashFiles, per the context
availability table in GitHub's contexts reference, so a step in
select-tests computes it.

ci-test-node-stop-commands.test.sh now checks that test-bash restores
only on a browser or animation leg, that both jobs restore under the
shared key, that the install step is id toolchains and writes
browser_downloaded, and that the save runs only on main after a
download.

Refs: #8498

Co-Authored-By: Claude Opus 5.5 <[email protected]>
check-docs-only-gate.sh fails closed on a select-tests output its tables do
not name, and reads a data output only as a whole env entry. The key joins
DATA_TABLE, test-bash and test-python read it into BROWSER_CACHE_KEY, and
the restore steps take the key from that env entry. The contract test and
the gate's fixture follow.

Refs: #8498

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 1, 2026
Merged via the queue into main with commit 332a5f6 Nov 1, 2026
52 checks passed
@kyle-sexton
kyle-sexton deleted the fix/align-ci-skip-and-chromium-cache branch November 1, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: run the planning browser suites on CI instead of skipping them

1 participant