Skip to content

P5 O9: lane A shows the permission mode the terminal session reported (sminos 1.27.14) - #355

Merged
SSFSKIM merged 2 commits into
masterfrom
p5-o9-mode-read
Oct 29, 2026
Merged

SSFSKIM merged 2 commits into
masterfrom
p5-o9-mode-read

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Lane A's Mode chip and Session info said "Not reported by the terminal session" because the bridge had no live permission mode. sminos 1.27.14 (doperpowers #445, board #160) now carries permissionMode, permissionModeAt and permissionModeFrom on the heartbeat's state and on read status. This PR reads them, using only what lane A already consumes.

What a person sees

  • A mode was reported: the chip shows the mode in the engine's title (default is "Manual"). Its title reads "Reported 2 minutes ago · A terminal session's mode is changed in the terminal". Session info's Mode row reads "Plan · Reported 2 minutes ago". The menu checks the reported mode, and every choice stays closed: MAWS still sets no mode on a terminal session.
  • No mode reported yet, or a bridge older than sminos 1.27.14: unchanged. The chip says "Mode", titled "Not reported by the terminal session: its mode is changed in the terminal", and Session info says "Not reported by the terminal session".
  • A remote terminal session's Session info gains a Permissions group with that Mode row. Before, it listed only the controls this device can't use.

How

  • src/shared/lane-a/mode.ts does the shared work. modeOf parses the three fields: all three must be present and well-typed, and the word must be one of the engine's six modes. reportsMode is the version guard (capabilities.sminos ≥ 1.27.14). LaneAState.mode is new and nullable.
  • Local: SessionFold takes the mode from each heartbeat; a heartbeat with no fields clears it. The mode is kept across a fresh stream's snapshot, which carries none, until the next heartbeat (5 s). The driver's state carries it only from a bridge that reports it.
  • Remote: the plane carries no heartbeat, so the mode comes from the read status the adapter already makes: at a watch's first snapshot, after a model change, and at a main-loop step-end at most every 10 s. No read is added. The status read records the launch it was asked under. Its mode shows only while the presence still names that launch, so a session resumed in a new process reads "Not reported" until a read under the new launch (review fix, 7839ead).
  • The renderer adds ModeBinding.reportedAt on the chip's binding. The chip's title ticks every 30 s while a reported mode is shown. Session info reads the same binding.

Tests: written to fail first.

  • The parse with the fields absent, present and partial, and the version guard.
  • The local fold, and the driver against the fake bridge, which gains setMode and heartbeat. Its read status now carries the fields.
  • The remote fold, and the remote adapter over a real link. The fake plane gains a per-session status read.
  • The lane A port's binding, the chip, Session info's row (local and remote), and an e2e:lane-a scene: none reported, then Plan, then a switch to Manual, on the chip, in Session info and in the menu.

Known limits

  • A switch on an idle remote session shows at its next status read, in practice its next turn. Locally it shows within one heartbeat.
  • A process change under the same engine id: locally, the previous mode can show until the next heartbeat (≤ 5 s); remotely it is cleared at once.

Gates: run 40895586375 green on 7839ead (static, unit, probes, e2e:lane-a, e2e:side; class 1a on the pool, e2e on macOS). Its tree equals the head's, and its flaky count is 0. An earlier run on 18e9db6 failed one unit shard on the known src/engine-host/ipc.test.ts artifactScope flake (tech-debt row 2026-10-28 "unit flakes"). ci-gate warned that e2e:delivery and e2e:desk-web-hub reach src/shared/ipc/schema/lane-a.ts; neither ran.

Review: doperpowers:reviewer-medium on 42c0ffa..18e9db6 found one P2 (the remote mode outlived a launch change). It is fixed in 7839ead, and the reviewer re-checked the fix as correct.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)

… (sminos 1.27.14)

The bridge now carries permissionMode, permissionModeAt and permissionModeFrom on its heartbeat's state and on read status. Main reads them where lane A already listens: the local driver's state stream folds the heartbeat's (kept across a fresh stream's snapshot, which carries none, until the next heartbeat), and the remote adapter's status read carries them. Both parse through @shared/lane-a/mode and put LaneAState.mode only from a bridge of sminos 1.27.14 or later. The Mode chip names the reported mode with how long ago on its title, Session info's Mode row names it with its age (a remote session's Session info gains that row), and neither sets a mode. With no report, or an older bridge, both still say Not reported by the terminal session. The fake bridge gains setMode and heartbeat, the fake plane a per-session status read.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… read for

Review fix: a terminal session resumed in a new process under the same engine session id kept showing the earlier process's mode, since the remote adapter re-reads read status only at a watch's first snapshot, after a model change and at a main-loop step-end. The status read now records the presence's launch it asked under, and the fold shows its mode only while the presence names that launch; the new process reads Not reported until a status read under its launch. No read is added.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 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-29T15:02:24.465175Z 7839ead 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.

@SSFSKIM
SSFSKIM merged commit 01d07b7 into master Oct 29, 2026
SSFSKIM added a commit that referenced this pull request Oct 29, 2026
…ion reports (#355); the mode row closed, a remote session's mode freshness row opened, the engine-host ipc flake's second sighting

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Oct 29, 2026
's mode, additive against master (laneA is machine-owned on this branch only)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
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