Repository navigation
Sync specification coverage and close replace-label evidence gaps - #77810
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills... |
|
✅ Ponytail Reviewer completed successfully!
|
|
✅ PR Specification Reviewer completed successfully!
|
|
✅ 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.
|
|
🔎 PR Code Quality Reviewer is reviewing code quality for this pull request... |
|
✅ 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.
What this change does: It updates specification coverage maps and adds replace-label tests. It also documents existing integration-level evidence gaps.
Should fix
- Remove the duplicate repository-format test and its test-only helper; the inline comment identifies the existing runtime coverage.
Verdict: Ship.
Lean: -25 lines possible.
Generated by ✂️ Ponytail Reviewer for #77810 · codex · routed: gpt61 medium · ~6 AIC · ⌖ ~1 AIC · ⊞ 185
Comment /ponytail to run again
|
|
||
| for _, tt := range tests { | ||
| t.Run(tt.repo, func(t *testing.T) { | ||
| assert.Equal(t, tt.valid, formalRepoSlugValid(tt.repo)) |
There was a problem hiding this comment.
- Should fix — Remove the duplicate slug test: This only exercises the new test-only
formalRepoSlugValidcopy;actions/setup/js/repo_helpers.test.cjsalready tests the same malformed slugs against the runtime parser. Delete this test and its helper and keep the existing runtime test as the evidence; otherwise both copies need maintenance and a runtime change can leave this test passing.
There was a problem hiding this comment.
🟡 Changes recommended
The change still has an active moderate test-coverage issue because the test bypasses safe-output extraction and therefore cannot detect regressions in parsing or preserving the ${{ inputs.max }} expression.
1 open issue
What changed in this PR
This PR synchronizes specification and compliance documentation with current fixtures and tests, adds formal replace-label coverage, and records remaining token-permission integration gaps.
Changes:
- Added RL-009, RL-011, and RL-014 formal test coverage and updated replace-label evidence maps.
- Documented RL-051 and RL-055 integration gaps and linked RL-054 to its formal predicate test.
- Updated OTel mappings, MCP fixture counts, and ESLint factory test documentation and prerequisites.
| File | Description |
|---|---|
| specs/replace-label-spec.md | Updates replace-label requirements, evidence mappings, test history, and documented token-permission gaps. |
| specs/replace-label-compliance/README.md | Synchronizes replace-label behavioral and security compliance coverage with the current tests and accepted gaps. |
| specs/otel-observability-spec.md | Adds OTel endpoint, header, resource, and instrumentation test mappings. |
| specs/github-mcp-access-control-compliance/README.md | Corrects the documented MCP fixture inventory to 12/12. |
| specs/eslint-factory/README.md | Documents the trace test and the non-macOS JAVA prerequisite. |
| pkg/workflow/replace_label_formal_test.go | Adds formal tests covering replace-label validation configuration, expression handling, and repository format rules. |
Review effort: Lite (dynamic)
| func TestFormalReplaceLabelRL011_MaxExpressionPreservedForRuntime(t *testing.T) { | ||
| max := "${{ inputs.max }}" | ||
| config := &SafeOutputsConfig{ | ||
| ReplaceLabel: &ReplaceLabelConfig{ | ||
| BaseSafeOutputConfig: BaseSafeOutputConfig{Max: &max}, | ||
| }, | ||
| } | ||
|
|
||
| require.NoError(t, validateSafeOutputsMax(config)) | ||
| assert.Equal(t, "${{ inputs.max }}", *config.ReplaceLabel.Max) | ||
| } |
There was a problem hiding this comment.
Reviewed head 3a1f760c65e04804dd538a9d56af093d21192ac9 against base 7f5b343e4215a26aa38107d3a2b51ef1938c3ece. Applicable contracts: specs/replace-label-spec.md v1.0.3 (RL-054, §9.3/§9.4), specs/replace-label-compliance/README.md, plus the OTEL, ESLint-factory, and GitHub MCP compliance documentation. The fixture/test and implementation-map synchronizations are generally aligned, and the proposed W3C metadata/changelog updates are not blocking for this PR. Blocking finding: the PR changes RL-054 from an explicit security evidence gap to a mapped test, but TestFormalSec_P8_TokenScopeMinimum is only a standalone formal model and does not verify the token used by the handler/workflow. Please retain the gap or add actual credential-path conformance evidence. No specification updates were applied.
Generated by PR Specification Reviewer for #77810 · copilot · gpt50 · ~6 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review-specs to run again
| | RL-053 | T-RL-030–031 | JS required-label gate test uses the REST response; the agent message has no label-state field. | | ||
| | RL-054 | **Gap [Security]:** the minimum `issues: write` scope is unverified; weaker grants could fail at runtime while broader grants violate least privilege. | — | | ||
| | RL-055 | **Gap [Security]:** per-type token selection is unverified; the workflow-wide token may carry unrelated permissions. | — | | ||
| | RL-054 | `TestFormalSec_P8_TokenScopeMinimum` | The formal predicate accepts `issues:write` and rejects read-only/unrelated scopes. It does not inspect a live token. | |
There was a problem hiding this comment.
RL-054 is a MUST about the token actually used by replace-label, but TestFormalSec_P8_TokenScopeMinimum only evaluates a standalone formal predicate (the test file explicitly says these helpers are not wrappers around the production handler). It cannot establish that the workflow supplies issues:write or that the handler uses that token. Please retain RL-054 as an explicit security evidence gap (as the prior version did), or add a conformance test/runtime enforcement that exercises the actual credential path; otherwise this table overstates the demonstrated MUST coverage.
Comment MemoryPeek at saved memory (spec-review-history)History |
Correction to the Matt Pocock skills reviewMy earlier overall review said all 16 OTel formal tests pass. That was wrong. My inline comment on specs/otel-observability-spec.md:989 also miscounted, saying fourteen pass. Corrected result: of the 20 OTel TestFormal_ names cited in this PR diff, 18 pass and 2 skip.
The coverage row at specs/otel-observability-spec.md:989 should drop these two names or mark them as pending gaps, so they are not counted as evidence. @copilot please address the corrected OTel coverage row.
|
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /grill-with-docs and /tdd. Requesting changes because two documentation claims overstate what the tests cover.
📋 Key Themes & Highlights
Key Themes
- Overclaimed trace-test scope:
specs/eslint-factory/trace.test.mjshas onetest(...)case, which covers onlyreadableTrace. The README row (line 15) and the run-instructions paragraph (line 106) also claim parsing and replay coverage. Narrow the wording or add tests for the other exports. - Formal predicate vs. production code:
TestFormalReplaceLabelRL014_RepositoryFormatchecksformalRepoSlugValid, a helper defined in the test file. Runtime enforcement lives inactions/setup/js/repo_helpers.test.cjs(parseRepoSlugcases). The RL-014 rows should cite that as the enforcing evidence.
Verified
- ✅ Referenced helpers,
BaseSafeOutputConfig.Max, andGetValidationConfigJSONWithDataSchemaexist. - ✅ All 16 OTel test names in the otel spec exist and pass.
- ✅ Fixture count 12/12 matches the on-disk YAML set.
- ✅ Targeted Go tests pass (RL-009/011/014, P8, fixture runner and count, OTel formal tests).
gofmtis clean andtrace.test.mjspasses.
Accepted gaps
RL-051 and RL-055 remain accepted integration-level gaps with reasonable rationale. The RL-054 wording is accurate because TestFormalSec_P8_TokenScopeMinimum checks only the predicate.
@copilot please address the inline comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~9 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
| | `compare.mjs` | Parsed YAML/TypeScript extraction, actual library build/scan commands and native CJS/AsyncLocalStorage probes | | ||
| | `trace.mjs` | Strict finite-value trace parser, independent abstraction replay and readable trace rendering | | ||
| | `compare.test.mjs` | Comparison sensitivity, mutated executable fixture and generated trace validation tests | | ||
| | `trace.test.mjs` | Trace parsing, transition replay, and readable trace rendering tests | |
There was a problem hiding this comment.
[/grill-with-docs] Overclaim: this row says trace.test.mjs covers parsing, transition replay, and rendering, but the file contains a single test(...) case that only checks readableTrace escaping. It has no test for parseTrace, validateTrace, or successors.
💡 Suggested fix
Narrow the row to what is tested, for example Readable trace rendering and cell-escaping tests. Alternatively, add tests for the other exports before keeping the broader wording.
@copilot please address this.
| ``` | ||
|
|
||
| `eslint-factory` provides TypeScript, ESLint, and Vitest; `actions/setup/js` provides the YAML parser used by the comparison. Then run `node specs/eslint-factory/check.mjs` and `node --test specs/eslint-factory/compare.test.mjs`. The test verifies that missing rows and broken targets are detected. Run both after adding, removing, or renaming a registered rule, editing the rule-link table, or changing the comparison logic. This checks link coverage, not rule-description semantics. | ||
| `eslint-factory` provides TypeScript, ESLint, and Vitest; `actions/setup/js` provides the YAML parser used by the comparison. Then run `node specs/eslint-factory/check.mjs`, `node --test specs/eslint-factory/compare.test.mjs`, and `node --test specs/eslint-factory/trace.test.mjs`. The comparison test verifies that missing rows and broken targets are detected; the trace test validates trace parsing, replay, and rendering. Run both test commands after changing comparison or trace logic. Run the checker and comparison test after adding, removing, or renaming a registered rule or editing the rule-link table. This checks link coverage, not rule-description semantics. |
There was a problem hiding this comment.
[/grill-with-docs] Same overclaim repeated: "the trace test validates trace parsing, replay, and rendering" does not match the current file, which only covers rendering. Also, "Run both test commands" now refers to three commands, which is ambiguous. Align this sentence with the narrowed row above and name the commands explicitly.
@copilot please address this.
| assert.False(t, formalRepoAllowed("evil/repo", "octo/current", []string{"octo/other"})) | ||
| } | ||
|
|
||
| func TestFormalReplaceLabelRL014_RepositoryFormat(t *testing.T) { |
There was a problem hiding this comment.
[/tdd] This test asserts against formalRepoSlugValid, which is defined in this same file (line 231), not production code. It cannot fail if the runtime slug parser changes. The pattern matches the file existing model predicates such as formalRepoAllowed, so it is acceptable as a predicate check.
💡 Suggested doc change
In the RL-014 rows of specs/replace-label-spec.md and specs/replace-label-compliance/README.md, label the Go test as a formal predicate check and name the parseRepoSlug tests in actions/setup/js/repo_helpers.test.cjs as the enforcing runtime evidence.
@copilot please address this.
| | GenAI compatibility | `actions/setup/js/otel_contract.test.cjs`: `it("preserves customer-facing raw OTLP JSONL and GenAI compatibility attributes", ...)` | | ||
| | Privacy defaults | `pkg/workflow/otel_observability_formal_test.go`: `TestFormal_SecretRefResourceAttributeRejected`; `actions/setup/js/send_otlp_span.test.cjs`: `it("redacts span attribute values whose keys match sensitive patterns", ...)`, `it("redacts sensitive keys in span event attributes", ...)` | | ||
| | Non-fatal export | `actions/setup/js/send_otlp_span.test.cjs`: `it("warns (does not throw) when server returns non-2xx status on all retries", ...)`, `it("warns (does not throw) when fetch rejects on all retries", ...)`, `it("does not throw when appendFileSync fails", ...)` | | ||
| | Resource and instrumentation invariants | `pkg/workflow/otel_observability_formal_test.go`: `TestFormal_CustomAttributesResourceAttributesIndependent`, `TestFormal_MergePrecedenceBaseWinsOverOverride`, `TestFormal_MergeOfEmptyMapsYieldsNil`, `TestFormal_MetricResourceCardinalityBound`, `TestFormal_InstrumentationScopeNaming` | |
There was a problem hiding this comment.
[/diagnosing-bugs] This coverage row lists TestFormal_MetricResourceCardinalityBound and TestFormal_InstrumentationScopeNaming as evidence, but both are placeholder stubs that call t.Skip("pending: ...") (see otel_observability_formal_test.go lines ~395-412). They assert nothing, so this row overstates coverage.
💡 Suggested fix
Remove those two names from the row and mark the cardinality and scope invariants as pending or an explicit gap, with the reason that no production filter or resolver exists yet. Correction to my earlier review: I wrote that all 16 OTel tests pass. Fourteen run and pass, and these two skip.
@copilot please address this.
|
🍳 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": "3a1f760c65e04804dd538a9d56af093d21192ac9",
"kind": "requested",
"schema_version": "1",
"state": "14bc5768449aa37722419f6846a3e4a0fc91db788993c88b353b7b48c28fb3c6",
"work": [
"204f5a2c233b8c9f6f21b8942ccde700b8593fcdd1cefdd501dde14a85ef96f6",
"34f38971738f6a752a646bd7797a6c8d47fb096e4eb6f91e946a91255433c8c4",
"412809a39f1f4ac90ab408619fb206b8a846dfb5128d2a66ca757caf8ac1f566",
"51e2287c3d1ee41b7e13769862add61dcd292a623cf943abc5968c984e246bcf",
"7c613efb93c5a478bac73b4f78fd45b2232ea47b0880d038135d7140c25e325c",
"8acb61a077717e3a460018aacdfde96fd489f77606cd36169e2328d9079b75bb",
"9a0c9a0dde1a288d4bb6ceca509730c8965af30b7606d2335cf2ab74d3ca3ad4",
"a7416337fc18a85b09b98c93aba83293eed34fb243fdf0aa3232d37f4c6e47cb",
"d8a3bb781bbbf4f9df68042d7291147fe33e879f71737d440051d9a19e8252ac"
],
"workflow": "pr-sous-chef"
}
|
…ec-work-plan-2026-11-14 Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
🎉 This pull request is included in a new release. Release: |

The daily spec review found stale fixture and test documentation, missing replace-label coverage, and coverage maps needing synchronization. This update aligns the docs with current fixtures and tests and records explicit decisions for token-permission gaps.
trace.test.mjsand document the non-macOSJAVArequirement.