Skip to content

feat(tracked): add the create-time tracking gates and retirement - #20

Merged
lstocchi merged 1 commit into
redhat-developer:mainfrom
lstocchi:create-time-2
Nov 30, 2026
Merged

lstocchi merged 1 commit into
redhat-developer:mainfrom
lstocchi:create-time-2

Conversation

@lstocchi

Copy link
Copy Markdown
Collaborator

prepare_tracking runs the checks that guard a re-create before the output is truncated: an existing tracked image's mounted, foreign-sidecar and unsnapshotted-work refusals, the image- and host-side overlap checks, repository discovery with the dirty check and artifact advisory, and the label (validated when explicit, derived from the image name otherwise). retire_old_tracking moves an owned sidecar's refs to previous/<timestamp>/ and removes the file, while a sidecar whose UUID records another image loses only its file.

The gates need no git, so a missing git cannot silently truncate a live tracked image. The types and entry points are pub for the create flow that lands next; the gates have library-level unit tests, including git-backed ones that skip when git is missing.

`prepare_tracking` runs the checks that guard a re-create before the
output is truncated: an existing tracked image's mounted, foreign-sidecar
and unsnapshotted-work refusals, the image- and host-side overlap checks,
repository discovery with the dirty check and artifact advisory, and the
label (validated when explicit, derived from the image name otherwise).
`retire_old_tracking` moves an owned sidecar's refs to
`previous/<timestamp>/` and removes the file, while a sidecar whose UUID
records another image loses only its file.

The gates need no git, so a missing git cannot silently truncate a live
tracked image. The types and entry points are `pub` for the create flow
that lands next; the gates have library-level unit tests, including
git-backed ones that skip when git is missing.

Assisted-by: Claude Code: DeepSeek-V4.1-Flash
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
@lstocchi
lstocchi merged commit 37fa08e into redhat-developer:main Nov 30, 2026
4 checks passed
@lstocchi
lstocchi deleted the create-time-2 branch November 30, 2026 09:02
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