Skip to content

fix(policy): ignore advisor provenance during contract inference - #3069

Merged
johntmyers merged 3 commits into
mainfrom
fix-advisor-provenance-contract/johntmyers
Sep 1, 2026
Merged

fix(policy): ignore advisor provenance during contract inference#3069
johntmyers merged 3 commits into
mainfrom
fix-advisor-provenance-contract/johntmyers

Conversation

@johntmyers

Copy link
Copy Markdown
Collaborator

Summary

Prevent policy-advisor contract inference from treating otherwise identical endpoints as distinct solely because one endpoint carries advisor provenance. This fixes the late follow-up identified on #2935, where a subsequent mechanistic proposal could be stored with an application error instead of being auto-approved.

Related Issue

No issue required: localized regression follow-up to #2935 and review comment.

Changes

  • Ignore provider_credentialed and advisor_proposed provenance while deduplicating effective endpoint contracts.
  • Ignore the same provenance while selecting an existing sandbox-owned rule.
  • Preserve the incoming advisor marker when mirroring a provider-owned contract into a new sandbox overlay.
  • Add the focused regression reproducer supplied in the review comment.

Testing

  • mise run pre-commit passes
  • cargo test -p openshell-policy passes (236 tests)
  • Unit tests added/updated
  • E2E tests not required; the regression is isolated to policy-library canonicalization

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs not required for this localized behavior correction

Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: John Myers <johntmyers@users.noreply.github.com>
@johntmyers
johntmyers force-pushed the fix-advisor-provenance-contract/johntmyers branch from 9758f2d to 7166ac0 Compare September 1, 2026 14:52
Signed-off-by: John Myers <johntmyers@users.noreply.github.com>
@johntmyers
johntmyers added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit 7ceea96 Sep 1, 2026
66 of 67 checks passed
@johntmyers
johntmyers deleted the fix-advisor-provenance-contract/johntmyers branch September 1, 2026 17:12
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.

2 participants