Skip to content

sminos 1.4.2: a stale bridge socket holds the open for its successor; questions a resync cannot fit go ahead of it; the uplink says the machine left the hub - #321

Merged
SSFSKIM merged 8 commits into
mainfrom
plane-residue
Oct 21, 2026

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 21, 2026

Copy link
Copy Markdown
Owner

doperpowers board #107, #110 — sminos 1.4.2.

#107: two session-plane edges desk-open-fast left

Residue of the desk-open-fast spec (docs/doperpowers/specs/2026-10-20-desk-open-fast-design.md, PR #302).

1. A streaming block vanished on a transcript-only snapshot. While a killed bridge child's socket was stale, the plane answered a re-subscribe from the transcript alone, so the desk dropped a named block whose row was not flushed yet. The re-subscribe also spun on those snapshots until the successor answered.

  • Fix: Plane.subscribe now gives a running session's BridgeReader a redial window (STALE_WAIT, 3 s). A refused connect is dialled again every 50 ms until the window passes. The mod spawns the successor child at once, and the child moves its socket into place, so the open is served by the successor's bridged snapshot, which still carries the block.
  • Unchanged: a session that is not running gets no window and is served from its transcript at once, as before. If no successor comes, the open goes transcript-only once the window passes.
  • Why this way: the fix withholds the snapshot on the machine instead of marking it provisional. MAWS desk-web's stream layer reads no provisional marker, so the machine side was the fix available within the existing contract, and the desk needs no change.

2. A resync was retried for ever when its pending questions alone passed the limit. About 64 pending asks near 64 KiB each kept the resync over the engine's body limit, so it was refused and retried as lost for ever.

  • Fix: resyncEvents() adds a third step after dropping streaming and shortening permissions. The questions that still do not fit (async asks included) go ahead of the resync, largest first. Each goes whole as its own raised event, and the poster splits them into posts that fit. The resync names them in pendingAhead, and the child keeps each named request as it holds it, decided/closed state included.
  • Result: no question is shortened, answers still match, and every post fits. The pages go before the resync, so a fresh child holds the full set by the time it is ready, and the uplink's requests reader never reconciles against a partial set.
  • DX5's resync row is amended in docs/doperpowers/plans/2026-10-15-arkho-desk-c2-bridge.md, and the spec's §7 and Residue list are marked done.

#110: the uplink supervisor's log after hub leave

sminos hub leave removes daemon/hub.json. UplinkSupervisor then logged "restarting it on the credential as it is now", although no credential was held.

  • Fix: it now logs this machine left the hub (hub.json is gone): the uplink stays stopped until the machine is enrolled again. It says the same when the uplink exits on its own while hub.json is gone, which used to say "restarting in Ns".
  • Unchanged: a change to hub.json that still holds a credential keeps today's line, still pinned by test-sync.sh.

Tests

Each new test was run red against main's code before the fix.

  • test_session_plane.py:
    • Engine and RealChild: a killed child's stale socket holds the open until its successor answers, and the block is still drawn with no vanished, inventory clean. With no successor, the open goes transcript-only once the window passes.
    • StaleSocket, through Plane.subscribe: a running session waits for the successor, and a session with no process gets no window.
    • fake_session.py gains kill_child and respawn_child.
  • mods/bridge.test.ts: 65 questions near TEXT_CAP give a resync whose posts all fit the engine's limit. Every question reaches the new child once and whole, pendingAhead names the pages, and there is no gap and no second resync. A resync that fits sends nothing ahead.
  • test-bridge-requests.sh: on the child, a resync with pendingAhead keeps the question that went ahead, does not invent a named one it never received, and answers still match.
  • test-uplink.sh: removing hub.json under a running supervisor gives the new line and no restart, and re-enrolling brings the uplink back. hub.json removed while the uplink is killed also gives the new line and no restart.

Gate: GREEN, https://github.com/SSFSKIM/doperpowers/actions/runs/39562340398. Review: doperpowers:reviewer-medium on 81f708c..0367e40 found no material findings.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)

… questions a resync cannot fit go ahead of it; the uplink says the machine left the hub

Board #107, two edges desk-open-fast left (its spec's residue, PR #302):

- A running session's bridge socket that refuses the connect (its child
  killed, the socket left behind) is dialled again for STALE_WAIT (3 s)
  before the plane serves the open from the transcript alone. The mod
  spawns the successor at once and it moves its socket into place, so the
  open is served by the successor's snapshot, which carries what streams:
  a block named and not yet flushed no longer vanishes from the desk's
  drawing, and the re-subscribe no longer spins on transcript-only
  snapshots. A session with no process is served from its transcript at
  once, as before.
- A resync whose whole questions alone still pass RESYNC_MAX, once
  streaming is dropped and permissions shortened, sends them ahead of it,
  largest first, each whole as its own `raised` (the poster splits them
  into posts that fit), and names them (`pendingAhead`); the child keeps
  each as that raise left it. Every post fits, no question is shortened,
  its answers still match, and the resync is no longer refused and queued
  again for ever. DX5's resync row and the open-fast spec amended.

Board #110: once `sminos hub leave` removes daemon/hub.json, the uplink
supervisor says the machine left the hub and the uplink stays stopped until
it is enrolled again, where it said it restarted the uplink on the
credential as it is now. A change that keeps a credential keeps that line.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T07:45:56.760056Z 0367e40 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
@SSFSKIM
SSFSKIM merged commit 7aebb0c into main Oct 21, 2026
10 checks passed
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