Skip to content

Preserve retained terminal pairing response write budget - #353

Draft
schickling-assistant wants to merge 2 commits into
mainfrom
schickling-assistant/2026-11-10-pairing-terminal-replies
Draft

schickling-assistant wants to merge 2 commits into
mainfrom
schickling-assistant/2026-11-10-pairing-terminal-replies

Conversation

@schickling-assistant

@schickling-assistant schickling-assistant commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Pairing retains terminal status after a permit expires, but response writes reused that permit's original deadline. A flow-control-blocked terminal response could be cut off before delivery.

Goal

Keep retained terminal status readable after the original deadline without extending pending permit work.

Decisions

Terminal replies receive an independent ten-second write budget. Pending replies retain their permit-bound deadline. A real QUIC regression uses a 64-byte receive window, cancellation, reconnection after expiry, and terminal EOF assertions. Only added hunks are formatted.

Verification

Exact head: 25bb3c444a98747f347d0d210330674b4c7fbbb7, based on 19e7f8964ce8305aeb8c200fb717967aa03f738f. Prerequisite for #352; stack #354.

Status Command Result
PASS Added-hunk Rustfmt fixed-point proof in declared devShell Exit 0; no remaining formatting delta wholly within terminal additions.
FAIL (baseline) cargo fmt --all -- --check Exit 1 at exact base 19e7f896 and the preformat wait head; repo has no formatting gate/configuration. Unrelated baseline source is not reformatted.
FAIL (baseline) Whole-file touched-only rustfmt --check --edition 2024 --config skip_children=true Baseline and head exit 1. Added-hunk proof, not whole-file exit 0, is the scoped formatting evidence.
PASS cargo test --locked -p fabric --lib retained_terminal_status_writes_after_original_deadline -- --nocapture Exit 0 at exact terminal head; real QUIC regression passed (4.76 seconds).
FAIL / PASS Descendant cargo test --locked and cargo clippy --locked --workspace --all-targets At wait head 41118e4814cd11d35c68a6d54c890680b93ebebe: full exit 101 (628 pass, nine fail, two ignored); clippy exit 0. Not exact terminal-head full-suite proof. All nine reproduce at baseline and terminal head (table below).
PASS which cargo rustc rustfmt cargo-clippy cc ld Exit 0 in shared declared devShell; ld.lld not declared by repo. Paths below.
NOT RUN Exact terminal-head full suite and clippy Exact terminal regression passed; descendant full-suite failure and clippy result are labeled separately.
NOT RUN Nix package builds and nonlocal daemon checks No live Fabric home, identity, socket, peers, or services touched.

Runner: approved fallback Linux build host (private identifier redacted), after alternate-host available space 234,991,235,072 bytes and saturated queue (38 waiters, two holders). No alternate-host target directory allocated. Launcher uses CI=1 CARGO_BUILD_JOBS=4 gate-slot --lane build --max-wait 5400 -- nix develop --no-write-lock-file --command <proof runner>.

Supported declared-shell paths from the completed run: cargo /nix/store/l7v00m55rb130bhql2kr74pq8sdpl41c-cargo-1.97.0/bin/cargo; rustc /nix/store/h6c2mbpmxih3mfadhvl6jzf090n419yv-rustc-wrapper-1.97.0/bin/rustc; rustfmt /nix/store/i7qpcas4xd1kz9k98yh2c0w8ld0x288b-rustfmt-1.97.0/bin/rustfmt; cargo-clippy /nix/store/bijimpgbih6bwc8sykr5fijcjim2qfgr-clippy-1.97.0/bin/cargo-clippy; cc /nix/store/adcz0m6qq2flmshdf0zz2xwjr5zbq1gr-gcc-wrapper-15.3.0/bin/cc; ld /nix/store/adcz0m6qq2flmshdf0zz2xwjr5zbq1gr-gcc-wrapper-15.3.0/bin/ld.

Before: retained response writes reused the old permit deadline. After: terminal writes have their own short bounded deadline. The exact behavioral regression passed.

Complexity

No new abstraction or dependency; terminal-only deadline selection.

Concerns

Terminal writes can retain a handler for up to ten seconds after expiry; existing connection and handler limits remain in force. This draft is 122 changed lines after formatting only its additions.

Friction & bottlenecks

