docs: restarting the module that serves your session is self-decapitating - #9
Conversation
…ting The call that restarts a module cannot survive that module's restart: its own reply route is torn down with every other route the module serves. The command succeeds and reports a transport error, every time. Documents the outcome as UNKNOWN rather than failed - the drain forces teardown after its budget regardless of whether in-flight requests finished, so a lost response does not mean lost work. Verified: a rescan+restart chain returned only the error, with the rescan's already-printed stdout gone from the buffer too. Includes the control case: restarting a module that does not serve the session is uneventful, since teardown is scoped to the draining module's endpoint.
There was a problem hiding this comment.
No issues found across 1 file
You're on the cubic free plan with 17 free PR reviews remaining this month. Upgrade for unlimited reviews.
Re-trigger cubic
The verification guidance cited `ck module health`, which is not a verb: health is its own domain (`ck health <id>`) and the module domain carries list/status/ restart/stop/start/rescan. A doc whose whole point is 'verify rather than re-running' failing on the verify step is the worst place to get it wrong. Every remaining ck invocation in the file was run against the live daemon.
|
Fixed in Worth noting where it landed: in the sentence telling operators to verify rather than re-run. A doc whose entire argument is "the outcome is unknown, go check" failing on the check step would have sent someone to an Both references now point at real commands, and I ran every Fork is private, and staying that way — noted on the |
Operator documentation for the #5 behaviour, separate from the code fixes there. Worth having regardless of which of those land, because the invocation is structurally unfixable — the route carrying the answer is the route being torn down, so no client change makes that call report cleanly.
Three things it records:
The mechanism. Harness tool calls execute by a module, so
bash → sh → aft-subc → ck-subcmeans restartingaftfrom an aft-served session severs the command's own reply path.The outcome is UNKNOWN, not failed. This is the part that costs real work if an operator gets it wrong. The drain forces teardown after its budget regardless of whether in-flight requests finished, so a lost response doesn't mean lost work. Observed directly: a
ck module rescan && ck module restart aftchain returned only the transport error, with the rescan's already-printed stdout gone from the buffer too. The rescan had run. So: verify withck module health, never blind-retry a mutation.The control case. Restarting a module that doesn't serve your session is uneventful, because teardown is scoped to the draining module's endpoint. Verified with a
stop claustrum && ck-auth import && start claustrum && healthchain from an aft-served session — full buffer survived, no transport error. Same operator, same wrapper, same daemon, different module.Cited by symbol (
begin_forwarding_drain_with,release_module_endpoint_routes) rather thanfile:line, so it doesn't rot on the next refactor.Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.Summary by cubic
Add operator docs explaining that restarting the module that serves your session is inherently “self-decapitating”: the restart succeeds but the command always returns a transport error because its own reply route is torn down. Covers why the outcome is UNKNOWN (not failed), how to verify with
ck module health, the unaffected control case, and how to avoid the issue.Written for commit 4bdaa42. Summary will update on new commits.