Skip to content

fix: restore short runtime observation containment - #87

Merged
schickling-assistant merged 1 commit into
mainfrom
schickling-assistant/2026-07-30-restore-short-pty-bound
Jul 30, 2026
Merged

fix: restore short runtime observation containment#87
schickling-assistant merged 1 commit into
mainfrom
schickling-assistant/2026-07-30-restore-short-pty-bound

Conversation

@schickling-assistant

Copy link
Copy Markdown
Contributor

Problem

PR #78 turned a consumer-side timeout increase into a fleet-scalability invariant. Its 45-row test did not exercise fleet observation: the fake pty slept for three seconds before printing a prebuilt JSON file. The resulting 10-second deadline delayed fail-closed diagnosis without fixing the observation boundary.

Goal

Keep a short outer bound around a wedged runtime, remove the synthetic latency contract, and leave fleet scalability with the runtime producer and pure exact-ID observation architecture.

Decisions

  • Restore the two-second outer containment bound instead of calibrating a larger global-census timeout.
  • Remove the fixed-sleep fleet test and its invariant; PR test: gate st2 against bounded PTY fleet observation #84 supplies the real packaged 0/75/100/500-session contract.
  • Preserve the PATH-resolved sleep in the hung-process fixture because that portability repair is independent of the timeout policy.
  • Do not add a compatibility facade or implement an st2-only "exact" API over global enumeration. R19's pure exact-ID observation boundary remains separate cross-repository work.

Verification

  • nix develop -c cargo test --test doctor doctor_bounds_a_hung_pty_probe_and_reports_the_runtime_error -- --exact — 1 passed; the proof completed in 2.02s and observed timed out after 2.0s.
  • nix develop -c cargo test --test up_once_exit — 2 passed.
  • nix develop -c cargo clippy --all-features --lib --bin st2 --test doctor --test up_once_exit -- -D warnings — passed.
  • nix flake check --print-build-logs — all six x86_64-linux checks passed, including packaged tests and invariant-reference resolution.
  • git diff --check — passed.
  • nix develop -c cargo test --all-targets --all-features — affected suites passed; the run later hit the pre-existing up_materialize_only_writes_the_overlay_without_needing_pty PATH fixture failure. The exact failure reproduces unchanged on origin/main.
  • Repository-wide cargo fmt --all -- --check remains red on unrelated files already unformatted on main; the changed diff is whitespace-clean.

Complexity

No new complexity. This removes 71 net lines and restores the timeout as a defensive boundary.

Concerns

PR #84 also touches tests/doctor.rs, so merge order may require a small textual rebase. The semantic contracts are complementary: #84 proves real fleet behavior; this PR removes the synthetic latency invariant.

Friction & bottlenecks

  • Friction: the broad Cargo test's PATH-isolation fixture removes git, producing a baseline failure unrelated to this change.
  • Friction: the repository-wide rustfmt gate is not clean on current main.
  • No new measured bottleneck was introduced.

Follow-ups

References

PR #78 promoted a consumer timeout into a fleet-scalability contract. Restore the two-second outer bound and remove its synthetic fixed-sleep proof while retaining the portable hung-process fixture.

Fleet behavior is proved against the packaged runtime in PR #84. Pure exact-ID observation remains the R19 architecture rather than a larger global-census timeout.

agent-session-id: dev3.dotfiles-cos-misc-agent-runtime-simplification
agent-tool: Codex
agent-tool-version: 0.145.0
agent-model: gpt-5.6-sol
agent-runtime-profile: /home/schickling/.config/coding-agents/profile.json
agent-skills-manifest: /nix/store/nk9iml2841l1yjjg0f6f0d3y60zkg1nn-agent-skills-corpus/share/agent-skills/manifest.json
tooling-profile: dotfiles@4a0515f
@schickling-assistant
schickling-assistant marked this pull request as ready for review July 30, 2026 12:56
@schickling-assistant
schickling-assistant merged commit 16097da into main Jul 30, 2026
1 check passed
@schickling-assistant
schickling-assistant deleted the schickling-assistant/2026-07-30-restore-short-pty-bound branch July 30, 2026 12:56
@schickling schickling added area:pty PTY sessions and terminal integration · Set: manual area:reconcile Supervisor run loop, lifecycle, restart, park, and teardown · Set: manual origin:agent Filed or primarily produced by an AI agent · Set: manual type:bug Something broken or a regression · Set: manual labels Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:pty PTY sessions and terminal integration · Set: manual area:reconcile Supervisor run loop, lifecycle, restart, park, and teardown · Set: manual origin:agent Filed or primarily produced by an AI agent · Set: manual type:bug Something broken or a regression · Set: manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants