Repository navigation
test: exit and init failure paths, graceful shutdown options, status message faults, events reconnect - #37
Merged
Conversation
…message faults, events reconnect - Init failures exit with 92 before the user function: an unreachable events websocket, malformed tracked child runs. - Exit: a listener that never ends is given up on after the timeout (exit: false returns then); a runtime blocked by a listener still exits on time, from the watchdog thread; exit: false returns and a later exit ends the run. - graceful_shutdown: false lets an aborted run go on; the shutdown delay puts the exit off after the abort. - A slow (beyond 1 s) or refused status message update is logged and skipped. FakeApi can now fault run updates. - The reconnection backoff sequence, and a reopen retried until the platform is back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0148RYR4BTGyCYHENSRZjC3S
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests only, covering two gaps from the test-gap review (g08 and g10). The only non-test change is a fault mode in FakeApi's run updates.
Exit and init failure paths (
tests/actor.rs)__ACTOR_CHILD_RUNS.ExitOptions::timeout, and withexit: false,exitthen returns.exit: true, the watchdog thread always ends the process first, because both deadlines are the same timeout. Same exit code either way, so I tested the teardown's own deadline throughexit: false.exit: falsetears the Actor down and returns, and a laterexitends the run.Graceful shutdown, status messages, events reconnect
graceful_shutdown: false: an aborted run goes on and its user function finishes.graceful_shutdown_delay: the exit comes after the delay, counted from the abort.fault_run_updates(&[Slow, Refused])for this.events.rs:All the new tests were mutation-checked against the code they cover. Each of these makes them fail:
graceful_shutdownor its delay;Generated by Claude Code