Repository navigation
Description
What this is
The keyword-family validity tool (#8864) scored six more languages against tree-sitter on real repositories (Go: prometheus, Rust: tokio, JavaScript: express, TypeScript: vue, Java: retrofit, C: redis). Besides the clear bugs (#8866 bitwise_ops, #8867 Java catch, #8882 Python serialization), these per-language differences are real but each turns on what the family is MEANT to count. Most families already have a written contract in gitgalaxy/standards/signal_contracts.py; the wording is quoted per row so the decision is a reading of the contract, not a fresh definition. Where the contract is draft or silent, the row is a question. Numbers are recall / precision against the oracle's reading of that contract (tests/tools/family_oracle_ts.py).
Correction (2026-11-21): the first version of this table had two rows that were oracle errors, not engine errors, and they are removed: Go state_print_hits (writing to a writer with fmt.Fprintf is not an ad-hoc debug print) and C is_documented (the oracle accepted any comment above; the contract says structured documentation, and against /** */ the family scores 0.96 / 0.86).
| language | family (contract) | recall / precision | what differs |
|---|---|---|---|
| Go | io ("moves data between the program and a system outside its runtime") |
0.33 / 0.62 | os.ReadDir (70 functions), os.RemoveAll (56), os.MkdirAll (46), os.WriteFile (42), os.OpenFile (32) missed |
| Go | time_date_logic ("... duration arithmetic, a formatting or timezone call") |
0.68 / 0.81 | time. package calls missed in 448 functions; the family fires in 479 |
| Go | closures ("syntax that opens an anonymous callable") |
1.00 / 0.36 | fires in 5,076 functions; a function literal is in 1,858. Cause not traced |
| Go, TypeScript | decorators |
n/a / 0.00 | fires in 19 (Go) and 10 (TypeScript) functions where no annotation exists; Go has none |
| Rust | branch |
1.00 / 0.70 | counts a branch in 2,176 functions, a parser sees 1,533 (the ? operator? if let?). Cause not traced |
| Rust | time_date_logic |
0.12 / 0.92 | Duration:: (249 functions), Instant:: (154), SystemTime:: missed |
| Rust | io |
0.49 / 0.25 | TcpListener::bind, OpenOptions::new, TcpStream::connect, stdin/stdout missed; fires in 253 functions where the oracle sees 129 |
| Rust | panics_and_aborts ("... an unreachable marker, a fatal-error, ... or process-exit call") |
0.78 / 0.76 | unreachable! (48 functions), exit (20), unimplemented! missed: the contract names the unreachable marker |
| Rust | thread_sleeps ("a sleep, a timed wait, a timeout-driven deferral") |
0.36 / 0.84 | sleep (48), time::sleep (42) missed; thread::sleep is caught |
| Rust | closures |
0.52 / 0.98 | half of the closures missed |
| TypeScript | regex_execution ("a match, substitution or split operator, a regex constructor or compile/exec call") |
0.63 / 0.87 | regex literals (23 functions) and .test (38) missed |
| TypeScript | time_date_logic, io |
1.00 / 0.02, 1.00 / 0.21 | the family fires in 64 / 19 functions; a parser sees 1 / 4 |
| TypeScript, JavaScript | doc ("structured documentation meant to be parsed by IDEs or generators") |
1.00 / 0.25, 1.00 / 0.02 | the family fires in 119 (TS) and 84 (JS) functions where a /** */ comment is in 30 and 2: it appears to count any comment |
| Java | time_date_logic |
0.38 / 1.00 | System.nanoTime (17 functions), TimeUnit. (9) missed |
| Java | io |
0.00 / 0.00 | fires in 44 functions where a parser sees a file or network call in 1 |
| C | io |
0.77 / 0.85 | close (34 functions), mmap, fgets missed |
| C | time_date_logic |
0.52 / 0.65 | bare time( calls (35 functions) |
| C | panics_and_aborts |
0.98 / 0.48 | the family fires in 257 functions, a parser sees 125: it appears to count assert (1,004 sites), which the contract does not name. Decision: is an assertion an abort? |
Contract-answerable rows (Rust unreachable!, Go and Rust time_date_logic, TypeScript regex literals) can be fixed once timed; the rest need the maintainer's reading of the contract, in #8862.
Part of #8863.
Activity
Rust unreachable!/unimplemented! and bare time types, Go time.Date/Un…
Rust bare exit, sleep and named-type io forms follow their contracts …
Go io counts os.OpenFile/WriteFile/ReadDir/Mkdir/Remove/Rename/Stat, …
C and C++ io count libc transfer calls: fgets, mmap, pread, recvfrom …
TypeScript and JavaScript regex_execution count .test/.exec/matchAll/…
Java io counts the I/O operation, not a mention of an I/O type (Part of
Go time_date_logic no longer counts time.Sleep (owner decision, Part of
Re-bless golden masters on the merged base (Part of #8868)
Family validity: worker skill, re-measure skill, checklist and red-ce…
Re-bless golden masters after merging main again (Part of #8868)
Update the tests that encoded the old time/sleep behavior; re-bless t…
#8868 Batches A, B and C: Go/C/Rust/JS/TS rules count what their cont…
Re-bless goldens for JavaScript closures (Part of #8868)
Family-validity baseline: JavaScript closures cell re-measured (Part of
JavaScript closures: skip the unit's own name = function header, coun…
Go decorators oracle: read //go: pragmas above and struct tags inside…
JavaScript doc oracle reads a doc above export, declaration, property…
Rust oracle reads the ? operator as a branch: the last #8868 decision…