Skip to content

spec(t27mcp): spec_brief -- brief spec row fields and why a spec fails (Closes #10090) - #10092

Merged
gHashTag merged 1 commit into
mcp-t27-examplesfrom
mcp-t27-brief
Oct 17, 2026
Merged

gHashTag merged 1 commit into
mcp-t27-examplesfrom
mcp-t27-brief

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #10090

Part of the epic #10066 (learnability: fewer tokens and round trips for cheap models). Stacked on #10083 (mcp-t27-examples), which stacks on #10080.

What

specs/t27mcp/spec_brief.t27 (module T27mcpSpecBrief): two decisions of the t27 MCP server (gHashTag/t27-mcp) that were hand-written JavaScript.

  • BRIEF_FIELDS / ONE_FIELDS: which manifest fields a short spec row keeps (t27_specs rows and t27_spec). Emitted by t27c gen-js; the server copies those keys and nothing else.
  • why_mask(is_fail, nodes, nfailed, tc, loss): why a health: "fail" spec fails, as a bit set (W_NOT_PARSED, W_BACKEND, W_TYPECHECK, W_LOSS, W_UNKNOWN). A spec that is not failing gets 0. WHY_TEXT holds one template per bit; {} is the count or the backend list the server fills in.

specs/OWNERS.md extends the t27mcp/ row.

Evidence (Railway lab, t27c 0.5.2)

  • t27c test-report specs/t27mcp/spec_brief.t27: 5 of 5 pass, 0 vacuous.
  • Negative controls: a spec that is not failing has no reason; a failing spec with no counter is W_UNKNOWN alone. With the not-parsed rule inverted, 3 of 5 tests fail.
  • t27c gen-c plus zig cc -target wasm32-wasi lowers it to a 185-byte wasm; the commands and sha256 are in wasm/BUILD of the server PR.
  • The reasons the wasm gives equal the JavaScript it replaces on all 2402 specs of the published manifest (113 failing, 0 differences).

Known limit

.len on a const table is constant-folded: a test that asserted table lengths ran 0 runtime asserts and was reported vacuous, so the spec checks the bit set through why_mask instead of table lengths.

🤖 Generated with Claude Code

…bit set for the MCP server

Closes #10090. Part of #10066.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@gHashTag
gHashTag merged commit eb09d19 into mcp-t27-examples Oct 17, 2026
24 of 28 checks passed
gHashTag added a commit that referenced this pull request Oct 18, 2026
#10083 and #10092 were merged into their stacked base branches
(mcp-t27-check, mcp-t27-examples) after #10080 had already landed,
so neither spec reached master. This carries the two specs and the
OWNERS row unchanged from mcp-t27-examples.

Closes #10081
Closes #10090

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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