Skip to content

Commit 53a9fd3

Browse files
olwangclaude
andcommitted
docs(selfhost-ledger): record milestone 2k (RS0101 done, 26 codes) + RS0015 scope
RS0101 landed byte-exact 619/619 (token-decidable feature-gating, not the type-inference bulk 2j mis-filed it as). RS0015 scoped: ~24/33 fixtures token-decidable, ~9 need constructor/variant resolution or expression parsing; all-or-nothing single code, so left OUT of CHECKER_TARGET_CODES for the semantic-frontier phase. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7fd0ce1 commit 53a9fd3

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

docs/ledgers/rss-selfhost-ledger.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,50 @@ gap is VM value-representation / intrinsic-dispatch cost (the next big lever).
11031103
These require a self-hosted TYPE-INFERENCE + BORROW-CHECKER engine — the whole semantic
11041104
frontend — which is the genuine next phase (its own multi-session effort), NOT more
11051105
token predicates.
1106+
- **Diagnostics (step 2, milestone 2k — DONE, 2026-07-03):** **RS0101** FEATURE_VIOLATION.
1107+
The 2j summary mis-filed RS0101 with the type-inference bulk; it is in fact
1108+
**token-decidable** (feature-keyword-vs-header), so it landed cleanly. Reproduces all
1109+
three oracle sources: (1) `checks/features.rs` feature_uses — a construct whose required
1110+
feature is absent from the header: `local` (WORD_LOCAL let/closure, `manage`, `take`
1111+
data-effect, `ResourcePool<T>`), `unsafe` (`effects(unsafe)`), `async` (`async`
1112+
modifier + `spawn`/`await`/`task_group`/`select`); (2) `signatures.rs::check_native_effect`
1113+
— a `native fn` missing `effects(native)` fires **regardless** of the declared features
1114+
(so native is tracked in the fn walk, not gated); (3) `body/semantics.rs::check_match_pattern_effects`
1115+
`match take` w/o local (subsumed by the `take` probe). KEY false-positive hunts (the
1116+
dangerous direction): the `async` EFFECT name in `effects(io,…,async)` is a REMOVED
1117+
runtime effect (RS0012), NOT an async construct — the `async` modifier is gated on the
1118+
next kw being fn/let/for; `take` is distinguished from `.take(` (method) and a `take:`
1119+
binding; reserved feature keywords (`local`/`async`/`unsafe`) only appear in a `features:`
1120+
header when DECLARED, so a header token self-gates. `declaredFeatures` is an
1121+
order-independent pre-pass; reuses `effects_name_probe` (new mode 2 = native effect) and
1122+
`fn_is_native`. Self-hosting corner correctly handled: `astdump.rss` (10 `local` stmts, no
1123+
header) is a corpus file the oracle flags RS0101 standalone, and the checker matches.
1124+
`CHECKER_TARGET_CODES` = **26 codes**; `checker_parity_corpus` byte-exact **619/619, 0
1125+
mismatches, 0 run-failures**. Commit 7fd0ce16.
1126+
- **RS0015 UNSUPPORTED_SYNTAX — SCOPED, left OUT (2026-07-03).** RS0015 is a SINGLE code
1127+
fired if ANY malformation is present, so the SET is all-or-nothing: a partial port turns
1128+
every un-handled trigger into a false negative on its fixture, so it cannot reach
1129+
0-mismatch without covering ALL 33 fixtures. **~24 of 33 are token-decidable** (structural
1130+
token scan): unclosed-call/function-body (unbalanced), malformed-{type,function,field,
1131+
parameter,empty-parameter,call-argument,empty-call-argument,type-argument,generic-parameter,
1132+
match-arm,effect,with}-declaration (the effects ones are ALREADY detected via the ported
1133+
`effect_item_kind`==0), unsupported-with-syntax, malformed-binding (`let x =` empty RHS),
1134+
duplicate-import-name, unknown-top-level-item (`enum`), namespace-declaration,
1135+
reserved-double-underscore-name (`__` prefix), opaque-type-with-fields (opaque + body),
1136+
protocol-default-method-body (protocol method w/ body), native-body-unsupported (native fn
1137+
w/ body), spawn-not-executable (`spawn` kw), unsupported-derive (known-derive set).
1138+
**~9 need real parsing / name resolution** (NOT token-decidable): none-call-form (`None()`),
1139+
none-with-payload (`None(1)`), option-type-called-as-variant (`Option(1)`),
1140+
result-type-called-as-variant (`Result(1)`), variant-named-payload (`Ok(value: 1)`) — all
1141+
need constructor/variant name+arity resolution; trailing-expression-token (needs
1142+
expression-extent parsing to know where an expr ends); const-non-literal-initializer
1143+
(literal-vs-expression classification of the const RHS); malformed-generic-parameter (the
1144+
`T: Unknown` bound is semantic; only the `<read T>` half is decidable); malformed-control-
1145+
statement (else-without-block / `while {` / `match {` need statement-grammar parsing). Since
1146+
the 9 require the same semantic/expression engine as the deferred SH-025 malformed-recovery
1147+
tail, RS0015 stays **OUT of CHECKER_TARGET_CODES**; it is planned for the semantic-frontier
1148+
phase alongside RS0207-0210 / RS0301-0313 / RS0025-0026. RS0025/RS0026 have 0 corpus
1149+
fixtures (skip, as noted in 2j).
11061150
- **Lexer spans (step 3):** added a `len` field to the shared `Tok`
11071151
(= consumed source span `j-i`, matching the Rust lexer's `index-start`) and made
11081152
`lexer.rss` emit the real `<line>:<col>:<len>` prefix. `lexer_parity_corpus` is

0 commit comments

Comments
 (0)