Repository navigation
Description
The T27 Ladder (loopback 3131, launchd job ai.t27.ladder) is served by a hand-written Node file kept outside the repository. specs/t27os/ladder.t27 holds only decision functions and constants (its header law 4 calls the endpoint "node plumbing"), and t27c gen-js specs/t27os/ladder.t27 prints 45 lines with no listener, no upstream call and no request handling. So a merged ladder spec (t27#13034, PR 13035, merged 2026-11-01) changes nothing in the running service: /health still lists the old rungs, and the old file imports no generated module. The PR text that said the glue is "regenerated with t27c gen-js after merge" names a step that does not exist.
The t27-native stage-2 router has the pieces up to the socket (router_sock.t27 bind bytes, router_serve.t27 request line and heads, t27#10782) and says the accept loop "rides later". This issue is that loop for the Ladder, so the running service can be built from specs and the hand-written file can be deleted.
Boundary
- specs/t27os/ladder.t27
- specs/t27os/ladder_serve.t27
- specs/t27os/router_serve.t27
User Scenarios
- Given a merged change to the rung table in
ladder.t27, when the maintainer regenerates and restartsai.t27.ladder, then/healthlists exactly the rungs the spec names and no hand edit of any JS file was needed. - Given a request to POST
/v1/chat/completionson 127.0.0.1:3131, when every rung refuses, then the 503 body names every tried rung and its class, as law 3 of the spec says. - Given a rung with no key wired, when the walk reaches it, then no network call is made and the rung is recorded as unwired (law 8).
Requirements
- FR-001:
ladder_serve.t27MUST own the accept loop, the request parse, the per-call 90000 ms timeout and the walk over the rung table ofladder.t27, and MUST compile witht27cand test witht27b. - FR-002: The serve loop MUST bind 127.0.0.1:3131 only and MUST answer GET
/healthwith the rung names read from the spec's table, not from a copy. - FR-003: The serve loop MUST keep the sticky start and the hedged first two rungs that the running service has today, and MUST add no new foreign-language file.
- FR-004: Keys MUST be read from the Keychain account names of the key master, and no key value MUST appear in a log line, a test or a report.
- FR-005: The change MUST land spec-only plus generated output; the hand-written file MUST be retired by deletion once
/healthand one 200 control request pass on the new service.
Success Criteria
t27b test specs/t27os/ladder_serve.t27exits 0 with 0 vacuous passes./healthof the new service lists 0 rungs named deepseek.- One control request through 127.0.0.1:3131 returns 200 within 120000 ms.
git diff --statof the landing PR shows 0 added lines in any.js,.mjs,.pyor.shfile.
Activity
gHashTag commentedon Nov 1, 2026
Stage-1 snapshot of the candidate (reviewer note; the lane owns the file, nothing is switched).
specs/t27os/ladder_serve.t27in the lane worktree, sha1 prefix803af45e918a, 18 tests, not pushed yet (no branch on origin, no PR at 07:07Z).~/t27/target/release/t27c test-report specs/t27os/ladder_serve.t27: tests 18, pass 16, FAIL 2, rate 88.9%, vacuous passes 0 of 16, exit 1.~/t27/target/release/t27b test specs/t27os/ladder_serve.t27 --check --quiet: runtime asserts 139, 16 passed, 2 failed, exit 1.the_head_end_and_the_content_length_are_read_in_any_case: assert at line 622 (he + 15 == req.len).thinking_goes_off_on_the_zai_head_unless_the_client_asked: index out of bounds at line 363 (body[cut_b .. inner_b], end of a slice of str).What this means for the running Ladder: nothing changed.
/healthon loopback 3131 at 07:05Z still lists the rungs zai, ollama, deepseek withlastGood 0; the log showsrung=0 status=200from 06:36 to 06:38Z and no request since, so the 200s are upstream recovery and the silence is idleness, not a fix. The serve loop becomes a candidate for the owner's switch decision only when both tools exit 0 with 0 vacuous passes on the pushed head; the switch itself and any edit of the runningladder.mjsor its launchd plist need the owner's separate word. Rollback for that step is the committed launchd plist plus the untracked currentladder.mjscopied aside before the switch; the.bak-20261027file is older than the running version and is not a rollback.spec(t27os): ladder_serve, the t27-native serve loop of the Ladder (R…
spec(t27os): ladder_serve, the t27-native serve loop of the Ladder (R…
spec(t27os): ladder_serve, the t27-native serve loop of the Ladder (R…
gHashTag commentedon Nov 17, 2026
Spec created: specs/tri/ladder.t27 (typecheck OK, 1 test passes).