Skip to content

Tighten SPDD compliance specs and fixtures - #52111

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

Tighten SPDD compliance specs and fixtures#52111
pelikhan merged 6 commits into
mainfrom
copilot/spdd-daily-spec-work-plan-2026-08-11

Conversation

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Addresses remaining SPDD follow-ups across AWF config, compiler threat detection, forecast fixtures, and GitHub MCP access-control compliance.

  • AWF config conformance

    • Add a Structure section linking the spec, conformance index, and DriftRecord tests.
    • Cross-reference the existing T-DR-005 additional-properties test.
  • Compiler threat detection

    • Collapse repetitive version-history rows while retaining CTR-016 through CTR-023 traceability.
    • Prohibit retrying a failed request through another degraded endpoint after retry exhaustion.
  • Forecast fixtures

    • Link fixture test IDs directly to Section 12 definitions.
    • Add run_summary_partial_et.json and formal validation for an in-progress, non-zero token snapshot.
  • GitHub MCP access control

    • Pin the scratchpad specification revision in the fixture README.
    • Add an empty-tool-name-deny.yaml P1 fixture.
    • Record fixture-based verification that P5 denial precedes P6 integrity denial.
allowed-tools:
  - issue_read
# An empty tool_name is denied with -32001.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 7.47 AIC · ⌖ 11.6 AIC · ⊞ 8.5K ·
Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 11.1 AIC · ⌖ 3.4 AIC · ⊞ 8.5K ·
Comment /souschef to run again


Requested branch update from https://github.com/github/gh-aw/actions/runs/31535473039.> Generated by 👨‍🍳 PR Sous Chef · gpt54 · 8.59 AIC · ⌖ 5.18 AIC · ⊞ 8.5K ·

Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 14.9 AIC · ⌖ 5.12 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Copilot AI linked an issue Aug 11, 2026 that may be closed by this pull request
10 tasks
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Review specification files for daily SPDD work Tighten SPDD compliance specs and fixtures Aug 11, 2026
Copilot AI requested a review from pelikhan August 11, 2026 16:32
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

PR Triage: #52111

  • Category: docs
  • Risk: low
  • Priority score: 25/100 (impact 8/50, urgency 7/30, quality 10/20) → low
  • Recommended action: defer

Automated triage — see labels for machine-readable classification.

Generated by 🔧 PR Triage Agent · auto · 45 AIC · ⌖ 2.09 AIC · ⊞ 7.8K ·

@pelikhan
pelikhan marked this pull request as ready for review August 11, 2026 18:40
Copilot AI balanced review requested due to automatic review settings August 11, 2026 18:40
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR does not have the 'implementation' label and has ≤100 new lines of code in business logic directories (24 additions detected).

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Ponytail Reviewer completed successfully!

Lean already. Ship.

Generated by Ponytail Reviewer for #52111

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

Warning

Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • api.individual.githubcopilot.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.individual.githubcopilot.com"

See Network Configuration for more information.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions github-actions Bot 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.

Review: Tighten SPDD compliance specs and fixtures

Overall the changes are correct and well-structured.

Changes reviewed:

  • run_summary_partial_et.json — new T-FC-024 fixture for in-progress run with partial ET; total_effective_tokens: 2750 satisfies the assertion. ✅
  • empty-tool-name-deny.yaml — MCP access-control fixture; error_code: -32001 and reason match the formal model. ✅
  • Spec cross-links, conformance-unit description, and compacted version table all look accurate. ✅
  • Degraded-endpoint no-retry guarantee (point 4) is clear and unambiguous. ✅

Non-blocking observation: In specs/compiler-threat-detection-spec.md, the compact changelog paragraph is placed directly after the last table row with no blank line separator. Some Markdown renderers may attach it to the table footer rather than treating it as a new paragraph. Adding a blank line before the paragraph would be safer.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 · 26.2 AIC · ⌖ 6.24 AIC · ⊞ 5.4K

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Analysis

Summary

