Skip to content

Experiment: qualify graceful daemon.shutdown lifecycle handoff - #16

Closed
mark-e-deyoung wants to merge 13 commits into
mainfrom
experiment/v2-b1-shutdown-lifecycle
Closed

mark-e-deyoung wants to merge 13 commits into
mainfrom
experiment/v2-b1-shutdown-lifecycle

Conversation

@mark-e-deyoung

@mark-e-deyoung mark-e-deyoung commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Public hosted-native qualification candidate for the daemon shutdown lifecycle.

The candidate is generated by a fail-closed exact transform over the sanitized public source. Each replacement aborts unless the expected public baseline block exists exactly once, so source drift fails closed rather than producing a fuzzy patch.

The public candidate tests the smallest daemon-owned lifecycle repair:

  • shutdown is requested through a bounded daemon-owned handoff;
  • the transport writes the successful RPC response before clearing the shared run gate;
  • active client handlers have bounded cancellation behavior;
  • listeners stop before remaining clients are cancelled/joined;
  • owned client threads are joined before teardown completes;
  • terminal daemon state becomes Stopped after cleanup.

The workflow applies that public transform, builds x64 Windows Server 2025 and native ARM64 Windows 11, runs the focused lifecycle regression, launches the real daemon, sends daemon.shutdown over the named pipe, requires the OK response, and requires bounded zero-code process teardown.

Private tracking coordinates, private source identity, private repair lineage, and internal failed patch attempts are intentionally not reproduced in this public record.

This is hosted-native behavioral qualification only. It grants no merge/release/promotion authority and does not establish controlled interactive WinBot acceptance.

Copy link
Copy Markdown
Contributor Author

Decision-changing hosted-Windows result on run 35117049678 (853688cc2f42031bf9249542f288be1fe51a0c1e): both arm64-win11 and x64-server2025 now configure, build the focused lifecycle targets, and PASS the two-phase lifecycle unit regression. Both then fail specifically at the real named-pipe daemon.shutdown response/process-teardown exercise. This retires the prior generated-fixture and focused-target-linkage failures as harness defects and narrows the remaining V2-B1 problem to live shutdown behavior or the live exercise itself. Preserve the implementation candidate pending diagnosis of that shared runtime failure; do not claim native WinBot/interactive-desktop acceptance from these hosted runners.

Copy link
Copy Markdown
Contributor Author

Decision-changing qualification result: the V2-B1 shutdown candidate now passes the complete hosted-native lifecycle rep on both x64 Windows Server 2025 and native ARM64 Windows 11 (run 35117943543). In both treatments the fail-closed transform/configure/build succeeded, the focused two-phase lifecycle regression passed, a real named-pipe daemon.shutdown returned an OK response, and the daemon completed bounded teardown with exit code 0 well inside the 15 s gate.

Root cause of the prior post-acknowledgement hang was broader than the CoreEngine handoff: background lifecycle owners still contained uninterruptible waits (30 s cleanup; potentially 24 h update/30 s rendezvous) and the named-pipe listener could re-enter blocking ConnectNamedPipe before the handler cleared the shared run gate. The experimental correction makes periodic waits gate-aware and explicitly wakes the pipe listener before joins; it does not increase the timeout.

Scope boundary: this is hosted-native behavioral evidence for graceful shutdown only. It does not constitute private promotion/merge/release authority or controlled interactive WinBot/native-desktop acceptance. A separate protocol defect observed by this rep—dispatched responses lose the request correlation ID (id:"")—is being qualified independently in #18 rather than broadening V2-B1.

Copy link
Copy Markdown
Contributor Author

Cross-domain PRE/POST/FRAME proving rep: use this already-qualified shutdown lifecycle as Rep C under SemperSupra/agent-dispatch-private#211. Do not redesign the candidate or add a contract framework.

Recover the smallest contract that explains the observed failure/recovery sequence:

REQUIRES daemon running; transport connected; shutdown lifecycle hook installed; owned lifecycle resources/threads/listeners are accounted for.

MODIFIES daemon lifecycle state, shared run gate, listener/owned worker state needed for bounded teardown.

PRESERVES unrelated configuration, request/response semantics outside shutdown, authority/config surfaces, diagnostics observability.

ENSURES_SUCCESS success response is emitted before shutdown activation; blocking listeners and periodic workers become interruptible; owned threads/resources complete; daemon reaches terminal stopped state; process exits 0 within the existing bound.

ENSURES_FAILURE partial shutdown must not silently strand owned resources; diagnostic evidence remains available; unrelated configuration/authority is not mutated.

PROGRESS only if it adds independent value: bounded teardown must complete without weakening the timeout.

Use the prior iteration as the falsifier: it satisfied the immediate RPC acknowledgement path but violated the whole-system postcondition because periodic waits and the listener could block teardown. Record whether explicit postconditions would have localized that defect earlier than the existing unit/runtime test split. Check one seam (e.g. CoreEngine shutdown request -> transport/lifecycle owner) and classify CONTRACT_SEAM_GAP if the producer's success guarantee was insufficient to establish the consumer's preconditions. Report redundant predicates; claim only evidence for #211's adopt/reduce/kill decision.

Copy link
Copy Markdown
Contributor Author

DOPAV historical experiment complete — close without product merge

Bounded daemon.shutdown source-transform hosted-native public experiment completed with two successful independent x64 Server 2025 and ARM64 Windows 11 Windows jobs. This experimental synthetic public source lane was explicitly not granted product merge/release authority; preserve immutable source and test receipts as design/qualification evidence, and defer authoritative C++ re-intake to the private product DLE.

Exact terminal source: 6efef81f5bf89fab3d31e93f9162d069664da3f4. Public source-bound Actions 35117943543 had all scoped Windows jobs SUCCESS. Disposition: CLOSED UNMERGED; preserve branch, original source, tests, review history and receipt in closed PR. Active successor/owning acceptance: https://github.com/SemperSupra/WinInspect-private/issues/406. No claim that a public hosted experiment authorizes private v0.5 source publication, default-branch merge, release, controlled interactive WinBot, or private GHA spending. Historical proof does not qualify changed private #461; exact-head native + security tests remain.

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