feat(#150): bootstrap-skill exemption + Bash-write coverage#152
Merged
atlas-apex merged 1 commit intoMay 3, 2026
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the legitimate-bypass case (#150) and the illegitimate-bypass case (#151) together so the ticket-first gate is coherent. Shipping either alone would leave a window where the framework is internally inconsistent — see
AgDR-0011for the full rationale..claude/session/active-bootstrapmarker written by/setup,/handover,/update,/split-portfolioon entry; cleared on exit; SessionStart sweep handles stale markers from interrupted sessions; configurable viaticket.bootstrap_skillsin.claude/project-config.{defaults,}.json..claude/hooks/_lib-detect-bash-write.shheuristic detector (output redirect,tee,sed -i,awk -i inplace,python -c,node -e,ruby -e);require-active-ticket.shandrequire-migration-ticket.shnow fire onBashin addition toEdit|Write|MultiEdit. Design choice: false-negatives preferred over false-positives.Why bundled
The two issues are the same crack in the gate viewed from two sides:
/setupis now hard-blocked on a fresh fork. Adoption flow is worse than before.Same shape as #147 / AgDR-0010 which bundled #145 + #146 for the same reason.
Closes me2resh/apexyard#150only — #151 closed manually post-merge per the single-Closes-per-PR rule.Testing
bash .claude/hooks/tests/test_detect_bash_write.sh→ 32/32 passing. Covers each pattern in the matcher table (positive class), representative reads (negative class), target extraction (positive + documented misses), and the exact bypass attempt repro from [Bug] require-active-ticket.sh bypassable via Bash file writes (echo>, python -c, tee, sed -i, etc.) #151.require-active-ticket.sh—bash .claude/hooks/tests/test_require_active_ticket_bash.sh→ 12/12 passing. Covers Bash writes blocked w/o ticket,python3 -c "...write_text..."bypass closed, Bash reads pass through, path exemptions still work for Bash, bootstrap-marker exemption works for Edit and Bash, unknown / empty marker correctly falls through, and the legacy active-ticket path still works (regression)..claude/hooks/tests/suite. The two failing tests (test_single_closes_per_pr.sh,test_validate_pr_required_sections.sh) are pre-existing — they hardcode#113, which has since been CLOSED upstream, and the validator now refuses closed-issue refs. Worth a small follow-up to switch the tests to a synthetic open issue or mockgh.me2resh/apexyard#NNNform. Confirms the existingverify-commit-refs.shis doing its job and our changes don't interfere with it.Glossary
.claude/session/active-bootstrap— a one-line file written by a bootstrap-class skill on entry, read byrequire-active-ticket.sh, removed by the skill on completion (or by the SessionStart sweep on the next session). The mechanism that lets/setuprun before any tickets exist without disabling the ticket-first gate./setup,/handover,/update,/split-portfolio. The list is configurable viaticket.bootstrap_skillsin.claude/project-config.{defaults,}.json.echo > file,tee,sed -i,python -c '…write_text…', etc.) skipped the ticket-first gate because the hook was scoped toEdit|Write|MultiEditonly. Closed in this PR via_lib-detect-bash-write.sh+ Bash-matcher wiring.clear-bootstrap-marker.shSessionStart sweep, but inside the same session, the operator-visible marker (cat .claude/session/active-bootstrap) is the only signal.🤖 Generated with Claude Code