Found by driving the compiled log-watcher's third path — the MCP server. It now
answers real JSON-RPC over HTTP: initialize returns protocolVersion/serverInfo,
tools/list returns the full tool list (1049 bytes of generated JSON), and an
unauthorized request gets 401 {"error":"unauthorized"}. corpus 71/0, woc 565/0,
wovm gates green.
- lexer: `\r` and `\0` escapes. Without `\r` a program cannot write CRLF at
all — the server's `index_of(buf, "\r\n\r\n")` was searching for a literal
backslash-r, so it never found a header terminator and hung on every request
- parser: an interpolated sub-expression now mints node ids from the OUTER id
space. A fresh sub-parser started at 1, so `${...}` nodes collided with the
file's own nodes — and every side table (drops, moves, rc, masks, f_decl) is
keyed by node id. Surfaced as WO-E404 "ownership table names `headers`,
which has no register"; silent misattribution otherwise
- types.ml: `net.Conn` is a reserved SCALAR type (a file descriptor). It was
falling through as "some user class", i.e. WO_K_OWNED, so the frame would
DROP an integer at scope end
- types.ml: confident_typ knows `..` yields Text. Interpolation desugars to a
Concat chain, so without it every interpolated value looked underivable —
which is why the `+`-on-Text check missed two live sites in the workload
- `m[k]` on a map is now the OPTIONAL read (nil for a missing key), while
`get(m, k)` stays the asserting one that traps KEY. That is what makes
`let v = m[k]; if v != nil` — the workload's header lookup — work.
trap/missing-map-key now pins `get(...)`, and the surface doc records the
split
- json.encode of a `json.Value` emits it verbatim (kind 255): an echoed id was
coming back as "1" instead of 1
- disasm: TRY/ENDTRY render instead of ?OP32/?OP33
- status board: the push-of-a-borrowed-Text gap is now recorded with the
concrete failure it produces (tools/call tail_log), plus the leaked
temporary-record shell found in the same disassembly
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
21 lines
911 B
Text
21 lines
911 B
Text
-- Runtime residual check: `get` on a `map` with a key that isn't present
|
|
-- traps KEY (docs/plan/oop-vm/08-builtin-surface.md's `get` row: "a
|
|
-- missing key traps KEY"). Unprovable at compile time -- the key is a
|
|
-- runtime `Text` value -- so it traps rather than failing to compile:
|
|
-- the hybrid boundary's runtime half.
|
|
--
|
|
-- Written as `get(...)` on purpose: the two map reads differ. `get(m, k)`
|
|
-- ASSERTS the key is there and traps KEY when it isn't (this fixture);
|
|
-- `m[k]` is the OPTIONAL read and yields nil for a missing key, which is
|
|
-- what makes `let v = m[k]; if v != nil { ... }` the ordinary lookup idiom
|
|
-- (the driving workload's own header lookup). Before 2026-08-14 both
|
|
-- spellings trapped, and this fixture used the sugar.
|
|
class Catalog {
|
|
prices: map<Text, Int>
|
|
}
|
|
|
|
fn main() {
|
|
let c = Catalog { prices: map_new() }
|
|
set(c.prices, "mug", 499)
|
|
print_int(get(c.prices, "shirt"))
|
|
}
|