Repository navigation
Close SPDD specification coverage gaps - #76554
Conversation
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ Matt Pocock Skills ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Specification Reviewer completed successfully!
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Ponytail Reviewer completed successfully!
|
|
✅ 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.
|
|
✅ 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.
|
There was a problem hiding this comment.
What this change does: It expands replace-label coverage and updates the related specifications. It also checks a compiled cross-repository fixture.
- Should fix: The fixture check repeats its expectations in several places; the inline comment identifies a smaller approach.
Verdict: Ship.
Lean: -18 lines possible.
Generated by ✂️ Ponytail Reviewer for #76554 · codex · routed: gpt61 medium · ~7 AIC · ⌖ ~1 AIC · ⊞ 181
Comment /ponytail to run again
| r"^([a-z-]+):\s*(\d+)$", expected_match[1], re.MULTILINE | ||
| ) | ||
| } | ||
| if expected != {"checkout-token-count": 2, "github-app-safe-output-count": 1}: |
There was a problem hiding this comment.
Should fix: Remove the duplicate expectation parser. The fixture counts are repeated in the comment, this fixed dictionary, and the lock checks below, so changing the fixture requires keeping multiple copies in sync. Keep the comment as documentation and check the expected properties directly in the lock, including the app count; this removes the parsing and source-counting layer.
There was a problem hiding this comment.
Removed the fixture/source-count parsing layer and now check emitted lock properties and App-token steps directly. Committed as c6c459a.
There was a problem hiding this comment.
Reviewed the changed lines and added tests/spec updates. I found no high-confidence, actionable correctness or security issue that should block merge. The static review did not execute tests or builds per review constraints.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
Reviewed head 764cc08f7c7eb7e57059aaee9c3607ef18f9bef3. Applicable contract: specs/replace-label-spec.md §5 (ordered processing pipeline; RL-008–RL-046). The updated compliance mapping claims §5 coverage from a test that only proves one Stage 5 gate skip and one success path; it does not establish the MUST that failures at every stage prevent all subsequent stages. See the inline finding on specs/replace-label-compliance/README.md:197. Please preserve an explicit partial-coverage gap or add stage-by-stage early-stop tests. No specification synchronization was applied. Static review only; tests and conformance scripts were not run.
Generated by PR Specification Reviewer for #76554 · copilot · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review-specs to run again
| | Requirement | Test ID(s) or documented gap | Implementation evidence | | ||
| |---|---|---| | ||
| | §5 ordered processing pipeline | **Gap:** no end-to-end stage-order/early-stop test. | — | | ||
| | §5 ordered processing pipeline | `replace_label.test.cjs`: “executes the label pipeline in order and stops before writes on a gate skip” | Asserts read → read → write order and that a gate skip stops after the first read. | |
There was a problem hiding this comment.
This mapping overstates the evidence for the normative §5 contract: §5 requires that a failure at any of the eight stages prevents every subsequent stage, but the cited test exercises only one Stage 5 gate skip plus one successful path. It does not cover schema, count, target, label, staged, computation, or REST failures and their downstream effects. Please retain this as a partial/explicit gap (or add stage-by-stage early-stop coverage) rather than marking §5 as covered.
There was a problem hiding this comment.
Marked §5 evidence as partial and listed the stage failure cutoffs not yet covered. Committed as c6c459a.
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /tdd, /codebase-design, and /grill-with-docs. Requesting changes on two rendering defects and several traceability gaps. Tests were not run locally (npm registry TLS failure), so this review is static.
📋 Key Themes and Highlights
Key Themes
- Broken rendering: duplicated table header in
specs/workflow-security/README.md, and a normative paragraph that splits a list in the MCP spec. - Spec accuracy: RL-014 and RL-043 are untagged despite the "every gap has a risk tag" claim. The daily-aic README says "timestamp-bound", which the TLA+ model does not represent.
- Traceability:
T-RL-037,T-RL-046a, andT-RL-046bare not in the spec catalogue, and the tests are out of order. - Tooling coverage: the new cross-repo branch of
check.pyhas no test incheck_test.py, and its evidence log omits the second compile.
Positive Highlights
- ✅ The new handler tests cover the 404, exhaustion, and warning-only paths, and the expected messages match
enhanceErrorandhandler_scaffold. - ✅ Soft-skip logging moved from info to warning consistently with RL-023 and RL-026.
- ✅ The cross-repo fixture declares its expected lock properties, and the counts match the frontmatter.
@copilot please address the review comments above. Start with the two rendering defects, since they break the published docs.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~13 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
| | Checkout merging, primary target, and directory identity | Entry identity is `(repository,path,wiki)`; `current` does not change cwd. Model token/app alternatives, unioned fetch/sparse patterns, and deepest history selection. | | ||
| | Safe-output token precedence | Runtime entry precedence, representative missing-key fallbacks, and independence from neighboring scoped Apps are modeled. Static/shared checkout target selection, installation grants, and handler/head-token variants still require separate refinement. | | ||
| | Filesystem and platform enforcement | Artifact service origin, immutable event metadata, AWF/gateway isolation, labels, action pin integrity, post-job cleanup, and revocation are environmental assumptions at this layer. | | ||
| | Boundary not fully modeled | Priority | Owner / tracking | Target TLA+ module | Evidence / required refinement | |
There was a problem hiding this comment.
[/codebase-design] The backlog table header is duplicated: the old 2-column header and separator (lines 890-891) sit above the new 5-column header, so the table will not render correctly.
💡 Fix
Delete lines 890-891. The new Priority column also assigns P1/P2 without stated criteria, so add the basis for each priority or drop the labels.
@copilot please address this.
There was a problem hiding this comment.
Replaced the duplicate header and documented the P1/P2 sequencing criteria. Committed as c6c459a.
| - Elevate content items from users in `trusted-users` to "approved" integrity regardless of author_association | ||
| - Parse and validate `approval-labels` configuration field | ||
|
|
||
| These are normative target requirements, not a claim that the local `gh-aw` |
There was a problem hiding this comment.
[/codebase-design] This normative paragraph splits the bulleted requirement list: the bullets after it (starting with "Promote content items..." at line 152) are detached from their parent list.
💡 Fix
Move the paragraph below the end of the list so the bullets stay contiguous. The status note itself is useful and can stay.
@copilot please address this.
There was a problem hiding this comment.
Moved the local-conformance status note after the complete requirements list. Committed as c6c459a.
|
|
||
| The remaining gaps are grouped by risk: **pipeline** (RL-009, RL-011, RL-033), | ||
| **observability** (RL-027), and **security** (RL-051, RL-054, RL-055). Each | ||
| remaining gap below has a risk tag and a one-line rationale. |
There was a problem hiding this comment.
[/grill-with-docs] The sentence says each remaining gap has a risk tag, but RL-014 (line 204) and RL-043 (line 230) are still untagged **Gap:** rows.
💡 Fix
Tag RL-014 and RL-043 with a risk category (for example [Pipeline], [Observability], or [Security]) and add a one-line rationale to each, or reword the sentence to match the rows.
@copilot please address this.
There was a problem hiding this comment.
Added validation and external-guarantee tags with rationales for RL-014 and RL-043. Committed as c6c459a.
| } | ||
| }); | ||
|
|
||
| it("T-RL-037 returns a hard error after transient retries are exhausted", async () => { |
There was a problem hiding this comment.
[/tdd] The IDs T-RL-037, T-RL-046a, and T-RL-046b are not defined in the spec catalogue, and the spec cites these tests only by quoted title. The T-RL-037 test is also placed after T-RL-046b, so the numbering is out of order.
💡 Fix
Add these IDs to specs/replace-label-spec.md with a one-line description each, cite them by ID in the compliance table, and renumber so the test order matches the catalogue. Keep the assertions, since they match the "Original error:" text that enhanceError produces.
@copilot please address this.
There was a problem hiding this comment.
Added the missing test IDs and descriptions to the spec catalogue, cited them in the compliance table, and ordered the handler tests by ID. Committed as c6c459a.
| except (ValueError, KeyError, TypeError) as error: | ||
| raise RuntimeError("Malformed compiler JSON; see source-compilation.log") from error | ||
|
|
||
| compile_result = subprocess.run( |
There was a problem hiding this comment.
[/diagnosing-bugs] The evidence record only logs the first compile command (source-compilation.json). The second compile at line 431, which produces the lock that is then checked, is not logged, and its exit code is not recorded.
💡 Fix
Record both invocations and their return codes in the evidence file. check_test.py has no test covering this cross-repo branch of check_sources, so add one that asserts the recorded commands.
@copilot please address this.
There was a problem hiding this comment.
The evidence now records both compiler commands and return codes; a regression test checks the recorded invocations. Committed as c6c459a.
|
|
||
| ## Norms | ||
|
|
||
| Only a uniquely identified, timestamp-bound prior producer may supply usage for |
There was a problem hiding this comment.
[/grill-with-docs] The README requires a "timestamp-bound" prior producer, but CancelledRerunAccounting.tla has no time or expiry state. Its VARIABLES are only outcome, currentProducer, priorProducer, accounting, decision, and warned.
💡 Fix
The module header says "unexpired and timestamp-bound" without modelling it. Either add a time/expiry variable and invariant, or narrow this README wording to what the TLA+ model checks.
@copilot please address this.
There was a problem hiding this comment.
Removed the unsupported timestamp-bound/unexpired claims so the README reflects only the current TLA+ state model. Committed as c6c459a.
There was a problem hiding this comment.
🟡 Changes recommended
The authentication checker can accept invalid token wiring, and the commit-based specification pin will fail CI after squash merges even when the specification is unchanged.
6 open issues
Use a content digest for the spec drift guard · New Validate actual checkout and safe-output App-token wiring · New Align gate-skip log levels with the specification · New Test 429 rate-limit exhaustion and error logging · New Mark rejection results skipped and test manager behavior · New Replace the original table header to preserve all nine items · New
What changed in this PR
This PR expands gh-aw’s replace-label conformance coverage and synchronizes related security and model specifications for #76553.
Changes:
- Adds handler assertions for errors, retries, skips, logs, results, and execution metadata; changes gate-skip logs to warnings.
- Refreshes coverage mappings, documents deferred MCP controls, and retains explicit token-permission gaps.
- Adds model guidance, refinement priorities, cross-repository compile checks, and corresponding workflow updates.
| File | Description |
|---|---|
specs/workflow-security/README.md |
Adds backlog priorities, owners, and target modules. |
specs/workflow-security/fixtures/cross-repo.md |
Declares expected compile-only lock properties. |
specs/workflow-security/check.py |
Adds emitted-lock checks for the cross-repository fixture. |
specs/replace-label-spec.md |
Updates requirement-to-test mappings. |
specs/replace-label-compliance/README.md |
Updates coverage evidence and classifies remaining gaps. |
specs/github-mcp-access-control-compliance/README.md |
Refreshes the spec pin and documents deferred controls. |
specs/daily-aic/README.md |
Adds Requirements, Safeguards, and Norms notes. |
scratchpad/github-mcp-access-control-specification.md |
Clarifies local conformance status and refreshes sync notes. |
actions/setup/js/replace_label.test.cjs |
Expands error, retry, skip, and success assertions. |
actions/setup/js/replace_label.cjs |
Emits warnings for required-label and title-prefix skips. |
.github/workflows/daily-workflow-security-model.md |
Directs refinements through the prioritized backlog. |
.github/workflows/daily-workflow-security-model.lock.yml |
Refreshes workflow body and admission hashes. |
.github/workflows/ci.yml |
Updates the access-control specification commit pin. |
Review effort: Max (auto)
| set -euo pipefail | ||
|
|
||
| pinned="34f03fba65c7bf34c1c03654b3c03900b7597a39" | ||
| pinned="acc6a88801ea84b853bc7432f00f1343ae4b7fe3" |
| if any(property_text not in lock_contents for property_text in expected_lock_properties): | ||
| raise RuntimeError("Cross-repo lock does not match the expected checkout/app properties") |
| const itemLabels = (item.labels || []).map(/** @param {any} l */ l => (typeof l === "string" ? l : l.name || "")); | ||
| if (!requiredLabels.every(r => itemLabels.includes(r))) { | ||
| core.info(`Skipping replace_label for ${contextType} #${itemNumber}: does not match required-labels filter (${requiredLabels.join(", ")})`); | ||
| core.warning(`Skipping replace_label for ${contextType} #${itemNumber}: does not match required-labels filter (${requiredLabels.join(", ")})`); |
| it("T-RL-037 returns a hard error after transient retries are exhausted", async () => { | ||
| let setLabelsCalls = 0; | ||
| mockGithub.rest.issues.setLabels = async () => { | ||
| setLabelsCalls++; | ||
| const error = new Error("Service unavailable"); | ||
| error.status = 503; | ||
| throw error; | ||
| }; | ||
|
|
||
| vi.useFakeTimers(); | ||
| try { | ||
| const handler = await main({}); | ||
| const resultPromise = handler({ label_to_remove: "in-progress", label_to_add: "done" }, {}); | ||
| await vi.runAllTimersAsync(); | ||
| const result = await resultPromise; | ||
|
|
||
| expect(result.success).toBe(false); | ||
| expect(setLabelsCalls).toBe(6); |
| | RL-043 | T-RL-050; **gap:** GitHub's server-side atomicity guarantee is not locally testable. | `TestFormalSingleRESTCall` | | ||
| | RL-044 | **Gap:** warning-only behavior for every soft-skip category is not directly tested. | — | | ||
| | RL-045 | **Gap:** `core.error()` logging for all hard-error categories is not directly asserted. | — | | ||
| | RL-044 | `replace_label.test.cjs`: warning-only assertions cover missing fields, count limit, target/repository rejection, blocked/allowlist validation, and required-label/title gates. | Each soft-skip path asserts warning output and no `core.error()`. | |
| | Boundary not fully modeled | Priority | Owner / tracking | Target TLA+ module | Evidence / required refinement | | ||
| |---|---|---|---|---| |
|
🍳 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": "764cc08f7c7eb7e57059aaee9c3607ef18f9bef3",
"kind": "requested",
"schema_version": "1",
"state": "c49fd8b5ce006ac8cef056c3df58904f690efb6608d04e9195e049d79aa67015",
"work": [
"071a5c3c7a9d65bce7675afbf6806bd7e1fe1e39b07a3a007538273769f357e5",
"20154254e3c46fbd49422cb4c10be45d5ee1e55d7c7b6c8401491d82fce0db81",
"4bc5ca92b90dbc549bad52fc835fa5a7f1c3e9e074cf40d5bfde5d8a64ee1e44",
"8793c9052c6a592080ff1ad4744fe14ac2beb85d2a6a94462589871384413dfc",
"b746a1f1dddc6995dfc36de70dd4df37c6e0e311e2266a0df0a83cf624836205",
"cce82d16ff70e4db7ec39bafabe3a301a399051d7ad7f8eccb542ea4e5fcc865",
"f66d966aed0b45d959836b68432c153736e92484ded7b3b6b7b26a2151f97505",
"fd4ac94e356d058bb5c656366613acc7fc7a042dba9b9936c3a8f53f12e5f7a0"
],
"workflow": "pr-sous-chef"
}
|
…ec-work-plan-2026-11-10 Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
🎉 This pull request is included in a new release. Release: |



This update closes replace-label handler coverage gaps and synchronizes the related specification notes. Remaining replace-label gaps are grouped by risk, with token-permission gaps explicitly retained.
Replace-label coverage
Specification synchronization
issues: writeand cross-repository token requirements, with unverified permissions called out as gaps.rolesandprivate-reposas normative but deferred locally; align conformance notes and revision pins.Model documentation