test: add spawn-guard placeholder regression test for fm-brief.sh - #9
Merged
Merged
Conversation
A wedged family-run step was occupying the runner until the 75-minute job cap; bound that step so cleanup and timing artifacts still upload.
Add a regression test to tests/fm-brief.test.sh that prevents
bin/fm-brief.sh from ever again emitting a scaffold token that its
sibling guard in bin/fm-spawn.sh then rejects.
The spawn guard (PR 5) refuses to launch when any {[A-Z_]+} token
remains in the brief file. PR 8 fixed a case where the Herdr
NOT-ENABLED section contained a literal {TASK} in prose, creating a
second occurrence that survived firstmate filling the real placeholder
and blocked dispatch for every non---herdr-lab brief.
Coverage spans every scaffold variant:
- ship (no-mistakes, direct-PR, local-only)
- scout
- secondmate charter (project-list and --no-projects)
- each with and without --herdr-lab where applicable
For each variant the test asserts exact per-token occurrence counts
against the spawn guard regex (read from bin/fm-spawn.sh, not
restated), catching both novel tokens and extra occurrences of
expected ones - the exact original bug class.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
What
Regression test that stops
bin/fm-brief.shfrom ever again emitting a scaffold token that its own sibling guard inbin/fm-spawn.shthen rejects.Why
PR 5 added a spawn guard that refuses to launch when any
{[A-Z_]+}token remains in the brief file. PR 8 (commit a9c8212) then fixed a case where the Herdr NOT-ENABLED section contained a literal{TASK}in its prose - "the task text that replaces{TASK}later" - creating a second occurrence that survived firstmate's placeholder fill and blocked dispatch for every non---herdr-labbrief.Nothing prevented recurrence. This test closes that gap.
How
Extends
tests/fm-brief.test.shwithtest_scaffold_tokens_match_spawn_guard_expectations, which:bin/fm-spawn.sh(\{[A-Z_]+\}) rather than restating it, so the test cannot drift from the pattern it protects.no-mistakes,direct-PR,local-only--no-projects--herdr-labwhere that flag appliesDefect-reintroduced run (test MUST fail)
Reintroduced the defect: put
{TASK}back into the Herdr NOT-ENABLED prose.Defect-reverted run (test MUST pass)
Constraints satisfied
bin/fm-spawn.shis unchangedbin/fm-brief.shis unchangedshellcheckis clean on the test file