Score: 100/100 ✅ Excellent | Implementation Ratio: 0% (threshold: ≤30%) | Violations: None

This PR ("Tighten SPDD compliance specs and fixtures") adds 1 high-quality specification-driven test and maintains fixture consistency across 2 test files. All new tests verify formal design contracts with comprehensive error handling.


Test Classification

New Test Functions (1 total)
Test File Type Assertions Classification Value
TestFormal_FC_P11_PartialETFixture forecast_compliance_fixtures_formal_test.go Go Unit 4 Design Test HIGH

Detailed Analysis

TestFormal_FC_P11_PartialETFixture

Design Invariant: Verifies that run_summary_partial_et.json fixture represents an in-progress run with non-zero token usage (T-FC-024).

Quality Signals 🟢:

  • Type Safety: Uses require.True with descriptive context (FC-P11 prefix) for critical assertions
  • Behavioral Coverage: Validates state invariant (in_progress status) and value invariant (positive token count)
  • Specification Alignment: Explicit T-FC-024 reference in both comment and assertion messages; cross-references specs document
  • Error Handling: All assertions include failure messages; handles missing/malformed fields via type assertions
  • Formal Test: Follows specification-first pattern per the file's formal model documentation

Assertions:

  1. run field must be JSON object → type-safe access
  2. status must be "in_progress" → state invariant
  3. token_usage_summary field must be JSON object → type-safe access
  4. total_effective_tokens must be > 0 → value invariant with threshold verification

Implementation Classification: Design Test (not implementation-only) — validates user-visible behavior and system invariants.


Fixture List Maintenance

The PR also updates fixture enumerations in existing test functions to ensure consistency:

  • TestFormal_FC_P9_TimestampOrdering — added to fixture list
  • TestFormal_FC_P10_MonteCarloInputCompleteness — added to test cases
  • TestFormal_FixtureCountConsistency — added to documented list
  • github_mcp_access_control_formal_test.go — added empty-tool-name-deny.yaml to compliance fixtures

These are test infrastructure updates, not new behavioral test functions — necessary for enumeration consistency.


Violation Scan

Violation Status Details
Go mock library usage ✅ PASS No gomock, testify/mock, .EXPECT(), or .On() usage
Missing build tags ✅ PASS (go/redacted):build !integration tag present on line 1 of test file
Missing assertion messages ✅ PASS All 4 assertions include descriptive failure context
Error/edge case coverage ✅ PASS Full coverage via type assertions and value bounds checking
Test inflation (>2:1) ✅ PASS N/A — fixture-only addition with no paired production changes

Quality Score Breakdown

```
Design tests: 1/1 = 100% → 40 pts
Edge/error cases: 1/1 = 100% → 30 pts
Duplicate clusters: 0 → 20 pts (no duplicates)
Inflation penalty: 0 → 10 pts (no inflation)
Total: 100/100
```

Thresholds: ≥80 ✅ Excellent


Recommendation

APPROVE — High-quality specification-driven test with zero violations, perfect design alignment, and comprehensive error handling. Fixture maintenance is complete and consistent.


Generated by Test Quality Sentinel — analyzing 1 new test function across Go test files. No JavaScript or infrastructure-only tests in scope.

🧪 Test quality analysis by Test Quality Sentinel · haiku45 · 19.7 AIC · ⌖ 3.92 AIC · ⊞ 7.6K ·
Comment /review to run again

@github-actions github-actions Bot 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.

✅ Test Quality Sentinel: 100/100. 0% implementation tests (threshold: 30%). Zero violations detected. High-quality specification-driven test with comprehensive error handling and perfect design alignment.

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

Tightens SPDD compliance documentation, fixtures, and formal tests across AWF configuration, threat detection, forecasting, and GitHub MCP access control.

Changes:

  • Improves specification traceability and synchronization guidance.
  • Adds forecast and GitHub MCP edge-case fixtures.
  • Extends formal fixture registration and validation.
