Repository navigation
Conversation
…process kill On timeout or a job-source abort, write a scratch cancel file so engines that expose a token can stop and return a typed cancelled failure. Kill the process group if the child ignores the file past the grace window.
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.
Closes #120
On timeout or a job-source abort, the runner writes a scratch
cancelfileand waits a grace window before killing the process group. Engines that
expose cooperative cancel (mizuchi
CancelToken) stop, returnlimit: cancelled, and the run is a typedFailure::Cancelledwith that report.The kill path still fires when the engine ignores the file; the child is
gone within five seconds. Engines without a token stay on the kill path.
Cancelled local runs write
failure.txtand a receipt whoseengine_versionis the engine report, with empty outputs.Reuse decision
Reuse the existing sandbox wait/kill, mizuchi
CancelTokenat the workeredge, and
Failure/ receipt reporting. The engine-agnostic signal is ascratch
cancelfile (not SIGTERM: that killed linux_native mizuchibefore it could report).
JobSourcestill has no execute-time cancelhook; the sandbox accepts an abort flag for when one exists. Kill after
grace stays
Failure::Limit.Lane
feat/120.worktrees/issue-1205f8aa37e8f95d77adbd603558bdeb32b45103d91482eeb7c46ef6c4d6abf67edd30720b29009d854Verification
cargo fmt --all -- --checkcargo clippy --locked --workspace --all-targets -- -D warningscargo clippy --locked -p kako-source-sekai --features sekai-client --all-targets -- -D warningscargo test --locked --workspacecargo test --locked -p kako-source-sekai --features sekai-clientbash scripts/validate-workflow-skills.shpython3 scripts/adr-index --checkFocused: cooperative cancel returns the engine report without kill;
ignored cancel kills within five seconds; source abort uses the same
path; mizuchi timeout is typed cancelled; cancelled receipt carries the
report; exclusive cancel-file create does not follow a symlink.
Skipped:
kekkai-guestuserspace payload tests (helper not on PATH).validate-behavior: skipped; the MVP and sandbox tests observe the
receipt,
failure.txt, and process lifetime.Autoreview
AUTOREVIEW_CODEX_CONFIG=model_provider=cliproxyapi "$AUTOREVIEW" --mode local --engine codexClean: no accepted/actionable findings.
Simplify-change
Userspace spawn uses the same PID-aware wait/kill path as in-process
backends (no watcher around kekkai's blocking deadline helper). Capture
stays a 4 MiB head drain per stream. Receipt identity reuses
engine_versionrather than a schema bump.Compatibility
2 * wall_clock + cancel graceso RLIMIT_CPUdoes not kill a cooperative engine first.
limit: cancelledstill complete; only afailed worker exit with that report is typed cancelled.