acc: extract shared invariant prologue - #6075
Merged
Merged
Conversation
Collaborator
Integration test reportCommit: 8f17e46
10 interesting tests: 4 RECOVERED, 3 flaky, 3 SKIP
Top 50 slowest tests (at least 2 minutes):
|
radakam
force-pushed
the
acc-migrate-skip-terraform-failures
branch
from
July 27, 2026 13:55
e151782 to
8a2c636
Compare
…gets no_drift, migrate, continue_293, delete_idempotent and destroy_idempotent each carried their own copy of the config render (data copy, init script, envsubst), the destroy-on-exit trap, and the deploy + panic-scan + INPUT_CONFIG_OK sequence. Move all of it into acceptance/bundle/invariant/script.prepare, which the harness picks up for the whole subtree, so each script holds only the invariant it asserts. The helpers are functions rather than prepare-time side effects because the harness concatenates script.prepare outside the subshell it wraps the script in, so a trap installed at prepare time would belong to the outer shell. invariant_deploy takes the deploy log name as its first argument, since the targets log to LOG.deploy, LOG.deploy_initial and LOG.deploy.293. Incidental deltas, all confined to LOG* files (logged, not compared): continue_293 gains LOG.config and a traced cleanup destroy, and destroy_idempotent's trap logs to LOG.destroy rather than LOG.destroy_final.
radakam
force-pushed
the
acc-migrate-skip-terraform-failures
branch
from
July 28, 2026 07:04
8a2c636 to
b8576df
Compare
Drop the comments that restated the line below them and condense the helper docs, keeping only the non-obvious parts: why invariant_setup must be called from the target rather than at prepare time, and what INPUT_CONFIG_OK signals to the fuzzer.
radakam
marked this pull request as ready for review
July 28, 2026 07:13
Guard INPUT_CONFIG in invariant_cleanup: scripts run under set -u, and a caller that builds its own config leaves the variable unset. Split invariant_render out of invariant_setup so such a caller can override the render alone from its own script.prepare, which the harness concatenates after this file. Lift set -e around the deploy in invariant_deploy so the panic scan still runs when the deploy fails: a config the CLI rejects must not panic on the way out. A clean failure exits with the deploy's own code and prints no INPUT_CONFIG_OK.
no_drift, migrate and continue_293 each ran the same plan + panic-scan + verify_no_drift.py sequence. Move it into invariant_verify_no_drift so a caller whose config the server does not round-trip exactly can override the check alone. migrate now logs the plan to LOG.planjson like the other two.
radakam
added a commit
that referenced
this pull request
Jul 28, 2026
#6075 replaces the sourced prologue.sh with acceptance/bundle/invariant/script.prepare, which the harness concatenates for the whole subtree, and turns the shared setup into helpers a child script.prepare can override. - Drop prologue.sh along with its FUZZ_SEED branch; no target script sources anything now. - Add fuzz/script.prepare, overriding invariant_render to emit the generated config and run the validate panic probe, and -- unless FUZZ_CHECK_DRIFT is set -- invariant_verify_no_drift with the plan-determinism oracle. - Drop SKIP_DRIFT_CHECK: no_drift and migrate no longer branch on fuzz mode. migrate now runs the determinism oracle in fuzz mode rather than skipping the drift check entirely. - Guard INPUT_CONFIG in migrate/script, which the fuzzer leaves unset.
denik
approved these changes
Jul 28, 2026
The set -e lift in invariant_deploy and the INPUT_CONFIG guard in invariant_cleanup serve only a caller that generates its own config, which does not exist in this PR. Drop both so the change is a pure extraction: every helper now runs the same sequence the five targets ran before, and #5686 adds the two deltas along with the caller that needs them. invariant_render and invariant_verify_no_drift stay separate functions. Both are pure structure -- the code inside them is unchanged -- and splitting them is what lets a config generator override the render or the drift check on its own.
Drop the sentences that restated the body (what invariant_render renders, what invariant_deploy deploys) and keep one line per helper for the part the code cannot show: why setup must run from the target, which helpers are override seams, and that invariant_deploy accepts VAR=val prefixes.
radakam
enabled auto-merge
July 28, 2026 12:34
radakam
added a commit
that referenced
this pull request
Jul 28, 2026
# Conflicts: # acceptance/bundle/invariant/script.prepare #6075 landed as a pure extraction, so main's script.prepare no longer carries the two deltas this branch had added to it. Keep main's version and re-add only the INPUT_CONFIG guard in invariant_cleanup, which this branch does need: the fuzzer clears the INPUT_CONFIG matrix and scripts run under set -u. The set -e lift around the deploy is not re-added. It is redundant here -- when a seed fails, fuzz/script already scans every LOG.* for panics before classifying it, so a config that panics on the way out is still reported as a bug rather than a rejection.
Collaborator
Integration test reportCommit: 735d65e
811 interesting tests: 803 FAIL, 3 KNOWN, 3 RECOVERED, 2 SKIP
Top 23 slowest tests (at least 2 minutes):
|
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.
Changes
Move the shared invariant setup into
acceptance/bundle/invariant/script.prepareand convert all five targets (no_drift,migrate,continue_293,delete_idempotent,destroy_idempotent) to it. Each carried its own copy of the config render, the destroy-on-exit trap, the deploy + panic-scan +INPUT_CONFIG_OKsequence, and the no-drift check; each script now holds only the invariant it asserts.No behavior change — the helpers run the same sequences as before. The five copies were not identical, so sharing one implementation shifts three log filenames, which are reported rather than compared.
Groundwork for #5686.