Skip to content

tests(sde): assert the brief-file dispatch Test 7 actually has - #156

Merged
SSFSKIM merged 4 commits into
mainfrom
worktree-65-api-implementer
Sep 15, 2026
Merged

SSFSKIM merged 4 commits into
mainfrom
worktree-65-api-implementer

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Closes #65

Test 7 of the subagent-driven-execution description test asserted a dispatch
design the skill no longer has, so it failed whenever the model answered
accurately.

What was wrong

Two defects, one on top of the other.

The assertion pointed at a superseded design. It required the controller to
paste the task's full text into the executor's prompt. The skill now extracts a
per-task brief (scripts/task-brief PLAN_FILE N) and dispatches its path:
skills/subagent-driven-execution/SKILL.md — "The brief file is the single
source of requirements" — and agents/task-executor.md — "Read the brief first
— it is your requirements." A correct answer was scored as a failure.

The assertion was not anchored to an answer line. This is why the ticket saw
flakiness rather than a clean stale-test failure. grep is line-based, so the
sibling assertion "Executor must read plan file:.*no" only matches when the
label and the answer share a line. The first assertion —
"provide.*directly\|full.*text\|paste\|include.*prompt" — floated free over
the whole response and matched explanatory prose such as "the brief file holds
the full text of the task." The two observed passes never read the answer at
all; they matched a sentence that was describing the brief.

Inverting the regex alone would have left a test that still passes for the wrong
reason.

What changed

  • Test 7's template now names both artifacts separately — the brief the executor
    is handed, and the plan file it is not sent to. The old template's correct
    answers ("by file" / "no") read as a contradiction unless the answerer already
    knew two different files were in play, which pushed good answers into prose
    that free-text matching then scored at random.
  • Both assertions anchor to their own answer line.
  • A comment records why anchoring matters, so the next edit does not
    reintroduce a floating alternation.
  • Test 8 drops the using-git-worktrees branch of its alternation. That skill no
    longer exists in this repo, and every string matching using-git-worktrees
    also matches worktree, so the branch was fully subsumed — removing it cannot
    change any outcome.

No skill content is touched. This makes the test match the skill that already
shipped, so CLAUDE.md's bar on skill edits does not apply.

Sibling audit

The ticket asked whether other regexes in the file encode superseded designs.
All eight were checked against the current skill and agent definitions:

Test Asserts Verified against Verdict
1 reads/loads the plan SKILL.md step 1, "Read the plan once" current
2 spec compliance before code quality agents/task-reviewer.md, Part 1 then Part 2 current
3 self-review required, does not replace external agents/task-executor.md, "Before Reporting Back: Self-Review" + "You Do Not Dispatch Reviewers" current
4 plan read once, at the start SKILL.md step 1 current
5 reviewer skeptical, reads the code task-reviewer.md, "Do Not Trust the Report"; the alternation already covers the diff-file design via read.*diff current
6 review loops, executor fixes SKILL.md step 5, "repeat until both verdicts are clean" current
8 isolation prerequisite SKILL.md step 1, isolated checkout current; dead alternation branch removed
9 warns against main isolated-workspace.md current

Test 7 was the only assertion encoding a superseded design.

Validation Evidence

Claim: the new assertions accept a correct answer and reject the inline one.
Six synthetic answers fed through the real test-helpers.sh assertions with the
real patterns from Test 7. All six verdicts were as intended:

  [OK]   correct / bare tokens (assert1=0 assert2=0, as intended)
  [OK]   correct / bolded labels, trailing prose (assert1=0 assert2=0, as intended)
  [OK]   stale / pastes task text inline (assert1=1 assert2=0, as intended)
  [OK]   stale / inline AND sent to the plan (assert1=1 assert2=1, as intended)
  [OK]   stale / inline answer, brief named in surrounding prose (assert1=1 assert2=0, as intended)
  [OK]   old pattern reproduces the flake: it passes a correct by-file answer

The fifth case is the acceptance criterion "fails on an answer asserting the
controller pastes the task text inline" — and specifically an inline answer
surrounded by brief-mentioning prose, the shape that used to sneak a pass. The
sixth reproduces the reported flake directly: the old pattern passing a correct
by file answer.

Claim: the test passes on live model runs, and does not depend on phrasing.
bash tests/claude-code/test-subagent-driven-execution.sh run 3x:

