Repository navigation
feat: t27_find -- intent to ranked corpus specs, or an honest miss - #14
Merged
Merged
Conversation
Summary by t27-beesThis PR adds Worth a look
Read: 7 files, +133 -1, the whole diff. Head |
The ranking is specs/t27mcp/find.t27 (gHashTag/t27, epic gHashTag/t27#10066), compiled to wasm; find.mjs only writes one manifest row at a time into the instance memory and sorts by the key it returns. - wasm/find.wasm, wasm/find_table.mjs: generated, sha256 in wasm/BUILD - find.mjs: glue (26 lines); server.mjs: the tool entry (8 lines) - smoke.mjs: a hit and a miss against the live manifest Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gHashTag
force-pushed
the
claude/exciting-gauss-9cbc6e
branch
from
October 18, 2026 04:25
328a540 to
26d28eb
Compare
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
New tool
t27_find: an intent in plain words ("clocked counter") returns ranked, existing corpus specs, or an honest miss. This is the first missing step of the validated-code contract (epic gHashTag/t27#10066): look up first, generate last.All the logic is a t27 spec,
specs/t27mcp/find.t27, in gHashTag/t27#10194 (13/13 tests, 0 vacuous, 5 negative controls,dupe_scan --likeclean; evidence is in that PR). Here are only the generated artifacts and glue.Reply shape:
{intent, miss, matched, skipped:{unhealthy,untested}, note, hits:[{path, ..., next:'t27_spec path:"..." source:true'}]}. A relevant spec that is nothealth/ok+has/testsis counted inskipped, never returned. Below the threshold the answer ismiss:truewith no hits (not the nearest neighbour).Files
wasm/find.wasmwasm/find_table.mjswasm/BUILDfind.mjsverdict/rank_key, sortserver.mjst27_findtool entrysmoke.mjspackage.jsonfileslistHand-written added lines: 40 (limit: 40 per file, 80 per PR). No logic in JS: every decision is
verdict/rank_keyfrom the spec.sha256
Built on the Railway lab with t27c 0.5.2 and zig 0.16.0;
smoke.mjspasses.Before / after: 10 lookup questions
Same driver CLI (
t27_specs,t27_grep,t27_spec) for both arms; the "after" arm also listst27_find. Haiku subagents, at most 8 calls, one run per cell. Ground truth was fixed before running. 7 questions have a spec in the corpus, 3 have none (correct answer: NONE). "Seen at" is the call number whose output first showed a ground-truth path.diskbloom/.../duplicate_rules.t27/ NONEHonest reading: no measurable improvement on this set. Strict correctness is 7/10 in both arms; the call counts (54 vs 52) and tokens (-6%) are within what one run per cell cannot separate from noise. Tokens include roughly 50k of fixed overhead per agent.
t27_specswith a path substring already finds the common names in 2 calls.Findings:
t27_findmiss, not a hit. The measured build dropped digits as noise, soSHA-256matchedshaping,sha512,blog-share; the agent rejected them and answered NONE. The "numbers are content words" fix in the spec removes those weak hits (SHA-256is now a miss,sha256hits), butSHA-256with a hyphen still does not hit, andSHA-256 implementationis a miss too. That fix came after the measurement and changes none of the 10 rows above. In the "before" arm the agent did find a real SHA-256 (duplicate_rules.t27) that no name search reaches; my ground truth did not list it, so it is scored wrong here although it is arguably right.specs/tri/graph/topological_sort.t27andspecs/tri/collections/priority_queue.t27arehealth/ok+has/tests, but their tests assert only!= undefined. The agents read the source and said NONE.has/testsis a manifest tag, not a receipt. This is the caset27_validate(next tool in the plan) is for, andt27_findsays so in itsnote.Not in this PR
t27_validate;t27_findtuning (filler words, hyphenated numbers); drop the duplicatedfind/hasin the JSfilterSpecs.Refs gHashTag/t27#10066. Spec PR: gHashTag/t27#10194.
🤖 Generated with Claude Code