Repository navigation
test(acquire): validate mirror history end to end - #248
Conversation
Exercise the existing mirror and promotion workflows with guarded disposable registry fixtures, actual service HTTP calls, rendered dashboard assertions, and verified cleanup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f6f2c5f5f0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🟡 Changes recommended
Cleanup can leave fixtures behind after a package failure or falsely report success against the wrong fixture attempt on a partial rerun.
2 open issues
What changed in this PR
Adds end-to-end validation of mirror history across the existing acquisition and promotion workflows, covering the lifecycle acceptance work in #163.
Changes:
- Adds a hosted workflow using disposable registry fixtures to verify copying, promotion, deletion, history skips, forced copying, and dashboard rendering.
- Exposes mirror workflow outputs and configurable graph-event artifact names while preserving existing defaults.
- Adds validation tests and documentation for execution, evidence, and cleanup.
| File | Description |
|---|---|
tests/mirror_history/test_mirror_history_e2e.py |
Tests lifecycle assertions, fixture safety, cleanup, and HTTP service handling. |
tests/mirror_history/mirror_history_e2e.py |
Implements live validation, evidence capture, and guarded cleanup. |
docs/reference/mirror-history.md |
Links to the end-to-end validation guide. |
docs/guides/acquire/validating-mirror-history.md |
Documents execution, acceptance criteria, artifacts, and recovery. |
docs/guides/acquire/README.md |
Adds the validation guide to the acquisition index. |
docs/contributing/workflow-naming.md |
Defines the validation workflow naming category. |
.github/workflows/validate-mirror-history.yml |
Orchestrates checks, fixture lifecycle validation, and cleanup. |
.github/workflows/_mirror-image.yml |
Exposes copy, skip, and digest outputs plus configurable artifact names. |
Review effort: Balanced
Follow GHCR blob redirects without forwarding registry authorization, redact signed download diagnostics, check untagged referrer removal, retry bounded visibility failures, and preserve fixture identity and independent cleanup on reruns. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Match the existing SBOM promotion path: only image tags enter the scan matrix. This prevents a concurrent fallback-index promotion from deleting discovery metadata before image-owned referrer cleanup, which the live version-inventory assertion exposed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>


Summary
Closes #163. Completes the remaining acceptance work for #157, whose close-out stays separate.
ghcr.io/toddysm/{quarantine,golden}/mirror-history-e2e-<run-id>-<attempt>/imagepackages. Normal image packages are not modified.Validation and review
Testing mode: hosted, normal GitHub Actions and Copilot review authorized.
Tested head:
f6f2c5f5f0436a7413f7093809c9e298a4cc639f.Local validation on Python 3.12/macOS arm64:
python -m pytest -q tests/mirror_history: 20 passed, including fixture guards, lifecycle failure cases, cleanup authorization/verification, real HTTP service startup/termination, credential-log redaction, and assertion-disable rejection.MYPYPATH=apps/python-app/libs/cssc_common mypy --python-executable .venv/bin/python --follow-imports=silent tests/mirror_history/mirror_history_e2e.py: clean.python -m compileall -q tests/mirror_history: clean. Editor-specific diagnostics are not exposed in this session; CLI syntax/type diagnostics were used instead.actionlint1.7.12: both changed workflows clean.shellcheck -S warning0.11.0: all 18 new workflow shell blocks clean.git diff --checkclean.Local graph-library/graph-service dependency restoration was blocked by the configured package mirror’s missing LadybugDB wheel; no dependency constraints were changed. The hosted checks job runs all libraries and services, including those graph suites, before any live registry mutation.
Self-review: safety/diagnostic findings addressed before publishing; no remaining findings. Acceptance requires every lifecycle job, cleanup, CodeQL, and settled review to pass; local or partial workflow success is not sufficient.
Final current-head evidence
Validated head:
364e225446e831788bec30d34dff749469f28a6d.Complete hosted acceptance: https://github.com/toddysm/cssc-framework/actions/runs/40562725339 — success, including verified deletion of both disposable packages.
The live test exposed and fixed two real producer defects: the registry reader now follows GHCR blob CDN redirects without forwarding registry authorization or exposing signed queries, and normal promotion excludes fallback-referrer index tags (matching the SBOM path) so they cannot race image-owned referrer cleanup. Initial historical results above are superseded by this current-head evidence.