RUN 1 exit=0   RUN 2 exit=0   RUN 3 exit=0

all 15 assertions [PASS] in each run, including
[PASS] Requirements handed over as a brief file and
[PASS] Executor is not sent to the plan file.

Claim: the passes are for the right reason, not incidental matching. The
suite prints model output only on failure, so the Test 7 prompt was run twice
standalone with the answer captured. Both samples:

Requirements reach the executor as: a brief file path
Executor must read the plan file: no

each citing SKILL.md Dispatch hygiene, scripts/task-brief, and
agents/task-executor.md. The assertions match the answer line, not the
citation prose.

Claim: lint and syntax clean. bash -n on the file: syntax OK.
scripts/lint-shell.sh (shellcheck over changed shell files): Linting 1 shell files, exit 0.

Claim: the suite is green. bash tests/claude-code/run-skill-tests.sh:

  Passed:  22
  Failed:  0
  Skipped: 9

STATUS: PASSED

exit 0, with test-subagent-driven-execution.sh itself [PASS] (217s) — a
fourth green run of this file on top of the three above. The 9 skips are the
board-api integration tier, which exits 77 ("prerequisites missing") because
$ARKHO_DIR is unset on this machine; the runner counts that tier's 77 as a
SKIP by design, not a failure.

Confusions

FOLLOW-UPS

  • daemon-resume 이중 실행 경합 — 동시 재개가 세션 락에서 영구 대기, 워커 침묵 사망에 메타는 working 잔존 #66 — tests/claude-code/test-subagent-driven-execution-integration.sh
    carries the same superseded design, in a worse form: its prompt instructs
    the session under test to "Provide full task text to subagents (don't make
    them read files)" (lines 139 and 153 — the list is written twice, and the
    prompt.txt copy is dead code that never reaches claude), then the success
    banner at line 319 scores having done so. Not folded into this PR: different
    file, and verifying it needs a full 1800s claude -p execution behind
    --integration, plus a read of the scoring logic this ticket did not audit.

Test 7 asserted the superseded inline-text dispatch: the controller was
said to paste the task's full text into the executor's prompt. The skill
now extracts a per-task brief (skills/subagent-driven-execution/SKILL.md,
'The brief file is the single source of requirements') and dispatches its
path; agents/task-executor.md agrees ('Read the brief first - it is your
requirements'). A correct answer therefore failed.

The deeper defect was that the first assertion was not anchored to an
answer line. grep is line-based, so the sibling assertion
('Executor must read plan file:.*no') only matches when label and answer
share a line, while 'full.*text|paste|include.*prompt' floated free over
the whole response and matched explanatory prose such as 'the brief holds
the full text of the task'. That is why the test passed twice and failed
twice on an unchanged design: the passes never read the answer.

Both assertions now anchor to their own answer line, and the template
names the two artifacts separately - the brief the executor is handed,
and the plan file it is not sent to - so 'by file' and 'no' no longer
read as a contradiction the answerer has to reconcile.

Test 8 drops the 'using-git-worktrees' branch of its alternation: that
skill no longer exists here, and every string matching it also matches
'worktree', so the branch was subsumed and its removal changes no outcome.

No skill content is touched - this makes the test match the skill that
already shipped.

Closes #65
`Executor must read the plan file:.*no` matched the letters "no" anywhere
after the label, so every qualifier containing them passed as a "no":

    "…: yes, but not directly"      -> MATCH (wrong)
    "…: yes (it cannot be skipped)" -> MATCH (wrong)
    "…: yes - it has no brief"      -> MATCH (wrong)
    "…: <yes or no>"                -> MATCH (wrong; the prompt's placeholder)

An executor-reads-the-plan answer — the design error this assertion exists
to catch — therefore passed whenever the model added a clause containing
"not". Anchoring the option to the start of the answer value fixes it:
`:[^a-zA-Z<]*no` tolerates markdown decoration (`**…:** no`) and leading
spaces, rejects `yes, but not…`, and excluding "<" keeps an echoed
placeholder from reading as a choice. Case-insensitivity is unchanged —
test-helpers.sh documents that choice deliberately.

The pattern is now a named variable with a hermetic pre-flight that pins
its verdict on those phrasings, so the assertion cannot silently loosen
again. It shares the variable with the live assertion, so it cannot drift
from what actually runs, and it fails in milliseconds before any model
time is spent.
Anchoring `Requirements reach the executor as:` to its answer line closed
the free-floating-prose leak, but two narrower ones survived, both passing
the test without the model choosing the brief-file option:

    "…: task text pasted into the prompt, not a brief file path" -> MATCH
    "…: <a brief file path or task text pasted into the prompt>" -> MATCH

The second is the prompt's own placeholder: the template names both
options on one line, so a response that restates the requested structure
before answering matched on the restatement.

`:[^a-zA-Z<]*[a-z]* *brief` requires "brief" at the head of the answer
value. One leading word is tolerated, so "a brief", "the brief" and a bare
"brief" all count — far short of the eight words it would take to reach
the losing option's own mention of a brief file path. Excluding "<" from
the run-up drops the placeholder.

A correct answer that names the rejected option ("a brief file path (not
the task text pasted into the prompt)") still passes; the fixture pins
that, so the leak cannot be closed later by banning "paste" outright.
`Self-review replaces external review:.*no` carries the identical
substring trap as Test 7's plan-file assertion — pre-existing, not
introduced by the Test 7 rewrite:

    "…: yes, notionally"  -> MATCH (wrong)
    "…: <yes or no>"      -> MATCH (wrong; the prompt's placeholder)

Same anchor, same fixture rows. This is the last answer-line assertion in
the file with the weakness: `Self-review required:.*yes` and Test 2's
assert_order pair are safe because "yes", "spec…compliance" and
"code…quality" are not substrings of their opposites, and the remaining
assertions match free prose rather than a chosen option.
@SSFSKIM

SSFSKIM commented Sep 15, 2026

Copy link
Copy Markdown
Owner Author

Review trail — PR #156 / ticket #65 (qagent lane, api mode)

Reviewed by run 44, reclaimed mid-wave, completed by successor run 49 on the
same seat. Base main. Reviewed head 193ff63c — which is the head a human
merged at 2026-09-15T16:50:16Z, ~20 minutes after this review pushed it.
The
merge landed exactly what was reviewed: 193ff63c is an ancestor of main and
tests/claude-code/test-subagent-driven-execution.sh on main is byte-identical
to it.

Engine rounds

Native codex engine (gpt-6-astra, effort high), pure correctness review, no
ticket or spec input. Two rounds, one run each, both lens-free — the diff is one
test file, well under the size that warrants a fan-out.

Round Run Lens Base…head Findings
1 r1-1 lens-free sweep origin/main…f9c50f94 none
2 r2-1 lens-free sweep origin/main…193ff63c none

Round 1: "The updated assertions match the current brief-file dispatch contract
and preserve the worktree check." Round 2: "…align with the current brief-file
handoff contract and reject the targeted false positives. Shell syntax
validation and all 18 regex fixtures passed."

Every finding below is therefore mine, from the compliance audit and from
running the artifact rather than reading it.

Compliance audit — PASS

Written before any engine output was read. Anchor: plan=None, so a DIRECT
ticket with a real [gate] pass (board event 431). No body edit between
register (421) and gate (431), so no at-gate reconstruction was needed. Base
equals MANIFEST_REF; the repo carries neither .doperpowers/risk-surfaces.md
nor .doperpowers/repo-facts.md.

  • Ticket substantively ready for the implemented scope — yes. Problem,
    Intent, Shape (3 bullets), Acceptance (3 checks), with the failing assertion
    quoted and the contradicted design cited by file:line.
  • Implementation matches the settled requirements — yes, all three Shape
    bullets. Verified independently of the PR body that
    skills/subagent-driven-execution/SKILL.md step 3 extracts a brief via
    scripts/task-brief and its dispatch-hygiene block calls the brief file "the
    single source of requirements", and that agents/task-executor.md:10,15
    agrees. The design the new assertion encodes is the design the repo ships.
  • Human-grade forks — none. Test-only change; no skill or agent definition
    touched, so CLAUDE.md's skill-content bar correctly does not apply. The one
    scope extension (Test 8's dead using-git-worktrees alternation branch) is
    provably a no-op: that string contains "worktree", so the dropped branch could
    never match anything the surviving branch does not.
  • Executor stopped at forks — n/a, none emerged. The adjacent defect it found
    in a different file was correctly deferred rather than folded in.
  • Closing-artifact cross-check — "## Validation Evidence" present and
    unusually specific. No PROTOCOL BLOCKER, no SPEC FINDING.

Claimed evidence verified by running it, not by reading the claim:

Claim Verdict
bash -n clean confirmed
scripts/lint-shell.sh clean confirmed via the explicit-file form — the bare form reports "No shell files found" from a clean checkout, since it lints the working-tree delta against HEAD. The PR's "Linting 1 shell files" is consistent with running it while the edit was uncommitted, not a false claim.
six synthetic assertion verdicts all six reproduced exactly
test-subagent-driven-execution.sh ×3 green reproduced independently at the reviewed head: 3/3 exit 0, both Test 7 assertions [PASS] each run
run-skill-tests.sh green see the deferred note on suite reliability below

AUDIT NOTES (trail only, never merge blockers):

Findings and routing

# Finding Bin Disposition
1 Test 7's plan-file assertion …:.*no accepts a wrong "yes": no is a substring of not/cannot/nothing, so "yes, but not directly" passed WAVE W1-1 FIXED 0fd6043b, accepted, pushed
2 Test 7's brief assertion passes without reading the answer — an inline answer naming the brief on the same line, and a verbatim echo of the prompt's own placeholder (which contains "a brief file path") WAVE W1-2 FIXED b58e4282, accepted, pushed
3 Test 3's …replaces external review:.*no carries the identical substring trap WAVE W1-3 FIXED 193ff63c, accepted, pushed
4 Test 5's "Reviewer reads code" rejects a CORRECT answer in diff vocabulary — observed, exit 1, aborting the file before Tests 6–9 WAVE W2-1 FIXED eb4e0f62 → rejected on spot-read → re-waved → FIXED ede1b3a0, accepted. Unlanded — see below
5 Test 8's worktree assertion rejects a correct answer that says "isolated checkout" LOG → ticketed no branch left to wave onto; carried to #70

Findings 1–3 were reported from the diff. Findings 4 and 5 were surfaced by
running the file live, not by reading it — finding 4 by the wave-1 regression
run, finding 5 by the wave-3 one.

Waves

Wave 1 — three items, one fixer, three commits, one per item, each touching
only the test file, no board file committed, no attribution lines. All three
graded FIXED and accepted. Rather than patching the regexes inline the fixer
hoisted them into named variables and added a hermetic pre-flight fixture
table
that runs 18 near-miss strings through the same pattern variables the
live assertions use, before any model time is spent. That is a better answer
than the brief asked for: the assertions' contract is now executable and cannot
drift from what actually runs. Pushed f9c50f94…193ff63c.

Wave 2 — one item (finding 4). Fixer replaced the fourteen-branch
verb/noun enumeration with one engagement-verb-then-artifact-noun pattern.
Commit eb4e0f62 produced the first end-to-end green run of the whole file in
this review. Graded and REJECTED on spot-read: the pattern listed review
as an engagement verb, but the prompt asks about the spec compliance
reviewer's attitude, so "review" appears in every answer regardless of
correctness. Paired with a near-certain artifact noun that made the assertion
close to always-true — "The reviewer trusts the executor's report of the code
changes" and "The reviewer signs off on the implementation report without
checking" both passed, and both describe what agents/task-reviewer.md forbids.

Wave 3 — the item's one permitted re-wave, corrected fix-forward in
ede1b3a0 (drop that one verb; judge and against kept, both load-bearing;
the two wrong answers pinned as nomatch fixture rows). Verified independently
against twelve cases including two beyond the brief's set: all correct. Graded
and accepted.

Wave 3's regression run then failed at Test 8 (finding 5) — a different
assertion, a correct answer, the same synonym problem. The fixer began an
off-board rerun chasing it; I stopped that. A green retry would have been the
wrong answer to a phrasing-dependent assertion, and routing new findings is not
the fixer's job.

What did not land, and why

PR #156 merged at 193ff63c while wave 2 was in flight, and its head branch was
deleted. Waves 2 and 3 — the accepted Test 5 fix — therefore had no branch to be
pushed to. Per this protocol a reviewer neither opens its own PRs nor rewrites
published history, so the two graded commits are preserved verbatim on
qa-65-test5-phrasing-followup (tip ede1b3a0, parent 193ff63c, which is
on main; git apply --check confirms the diff applies cleanly to current
main), and ticket #70 carries them plus finding 5 with the cherry-pick
instructions.

This is not a complaint about the merge. AUTO_MERGE is off for this run, so the
protocol's outcome was observation mode — the merge was the human's to make, and
they made it at a head that had a clean engine round, a clean compliance audit
and independently reproduced acceptance evidence. The only consequence is that
two later fixes need a second vehicle.

Deferred findings (recorded here — TECH_DEBT_ISSUE is "none")

  • D1 — PAT_REQUIREMENTS_AS_BRIEF tolerates one word between label and
    option, so a paraphrased correct answer ("the path to a brief file") would
    fail. Never observed: every live sample used the canonical "a brief file
    path". Deliberate — a false negative prints the model's answer and is
    diagnosable, where the false positive it replaced was silent. Widening the
    run-up to four words is safe if the margin is wanted (the losing option needs
    eight to reach its own mention of a brief). Carried to refactor(naming): generalize the execution vocabulary (qa-loops, SDE, executing, Executor Worker) #70's Notes.
  • D2 — the file's default CLAUDE_PROMPT_TIMEOUT=90 killed a run at exit
    124 with a correct answer already emitted. Under set -e that reds the whole
    file for reasons unrelated to any assertion, so run-skill-tests.sh green is
    not purely a function of the regexes. Raising the committed default is a cost
    judgment, left open. Carried to refactor(naming): generalize the execution vocabulary (qa-loops, SDE, executing, Executor Worker) #70's Notes.
  • D3 — the design-level observation, offered rather than asserted: this file
    string-matches free model prose throughout and three of its assertions needed
    phrasing repairs in one review cycle. The fixture table makes each repair
    cheap and permanent, but every remaining free-prose assertion is one unusual
    synonym away from a red run. Whether that is acceptable for a
    description-recall test is a human's design call; recorded in refactor(naming): generalize the execution vocabulary (qa-loops, SDE, executing, Executor Worker) #70, not acted
    on.

Environmental friction

  • E1 — board-bind.sh cannot bind a successor run. After the reclaim of run
    44 and the successor claim of run 49, the seat registry rehydrated fully and
    every ordinary board script resolves the new run, but the bind refuses,
    verbatim:

    error: API mode bind needs BOARD_RUN_ID in env (the dispatcher exports it)
    
    # with run_id/fence supplied from the seat registry:
    error: bind refused for run 49: no run bearer in the environment.
    Confirming this bind would declare
    ec559a61-0453-4e94-aa50-4f17c050abaf.json complete while every later
    resume of the run could not speak as it — let the lease expire and take a
    successor instead.
    

    The refusal is correct and was not worked around. Consequence: no bind event
    exists for run 49, so a needs-human park from a successor run has a weaker
    resume path than one from an original run. Not blocking — board reads and
    writes both worked throughout, including registering refactor(naming): generalize the execution vocabulary (qa-loops, SDE, executing, Executor Worker) #70. Suggested repair:
    hand a successor its bearer the way the original dispatch does; the check that
    proves it is a bind event for the new run appearing after a
    reclaim+successor cycle.

  • E2 — board-search.sh claim-gated for run bearers (arkho#12). See A1.

  • E3 — bearer scoped to the ticket and its direct children. See A3.

  • E4 — headless test sessions fold permission-rule warnings, an
    [claude-code:unrecognized_model] line for model: sol, and a <to-human>
    wrapper into $output. Nothing here turned on it, but it is extra surface for
    a string-matching test to match by accident — the same failure mode dp#51 deferrals + dp#60: meta opener walk, qagent returns, typed claim recovery, truncation guards, render fences (v7.51.0) #65 exists
    to close.

Verdict

The MERGE verdict's three conditions were satisfied at 193ff63c: final
verdict approve with no critical or high finding unresolved; no unresolved
PROTOCOL BLOCKER or SPEC FINDING; no CI checks configured on the branch, which
merges on the review alone. AUTO_MERGE is off, so this review would not have
merged — the record would have read "auto-merge disabled; this is what I would
have merged". A human merged the same head independently, which is the same
outcome by the sanctioned route.

Ticket #65 is finalized done post-merge. Residue rides #70; nothing is
left dangling.

Secondary linked issues: none (ISSUE_LIST = 65).

SSFSKIM added a commit that referenced this pull request Oct 28, 2026
…lease-order

sminos 1.27.8 for this branch's #156 and #158, above main's 1.27.7.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
sminos 1.27.8: queued operator events released in the order said, and named after a leave (#158, #156)
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.

1 participant