Repository navigation
Withdraw spawn stage - #854
Merged
Merged
Conversation
It uploaded to a bucket it never created, nothing ever downloaded the
staged data, and no staging bucket exists in the account — so it had
never run. Meanwhile `spawn stage estimate` published "Savings: $85.70
(93% reduction)" to anyone who typed it, which was the most concrete
thing the feature produced.
~1,600 lines: the command, its three subcommands, and the seven
stage-only functions in pkg/staging. pkg/staging/cost.go and its tests
went too — the model is entirely staging-specific ("Data Staging Cost
Comparison", EstimateStagingCost) and has nothing to estimate once the
feature is gone. Recoverable from history if the idea is revived.
pkg/staging is NOT removed. NewClient, resolveSchedulesBucket,
ensureBucket and UploadScheduleParams are live on the `spawn schedule`
path — three spawn-schedules-* buckets exist — so each of the seven
removed functions was checked for callers outside the command first, and
each had zero.
Deleting staging_test.go would have left the live half with no
behavioural coverage at all: its five tests covered only the functions
removed here, and resolveSchedulesBucket is the function #804 had just
made load-bearing, since the caller now persists which bucket it chose.
So four tests replace them, against the Substrate emulator: the shared
name is preferred; the RETURNED name is a bucket that actually exists,
because a function that creates the right bucket and reports the wrong
one is exactly what broke scheduled sweeps; the account-scoped fallback
works and carries the account id; and two calls agree. Swapping
dead-code coverage for live-code coverage is why both halves belong in
one change.
Two e2e tests referenced the command, and the coverage gate caught the
first by itself — "stale coverage classifications for commands no longer
in the binary: [covered:stage]", which is the right shape for a gate
over a classification list.
examples/README.md told users to run it; it now says what to do instead
(aws s3 cp, or an FSx data-repository association via --fsx-import-path).
Closes #805
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 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.
Closes #805.
Correctness audit 2026-10. Phase 5 decision, per your approval.Why withdraw rather than finish
spawn stage estimateprinted "Savings: $85.70 (93% reduction)" to anyonewho typed it. That figure was the most concrete thing the feature produced.
~1,600 lines removed: the command, its three subcommands, and the seven stage-only
functions in
pkg/staging.pkg/staging/cost.goand its 295 lines of tests went too. The model is entirelystaging-specific —
EstimateStagingCost, "Data Staging Cost Comparison" — and has nothingto estimate once the feature is gone. Recoverable from history if the idea is revived.
pkg/stagingis NOT removedThis is the trap the audit plan flagged, and it is real:
NewClient,resolveSchedulesBucket,ensureBucketandUploadScheduleParamsare live on thespawn schedulepath, and threespawn-schedules-*buckets exist in the account.So each of the seven removed functions was checked for callers outside the command first:
The coverage swap is the part worth reviewing
pkg/staging/staging_test.go's five tests covered only the functions removed here. Sodeleting it would have left the live half of the package with no behavioural coverage at
all — including
resolveSchedulesBucket, the function #804 had just made load-bearing,since the caller now persists which bucket it chose.
Four tests against the Substrate emulator replace them:
spawn-schedules-<region>is preferred;right bucket and reports the wrong name is precisely what broke scheduled sweeps;
way the shared name does;
call returning something different would make the persisted name wrong for every
schedule after the first.
Swapping dead-code coverage for live-code coverage is why both halves belong in one change
rather than a deletion now and a test later.
The e2e coverage gate caught one of these itself
That is the right shape for a gate over a classification list, and worth noting after a
day of finding ones that were not.
TestTier0_StageListEmptyalso went.Docs
examples/README.md's first staging step told users to runspawn stage upload. It nowsays what to do instead —
aws s3 cp, or an FSx data-repository association via--fsx-import-path— and the parameter file in step 2 still works for a normal launch.Verification
make check(all nested modules),make check-docswithdocs-gen/stage.mdremoved byregeneration, changelog gate,
semgrep0 findings,make api-snapshotno drift(
pkg/stagingis not in the public-surface set), Tier 0 e2e with-count=1, andspawn stagenow exits 1 withunknown command "stage".