Skip to content

fix: report dead-task respawns as restarts - #71

Merged
myobie merged 3 commits into
mainfrom
agent/clarify-restart-reporting
Jul 31, 2026
Merged

fix: report dead-task respawns as restarts#71
myobie merged 3 commits into
mainfrom
agent/clarify-restart-reporting

Conversation

@myobie

@myobie myobie commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Report a successful replacement as restarted.
  • Use launched only when st2 starts a task without a restart reap.
  • Use gc only for final garbage collection without a replacement.
  • Keep reap-before-spawn ordering, error behavior, runtime behavior, and public output fields.
  • Preserve restarted when a catalog-selected pass absorbs its nested report.
  • Use concise ASD-STE100-style comments, test names, and assertion messages.

Taxonomy

  • First launch: spawn succeeds without a prior restart reap; report only launched.
  • Successful restart: dead-active reap succeeds, then replacement spawn succeeds; report only restarted.
  • Final garbage collection: final removal succeeds and no replacement is spawned; report only gc.
  • Failed reap: do not spawn that replacement and do not report a restart.
  • Failed replacement spawn: the reap can succeed, but do not report a restart.
  • Ordering: each dead-active record is reaped before its replacement spawn.

The CLI and eval supervisor continue to print the same public field names. The change separates their values.

Current-main correction

Current main added catalog-selected reporting after the first PR draft. The restack found two proof gaps:

  • Selected restart tests still expected launched and gc.
  • UpReport::absorb did not copy the new restarted vector.

This head corrects both gaps and proves that selected reconciliation does not act on sibling tasks.

Size

Measure Before rewrite Exact current head
PR-local added source 74 lines / 216 words 91 lines / 275 words
Diffstat +77 / -9 +94 / -17

The increase is the current-main selected-path proof and the required restarted absorb operation. Runtime behavior outside report classification is unchanged.

Current-main integration

  • Merged live main ea58cda7d5ffd8a64cf157259425c6bd26549cb4 normally.
  • Exact head: ac653955bf2d6830cc9ae84ed415313fa96a2133.
  • No force push, deploy, catalog mutation, runtime rollout, or reconcile occurred.

Verification at ac653955bf2d6830cc9ae84ed415313fa96a2133

  • cargo test --test run -- --test-threads=1: PASS (27/27)
  • cargo test --test native_only -- --test-threads=1: PASS (3/3)
  • cargo test --all-targets --all-features -- --test-threads=1: PASS
  • Scoped cargo clippy --test run --all-features with warnings denied: PASS
  • cargo test --doc --workspace: PASS
  • cargo doc --workspace --no-deps: PASS with five unchanged live-main warnings
  • git diff --check: PASS
  • Hosted Nix: PASS — run 30638466148 / job 91182027806

This PR remains open and unmerged for review.

@myobie
myobie force-pushed the agent/clarify-restart-reporting branch from 03cd911 to 02c2c4b Compare July 29, 2026 21:41
@myobie
myobie marked this pull request as ready for review July 29, 2026 21:55

myobie commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Exact-head completion receipt for ac653955bf2d6830cc9ae84ed415313fa96a2133: hosted Nix passed in run 30638466148 / job 91182027806. Local focused, full-workspace, scoped Clippy, doctest, documentation, and diff gates are also green. The PR remains open and unmerged for review.

@myobie
myobie merged commit 3744c42 into main Jul 31, 2026
1 check passed
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