Repository navigation
fix(edge): preserve managed runner state and protect credential handoffs - #1431
mergify[bot] merged 1 commit into
Conversation
|
Queue requested — the merge queue status continues in this comment ↓. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
The managed supervisor remains the owner of startup, state selection and shutdown, and TokenManager still owns the credential after startup. The private socket is confined to initial process startup. The stop cleanup runs under the existing start lock and preserves the proven reconnect credential. No steady-state network, database or policy path changes. I ran the 48 managed-background module tests extracted unchanged from this head on Linux. An isolated process fixture also exercised the production launch and readiness code with an explicit synthetic credential, a relative state root containing an apostrophe and spaces, and the printed status/logs/stop commands from an empty shell environment. Incomplete socket input failed before readiness. The repository PTY/WebSocket regression exercises the actual Edge boundary.
✅ Merged into
|
5b5a62b to
ffc86ba
Compare
Capability assessment: Unchanged: existing User Runner capabilities, identity and wire protocol are preserved.
Summary
Fix three issues in the managed User Runner lifecycle.
Related issue
Follow-up to #1226 and #1227.
Change type
User and compatibility impact
Operators can keep using their existing MOI connect command. The printed status, logs and stop commands select the original state directory, including when the user opens another terminal. The original interactive invocation still accepts the token on its command line.
Architecture and complexity delta
The managed Edge supervisor owns the initial parent-to-child transfer, the credential handoff files and the printed management commands. The credential reaches the existing token manager through the same explicit-token input. The Server, release installer and database schema require no changes.
Verification
cargo nextest run --locked -p astra-edge --profile cipassed all 159 tests. The PTY test executes the printed commands in a clean shell, checks the WebSocket credential, and exercises reconnection and shutdown. Regression assertions cover split and inline token flags, pending and claimed handoff files, and refusal of a late handoff while stopping.make format-check,python3 scripts/ci/validate_repository.py,make auditandgit diff --checkpassed.make lint) and the complete native macOS lane (bash scripts/ci/run-macos-lanes.sh all) passed.Final checklist