Skip to content

Enforce replace-label post-update response checks - #50625

Open
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/spdd-daily-spec-work-plan-2026-08-05
Open

Enforce replace-label post-update response checks#50625
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/spdd-daily-spec-work-plan-2026-08-05

Conversation

Copilot AI commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

The SPDD review identified that replace_label accepted HTTP 200 responses without verifying the resulting label state. It also identified documentation gaps around observability safeguards and intent-attribution fixture structure.

  • Replace-label enforcement

    • Reject successful setLabels responses when the added label is absent.
    • Reject responses retaining a previously present removed label.
    • Emit core.error() with the existing { success: false, error } result shape.
    if (!updatedLabelNames.includes(labelToAdd)) {
      return { success: false, error: "…label_to_add…not found…" };
    }
  • Coverage and compliance fixtures

    • Add JavaScript tests for both partial-success response cases.
    • Update RL-057/RL-058/RL-059 fixture documentation and parity date.
  • Specification alignment

    • Add the Intent Attribution fixture model’s PolicyCompiler/CLI-reporting structure note.
    • Add consolidated OTel reliability safeguards and fixture-contract references to its implementation map.

Copilot AI linked an issue Aug 5, 2026 that may be closed by this pull request
11 tasks
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update daily SPDD work plan for 2026-08-05 Enforce replace-label post-update response checks Aug 5, 2026
Copilot AI requested a review from pelikhan August 5, 2026 16:43
@pelikhan
pelikhan marked this pull request as ready for review August 5, 2026 16:45
Copilot AI balanced review requested due to automatic review settings August 5, 2026 16:45

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

Adds post-update validation to replace_label and aligns related specifications and fixtures.

Changes:

  • Rejects incomplete setLabels responses and adds regression tests.
  • Updates replace-label and intent-attribution compliance documentation.
  • Consolidates OTel reliability safeguards and implementation references.
Show a summary per file
File Description
actions/setup/js/replace_label.cjs Validates resulting label state.
actions/setup/js/replace_label.test.cjs Tests partial-success rejection.
specs/replace-label-compliance/README.md Updates enforcement and parity notes.
specs/intent-attribution-compliance/README.md Documents policy/report structure.
specs/otel-observability-spec.md Adds safeguards and implementation references.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 5/5 changed files
  • Comments generated: 3
  • Review effort level: Balanced

Comment on lines +910 to +911
| MCP access-control fixture contract | `specs/github-mcp-access-control-compliance/README.md` |
| Replace-label fixture contract | `specs/replace-label-compliance/README.md` |
Comment on lines +95 to +97
`traced_root_url` from the resolved artifact relationship; its
`attribution_status` and `attribution_source` preserve the attribution
context that was supplied to policy compilation.
| Edge: duplicate transition entries | `TestFormalTransitionEdge_DuplicateTransitionEntriesIdempotent` | Duplicate entries in the list don't change the allow/deny decision |

Coverage parity check (2026-08-03): verified Behavioral Coverage Map entries
Coverage parity check (2026-08-05): verified Behavioral Coverage Map entries
@pelikhan

pelikhan commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

/matt

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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

@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 /diagnosing-bugs and /tdd — approving. The implementation correctly closes the RL-057/RL-058/RL-059 spec gap and the new tests cover both partial-success cases cleanly.

📋 Key Themes & Highlights

Positive Highlights

  • ✅ Both validation checks guard the right states (label_to_add absent, label_to_remove retained) and are evaluated in a safe order — the labelToRemove !== labelToAdd guard prevents false positives on self-transitions.
  • ✅ Test names read as specifications and follow clear Arrange / Act / Assert structure.
  • core.error() + { success: false, error } keeps the error shape consistent with the rest of the handler.
  • ✅ Compliance README update is precise: removes the gap note and replaces it with the concrete enforcement statement.
  • ✅ OTel safeguards addition is correctly scoped under its own ### Safeguards heading with appropriate MUST-level normative language.

Minor Observation (non-blocking)

The labelToRemoveIsPresent variable referenced by the new guard is defined earlier in the function (outside the diff). Worth confirming it correctly captures the pre-update label presence and is not stale across retries — but the naming is clear and the logic reads correctly.

> 🧠 *Reviewed using Matt Pocock's skills by [Matt Pocock Skills Reviewer](https://github.com/github/gh-aw/actions/runs/31029004356)* · sonnet46 · 27.5 AIC · ⌖ 14.4 AIC · ⊞ 7.1K > Comment /matt to run again

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

PR Triage: #50625

Category: feature | Risk: medium | Priority Score: 62/100 (impact 25, urgency 20, quality 17)
Recommended action: batch_review
OTel-related PR — labeled otel; per policy this should be assigned to @mnkeifer for review (no assign tool available to this agent, flagging for manual assignment). CI: impacted-js-tests failing.

Generated by 🔧 PR Triage Agent · auto · 45.2 AIC · ⌖ 2.9 AIC · ⊞ 8K ·

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-05

3 participants