Repository navigation
feat(s3): seedable spore.host task-completion outcomes (#360) - #361
Merged
Merged
Conversation
A GET of tasks/<task_id>/completion.json now resolves a seedable, clock-aware spore.host `spawn task run` completion record (task_id, exit_code, state, started_at, ended_at), matching taskproto.CompletionRecord. New control-plane endpoints POST/DELETE /v1/spawn/task-completion seed by task id, mirroring the /v1/ssm/command-invocation (#345) pattern. - Before a seed's ended_at (simulated clock) the GET is NoSuchKey ("still running"); at/after, the record is served -- exercises a consumer's real poll loop deterministically. - No seed + matching key -> nominal exit_code:0/completed; a real staged object at the key always wins; any non-tasks/*/completion.json key stays a normal 404. - Substrate does not execute the task; this is the seedable completion observation only, per the scope boundary. Closes #360.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Implements #360 — a seedable, clock-aware completion signal for spore.host
spawn task run, so the workflow adapters (nf-spawn, miniwdl-spawn, cwl-spawn, snakemake-executor-plugin-spawn, airflow-spawn, pegasus-spawn) can run engine-composition CI against Substrate with only the completion outcome seeded.What
A GET of
tasks/<task_id>/completion.jsonagainst a bucket resolves a seedable completion record —task_id,exit_code,state(completed/failed),started_at,ended_at— matchingtaskproto.CompletionRecord.New control-plane endpoints, mirroring
/v1/ssm/command-invocation(#345):POST /v1/spawn/task-completion—{task_id, exit_code, state, started_at, ended_at}DELETE /v1/spawn/task-completion?taskId=...(one) / no query (all)Behaviour
ended_at(on the simulated clock viaTimeController) the GET returnsNoSuchKey("still running"); at/after, the record is served — so a consumer's real poll loop is exercised deterministically.tasks/*/completion.jsonkey →exit_code:0 / completed(per the seeding philosophy).aws s3 cppath) is served verbatim — the resolver only runs when the key is genuinely absent.tasks/*/completion.jsonkey stays a normal 404 — this never turns a bare miss into a fake success.Per the #360 discussion:
completion.jsonis the only object the spawn CLI'sfetchCompletion()reads (.exitcodeis unread, so not synthesized);state ∈ {completed, failed}.Scope
Substrate does not execute the task — this is the seedable completion observation only, exactly the category of #345 / SageMaker / Bedrock seeds. In-scope per
docs/scope.md.Tests
emulator/spawn_control_test.go: nominal success, seeded failure, clock-gate (futureended_at→ NoSuchKey), real-object-wins, non-matching-key-stays-404, seed+targeted-clear+clear-all+missing-task_id-400. Full race suite + lint clean.Closes #360.