Skip to content

fix(bootstrap): stage only generated files; test: workflow hygiene pins - #4

Open
SaulBuilds wants to merge 4 commits into
mainfrom
dgx/qg-pins-1022
Open

SaulBuilds wants to merge 4 commits into
mainfrom
dgx/qg-pins-1022

Conversation

@SaulBuilds

Copy link
Copy Markdown
Contributor

What

  1. bootstrap.sh stages only the files it creates. Before this change, step 9 ran git add -A, so in --non-interactive mode (where every prompt auto-answers yes) any unrelated file in the adopter's tree was committed with the bootstrap. It now stages an explicit list: CONFIG.md, PRODUCT_SPEC.md, the coverage baselines, INDEX/, CLAUDE.md, the renamed Sprint 0 directory plus the placeholder's removal, and .claude/settings.json only when this run seeded it.
  2. New tests: tests/test_bootstrap_staging.py runs the real bootstrap in an isolated temp copy with HOME and git config overridden. tests/test_workflow_hygiene.py checks three things:
    • every ${{ }} in a run: body is an allowlisted value;
    • every uses: line is pinned, including the - uses: list form, which the existing pin test skipped;
    • each claim-grade step validates $PR_NUMBER before using it.
  3. CI: the tests/ suite wasn't run by any workflow. A self-tests job in tripwires.yml now runs it. The workflows README had drifted (merge-gate.yml was missing), which left the existing README test red on main; it now has the missing row and the corrected permission count.

Standard: met

  • Red first: 30ee31f is the red test. It fails on an assertion: the planted file is committed. a6307dc is the fix.
  • Revert check: re-adding git add -A turns the staging test red. Each of these turns a named hygiene test red: an inline dispatch input, an inline step output, a tag-pinned or abandoned action, or dropping one numeric check. (Under the old suite, those four, plus removing the numeric check, all stayed green.)
  • Suite: python3 -m unittest discover -s tests 36 OK (was 29 passing + 1 failing on main). actionlint 1.7.7 is clean on tripwires.yml.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KGMeatV8UjtCB4CTbWuAv4

SaulBuilds and others added 4 commits October 22, 2026 17:10
…(red)

Runs the real bootstrap.sh --non-interactive in an isolated temp copy of the
skeleton with unrelated files planted in the tree, and asserts they are
neither staged nor committed, while the generated files still are.

Red on main: the planted files are committed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KGMeatV8UjtCB4CTbWuAv4
Step 9 used `git add -A`, so in --non-interactive mode (where every confirm
auto-answers yes) any unrelated file in the adopter's tree was committed with
the bootstrap. Stage an explicit list instead: CONFIG.md, PRODUCT_SPEC.md,
coverage BASELINE.md + baseline.json, INDEX/, CLAUDE.md, the renamed Sprint 0
dir (plus the placeholder's removal), and .claude/settings.json only when this
run seeded it.

tests/test_bootstrap_staging.py: red before, green after; revert check
(re-adding `git add -A`) turns it red again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KGMeatV8UjtCB4CTbWuAv4
…checks

- every ${{ }} inside a run: body must be an allowlisted value (event name,
  SHAs, PR number); inputs, step outputs and free text go through env:
- every `uses:` (including the `- uses:` list form, which the existing pin
  test skipped) is SHA-pinned, docker images version- or digest-pinned, no
  abandoned or latest refs
- each claim-grade step that consumes $PR_NUMBER validates it before use

Each assertion was revert-checked: re-introducing an inline dispatch input,
an inline step output, a tag-pinned or abandoned action, or dropping one
numeric check turns a named test red.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KGMeatV8UjtCB4CTbWuAv4
….yml

The repo's own regression suite under tests/ was not run by any workflow,
and the workflows README had drifted (merge-gate.yml missing), which turned
the README test red on main unnoticed. Add a self-tests job to
tripwires.yml (skips cleanly if tests/ is removed) and add the missing
README row and permission count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KGMeatV8UjtCB4CTbWuAv4
@github-actions

Copy link
Copy Markdown

Claim grader (shadow mode)

Each commit / PR-text element scored against the claim-compression rubric. Shadow mode: this comment is informational; merge is not blocked.

Kind Id Score Verdict Reasons
pr_title PR #4 — grader-unavailable no API key in env (set ANTHROPIC_API_KEY or OPENAI_API_KEY); grader returns informational no-op until configured
pr_body PR #4 — grader-unavailable no API key in env (set ANTHROPIC_API_KEY or OPENAI_API_KEY); grader returns informational no-op until configured
commit 30ee31f4 — grader-unavailable no API key in env (set ANTHROPIC_API_KEY or OPENAI_API_KEY); grader returns informational no-op until configured
commit a6307dc9 — grader-unavailable no API key in env (set ANTHROPIC_API_KEY or OPENAI_API_KEY); grader returns informational no-op until configured
commit 5a02e37f — grader-unavailable no API key in env (set ANTHROPIC_API_KEY or OPENAI_API_KEY); grader returns informational no-op until configured
commit aec167af — grader-unavailable no API key in env (set ANTHROPIC_API_KEY or OPENAI_API_KEY); grader returns informational no-op until configured

@BerryManifold BerryManifold left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated Codex static review of aec167af38e473ffab8c99cd916f71ae6756093a is complete. Result: blockers; details retained privately. Details and coverage limits are recorded in the project's private review log. No tests were executed by this reviewer. Both account submissions represent the same Codex review, not independent reviews.

@Matr0xshka Matr0xshka left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated Codex static review of aec167af38e473ffab8c99cd916f71ae6756093a is complete. Result: blockers; details retained privately. Details and coverage limits are recorded in the project's private review log. No tests were executed by this reviewer. Both account submissions represent the same Codex review, not independent reviews.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants