Skip to content

TDD 0065: parent-session light-tier check (FR-86) - #184

Merged
cahenesy merged 4 commits into
masterfrom
build/20261005-174458/0065-parent-session-model-check
Oct 5, 2026
Merged

cahenesy merged 4 commits into
masterfrom
build/20261005-174458/0065-parent-session-model-check

Conversation

@cahenesy

@cahenesy cahenesy commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Implements TDD 0065 (PRD f6ef178, ADR 0015). Second in the stack; 0064 is already merged, so this targets master.

What changed

  • New tl_fr86_message in scripts/lib/models.sh returns one of three results:

    • nothing, when the parent session is above the light tier;
    • a warning that the parent is on the light tier;
    • a "could not be read ()" warning.

    There is no web fetch and no "most capable" comparison.

  • New check in /prd-author, /tdd-author and /build-tdds. Each skill gets the same <!-- tl:fr86-check --> block, byte for byte, with Continue/Stop prose and fail-closed sourcing. In /build-tdds it is a new ## 1a section, before the lock.

  • New tests/parent-session-check.test.sh (68 checks). It extracts each skill's block and runs it in a clean env -i shell, the way the harness does. A test that only greps the text missed exactly this in the earlier 0064 build. In a scratch copy with the models.sh source line removed from one block, 11 checks failed.

  • Test-gate change. tests/implement-gate.test.sh now fails when a registered eval is missing, where it used to skip it silently (L-011).

  • Version 3.46.0 → 3.47.0, with a matching releases.json entry.

Gates

Gate Result
test-first PASS (b3f5526 test(failing) → c7ecdfc feat; red on master: 27 fail)
ci-checks PASS (parent-session-check 68/0, model-roles 87/0)
runtime-verify (sonnet) PASS — 8/8 checks, independently extracted and run; the real /build-tdds block on this session printed nothing
review (opus) PASS — no blockers or majors

Follow-ups from review (not blocking)

  • Minor: control bytes can reach the terminal. A light-tier model id is printed as-is, so ESC/BEL bytes from a transcript would reach the user. Risk is low, since the harness writes the transcript. The fix is to sanitize the id to [A-Za-z0-9._:@/+-] and cap its length.
  • Minor (design): the check runs after the draft question. In /prd-author and /tdd-author the check comes after step 0's Resume/Discard question, so Discard followed by Stop has already removed the draft. The TDD put it there; a revision should move the block before step 0.
  • Nits:
    • If both plugin roots are empty, the block sources /scripts/.... It fails closed, but the error message isn't clean.
    • One observation-number cross-reference in the TDD points at the wrong observation.

Merge note

Merge with a regular merge, not squash, so 0066 stacks cleanly. Don't run claude plugin update until 0066 is merged.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ki3TDnP2bNqqpEkFoZaEXq

cahenesy and others added 4 commits October 5, 2026 14:10
Add tests/parent-session-check.test.sh: extracts the first fenced bash
block after `<!-- tl:fr86-check -->` from /prd-author, /tdd-author and
/build-tdds and runs it as the harness does (env -i, `bash <block>`, no
args, nothing pre-sourced) against fixture transcripts and a Grok
summary.json. Pins observations 1-8 of the TDD 0065 Verification plan:
byte-identical blocks, silent above the light tier, the exact light and
unreadable warning lines, fail closed on an unusable plugin root,
Continue/Stop/fail-closed prose after the block, and no vendor-page
fetch text. A missing marker, block or skill file is an infra FAIL.

Register it in the implement-gate aggregator; a registered eval that is
missing now fails instead of being skipped (L-011).

Red: no skill carries the marker and models.sh has no tl_fr86_message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Ki3TDnP2bNqqpEkFoZaEXq
Add tl_fr86_message to scripts/lib/models.sh (FR-86). It calls
tl_parent_model once and reuses tl_model_tier: a readable parent above
the light tier prints nothing; a light-tier parent prints one line
naming the id; an unreadable parent prints one line carrying the
reason from tl_parent_model's stderr (`unknown` when none). rc 0 in all
three cases, rc 2 only when the library itself is unusable. No network
and no capability comparison (ADR 0015).

/prd-author (after step 0), /tdd-author (after the resume check) and
/build-tdds (new step 1a, before the lock) carry the same
`<!-- tl:fr86-check -->` block: it sources plugin-root.sh and models.sh
itself, fails closed if either cannot be sourced, and calls
tl_fr86_message in that same shell, so it works when the harness runs
it as a fresh shell. The prose after it asks Continue / Stop on a
printed line and stops on a non-zero exit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Ki3TDnP2bNqqpEkFoZaEXq
@cahenesy
cahenesy merged commit 1c841c5 into master Oct 5, 2026
1 check passed
@cahenesy
cahenesy deleted the build/20261005-174458/0065-parent-session-model-check branch October 5, 2026 19:01
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