Preserve per-tag directories to prevent bundle overwrites (merges into #96)#103
Conversation
There was a problem hiding this comment.
💡 Codex Review
Fixops/backend/api/evidence/router.py
Lines 18 to 47 in 7617726
The packager now persists bundles and manifests into tag-derived subdirectories (tag_path = Path(tag.replace(':', '_')) followed by parent.mkdir()), so tags containing namespaces like ghcr.io/org/app:1.0 produce files in nested folders. The evidence API still assumes everything lives directly under the root, using manifest_dir.glob("*.yaml") and constructing paths with f"{tag}.zip"/f"{release}.yaml", and the route parameter cannot capture /. As a result, namespaced bundles created after this change will neither be listed nor retrievable via /evidence. The API needs to mirror the new path transformation (e.g. recursive globbing or matching on the same translated tag) to avoid returning empty results or 404s for valid bundles.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR.
88b9980
into
codex/implement-parser-hardening-and-safety-improvements
…/123 + build:5.50s (perf flake 1217ms vs 1000ms) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🤖 PR by cubic
This PR addresses the comment in #96 – Harden parser validation and evidence guardrails
File:
evidence/packager.pyLine: 268
Comment:
This fix was automatically generated. Please review the changes carefully before merging.
Summary by cubic
Preserves per-tag directory structure for evidence bundles and manifests to prevent overwrites from namespaced tags. Implements the feedback from #96 by using nested paths and creating parent directories.
Bug Fixes
Migration