Initial host-toolchain linking failed before product compilation. The unmodified declared GCC/binutils devShell is used instead. An overparallel descendant suite was cancelled under memory pressure; later checks use jobs=4.

Follow-ups

The dependent draft #352 adds reactive waits. All nine of its full-suite failures reproduce at baseline and this exact terminal head (below).

References

See #352 and docs/runtime-peer-api.md.

Full-suite failure attribution

Each exact test below was run individually with cargo test --locked -p fabric --lib <test> -- --exact --nocapture, in the same unmodified declared devShell, CI=1 CARGO_BUILD_JOBS=4, inside heavy build admission. Head results come from the original full suite, not a retry.

Exact test Wait head 41118e48 Base 19e7f896 Terminal 25bb3c44 Classification and first error / evidence
ca::tests::the_constraint_is_present_and_a_verifier_enforces_it FAIL 101 101 Pre-existing environment dependency: openssl required / ENOENT; src/ca.rs:363-368.
daemon::tests::a_peer_returns_after_minutes_and_hours_without_errors_or_a_helper FAIL 101 101 Pre-existing environment dependency: initial readiness / early EOF; /bin/cat ENOENT; src/daemon.rs:12611.
daemon::tests::interface_address_and_wake_changes_preserve_live_sessions_and_declarations FAIL 101 101 Pre-existing environment dependency: early EOF; /bin/cat ENOENT; src/daemon.rs:12514.
update::supervisor_tests::a_stale_supervisor_does_not_revert_a_healthy_later_update FAIL 101 101 Pre-existing environment dependency: stale supervisor did not clean itself; cmp/cat/rm ENOENT; src/update.rs:1178-1189,3561.
update::supervisor_tests::a_supervisor_without_a_generation_record_does_nothing FAIL 101 101 Pre-existing environment dependency: stale supervisor did not clean itself; cmp/rm ENOENT; src/update.rs:1178-1189,3561.
update::supervisor_tests::an_interruption_after_replacement_restores_the_binary_later FAIL 101 101 Pre-existing environment dependency: rollback bytes differ; cmp/cat/rm ENOENT; src/update.rs:1178-1189,3498,3518.
update::supervisor_tests::the_macos_job_removes_itself_after_success FAIL 101 101 Pre-existing environment dependency: transient job left plist; cmp/cat/rm ENOENT; src/update.rs:1178-1189,3473.
update::tests::the_detached_restart_leads_its_own_process_group FAIL 101 101 Pre-existing environment dependency: ENOENT spawning /usr/bin/true; src/update.rs:2227.
update::tests::the_detached_restart_waits_for_the_updater_to_exit FAIL 101 101 Pre-existing environment dependency: ENOENT spawning /bin/sleep; src/update.rs:2268.

All nine reproduce at baseline and terminal head; none meets the baseline-pass/head-fail regression criterion. The full suite remains FAIL, not waived or green. Latest main CI test852 succeeded (Ubuntu deterministic and macOS jobs). Its workflow uses stable Rust directly on hosted OS images (.github/workflows/test.yml:51-55,68,87-95), not the Nix devShell; it has no explicit OpenSSL/coreutils installation step. No host tools, paths, shims, or test exclusions were changed.

Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/fabric-mesh
session 01a1ecd5
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.12.5
agent_runtime OMP 18.12.5
agent_model openai-codex/gpt-6.1-sol
worktree smalltalk/main

agent-identity: agent/dotfiles/fabric-mesh
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.12.5
agent-runtime: OMP 18.12.5
agent-model: openai-codex/gpt-6.1-sol
agent-identity: agent/dotfiles/fabric-mesh
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.12.5
agent-runtime: OMP 18.12.5
agent-model: openai-codex/gpt-6.1-sol

@schickling-assistant schickling-assistant left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fabric-mesh (agent/dotfiles/fabric-mesh) records an independent exact-head source review of 25bb3c444a98747f347d0d210330674b4c7fbbb7. Verdict: GO.

  • The terminal status gets a new now + 10 s write deadline for header and body. It is independent of the original attempt deadline.
  • The acknowledgement wait is separately bounded.
  • The regression test does real QUIC I/O after the deadline, with 64-byte receive credit.

Not verified: a mutation run against the old code.

Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/fabric-mesh
session 01a1ecd5
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.12.5
agent_runtime OMP 18.12.5
agent_model anthropic/claude-opus-5-5
worktree unknown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant