Skip to content

Harden SPDD specification sync and conformance coverage - #54564

Merged
pelikhan merged 5 commits into
mainfrom
copilot/spdd-daily-spec-work-plan-2026-08-21
Aug 21, 2026
Merged

pelikhan merged 5 commits into
mainfrom
copilot/spdd-daily-spec-work-plan-2026-08-21

Conversation

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Addresses SPDD gaps across access control, guard policies, safe outputs, and AWF config-source specifications. The changes clarify ambiguous precedence and cadence rules while linking requirements to implementation and conformance coverage.

  • Safe Outputs sync

    • Add Sync Notes and Sync Follow-ups.
    • Map Layer 3/4 requirements to relevant pkg/workflow/ implementation files.
  • Access-control and guard-policy rules

    • Define blocked-user precedence over trusted-user grants (T-GH-094).
    • Clarify omitted repository scope versus rejected empty allowlists.
    • Centralize lockdownallowed-reposmin-integrity evaluation order.
  • AWF config-source conformance

    • Register CR-06a owner-assignment and acknowledgement coverage as T-DR-011.
    • Associate existing focused formal tests with the fixture ID.
    • Explicitly mark production issue assignment/comment acknowledgement automation as pending.
  • Cadence and safeguard traceability

    • Make daily drift-check scheduling consistent with scheduled-run persistence rules.
    • Add fixture-index backlinks for all REASONS safeguard requirements.
1. `lockdown: true` takes absolute precedence.
2. `allowed-repos` evaluates repository scope when lockdown is disabled.
3. `min-integrity` evaluates only after repository scope passes.

Copilot AI linked an issue Aug 21, 2026 that may be closed by this pull request
9 tasks
Copilot AI and others added 3 commits August 21, 2026 16:17
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] Update sync notes in safe outputs specification Harden SPDD specification sync and conformance coverage Aug 21, 2026
Copilot AI requested a review from pelikhan August 21, 2026 16:20
@github-actions

Copy link
Copy Markdown
Contributor

Contribution Approved

