Skip to content

feat(evidence): accept declared unresolved sources - #729

Merged
jeremi merged 2 commits into
mainfrom
codex/evidence-declared-unresolved
Aug 12, 2026
Merged

feat(evidence): accept declared unresolved sources#729
jeremi merged 2 commits into
mainfrom
codex/evidence-declared-unresolved

Conversation

@jeremi

@jeremi jeremi commented Aug 12, 2026

Copy link
Copy Markdown
Member

Summary

  • add a closed, exact unresolvedProblem declaration for HTTP JSON sources
  • collapse Relay V2 unresolved consultations into a data-free Evidence unavailable outcome
  • preserve dependency-failure semantics for unresolved fetch and fetch-set members
  • add truthful declaredUnresolved fixture coverage, normative contracts, and security traceability

Why

Relay V2 intentionally makes no-match, ambiguous-match, and concealed outcomes indistinguishable as one exact 404 Problem Details response. Registry Evidence needs to accept that governed source outcome without parsing or exposing sensitive source state.

Security invariants

  • only an exact configured status, media type, type, and code tuple is accepted
  • response bodies and configured problem details never enter public errors, audit payloads, or fixture traces
  • singular/search outcomes are neutral unresolved; dependent fetch/member outcomes remain dependency failures
  • malformed, undeclared, oversized, duplicate-member, and wrong-media responses fail unavailable
  • optimized HTTP batching cannot use this declaration

Verification

  • cargo fmt --all -- --check
  • cargo test -p registry-evidence --locked
  • cargo clippy -p registry-evidence --all-targets --locked -- -D warnings
  • products/evidence/scripts/check-contracts.sh
  • products/evidence/scripts/check-source-neutrality.sh
  • products/evidence/scripts/check-config-key-paths.sh
  • cargo metadata --locked --format-version 1
  • git diff --check

This is the Registry Evidence prerequisite for the Solmara authority-cell reset and the v0.20.1 fix-forward release. The already-published v0.20.0 tag and assets are not changed.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
@jeremi
jeremi marked this pull request as ready for review August 12, 2026 11:22
@jeremi
jeremi enabled auto-merge (squash) August 12, 2026 11:23
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
@jeremi
jeremi merged commit 973afcd into main Aug 12, 2026
32 checks passed
@jeremi
jeremi deleted the codex/evidence-declared-unresolved branch August 12, 2026 11:30

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 71c871d94f

ℹ️ 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".

HttpJson {
base_url: String,
posture: AcquisitionPosture,
/// Optional exact upstream Problem Details tuple which means that the

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add the missing DCO sign-off

For any PR containing this commit, the DCO job will fail because its message has no Signed-off-by: Name <email> trailer; .github/workflows/dco.yml:27-38 checks every non-merge commit and exits unsuccessfully when that trailer is absent. Recreate this commit with git commit -s before submitting it.

AGENTS.md reference: AGENTS.md:L274-L274

Useful? React with 👍 / 👎.

Comment on lines +2130 to +2133
let declared_unresolved = config
.sources
.get(requirement.initial_source())
.is_some_and(|source| source.unresolved_problem().is_some());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate unresolved fixtures for every requirement

When two requirements reference the same fixture path, this requirement-specific flag is computed only for the first one because the existing cache check at lines 2127-2129 skips every later reference. If the first requirement's initial source declares unresolvedProblem but a later one's does not, Bundle::load accepts the fixture's declaredUnresolved case without ever validating it against the later source; configuration validation does not prohibit shared fixture paths, so a directly loaded runtime bundle can bypass this new startup invariant depending on requirement order. Validate the marker for every referencing requirement before reusing the parsed fixture, or reject duplicate references at bundle load.

AGENTS.md reference: products/evidence/AGENTS.md:L85-L94

Useful? React with 👍 / 👎.

"fixture declared-unresolved marker must be true",
));
}
None => false,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require a fixture case for each unresolved declaration

When an initial source declares unresolvedProblem but its fixture retains the old no-match and ambiguous cases, None => false leaves those existing IDs sufficient for FixtureCategories::complete(), so the production/evidence-grade bundle loads without any declaredUnresolved case. This lets a project claim complete fixture coverage without exercising the newly governed data-free outcome that the fixture contract says every declaring source must include; track whether the marker was observed and reject its absence when declared_unresolved is true, with a focused negative test.

AGENTS.md reference: products/evidence/AGENTS.md:L96-L102

Useful? React with 👍 / 👎.

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