Show a summary per file
File Description
specs/github-mcp-access-control-compliance/README.md Pins the specification and documents fixture coverage.
specs/github-mcp-access-control-compliance/empty-tool-name-deny.yaml Adds empty-tool-name denial coverage.
specs/forecast-compliance-fixtures/run_summary_partial_et.json Adds an in-progress token snapshot fixture.
specs/forecast-compliance-fixtures/README.md Links fixtures to specification test IDs.
specs/compiler-threat-detection-spec.md Consolidates history and tightens retry safeguards.
specs/awf-config-sources-spec.md Defines the conformance-unit structure.
specs/awf-config-sources-compliance/README.md Cross-references structure and T-DR-005.
pkg/workflow/github_mcp_access_control_formal_test.go Registers the new MCP fixture.
pkg/cli/forecast_compliance_fixtures_formal_test.go Validates and registers the partial forecast fixture.
docs/src/content/docs/specs/forecast-specification.md Defines partial-observation and overflow tests.

Review details

Tip

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

Suppressed comments (1)

docs/src/content/docs/specs/forecast-specification.md:935

  • This reuses T-ET-006 for a different requirement, but that ID is already defined in effective-tokens-specification.md:596 for zero-ET leaf-node aggregation. The same ID would therefore map to two incompatible tests. Assign this overflow case an unused forecast ID (for example T-FC-025) and update the README/test references together.
- **T-ET-006**: A run with total effective tokens of at least 1,000,000 is handled without overflow.
  • Files reviewed: 10/10 changed files
  • Comments generated: 2
  • Review effort level: Balanced

- **T-FC-021**: Sampling respects `--days` historical window cutoff.
- **T-FC-022**: Run with missing `aw_info.json` artifact contributes zero ET and is still counted in `sampled_runs`.
- **T-FC-023**: Workflow with zero sampled runs produces nil projection with zero fields.
- **T-FC-024**: An in-progress run with a non-zero token usage snapshot is represented as a partial observation.
"run_summary_failed.json",
"run_summary_high_et.json",
"run_summary_cancelled.json",
"run_summary_partial_et.json",

@github-actions github-actions Bot 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.

Skills-Based Review 🧠

Applied /tdd and /grill-with-docs — commenting with a few targeted improvements, no blocking issues.

📋 Key Themes & Highlights

Key Themes

  • Test assertion completeness (/tdd): TestFormal_FC_P11_PartialETFixture verifies status and total_effective_tokens but not conclusion, leaving a silent drift path if the fixture later sets conclusion: null.
  • Naming consistency (/grill-with-docs): The empty-tool-name-deny.yaml fixture table row uses P1_ToolAllowed as its test ID while every other row uses T-GH-* IDs.
  • Spec term precision (/grill-with-docs): Rule 4 of the degraded-endpoint policy introduces "independently authoritative endpoint" without a definition.
  • Changelog compaction trade-off (/grill-with-docs): Collapsing 1.0.151.0.19 into one row removes per-version auditability for future bisects.

Positive Highlights

  • ✅ New run_summary_partial_et.json fixture is well-structured and covers the T-FC-024 partial-run scenario cleanly.
  • ✅ Linking fixture table entries directly to spec section anchors is a clear usability win.
  • ✅ The Structure section in awf-config-sources-spec.md is a good pattern for capturing the three-way conformance unit obligation.
  • ✅ Spec version pinning in the GitHub MCP README is a useful guardrail against fixture drift.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 · 46.9 AIC · ⌖ 7.22 AIC · ⊞ 7.1K
Comment /matt to run again

Comments that could not be inline-anchored

specs/forecast-compliance-fixtures/run_summary_partial_et.json:6

[/tdd] The run_id field value 12345679 is one higher than sibling fixtures (which use 12345678). If intentional as a unique identifier, a short comment would prevent future readers from treating it as a typo.

<details>
<summary>💡 Suggestion</summary>

Add a JSON comment (or README note) clarifying the choice of ID, e.g. "intentionally distinct from run_summary_high_et.json (12345678)". Removes ambiguity when new fixtures are added.

