Repository navigation
Complete SPDD spec follow-ups for November 9 - #76282
Conversation
Co-authored-by: gh-aw-bot <[email protected]>
Co-authored-by: gh-aw-bot <[email protected]>
|
✅ PR Specification Reviewer completed successfully!
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
🔎 PR Code Quality Reviewer is reviewing code quality for this pull request... |
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
Reviewed head 15d3a82a547ad3144d938128528a91a9b4c57a76 against the affected Intent Attribution, OTel, ESLint, and Security Architecture specifications.
Blocking findings are inline on specs/otel-observability-spec.md: (1) new normative T-OT-012/T-OT-013 safeguards have no corresponding executable tests or updated §17.1.A mapping in this PR, despite the spec requiring same-change conformance coverage; (2) the new PII rule is ambiguous with existing §15.4 permission for authorized user/actor/repository/item identifiers.
No specification files were edited by this review. Security validation documentation was treated as evidence only; tests were not run in this static review.
Generated by PR Specification Reviewer for #76282 · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.7K
Comment /review-specs to run again
|
|
||
| ### Sync Notes | ||
|
|
||
| Sections 15.2 and 16.1/16.6 define the privacy and delivery safeguards; §17.1.A maps existing implementation tests, while §17.1.2 defines their conformance test IDs. Changes to content capture, redaction, mirrors, exporter retries, fan-out, or shutdown behavior MUST update the corresponding test mapping. Revalidate the shipped compatibility contract with `make validate-otel-contract`. |
There was a problem hiding this comment.
The new T-OT-012/T-OT-013 MUST-level safeguards are not backed by the changed-file set: no executable tests were added or updated for bounded-flush failure, PII in mirrors/artifacts/diagnostics, or metric-dimension exclusion. The existing §17.1.A map only lists the pre-existing exporter/redaction tests, and make validate-otel-contract runs those tests rather than these new cases. Because §17.3 requires tests for each compatibility behavior and says compatibility-surface changes MUST update tests in the same change, please add the corresponding conformance tests (or keep these requirements explicitly pending/non-normative).
There was a problem hiding this comment.
T-OT-012 is now marked partial: existing non-2xx, retry-exhaustion, and mirror-write tests are mapped, with bounded-flush coverage still pending. T-OT-013 is explicitly proposed/non-normative, so the spec no longer claims full coverage. Fixed in 447c085.
|
|
||
| A Level 3 implementation MUST provide a redaction stage before remote export and artifact upload. Redaction MUST cover known secret formats, authorization headers, bearer tokens, GitHub tokens, private keys, passwords, connection strings, and configured repository-specific patterns. | ||
|
|
||
| Direct personal identifiers and other PII MUST NOT be captured by default. When an identifier is operationally necessary and authorized, it MUST be validated and bounded, MUST be redacted before remote export and from mirrors, artifacts, and diagnostics according to the applicable privacy rules, and MUST NOT be a metric dimension by default. See safeguard **OTEL-SG-02** and test **T-OT-013** in §17.1.2. |
There was a problem hiding this comment.
This new rule is ambiguous against the existing §15.4 contract: §15.4 permits user IDs, actor names, repository names, and item identifiers in traces/logs when operationally necessary and authorized, while this sentence requires direct identifiers to be redacted before remote export and from mirrors, artifacts, and diagnostics. Please define whether those §15.4 values are exempt, or explicitly require their redaction too, so the normative obligations are consistent and T-OT-013 has an unambiguous oracle.
There was a problem hiding this comment.
§15.2 now treats authorized §15.4 operational identifiers as a compatibility exception, reflecting the current raw actor/actor-ID export. Stricter redaction is recorded as proposed, not a current guarantee. Fixed in 447c085.
There was a problem hiding this comment.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~5 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
| assert.Equal(t, expected.Source, string(rec.Source)) | ||
| if expected.IntentKey == nil { | ||
| assert.Empty(t, rec.Labels, "fixtures that omit intent_key must not resolve through blended label attribution") | ||
| if expected.Labels != nil { |
There was a problem hiding this comment.
The revised assertion removes the existing no-blended-labels invariant from all fixtures whose expected intent key is nil, allowing accidental label attribution to pass silently.
💡 Preserve both checks
Keep the prior assert.Empty(t, rec.Labels, ...) check when expected.IntentKey == nil, and add the new expected.Labels != nil equality check separately for fixtures that intentionally expect labels. This preserves the single-source regression guard while supporting the unmapped fixture.
There was a problem hiding this comment.
Restored the empty-label assertion when no intent key is expected, retained explicit label equality, and added a direct intent_key assertion through the resolved record. Fixed in 447c085.
|
|
||
| rec := fixtureResolver(fixture).ResolvePullRequest(buildFixturePullRequest(fixture)) | ||
| assertFixtureAttribution(t, fixture.Expected.Attribution, rec) | ||
| assertFixturePolicy(t, fixture.Expected.Policy, fixturePolicyCompiler(t).Compile(rec, intent.RepositoryContext{})) |
There was a problem hiding this comment.
This new fail-closed test cannot detect a regression that lets ambiguous, unmapped, or suggested records reach policy rules because fixturePolicyCompiler builds its sole rule from the expected safest-policy values.
💡 Make the negative assertion meaningful
Compile these fixtures with a permissive wildcard rule (for example, bounded/any_branch, no approval, auto-merge enabled, and multiple attempts) and assert the result remains the safest policy. Otherwise removing the new status short-circuit would still produce exactly the expected values and the test would pass.
There was a problem hiding this comment.
Fail-closed fixture tests now use a permissive wildcard rule (bounded, any-branch, no approval, auto-merge enabled, 10 attempts), so non-mapped statuses must override it. Fixed in 447c085.
| fixture := loadIntentComplianceFixture(t, "suggested-attribution-fail-closed.yaml") | ||
| suggestion := fixture.Input.SuggestedAttribution | ||
| require.NotNil(t, suggestion) | ||
|
|
There was a problem hiding this comment.
This test constructs the IntentRecord directly from the fixture and then asserts those same copied fields, so the attribution assertions provide no coverage of resolver behavior or fixture interpretation.
💡 Limit the assertion to what this test proves
Keep this as an explicit compiler passthrough test, but remove the self-fulfilling attribution assertion (or add a comment explaining that suggestions are intentionally seeded because the resolver does not produce them). The meaningful assertion should use a permissive policy rule and verify that suggested still fails closed.
There was a problem hiding this comment.
Removed the self-fulfilling attribution assertion from the directly seeded suggested record; the test now uses it only to verify that the permissive policy cannot be selected. Fixed in 447c085.
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs, /tdd, and /codebase-design. Requesting changes on one probable test regression and two spec gaps.
📋 Key Themes & Highlights
Key Themes
- Weakened assertion (blocking): the
IntentKey == nillabel-empty guard incompliance_fixtures_formal_test.gobecame an opt-inLabelscheck.IntentKeyis never asserted. - Spec/code drift: the Fail-Closed section in
intent-attribution-agent-governance.mddoes not nameunmappedorsuggested.PolicyCompiler.Compilehas no production callers, so the change is test-only. - Unimplemented conformance IDs: T-OT-012 and T-OT-013 have no implementing test.
- ESLint revalidation: the documented commands fail in a clean checkout (
typescriptnot installed).
Positive Highlights
- ✅
policy.gonow fail-closes indeterminate and non-authoritative attribution, matching the spec's intent. - ✅ New fixtures (
multi-root-policy,suggested-attribution-fail-closed,unmapped-labels-fail-closed) cover the new branches. - ✅
go test ./pkg/intent/andTestFormalRS05a*pass, and the Z3 expectation counts (11 unsat / 3 sat) match the spec.
Validation limits
The Z3 solver run (z3 not installed), ESLint factory checks, and the Vitest counts were not run in this environment, so those claims are unverified here.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 6.3K
Comment /matt to run again
|
|
||
| These are agent, deployment, or operational obligations outside the bounded model. | ||
|
|
||
| ## Sync Notes |
There was a problem hiding this comment.
[/tdd] The new Sync Notes say to revalidate with node specs/eslint-factory/check.mjs and node --test specs/eslint-factory/compare.test.mjs. In this checkout both fail: check.mjs exits 1 with Cannot find module typescript, and compare.test.mjs fails with MODULE_NOT_FOUND. Document the install step or dependency location here so the check can be reproduced.
@copilot please address this.
There was a problem hiding this comment.
Added the two npm ci --prefix ... install commands, declared/locked the YAML dependency used by the comparison, and documented the Java/TLC prerequisite for the model checker. Fixed in 447c085.
| | **T-OT-009** | §10.3 `gen_ai.system` on built-in agent spans | A known engine emits a non-empty normalized provider/system value | Run a workflow with a built-in agent span, decode exported spans, and assert `gen_ai.system` is present whenever the engine mapping is known | | ||
| | **T-OT-010** | §13.3 `gh-aw.outcome.type` on optional downstream outcome-evaluation spans | Exported outcome spans preserve the safe-output type being evaluated | Feed `.outcomes[].items[]` from `gh aw logs --outcomes --json` to the downstream exporter under test and assert `gh-aw.outcome.type` matches the evaluated manifest item type; not a built-in CLI export | | ||
| | **T-OT-011** | §17 Backward-compatibility: v0.3.0 fields present in v0.4.0 export | All span attribute keys that were present in v0.3.0 (`gh-aw.*`, `github.*`, `gen_ai.system`, `gen_ai.usage.total_tokens`, `OTEL_EXPORTER_OTLP_ENDPOINT`, built-in setup/conclusion span names) **MUST** also be present in a v0.4.0 export at the same semantic positions | Produce a v0.4.0 compliant export from the current implementation; compare the set of attribute keys against the v0.3.0 attribute inventory (defined in Version 0.3.0 change-log entry in Section 19); assert no v0.3.0 attribute has been removed or renamed; assert no built-in span name has changed | | ||
| | **T-OT-012** | §16.1 Exporter failure preserves functional result | Non-2xx responses, exhausted network retries, mirror-write failures, and bounded flush failures do not replace the completed workflow result or report delivery success | Exercise failures in each exporter and mirror path; assert bounded diagnostics and unchanged functional result | |
There was a problem hiding this comment.
[/tdd] T-OT-012 is added as a normative conformance test, but no implementation or test references this ID. A repo search finds it only in this spec, and I found no check under make validate-otel-contract that covers it. Either add the test for non-2xx and exhausted-retry behaviour, or mark the row as planned so the spec does not claim coverage it lacks. T-OT-013 has the same gap.
@copilot please address this.
There was a problem hiding this comment.
T-OT-012 and T-OT-013 are now explicitly tracked as partial/proposed follow-ups; the spec maps existing tests and does not claim complete coverage for bounded flush or identifier redaction. Fixed in 447c085.
| assert.Equal(t, expected.Source, string(rec.Source)) | ||
| if expected.IntentKey == nil { | ||
| assert.Empty(t, rec.Labels, "fixtures that omit intent_key must not resolve through blended label attribution") | ||
| if expected.Labels != nil { |
There was a problem hiding this comment.
[/diagnosing-bugs] The unconditional guard assert.Empty(t, rec.Labels, ...) for fixtures without intent_key was replaced by an opt-in if expected.Labels != nil check. An unlabelled fixture can now pass even if blended label attribution regresses. IntentKey (line 56) is also declared but never asserted, so the intent_key expectation is unchecked. Restore the empty-label guard and assert intent_key directly.
💡 Restore the guard
if expected.IntentKey == nil {
assert.Empty(t, rec.Labels, "fixtures that omit intent_key must not resolve through blended label attribution")
}@copilot please address this.
There was a problem hiding this comment.
Restored the no-blended-labels assertion for fixtures without an intent key and added direct intent-key propagation/assertion for explicit metadata. Fixed in 447c085.
| // wildcard rule. Suggested attribution is non-authoritative, and unmapped labels | ||
| // do not identify a configured intent. | ||
| switch rec.Status { | ||
| case AttributionUnlinked, AttributionAmbiguous, AttributionUnmapped, AttributionSuggested: |
There was a problem hiding this comment.
[/codebase-design] Fail-closing unmapped and suggested into the safest policy is the right direction, since the spec says suggested attribution is non-authoritative. Two gaps remain. First, PolicyCompiler.Compile has no production callers (grep finds only tests), so this change is test-only today. Say so in the PR description. Second, the Fail-Closed Behavior section of specs/intent-attribution-agent-governance.md (around line 66) still lists only unlinked, ambiguous, or indeterminate, so the normative text and the code have drifted. Name the new statuses there.
@copilot please address this.
There was a problem hiding this comment.
Policy compilation now permits rule matching only for AttributionMapped, and the fail-closed tests cover empty and unknown statuses. The governance spec names all fail-closed statuses. The compiler remains advisory/test-only; the implementation companion records that runtime wiring is absent. I don't have a PR-description editing tool here, so this reply makes that limitation explicit. Fixed in 447c085.
There was a problem hiding this comment.
🟡 Changes recommended
The policy matcher allows empty or unknown attribution statuses to select permissive wildcard rules instead of failing closed.
3 open issues
What changed in this PR
This PR addresses #76280 by expanding intent-attribution safeguards and synchronizing gh-aw’s security, governance, and observability specifications.
Changes:
- Records bounded RS-05a authorization revalidation results and their proof limits.
- Adds multi-root, suggested, and unmapped compliance fixtures, extending fail-closed policy compilation.
- Splits governance implementation notes into a companion document and adds OTel safeguards and ESLint revalidation guidance.
| File | Description |
|---|---|
specs/security-architecture-spec.md |
Updates the RS-05a revalidation summary and scope limits. |
specs/security-architecture-spec-validation.md |
Records passing authorization-model evidence and remaining gaps. |
specs/otel-observability-spec.md |
Adds privacy and exporter-failure safeguards, test IDs, and sync guidance. |
specs/intent-attribution-compliance/unmapped-labels-fail-closed.yaml |
Defines safest-policy expectations for unmapped labels. |
specs/intent-attribution-compliance/suggested-attribution-fail-closed.yaml |
Defines non-authoritative suggestion behavior. |
specs/intent-attribution-compliance/README.md |
Expands fixture requirements and behavioral coverage mappings. |
specs/intent-attribution-compliance/multi-root-policy.yaml |
Defines fail-closed behavior for three closing roots. |
specs/intent-attribution-agent-governance.md |
Links extracted implementation notes while preserving existing anchors. |
specs/intent-attribution-agent-governance-implementation.md |
Collects implementation status, operational guidance, and enforcement gaps. |
specs/eslint-factory/README.md |
Documents model non-goals and rule-table revalidation guidance. |
pkg/intent/policy.go |
Adds suggested and unmapped statuses to fail-closed handling. |
pkg/intent/governance_formal_test.go |
Extends fail-closed tests to the additional statuses. |
pkg/intent/compliance_fixtures_formal_test.go |
Adds fixture inputs, resolver adaptation, and policy assertions. |
Review effort: Max (auto)
| // Indeterminate attribution must never receive a relaxed policy from a matching | ||
| // wildcard rule. Suggested attribution is non-authoritative, and unmapped labels | ||
| // do not identify a configured intent. | ||
| switch rec.Status { | ||
| case AttributionUnlinked, AttributionAmbiguous, AttributionUnmapped, AttributionSuggested: | ||
| policyLog.Printf("Fail-closed for indeterminate status=%s, returning safest default policy", rec.Status) | ||
| return safestDefaultPolicy() | ||
| } |
| if expected.Labels != nil { | ||
| assert.Equal(t, expected.Labels, rec.Labels) | ||
| } |
|
|
||
| A Level 3 implementation MUST provide a redaction stage before remote export and artifact upload. Redaction MUST cover known secret formats, authorization headers, bearer tokens, GitHub tokens, private keys, passwords, connection strings, and configured repository-specific patterns. | ||
|
|
||
| Direct personal identifiers and other PII MUST NOT be captured by default. When an identifier is operationally necessary and authorized, it MUST be validated and bounded, MUST be redacted before remote export and from mirrors, artifacts, and diagnostics according to the applicable privacy rules, and MUST NOT be a metric dimension by default. See safeguard **OTEL-SG-02** and test **T-OT-013** in §17.1.2. |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "15d3a82a547ad3144d938128528a91a9b4c57a76",
"kind": "requested",
"schema_version": "1",
"state": "8c2cc8004f70d4dcbebda8be782e7c8c2f8992c73ad15a76f6a54be483be55f4",
"work": [
"04c992802548042c16cf56a5e6f35726309fb96371e9e1f068ea7699c5a7b82e",
"0a31de080a50b1c31fd6336c8920419c0ad6ae1b41d25c67284d37be6e91555c",
"51e2287c3d1ee41b7e13769862add61dcd292a623cf943abc5968c984e246bcf",
"760ffa363127aab3898ed2c231a1ddcc0d2d7b4c7b80561b8c2ec20ebda1ea0c",
"7a845bc2197762fdd6880aa89fd9564601ca3f5d4c2bb00b14c659029e3227ba",
"7fd4d5f22b42226bfbeb2a4a5600ec2b1591b23cb96ced84b8268a399fb8dd4d",
"b581db042fa08f39143bbc76a6171ec633084c4a52ef55d7fc6659a87f956e06",
"e273b5d4de824db713555e2cc5d63390c11acbb62148f9714cddbfb1c3dd0f86",
"e99cbd1ed20f7a8659e708fbbc20614aab896c5532dbf407c88cc96c42c18e5e",
"fbb3fbfe645beeeb2fae58233851dc75807be92722c800ee0bc3fa2014a2ee79"
],
"workflow": "pr-sous-chef"
}
|
…ec-work-plan-2026-11-09 Co-authored-by: gh-aw-bot <[email protected]>
Co-authored-by: gh-aw-bot <[email protected]>
Merged the latest |
|
🎉 This pull request is included in a new release. Release: |



This SPDD pass identified pending RS-05a formal revalidation, missing intent-attribution fixtures, and documentation gaps across the OTel, governance, and ESLint factory specs. The changes record the revalidation, expand fail-closed coverage, and synchronize the affected specifications.