feat: clean-slate vNext schema v1 identity foundation - #48
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b954cffec
ℹ️ 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".
| period = (binding.period_key, binding.as_of, binding.cadence) | ||
| previous = digest_periods.get(binding.artifact_integrity_digest) | ||
| if previous is not None and previous != period: | ||
| raise _error("artifact_digest_conflict") |
There was a problem hiding this comment.
Reject conflicting metadata for reused artifact digests
When two same-period bindings reuse an artifact_integrity_digest (for example an unsuffixed canonical plus a .variant-<digest> variant), this check only compares period_key/as_of/cadence. That means the same full-artifact digest can be accepted with a different semantic_digest or report schema/contract metadata because the canonical and variant target names do not collide. Since the artifact digest is supposed to identify the validated report bytes, allowing it to bind conflicting report identity metadata breaks the fail-closed identity contract and can corrupt later artifact-to-binding matching.
Useful? React with 👍 / 👎.
🤖 Codex PR Review🚫 Merge blocked: 2 serious issue(s) found in high-risk files ⚖️ Codex Review Arbitration🚫 block: The current findings are not cleared by the PR source of truth. First, 🚫 Blocking IssuesThese issues must be fixed before this PR can be merged: 1. 🟠 [HIGH] Logic in
|
Co-Authored-By: Codex <noreply@openai.com>
|
Final closure evidence (closure_count=1/max=1, absolute_final=true):
Final validation: focused |
|
Permanent freeze/close-reslice: closure_count=1/max=1, absolute_final=true; fingerprint=1e2d72cb050664ab59e8. Preserve branch/worktree/commits/comments/unresolved review evidence/tests. No further code action. |
Scope
Fresh clean-slate foundation-only reslice from
origin/main@d13dad1cfd2680cfdf9c96bc4687fc3d32ffc015.Type/wire namespace is the only dispatch source of truth. This PR adds only immutable
VNextIdentityBinding/VNextIdentityIndexplus strict schema-v1 parser/serializer. It has noSelectedCandidate, allocation mode, raw-report verification,PublicationEntry,PublicationPlan, publisher/build/Pages/I/O, legacy compatibility, dual-read, or migration.Fixed contract
qar_vnext_identity.v1, binding discriminatorqar_vnext_binding.v1;contract_version_for_schema();Validation matrix
Focused adversarial tests cover version/namespace/type rejection, target suffixes, optional attachments, cadence/period, canonical/display policy, duplicate identity/collision, safe integers, Mapping snapshot, and deterministic roundtrip.
python3 -m pytest -q tests/test_vnext_identity_schema_v1_foundation.py— 18 passedpython3 -m pytest -q— 283 passedpython3 -m ruff check src tests— passedpython3 -m compileall -q src tests— passedgit diff --check— passed