</details>

@copilot please address this.

specs/forecast-compliance-fixtures/run_summary_partial_et.json:11

[/tdd] The fixture uses &quot;conclusion&quot;: &quot;&quot; (empty string) for an in-progress run. If the spec allows both null and &quot;&quot;, the test in TestFormal_FC_P11_PartialETFixture should also verify the conclusion field to make the expectation explicit.

<details>
<summary>💡 Suggestion</summary>

Add an assertion in the test:

assert.Equal(t, &quot;&quot;, run[&quot;conclusion&quot;],
    &quot;FC-P11 (T-FC-024): in-progress run must have an empty conclusion&quot;)

This prevents a future fixture edit (changing to …

pkg/cli/forecast_compliance_fixtures_formal_test.go:57

[/tdd] TestFormal_FC_P10_MonteCarloInputCompleteness adds run_summary_partial_et.json with wantConclusion: &quot;&quot; and aicMustBeGT0: true. If AIC is expected > 0 for an in-progress run, the reasoning should be documented — is it because partial token usage is counted as AIC, or is this a boundary-condition test?

<details>
<summary>💡 Suggestion</summary>

Add a short comment above the entry explaining why aicMustBeGT0: true is expected for an in-progress run, tying it to T-FC-024 sema…

specs/compiler-threat-detection-spec.md:144

[/grill-with-docs] Collapsing 1.0.151.0.19 into a single row loses per-version auditability. A future bisect on a regression between e.g. 1.0.16 and 1.0.17 will have no row to consult.

<details>
<summary>💡 Suggestion</summary>

Consider keeping individual rows but collapsing their notes to a short delta form (e.g. "Same as 1.0.15; no new lock-file changes.") rather than removing the rows entirely. The compact changelog prose at the bottom partially compensates but is harder to scan…

specs/compiler-threat-detection-spec.md:156

[/grill-with-docs] The new rule 4 says the optimizer MUST NOT retry against a different degraded endpoint but leaves "independently authoritative endpoint" undefined. Without a clear definition, implementors may disagree about what qualifies.

<details>
<summary>💡 Suggestion</summary>

Add a parenthetical or footnote defining "independently authoritative endpoint", e.g.:

> (An endpoint is independently authoritative if it is declared in the workflow's authoritative-endpoints configu…

specs/github-mcp-access-control-compliance/empty-tool-name-deny.yaml:12

[/tdd] The fixture has a single scenario. An empty tool name against an allowed-tools: [] (empty list) is also an interesting boundary: the spec should clarify whether P1 fires in that case or falls through. A second scenario covering the empty-list case would make the fixture a complete spec for P1 edge cases.

<details>
<summary>💡 Suggested additional scenario</summary>

  - scenario_id: &quot;empty-tool-name-empty-allowed-list&quot;
    description: &quot;Empty tool name with empty allowed-t…

</details>

<details><summary>specs/github-mcp-access-control-compliance/README.md:81</summary>

**[/grill-with-docs]** The new fixture table row for `empty-tool-name-deny.yaml` uses `P1_ToolAllowed` as the test ID rather than a `T-GH-*` identifier. All other rows in the table use `T-GH-*` IDs. Using a predicate name here breaks the ID convention and will confuse the fixture runner if it does ID-based lookup.

&lt;details&gt;
&lt;summary&gt;💡 Suggestion&lt;/summary&gt;

Either assign a `T-GH-*` ID (e.g. `T-GH-034`) to this scenario in the spec and use that, or explicitly note that this fixture is predicate…

</details>

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please refresh this branch, verify checks, and use the pr-finisher skill before handing back.

Unresolved review threads to address (newest first):

No failed checks were reported in the compact candidate set for this run.

Branch update was requested by sous-chef in run https://github.com/github/gh-aw/actions/runs/31527012599.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 7.47 AIC · ⌖ 11.6 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please refresh this branch, verify checks, and use the pr-finisher skill before handing back.

Unresolved review threads to address (newest first):...

Addressed both review findings in e9fc3fc: added T-FC-024 to §12.2 and updated forecast fixtures/tests to unmarshal production-shaped RunSummary timestamps. The branch is refreshed; local lint, tests, and workflow recompilation all pass.

Copilot AI requested a review from gh-aw-bot August 11, 2026 20:02
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please refresh this branch, verify checks, and use the pr-finisher skill before handing back.

Unresolved review threads to address (newest first):

No failed checks were reported in the compact candidate set for this run.

Branch update was requested by sous-chef in run https://github.com/github/gh-aw/actions/runs/31531364207.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 11.1 AIC · ⌖ 3.4 AIC · ⊞ 8.5K ·
Comment /souschef to run again

…ec-work-plan-2026-08-11

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please refresh this branch, verify checks, and use the pr-finisher skill before handing back.

Unresolved review threads to address (newest first):...

Refreshed the branch from current main in c364e0d. The prior review fixes remain in e9fc3fc; formatting, lint, integration tests, workflow recompilation, and the final agent validation gate all pass. The Sous Chef run’s eight jobs also completed successfully.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please refresh this branch, verify checks, and use the pr-finisher skill before handing back.

No failed checks were reported in the compact candidate set for this run.

Branch update was requested by sous-chef in run https://github.com/github/gh-aw/actions/runs/31535473039.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 8.59 AIC · ⌖ 5.18 AIC · ⊞ 8.5K ·
Comment /souschef to run again

@github-actions

Copy link
Copy Markdown
Contributor

Great work! 🎯 This PR tightens SPDD compliance across multiple spec areas and includes formal test fixtures. Here's what stands out:

Well-structured contribution:

  • Fixes a related issue ([spdd] Daily spec work plan - 2026-08-11 #52110) and addresses follow-ups systematically
  • Touches four distinct compliance areas (AWF config, compiler threat detection, forecast fixtures, GitHub MCP access control) but keeps each change focused and traceable
  • Includes 2 new test/fixture files and updates formal test coverage in Go code
  • Adds concrete fixture examples (empty-tool-name-deny.yaml, run_summary_partial_et.json) that serve as compliance verification
  • Detailed PR body clearly explains the rationale for each change

Follows project guidelines:

  • This is a core team (agentic) contribution from Copilot coding agent, which aligns with the stated development model
  • Spec and fixture updates are on-topic for gh-aw (configuration compliance, threat detection, access control)
  • Test coverage is maintained and expanded

This PR is ready for review! 🚀

Generated by ✅ Contribution Check · auto · 60.4 AIC · ⌖ 3.55 AIC · ⊞ 8.8K ·

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please refresh this branch, verify checks, and use the pr-finisher skill before handing back.

No failed checks were reported in the compact candidate set for this run....

Verified c364e0df29 already contains current main (c993af6e74), so no additional refresh commit was needed. The Sous Chef run passed all eight jobs, and local formatting, lint, unit tests, full Go tests, workflow recompilation, and the final agent gate all pass.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot This PR looks ready for another finishing pass. Please refresh the branch context, address any remaining reviewer feedback, and run the pr-finisher skill before handing back to maintainers.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 14.9 AIC · ⌖ 5.12 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot This PR looks ready for another finishing pass. Please refresh the branch context, address any remaining reviewer feedback, and run the pr-finisher skill before handing back to maintainers....

Completed the finishing pass. c364e0df29 contains current main, and the remaining review findings are satisfied by e9fc3fc277. Formatting, lint, impacted and full tests, workflow recompilation (285/285), and the final agent validation gate all pass; the worktree is clean.

@pelikhan
pelikhan merged commit c5883c9 into main Aug 11, 2026
2 checks passed
@pelikhan
pelikhan deleted the copilot/spdd-daily-spec-work-plan-2026-08-11 branch August 11, 2026 22:43
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-11

4 participants