Skip to content

Commit 64563f3

Browse files
olwangclaude
andcommitted
docs(selfhost-ledger): record Step 2 batch 3 (signature table + RS0022)
Milestone 2j: cross-function signature table (same-file async fn collector + membership call-resolution helper) and RS0022 (async-call-not-consumed), green at 619/619 (25 codes). Document the four measured SKIPs (RS0013/RS0201/RS0202/ RS0036), all blocked on type inference / callee-signature resolution — none on borrow analysis. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent c0e7894 commit 64563f3

1 file changed

Lines changed: 46 additions & 6 deletions

File tree

docs/ledgers/rss-selfhost-ledger.md

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,12 +1051,52 @@ gap is VM value-representation / intrinsic-dispatch cost (the next big lever).
10511051
no_panic body violations — RS0009-style call scan). `CHECKER_TARGET_CODES` = **24
10521052
codes**; `checker_parity_corpus` byte-exact **619 files, 0 mismatches, 0 run-failures**.
10531053
Commits 240ce274/9715367f/78012146/3ad62a2b/be6fa09d.
1054-
- **THE TOKEN-DECIDABLE TIER IS ESSENTIALLY EXHAUSTED (24 codes).** SKIPPED because they
1055-
need type inference / callee-signature resolution / borrow analysis (measured, not
1056-
ducked): RS0201 (unnamed-arg — needs callee visibility+kind), RS0013 (invalid-try —
1057-
operand/error-type inference), RS0022 (async-not-consumed — callee is_async), RS0036
1058-
(payload transferability), RS0202 (missing-data-effect — callee param-effects); RS0038
1059-
(char-literal) has 0 corpus fixtures. THE REMAINING BULK (~260 corpus files when ALL
1054+
- **Diagnostics (step 2, milestone 2j — signature table — DONE, 2026-07-03):** built the
1055+
cross-function **signature table** as the batch's infrastructure: a pre-pass over the
1056+
token stream that records, per top-level `fn`, its cross-call attributes (started with
1057+
same-file `async fn` names, collected by extending `collect_rs0009`'s fn walk; the
1058+
call-resolution helper is a membership probe against these name sets, since same-file
1059+
fns register only under their unqualified simple name). Landed the one candidate that is
1060+
purely signature-table-decidable: **RS0022** (ASYNC_CALL_NOT_CONSUMED) —
1061+
`has_unconsumed_async_call` flags a call resolving to a same-file async fn that is not
1062+
the immediate `await`/`spawn` operand nor an `async let` RHS (mirrors
1063+
`check_async_call_consumed`); there are **no async builtins**, so qualified/receiver and
1064+
stdlib calls never resolve to an async signature and a token-adjacency probe is exact
1065+
over the corpus (verified against all ~30 async-fn corpus files: every same-file async
1066+
call is consumed via `await`/`async let`, only the RS0022 fixture is unconsumed).
1067+
`CHECKER_TARGET_CODES` = **25 codes**; `checker_parity_corpus` byte-exact **619/619,
1068+
0 mismatches, 0 run-failures**. Commit c0e7894b.
1069+
- **The other four batch-3 candidates were MEASURED and SKIPPED (blocked on the batch-4
1070+
engine, not ducked):**
1071+
- **RS0013** (invalid-try) — the return-root sub-rule (`?` in a fn whose return root is
1072+
not Result/Option) IS signature-decidable and was implemented, but it is **not
1073+
corpus-green on its own**: two fixtures flag RS0013 *inside* Result-returning fns —
1074+
`try-operator-non-result-value.rss` (operand `load()` returns a struct → `#1`
1075+
`check_try_value_is_result`) and `try-operator-error-type-mismatch.rss` (operand's
1076+
Result error type ≠ the fn's → `#2`). Both need **operand/error-type inference**, so
1077+
the return-root rule alone produces false negatives. Reverted. → **needs type
1078+
inference**.
1079+
- **RS0201** (unnamed-arg) — an unnamed arg is allowed only for receiver-call shorthand,
1080+
private same-file unqualified fns, and constructor field-shorthand; everything else
1081+
(public fn, core/builtin qualified call, variant, constructor) requires named args.
1082+
The corpus fixtures fire on qualified core calls (`String.concat("prefix", …)`,
1083+
`Image.save(read image, …)`), which need the **full builtin/core signature table** to
1084+
know the callee resolves-and-requires-named, plus qualified-vs-receiver
1085+
disambiguation and constructor field names. → **needs type/callee resolution**.
1086+
- **RS0202** (missing-data-effect) — needs each callee param's declared effect AND a
1087+
**Copy/non-Copy type model** (scalars don't require effects) AND receiver type
1088+
inference (`mut cache.put(key: "x")` must resolve `cache: Cache`). The fixtures are
1089+
core/receiver/generic calls (`Image.resize`, `Db.close`, `ResourcePool<…>.borrow`).
1090+
**needs type inference**.
1091+
- **RS0036** (payload-not-transferable) — needs message-payload Send/transferability
1092+
analysis. → **needs type inference**. RS0038 (char-literal) still has 0 corpus
1093+
fixtures.
1094+
- **THE TOKEN-DECIDABLE TIER IS EXHAUSTED; the cross-function signature table adds exactly
1095+
RS0022 (25 codes total).** The remaining candidates SKIPPED because they need type
1096+
inference / callee-signature resolution (measured, not ducked): RS0201, RS0013, RS0202,
1097+
RS0036 (all above). None is blocked on *borrow* analysis specifically — they are all
1098+
type-inference / callee-resolution gaps (the #3 borrow/ownership engine is a separate
1099+
need, seen in RS0301-0313/RS06xx/RS07xx below). THE REMAINING BULK (~260 corpus files when ALL
10601100
~100 codes are targeted → 305 mismatch): RS0207/0208/0209/0210 (type/return/control-
10611101
flow/operator mismatch), RS0301-0313 + RS06xx + RS07xx (ownership/borrow), RS0015
10621102
(unsupported-syntax), RS0101 (feature-gating), RS0025/0026 (unknown-field/binding).

0 commit comments

Comments
 (0)