Skip to content
This repository was archived by the owner on Aug 12, 2026. It is now read-only.

Commit d169c01

Browse files
committed
/survey: a grep that finds something has not shown you all of it
Third instance today of one shape -- reading a truncated view and treating it as the whole. The first two were greps whose [a-z_] class silently excluded digits, and /survey already carries that. This one is the other half, and it was the expensive one: void *, wasmtime_context_t *, uint32_t); was printed for a callback typedef and read as the signature. The return type, wasmtime_error_t* rather than void, was on the line above and outside the window. Declaring the upcall void made wasmtime read a garbage register as an error pointer and crash *after* the callback had run correctly, so every probe printed success and the search went to ownership of an unrelated pointer for two turns. So the rule now says both halves, and adds the specific one that earned it: before binding a C function through FFM, read its whole declaration from the file rather than from a match. A wrong descriptor's symptom is a native crash with no Clojure frame in it, and the cost of being sure is one Read. Prose rather than machinery, and in the file that already carries the adjacent rule, because there is nothing here to mechanize -- checking a descriptor against a header automatically would mean parsing headers. Claude-Session: https://claude.ai/code/session_01XF5Hfq4Ca2N2XYEzWQQuHt
1 parent 99fa006 commit d169c01

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎.claude/skills/survey/SKILL.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,24 @@ character class, or search for the surrounding prose rather than the
7878
identifier. This is the cheap half of the constraint already in
7979
`.claude/CLAUDE.md`: *ask what a negative result was incapable of showing you.*
8080

81+
**A grep that finds something has not shown you all of it either.** The same
82+
day, a survey printed
83+
84+
```
85+
void *, wasmtime_context_t *, uint32_t);
86+
```
87+
88+
for a callback typedef and the parameters were read as the signature. The
89+
return type — `wasmtime_error_t *`, not `void` — was on the line above, outside
90+
the window. Declaring that upcall `void` made wasmtime read a garbage register
91+
as an error pointer and crash *after* the callback had run correctly, so every
92+
printed probe said it worked.
93+
94+
**Before binding a C function through FFM, read its whole declaration** —
95+
return type included — from the file, not from a match. A wrong descriptor's
96+
symptom is a native crash with no Clojure frame in it, and the cost of being
97+
sure is one `Read`.
98+
8199
## Two failure modes specific to surveying
82100

83101
The general ones — no local paths, siblings' conclusions don't transfer — are

0 commit comments

Comments
 (0)