Skip to content

fix(runtime): lifecycle evidence honesty + native live-session v2 (anti-overfit) - #294

Merged
ZhiXiao-Lin merged 18 commits into
mainfrom
feat/native-live-session-keyed-exec-honesty
Sep 10, 2026
Merged

ZhiXiao-Lin merged 18 commits into
mainfrom
feat/native-live-session-keyed-exec-honesty

Conversation

@ZhiXiao-Lin

@ZhiXiao-Lin ZhiXiao-Lin commented Sep 10, 2026 •

Copy link
Copy Markdown

Summary

  • Native Linux live-session Host-reopen observation harness (a3s.box.linux-native-live-session.v2) with keyed captured exec; anti-overfit flags keep B2/retained-stream claims false.
  • Kill honesty: invent 128+signal only for Killed with missing reap; AlreadyStopped/NotFound leave exit absent and do not invent stopped_by_user via KillTerminal.
  • Cold pause/resume honesty: refuse inventing Paused over terminal Failed/Stopped(+exit); clean Stopped without exit remains successful cold pause.
  • Warm pause/resume honesty: publish terminal evidence (or Failed on vanish) instead of leaving stuck Pausing/Resuming.
  • Snapshot honesty: non-Sandbox Snapshotting abort restores source state without publishing; cold-paused NotFound/Stopped-without-exit restores Paused; recover/reconcile/inspect return Ready/restored status (not create-time Conflict after repair).
  • Observe honesty: in-flight observe_record uses startup_terminal_state (Stopped-without-exit → Failed); pending Killing with authenticated exit uses KillTerminal; stable Running owner-loss Stopped-without-exit stays Stopped.
  • FakeBackend lifecycle unit tests default to MicroVM so Windows hosts execute honesty contracts; Sandbox snapshot suites stay Linux-gated.
  • ROADMAP records lifecycle evidence honesty without closing B2.

Why (first principles)

Refuse overfitting: no timeout/schema/pin games, no fixture-as-driver B2 close, no forged EXIT/hardware evidence. Align pause/resume/kill/snapshot/observe completion with authenticated backend evidence.

Test plan

  • Local invent kill/stopped_by_user, MicroVM snapshot refuse/restore, observe_* contracts
  • CI Format / Clippy / Test / Containerd / SDK Packages on tip feb86870
  • SDK sandbox ×2 + WHPX green on tip
  • Merge when required checks pass

Parked before local branch cleanup; not for main until qualification evidence exists.
Prove keyed captured exec before/after Native Linux Host reopen, keep
retained-stream and B2-closed flags false, Linux-gate the example so
Windows builds stay honest stubs, and document that process_restart is
fixture-only evidence.
Only derive 128+signal when KillOutcome::Killed lacks an observed status.
Vanished-runtime AlreadyStopped/NotFound paths keep exit_code absent,
aligning kill completion with owner-loss inspect honesty.
Filesystem-only pause must not invent a resume-ready Paused state over a
crashed generation. Publish Failed with the authenticated exit instead.
Lost-response kill reconciliation treats Failed as Terminal, not user stop.
Filesystem-only resume must not roll authenticated Stopped/Failed evidence
back to retryable Paused (dropping exit). Publish Terminal instead; keep
Created/Paused/NotFound as honest retryable rollbacks.
Refuse stuck Pausing/Resuming when inspect shows Stopped/Failed; keep authenticated exit instead of deferring honesty only to reconcile.
Only Killed outcomes use KillTerminal; AlreadyStopped/NotFound cleanup uses Terminal so vanished-runtime paths keep exit absent without fabricating user-stop attribution.
…VM default

Default create isolation to MicroVM so pause/resume/kill/reconcile contracts execute on Windows hosts; keep Sandbox snapshot suites Linux-gated with explicit sandbox_request.
Treat Stopped+exit like Failed during filesystem-only pause: publish Terminal evidence instead of inventing Paused and dropping the authenticated exit. Clean Stopped without exit remains a successful cold pause.
drive_snapshot now mirrors create_snapshot backend gating: non-Sandbox Snapshotting aborts without inventing a published filesystem snapshot and restores the source state.
@ZhiXiao-Lin ZhiXiao-Lin changed the title test(qualification): Native Linux live-session v2 without B2 overfit fix(runtime): lifecycle evidence honesty + native live-session v2 (anti-overfit) Sep 10, 2026
Vanished-runtime warm pause/resume must not leave stuck Pausing/Resuming; publish Failed with Terminal(None) immediately, matching recover NotFound honesty.
Non-Sandbox snapshot recover/reconcile must not treat MicroVM cold-pause
NotFound (no live provider by design) as terminal Failed. Restore Paused
and keep refusing Sandbox-only snapshot publish.
Recover/reconcile/inspect must return Ready/restored status after aborting
a non-Sandbox Snapshotting claim, not fail callers with create-time Conflict
once source state was already repaired without publishing a snapshot.
In-flight lifecycles map Stopped-without-exit to Failed via startup_terminal_state
instead of inventing clean Stopped. Pending Killing with an authenticated exit
uses KillTerminal for stopped_by_user. Stable Running/Paused owner-loss stays
Stopped. Also fix clippy unnecessary_lazy_evaluations on snapshot abort restore.
@ZhiXiao-Lin

Copy link
Copy Markdown
Author

Pushed feb86870: (1) fix Clippy unnecessary_lazy_evaluations on non-Sandbox snapshot abort restore; (2) observe_record terminal honesty — in-flight Stopped-without-exit → Failed via startup_terminal_state; pending Killing+authenticated exit → KillTerminal/stopped_by_user; stable Running owner-loss Stopped-without-exit unchanged. Local observe_* contracts pass.

@ZhiXiao-Lin
ZhiXiao-Lin merged commit 9e12e9e into main Sep 10, 2026
14 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