ContainerDeskDocs
Containers & resourcesView source ↗

▦ Read scheduling and stale data

The IPC client schedules only the finite read commands list_containers, list_compose, inspect_container, container_logs and container_stats. Mutations, confirmation intents, terminal input, native exports and stream startup/ACKs use their existing separate paths. The scheduler has no generic mutation retry entry point.

Scheduling retains at most three host/daemon groups, sixteen outstanding request identities per group and thirty-two consumers per identical request. The complete serialized request is the single-flight key, including scope/session generations, full resource ID and sensitive-value reveal flag. Repeated identical refresh requests share one native result; each consumer retains its own lifetime check. Cancelling one view does not discard another current consumer. Completed results are not cached by the scheduler.

There are at most two active finite reads per host/daemon group, one background statistics read per group and four active finite reads globally in the renderer. Queued user inventory/inspect/log reads precede background statistics; a dispatched read is not preempted. Backoff releases its active slot. Native Rust independently admits at most two finite reads per saved host and one stats read per host across IPC requests. All reads, including logs/events streams, remain subject to the existing four native permits. The app inspects the selected container only; table rows never start individual inspect processes.

Only resource-limit, operation-timeout and transport-unavailable failures retry. Each request has at most three dispatches (initial plus two retries), with 500/1000 ms exponential bases and jitter from 75% to 125%; scheduling scans are at most 100 ms apart. Monotonic time protects retry/queue deadlines from wall-clock changes. Queued/retrying requests expire after two minutes, while each actual native snapshot has the existing bounded deadline. Permission, malformed-response, missing-resource, stale-session and disconnected errors do not retry. Validation of returned typed data happens outside the retry loop.

Lifetime checks remove queued consumers and prevent retries or publication after a host/session/view changes. A cancelled consumer’s already dispatched native read still occupies its slot until completion; this prevents rapid navigation from concealing accumulating processes. Host disconnect cancels/reaps the native session work. No arbitrary process or production host is touched by these controls.

The inventory cache retains last-success time and explicitly stale rows while a read is pending or failed. An empty successful snapshot is distinct from unavailable/disconnected state; only successful current-scope snapshots replace rows. On focus, visibility return or network-online signals, the selected scope requests a coalesced current snapshot. A 15-second watcher also detects a wall-clock gap longer than 45 seconds, representing a possible suspended laptop. These signals are hints: they neither assert that a connection works nor reconnect a disconnected host without a valid scope. Existing stats focus/pause behavior remains; lost SSH sessions still require the existing explicit host reconnect.

codex/tracking/evidence/028.md records controlled-clock tests, maximum measured concurrent reads, actual slow SSH/Docker cancellation and native Linux regression evidence. Simulated clock jumps are not a claim of a physical laptop suspend/resume test.

Prompt 032 adds a bounded admission wait for confirmation inventory reads and reserves one of the existing four native global command permits for a submitted lifecycle action. Preparation does not retry a dispatched command; mutations remain outside the renderer read scheduler and retain their own host lock through completion. See lifecycle controls.

Reads after management actions (038)

Container and Compose mutation IPC calls invalidate finite read consumers for their host/daemon when the call settles, including a transport failure or unknown outcome. A read already in flight may have sampled the state before the action. It must not be joined by a later post-action inspection or delivered as a fresh result. The scheduler rejects those consumers, drops queued work, and uses a new per-host epoch for subsequent coalescing. Discarded work cannot retry. Active native calls keep their slots until their promises settle, so invalidation cannot bypass host/global limits; other hosts keep their consumers. This does not retry a mutation, cancel a dispatched mutation, or infer its outcome. An explicit fresh read reconciles current state.