Skip to content

Wire intent policy enforcement and OTel Level 1 contract coverage - #52329

Closed
pelikhan with Copilot wants to merge 4 commits into
mainfrom
copilot/spdd-daily-spec-work-plan-2026-08-12
Closed

Wire intent policy enforcement and OTel Level 1 contract coverage#52329
pelikhan with Copilot wants to merge 4 commits into
mainfrom
copilot/spdd-daily-spec-work-plan-2026-08-12

Conversation

Copilot AI commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Daily SPDD review found intent policies were compiled but advisory-only, and OTel Level 1 compliance still had unimplemented T-OT-008–011 coverage. This change adds feature-flagged runtime enforcement and closes the OTel/spec sync gaps.

  • Intent policy enforcement
    • Added pkg/intent/authz.Authorizer.
    • Wired MCP tool-call authorization behind GH_AW_INTENT_POLICY_ENFORCEMENT=true.
    • Enforces allowed/denied tools, write scope, human approval, required checks, auto-merge, and max attempts.
    • Fails closed when enforcement is enabled but policy loading fails.
GH_AW_INTENT_POLICY_ENFORCEMENT=true \
GH_AW_INTENT_POLICY_PATH=.github/intent-policy.json \
GH_AW_INTENT_LABELS=documentation \
gh aw mcp-server
  • Runtime regression coverage

    • Added tests proving denied tools are rejected.
    • Added tests proving MaxAttempts and AutoMergeAllowed are read from the compiled policy at execution time.
  • OTel compliance

    • Added contract coverage for T-OT-008 through T-OT-011.
    • Aligned outcome-evaluation span naming with the spec: gh-aw.outcome.evaluate.
    • Updated validate-otel-contract to include/report the new Level 1 IDs.
  • Spec sync

    • Updated intent governance audit status for feature-flagged enforcement.
    • Added OTel safeguard text: stubbed tests cannot count toward Level 1 conformance.
    • Added replace-label bidirectional sync notes between spec and compliance fixtures.
    • Added objective-mapping → intent-policy migration tracking notes.

Copilot AI linked an issue Aug 12, 2026 that may be closed by this pull request
11 tasks
Copilot AI and others added 3 commits August 12, 2026 16:35
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Review daily spec work for SPDD on 2026-08-12 Wire intent policy enforcement and OTel Level 1 contract coverage Aug 12, 2026
Copilot AI requested a review from pelikhan August 12, 2026 16:47
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

  • Category: feature
  • Risk: high
  • Score: 75/100 (impact 50 + urgency 15 + quality 10)
  • Recommended action: fast_track
  • OTel-related: assigning to @mnkeifer per triage policy
  • Note: OTel-related: security/intent enforcement + otel contract; feature-flagged

Generated by 🔧 PR Triage Agent · auto · 39.1 AIC · ⌖ 2.59 AIC · ⊞ 7.8K ·

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for working on intent policy enforcement and OTel compliance! 🎯 Here's feedback to help refine this contribution:

Mixing concerns across systems
This PR bundles three distinct areas:

  1. Intent policy enforcement — new pkg/intent/authz/ module and CLI wiring
  2. OTel compliance — span naming updates and Level 1 contract tests
  3. Specification updates — docs/specs covering governance, compliance, and migration notes

While these are related, reviewers will find it easier to evaluate, merge, and iterate on each system independently. Consider splitting into:

  • A core policy authorization PR (Go code + policy enforcement tests)
  • An OTel compliance PR (span naming, formal tests)
  • A spec sync PR (documentation updates and migration notes)

This keeps each review focused on a single system, reduces risk per merge, and makes rollback simpler if issues emerge.

What looks good:
✅ Comprehensive test coverage (5 test files, multiple scenarios)
✅ Clear description with examples and issue reference (#52328)
✅ Properly scoped for an agentic workflow per CONTRIBUTING.md
✅ High-priority, high-risk label placement is appropriate

If you'd like help structuring the split, you can assign this prompt to your agent:

Split PR #52329 into three focused PRs:

1. Intent Policy Authorization PR
2. OTel Compliance PR
3. Specification and Governance Sync PR

Each PR will be tighter, easier to review, and faster to merge.

Generated by ✅ Contribution Check · auto · 64.6 AIC · ⌖ 3.82 AIC · ⊞ 8.8K ·

@pelikhan pelikhan closed this Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[spdd] Daily spec work plan - 2026-08-12

2 participants