Excellent work hardening the SPDD specification sync and conformance coverage! This PR addresses all the items from the daily spec review (#54563) in a focused, well-documented manner.

Summary

  • On-topic: Specification hardening and conformance registry improvements align perfectly with gh-aw's agentic workflow focus.
  • Follows process: As a core-team agentic agent (Copilot coding agent), this PR correctly addresses an issue plan and implements the proposed changes.
  • Focused: All 8 file changes relate cohesively to specification sync documentation, conformance fixture IDs, and test naming alignment.
  • Well-tested: Updates to Go conformance tests, renamed test functions with explicit fixture IDs.
  • Well-documented: Comprehensive PR body with organized sections covering Safe Outputs, access control, config-source conformance, and cadence traceability.

Changes Verified

  • 68 lines changed (50 additions, 18 deletions)
  • No new dependencies introduced
  • Specification documents updated with Sync Notes/Follow-ups structure
  • Conformance registry and test fixtures properly cross-linked

Ready for merge. No additional work required.

Generated by ✅ Contribution Check · auto · 61.4 AIC · ⌖ 5.56 AIC · ⊞ 9.2K ·

@pelikhan
pelikhan marked this pull request as ready for review August 21, 2026 18:15
Copilot AI balanced review requested due to automatic review settings August 21, 2026 18:15
@pelikhan
pelikhan merged commit f2e8122 into main Aug 21, 2026
1 check passed
@pelikhan
pelikhan deleted the copilot/spdd-daily-spec-work-plan-2026-08-21 branch August 21, 2026 18:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Hardens SPDD specifications and links requirements to conformance coverage.

Changes:

  • Clarifies guard-policy precedence and drift-check cadence.
  • Adds safe-output implementation mappings.
  • Registers CR-06a and T-GH-94 conformance identifiers.
Show a summary per file
File Description
specs/awf-config-sources-spec.md Updates cadence, safeguards, and CR-06a traceability.
specs/awf-config-sources-compliance/README.md Registers T-DR-011.
scratchpad/safe-outputs-specification.md Adds synchronization guidance.
scratchpad/guard-policies-specification.md Centralizes evaluation order.
scratchpad/github-mcp-access-control-specification.md Documents deny-list precedence and empty scopes.
pkg/workflow/awf_config_safeguards_formal_test.go Associates CR-06a tests with T-DR-011.
pkg/workflow/awf_config_conformance_registry_formal_test.go Advances registry expectations.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Suppressed comments (1)

pkg/workflow/awf_config_safeguards_formal_test.go:124

  • This newly registered T-DR-011 test checks only the upper deadline. The predicate it exercises returns true for an acknowledgement timestamp before assignedAt, so the fixture does not establish that acknowledgement occurred after assignment. Add the lower-bound check and a regression assertion for a pre-assignment timestamp.
func TestAWFConfigSafeguard_TDR011_EscalationAcknowledgementWindow(t *testing.T) {
	assignedFriday := time.Date(2026, 8, 7, 9, 0, 0, 0, time.UTC)
	mondayDeadline := time.Date(2026, 8, 10, 9, 0, 0, 0, time.UTC)

	assert.True(t, formalEscalationAcknowledgedWithinOneBusinessDay(assignedFriday, mondayDeadline))
	assert.False(t, formalEscalationAcknowledgedWithinOneBusinessDay(assignedFriday, mondayDeadline.Add(time.Nanosecond)))
  • Files reviewed: 7/7 changed files
  • Comments generated: 6
  • Review effort level: Balanced


The MCP Gateway MUST evaluate access in this order:

1. `lockdown: true` takes absolute precedence and denies the invocation; `allowed-repos` and `min-integrity` MUST NOT be evaluated.
A scheduled GitHub Actions workflow in `github/gh-aw` SHOULD automate this procedure. The workflow SHOULD:

- Run on a weekly schedule and on pull requests that touch AWF config handling.
- Run on a daily schedule and on pull requests that touch AWF config handling.
```
pkg/workflow/awf_config_drift_test.go — DriftRecord schema validation and usage (T-DR-001 through T-DR-010; T-DR-005: TestDriftRecord_TDR005_NoAdditionalProperties)
pkg/workflow/awf_config_safeguards_formal_test.go — unavailable-source safeguards (T-DR-SAFE-001 through T-DR-SAFE-004)
pkg/workflow/awf_config_safeguards_formal_test.go — unavailable-source safeguards (T-DR-SAFE-001 through T-DR-SAFE-004) and CR-06a escalation-owner acknowledgement (T-DR-011)
| T-DR-008 | §7.5.1 — corrective PR embeds records | The corrective PR description MUST embed the full `DriftRecord` list as JSON. | `pkg/workflow/awf_config_drift_test.go` |
| T-DR-009 | §7.5.1 — empty list is valid | An empty `DriftRecord` list (no drift detected) is a valid output and MUST NOT trigger corrective PR or escalation actions. | `pkg/workflow/awf_config_drift_test.go` |
| T-DR-010 | §7.2 Step 5 integration | The drift detection procedure Step 5 MUST produce a list of zero or more `DriftRecord` objects; the output format MUST be a JSON array conforming to the §3.1 schema. | `pkg/workflow/awf_config_drift_test.go` |
| T-DR-011 | §6 CR-06a — escalation-owner acknowledgement | Escalations select a non-empty owner using the documented fallback and require acknowledgement within one business day. | `pkg/workflow/awf_config_safeguards_formal_test.go` |
- **T-GH-091**: When both `blocked-users` and `min-integrity` are configured, access is the conjunction of P5_NotBlocked AND P6_IntegrityMet; a non-blocked user with content at or above the threshold is allowed
- **T-GH-092**: Non-blocked user with content exceeding the configured threshold is allowed; P5 and P6 both pass
- **T-GH-093**: Blocked user whose content also fails the integrity threshold is denied with `-32005` (P5_NotBlocked fires before P6_IntegrityMet per §8.5 combined evaluation order), not `-32006`
- **T-GH-094**: A user in both `blocked-users` and `trusted-users` is denied because `blocked-users` takes precedence
| Specification area | Implementation mapping |
|---|---|
| §3.4 Layer 3 validation guardrails | `pkg/workflow/safe_outputs_validation.go`, `pkg/workflow/safe_outputs_validation_config.go` |
| §3.5 Layer 4 execution handlers | `pkg/workflow/safe_output_handlers.go`, `pkg/workflow/safe_outputs_actions.go` |
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.87.4

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.

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

3 participants