Skip to content

test(tracked): safety gates end to end - #22

Open
lstocchi wants to merge 1 commit into
redhat-developer:mainfrom
lstocchi:track_gates
Open

lstocchi wants to merge 1 commit into
redhat-developer:mainfrom
lstocchi:track_gates

Conversation

@lstocchi

Copy link
Copy Markdown
Collaborator

The create-time refusals and their rollback now have end-to-end coverage. Each refusal is asserted together with the state it must leave alone: an overlapping mapping disables tracking but still writes the image; a label collision and a foreign ref of the same label fail before the output is created and move no ref; a re-create without --discard-unsnapshotted leaves the image byte-identical and its base in place; a mounted image is refused until --replace-mounted accompanies the discard; and a --from failure after the tracking checks leaves the old image tracked with its refs unmoved.

The git-less paths run the binary with an empty PATH: the mounted gate still fires on an old image, and retirement without git removes only the sidecar, warns, and leaves the refs under refs/ext4kit//. A foreign sidecar is reported, owns no refs, and needs neither the discard override nor moves another image's history. Tracking stays opt-in for re-creates: without --track the gates still refuse and --discard-unsnapshotted still retires the old refs.

The create-time refusals and their rollback now have end-to-end coverage.
Each refusal is asserted together with the state it must leave alone: an
overlapping mapping disables tracking but still writes the image; a label
collision and a foreign ref of the same label fail before the output is
created and move no ref; a re-create without --discard-unsnapshotted
leaves the image byte-identical and its base in place; a mounted image is
refused until --replace-mounted accompanies the discard; and a --from
failure after the tracking checks leaves the old image tracked with its
refs unmoved.

The git-less paths run the binary with an empty PATH: the mounted gate
still fires on an old image, and retirement without git removes only the
sidecar, warns, and leaves the refs under refs/ext4kit/<label>/. A
foreign sidecar is reported, owns no refs, and needs neither the discard
override nor moves another image's history. Tracking stays opt-in for
re-creates: without --track the gates still refuse and
--discard-unsnapshotted still retires the old refs.

Assisted-by: Claude Code: DeepSeek-V4.1-Flash
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
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