Skip to content

Make extend --job-array-* move the enforced deadline; gate spawn:ttl writers (#983) - #993

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/983
Oct 16, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/983

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Fixes #983

What was wrong

spawn extend --job-array-* wrote only spawn:ttl=<raw arg>. spored and the TTL reaper enforce spawn:ttl-deadline, which it never touched. The command printed "Job array TTL extended!" and every instance still died at its original deadline.

Changes

Evidence

  • The gate against an origin/main checkout fails with extendJobArrayWithAudit, runStart and startJobArray.
  • The gate against a compiling revert in this branch (array updater overwrites tags with {"spawn:ttl": newTTL}, start re-adds the write) fails with jobArrayTagUpdater and runStart. TestJobArrayExtendMovesEachInstancesDeadline and TestJobArrayExtendRaisesEachInstancesCostLimit fail too.
  • make check: the only failure is the known Docker-only TestGenerateWrapper_ChownFixesCrossUIDStickyUnlink_Docker. make check-nested: all 9 nested modules clean.
  • Not reproduced live. No AWS resources were used.

@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 53.84615% with 18 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/extend.go 52.00% 11 Missing and 1 partial ⚠️
cmd/state.go 57.14% 5 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

…writers (#983)

The job-array path of `spawn extend` wrote only spawn:ttl=<raw argument>. spored
and the TTL reaper enforce spawn:ttl-deadline, so it reported success and moved
nothing. Each array instance now goes through extensionTags, the same function
the single-instance path uses (computeExtendedTTLTags plus the #639 cost-limit
decision), so the two paths cannot drift.

Audit of every other spawn:ttl writer: `spawn start` (single and job-array)
"restored" spawn:ttl-remaining into spawn:ttl without the deadline. That changed
nothing enforced, corrupted the total-from-launch meaning, and shortened the TTL
on pre-deadline instances. Start no longer rewrites the TTL and tells the user
the deadline still applies, which matches the documented fixed-deadline design
(#928). launch's conditional deadline is filed as #990, and the LaunchTime-anchor
problem as #992.

TestEveryTTLTagWriterAlsoWritesTheDeadline parses every non-test .go file and
fails when a declaration writes spawn:ttl without writing or deleting
spawn:ttl-deadline. There is no allowlist. It fails on origin/main
(extendJobArrayWithAudit, runStart, startJobArray).

Fixes #983 (#983)
@scttfrdmn
scttfrdmn merged commit baad802 into main Oct 16, 2026
8 checks passed
@scttfrdmn
scttfrdmn deleted the fix/983 branch October 16, 2026 22:16
@scttfrdmn scttfrdmn mentioned this pull request Oct 16, 2026
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.

spawn extend --job-array-* writes only spawn:ttl, so it never moves the deadline spored and the reaper enforce

1 participant