Uh oh!
There was an error while loading. Please reload this page.
Add fixture-driven formal conformance tests for intent attribution compliance - #49594
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Looks good! 🎯 This PR adds the missing fixture-driven formal conformance tests for intent attribution compliance, exactly as specified in issue #49593. The implementation: ✅ Binds real implementations — exercises actual pkg/intent.Resolver and pkg/intent.PolicyCompiler against three normative YAML fixtures This is ready for review. The fixture-driven approach mirrors the specification's intent and will provide strong conformance guarantees for the intent attribution system.
|
PR Triage
Draft; adds formal fixture conformance tests only, no production code changes.
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
Adds fixture-driven conformance tests for intent attribution and fail-closed policy behavior.
Changes:
- Adds formal resolver/compiler tests using three YAML fixtures.
- Documents formal invariants and their test coverage.
Show a summary per file
| File | Description |
|---|---|
pkg/intent/compliance_fixtures_formal_test.go | Adds fixture adapters, assertions, and conformance tests. |
specs/intent-attribution-compliance/README.md | Defines the formal model, invariants, coverage map, and usage. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 4
- Review effort level: Balanced
| F5_MappedStatusPermitsRelaxedPolicy(a) ≜ | ||
| Resolve(a).status = mapped ⇒ Compile(Resolve(a)) ≠ safest_policy |
| F6_PolicyDeterminism(a) ≜ | ||
| Resolve(a) = Resolve(a) ∧ Compile(Resolve(a)) = Compile(Resolve(a)) |
| pr.ExplicitIntent = &intent.IntentRecord{ | ||
| Status: intent.AttributionMapped, | ||
| Source: intent.AttributionSource(fixture.Input.Artifact.ExplicitIntent.Source), | ||
| Rule: "fixture_explicit_intent", | ||
| } |
| Autonomy: fixture.Expected.Policy.Autonomy, | ||
| WriteScope: fixture.Expected.Policy.WriteScope, |
🎉 This pull request is included in a new release. Release: |
This adds the missing formal fixture-level conformance coverage for
specs/intent-attribution-compliance/README.md. The new suite binds the three normative YAML fixtures to the realpkg/intent.Resolverandpkg/intent.PolicyCompiler, covering attribution precedence, ambiguous-root handling, and fail-closed governance.Formal fixture suite
pkg/intent/compliance_fixtures_formal_test.goexplicit-intent-wins.yamlambiguous-root-closing-issues.yamlunlinked-pr-fail-closed.yamlBehavior covered
status=ambiguous,source=closing_issuestatus=unlinked,source=noneSpec README formalization
specs/intent-attribution-compliance/README.mdwith:F1–F7)