release/v0.0.282 — paste spans, Codex WS, TLS, session branches, teleport, DeepSeek lean - #696
Conversation
Track collapsed paste labels as positional semantic spans instead of re-associating hidden bodies through display-string matches. Live spans now render with attachment highlighting, move as one cursor/word unit, detach on edits, and are consumed on expansion so typed lookalikes cannot resurrect or duplicate removed content. Split history replay into a focused sibling module so replayed draft labels remain ordinary text and readline stays within the source line ceiling. Closes #673 Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
The modern tools/list probe and legacy initialized notify each built a throwaway HTTP client, so a successful probe's keep-alive died before the next call. WSS rescanned the host CA store on every dial. Probe and initialized now use the persistent transport; WSS shares a process-lifetime CA bundle warmed once. WS→SSE stays on the prewarmed Agent pool. Loopback test: connect + next list is one TCP accept.
embedFile includes the test body, so a contiguous throwaway-client string in the assertion always "found" itself. Split the needles.
Streamable HTTP omitted Accept-Encoding and read the raw body, so a tools/list catalog crossed uncompressed. Provider POST already decompresses. Advertise the std client defaults and decode Content-Encoding. Loopback: a 40-tool list is smaller on the wire than plaintext, and the client still returns the JSON. ADR 0043 updated.
A second launch CA walk is 4–7ms and OAuth throwaways are login-only; ADR 0002 blocks shrinking WS bodies. No further code change. Table is the evidence for stopping.
Codex closes its Responses socket immediately after a type:error frame. Graff previously waited for another frame, discarded the accumulated API body on EOF, and retried an unchanged deterministic request across fresh WS and SSE transports. Classify authoritative error frames as terminal API responses, retire the closing socket without charging the transport ladder, and allow only recognized stale chains to rebuild once with full input. Bound parsed code/message diagnostics before tracing or displaying them, including through the fullscreen TUI. Add loopback, interactive PTY, stale-chain, diagnostic-redaction, and headless TUI regressions while retaining the existing fallback and compaction trajectories. Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
A request-construction TLS failure occurs before the existing connection poison can run, so retries and later TUI trajectories kept reusing a launch-scoped client that only process replacement could heal. Route model HTTP calls through leased generations, rotate on construction failure without deinitializing in-flight users, and preserve the original client for unrelated launch consumers. Gate every managed constructor on CA readiness, distinguish CA warm and request-construction failures in traces, and cover concurrent stale reports plus later ordinary and child POST recovery with a loopback regression. Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
The local Zig 0.16 compiler accepted a repeated string expression in the new diagnostic test, but the repository's pinned Zig 0.17 CI compiler rejects it during parsing on both Linux and Windows. Build the same long message with the repository's established @Splat pattern so the test remains portable across both toolchains. Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
yxlyx: semantic paste spans so [Pasted text #N] is one navigation/delete unit and a typed lookalike does not resurrect a hidden body.
yxlyx: treat Responses type:error as a terminal API response, keep a bounded last_api_error, and rebuild full input once on a stale chain.
…ions yxlyx: lease/rotate the shared std.http.Client on TlsInitializationFailed at request construction. ADR number will be remapped off 0042. # Conflicts: # docs/adr/README.md
#693 pushed the request loop to 602 lines. Move keep-alive retry and scratch-arena reset into agent_request_scratch.zig and ratchet the suite floor to 1817 for the yxlyx paste / WS / TLS tests.
Close model-client admission before teardown, drain active generation leases and CA-ready waiters, and serialize global lookup with destruction. This prevents ReleaseFast use-after-free races while allowing unrelated HTTP clients to remain usable.\n\nCorrect retry accounting so the advertised limit is the actual total, preserve throttle/server failure attribution, and add deterministic real-TLS, concurrent, allocation, TUI-root, foreground-child, and background-child recovery coverage. Remove the unrequested ADR and raise the test-count ratchet to the verified suite size.\n\nCo-Authored-By: Codegraff <blackfloofie@codegraff.com>
Concurrent resumes previously shared one durable session identity, so autosaves and shutdown writes could overwrite another continuation. Add clone-on-write resume targets across line, scripted, ACP, and fullscreen TUI paths, claim destination names atomically, and keep provider-native history plus session metadata attached to the selected branch.\n\nRecord the identity contract in ADR 0042 and cover source immutability, branch isolation, ownership stability, cache identity, and destination races with an offline process regression.\n\nCo-Authored-By: Codegraff <blackfloofie@codegraff.com>
Pick up the 281 download/notarization notes that landed after the cut.
…ycle yxlyx: drain generation leases on teardown, fix retry accounting, add real-TLS / child coverage. Keep ADR 0048 (the first #694 commit's record, remapped off the TUI-claims 0042 slot). # Conflicts: # docs/adr/0048-model-http-client-recovery-uses-generations.md # docs/adr/README.md # scripts/eval/tier1-manifest.json
The follow-up dropped the TLS-generation record; 0042 is TUI claims and 0048 stays the leased-client decision. Floor stays 1817.
yxlyx: --resume SOURCE --branch DEST across REPL/TUI/ACP. ADR number will be remapped off 0042 (TUI claims) to the next free slot. # Conflicts: # docs/adr/README.md # src/main.zig # src/session_run.zig
Complementary to #694 model-HTTP generations: MCP HTTP/WSS keep the warmed client and accept gzip catalogs. ADR remapped off 0043. # Conflicts: # docs/adr/README.md # src/http_warm.zig # src/test_hooks.zig
Record the ADR remaps (0049 / 0050) and the extra #694 lifecycle hardening. Still no tag.
…lose #697 added one Agent field and tripped the ceiling. Move the worker-line row test into agent_tests.zig. The grok-spec loopback was closing the listen socket while accept still ran (BADF); wake, await, then deinit.
The wide-native RLM showcase invalidated the root catalog and never rebuilt it, and the next Responses body serialized `"tools":,` — the HTTP 400 RobertDeRose reproduced on 0.0.280. The showcase callers rebuild now (bed8e4f), but the invariant still lived at N call sites: any future invalidate-without-rebuild reaches the wire malformed again. Enforce it at buildBody, the one serializer every wire and every caller passes through: an empty catalog string means "omit the field", exactly what text_only does on purpose and what every provider accepts. The regression test pins the empty-catalog body on Responses, Chat, and Anthropic, and re-pins that a real catalog still rides untouched. Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
TLS-generation, session-branch, and MCP reuse tests landed on top of the 1817 floor. Slack was 31 ahead; the hook warned.
…ry request body Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
#695's empty-catalog omit test lands on top of the 1848 floor from the earlier 282 folds. The suite ran 1849 on this revision.
Same SuperGrok seat, jobs=1. Graff stays unique vs grok and OpenCode on pass/wall/calls/tokens/list$/RSS. Calls still 52.
|
12-task in-house remasure after folding #697 is in (
Calls stayed 52 vs the 141658 pin. list$ ticked down ($0.3504 → $0.3410). Wall +9s is almost all model variance on Notes landed in |
The Linux debug executable crossed the 128 MiB learning-program ceiling after session branching was linked, causing the hosted zero-configuration bootstrap e2e to fail before it could pin the current binary. Keep the safety bound but raise it to 160 MiB so supported debug builds remain valid learning evaluators.\n\nCo-Authored-By: Codegraff <blackfloofie@codegraff.com>
Durable compaction handoffs name and ; substring matching interpreted their prefix as JavaScript and could inject an unrelated fifth model turn. Match source suffixes at a boundary while explicitly supporting JSX/TSX.\n\nAlso make the Codex compaction probe parse both chat strings and normalized Responses blocks, and wait for prompt-first startup settings before counting transport turns.\n\nCo-Authored-By: Codegraff <blackfloofie@codegraff.com>
Responses history may carry user content as either a chat string or normalized input_text blocks. Parse both forms so the compaction probe validates request meaning rather than racing normalization, and let prompt-first startup apply persisted auxiliary-call settings before transport counting begins. Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
Debug learn-pin ceiling, source-nudge suffix boundaries, and Codex compaction wire parsing from the reopened session-branch head.
|
Folded the three #698 follow-ups that were not on the original #697 merge: 160 MiB debug learn-pin headroom, source-nudge suffix boundaries ( |
|
Aggressive open-PR sweep (do not merge 282). Closed (13): #698 (duplicate of #697 + follow-ups already on this tip), #277 Smolify/OAuth (abandoned vs tip), #200 idle localhost (abandoned; #199 stays parked), #642 row nouns (landed), #603 codedb-pro lookup draft (stale vs ADR 0019/0040), #593 codedb pairing (superseded by ADR 0019), #591 graff-kernel.wasm (superseded by ADR 0038 graff-core.wasm), #585 ask_user images (landed, ADR 0015), #573 ACP kitchen-sink draft (stale vs ADR 0032/0041), #561 TUI tab-expand draft (stale vs tip TUI), #511 bash stream follow-ups (landed), #507 dup MCP / 500k / GIT_DIR (landed), #496 release --clobber (landed in 0.0.252). Kept open: this draft; #675 DeepSeek thinking-off + 15s lean bash (unique, not on tip; ADR numbers collide with 0048–0050 here — rebase/remap before fold); #677 Inventory: |
…notes Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
#677 leftover of #554: /teleport restores a snapshot tar onto another CLI backend; /snapshot gc keeps the newest n trees. ADR 0051 (their 0042 collided with TUI claims). #675: lean -p bounces prose-only first "done"; short Codegraff flakes retry twice; DeepSeek thinking off at default low; lean bash auto-backgrounds at 15s. ADRs remapped 0048-0051 -> 0052-0055. Suite floor 1861. Keep-alive-only bodies share the short-flake retry so the request-scratch split stays. Co-authored-by: yxlyx <85774423+yxlyx@users.noreply.github.com>
|
Folded #677 (teleport/GC, ADR 0051) and #675 (DeepSeek thinking-off / lean 15s bash, ADR 0052–0555). Both worked under the unit suite; ADRs remapped off 282's existing 0048–050. Tier 1 green: 1861 tests. Closing #675 and #677 as superseded. On contributor history: yxlyx already has 9 authored commits on this branch from the #674/#693/#694/#697 merges. #675/#677 themselves were Cursor Agent commits, so this fold uses |
…recovery The malformed-handshake test asserts error.TlsRequestConstructionFailed from both production constructor catches, and green on Linux/macOS. On Windows CI the handshake read dies with NTSTATUS LOCAL_DISCONNECT, which std surfaces as error.Unexpected — raw, bypassing the recovery rotation the test (and #694's contract) demands. constructionTlsFailure() is the shared predicate: TlsInitializationFailed always, plus error.Unexpected when the request is https (a plain-HTTP connect error must not be mislabeled a TLS failure). Both catches — http.post and the streaming path — consult it. Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
Next cut after v0.0.281 merged to main. No GitHub tag until asked. Download / notarization ids land after the build. Do not merge to main until asked.
Folded from yxlyx
[Pasted text #N]spans. Navigation and delete treat a chip as one unit; a typed lookalike stays literal.type:erroris a terminal API response. Boundedlast_api_error; one-shot full-input rebuild on a staleprevious_response_id.std.http.Clienton request-constructionTlsInitializationFailed. Follow-up hardens lease teardown (drain on shutdown, retry accounting, child coverage).--resume SOURCE --branch DESTclone-on-write so two processes cannot clobber one.session.json. yxlyx reopened the same head as Fix concurrent session resumes with clone-on-write branches #698 after Fix concurrent session resumes with clone-on-write branches #697 closed; already on this tip.toolsfield instead of serializing"tools":,(0.0.280 HTTP 400). Landed on the remote 282 tip while this cut was mid-fold; merged in.ADR remaps
#694/#697/#679numbered records 0042 / 0042 / 0043. Those slots are already TUI claims screen (#666) and Pi SWE (#667) on main.Not folded
Closed superseded PRs
Folded heads closed after landing here: #674 #693 #694 #679 #697.
Already on main via 281 (or earlier) and closed as superseded: #211 #212 #213 #214 #215 #538 #562 #631 #635 #652 #653 #655 #656 #657 #658 #659 #660 #661 #663 #666 #667 #668 #669 #678 #684.
Left open on purpose: this draft (#696), #675, #677, #277, #200, #698 (same-head reopen of folded #697), and the older unique drafts #561 #603 #593 #591 #585 #573 #511 #507 #496 #642.
Deleted stale branches
Closed-PR heads, June–July wip, and old tagged-release branches through 276 were deleted from origin. Remaining remotes are
main,release/v0.0.279,release/v0.0.281, this branch, and the still-open unique-draft heads.Release-branch hygiene
agent_request.zigsplit scratch / keep-alive helpers intoagent_request_scratch.zigso the WS merge stays under the 600-line ceiling.agent.zigstays ≤597 after the grok-spec mock join.tuiguard.graff --versionwhat's-new,CHANGELOG.md, anddocs/releases/v0.0.282.mdmatch this cut.No tag.