Skip to content

test: inject conflicts into the random invariant model#82

Merged
andyrewlee merged 1 commit into
mainfrom
audit/35-model-inject-conflicts
Jun 15, 2026
Merged

test: inject conflicts into the random invariant model#82
andyrewlee merged 1 commit into
mainfrom
audit/35-model-inject-conflicts

Conversation

@andyrewlee

Copy link
Copy Markdown
Owner

runModel's cases never call conflictOn, so every random restack took the clean
path -- ErrConflict/PendingReparent/Continue were unreachable in the random walk
(only the fixed 2-branch fixtures exercised them), so the model never explored
op-after-op interactions around a just-resolved rebase. Add an 11th carve-out
(like the repair/prune ones, outside the undo oracle): with low probability pick
a non-trunk-parented branch, conflictOn it, amend its parent to trigger the
upstack conflict, assert ErrConflict + rebase-in-progress, Continue, then assert
the restack is idempotent and invariants hold. The resolved state flows into the
later walk for free. Stable across seeds (-count=6).


Part of a 38-PR stacked diff (audit/01audit/38), reviewed and merged bottom-up. This PR is based on audit/34-abort-into-engine.

@andyrewlee andyrewlee force-pushed the audit/34-abort-into-engine branch from df2d219 to 9ef69db Compare June 15, 2026 06:49
runModel's cases never call conflictOn, so every random restack took the clean
path -- ErrConflict/PendingReparent/Continue were unreachable in the random walk
(only the fixed 2-branch fixtures exercised them), so the model never explored
op-after-op interactions around a just-resolved rebase. Add an 11th carve-out
(like the repair/prune ones, outside the undo oracle): with low probability pick
a non-trunk-parented branch, conflictOn it, amend its parent to trigger the
upstack conflict, assert ErrConflict + rebase-in-progress, Continue, then assert
the restack is idempotent and invariants hold. The resolved state flows into the
later walk for free. Stable across seeds (-count=6).
@andyrewlee andyrewlee changed the base branch from audit/34-abort-into-engine to main June 15, 2026 06:49
@andyrewlee andyrewlee force-pushed the audit/35-model-inject-conflicts branch from 1722238 to 61aba0f Compare June 15, 2026 06:50
@andyrewlee andyrewlee merged commit f29216e into main Jun 15, 2026
4 checks passed
@andyrewlee andyrewlee deleted the audit/35-model-inject-conflicts branch June 15, 2026 06:51
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