Skip to content

Preserve submitted review anchors during comment identity lookup - #75865

Merged
pelikhan merged 4 commits into
mainfrom
pelikhan/safe-output-failures
Nov 8, 2026
Merged

pelikhan merged 4 commits into
mainfrom
pelikhan/safe-output-failures

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Why

A successfully published inline review comment could be reported as skipped when GitHub's optional comment-identity lookup returned null coordinates. This incorrectly failed dependent safe outputs despite successful publication, as observed in PR Code Quality Reviewer run 42453377632.

Approach

Preserve the anchor metadata for exactly the inline comments included in a successful review POST. Treat identity lookup as optional enrichment, assigning IDs only when anchor matches are unique in both the returned and submitted lists. Sparse, partial, reordered, or ambiguous responses cannot erase publication evidence. Comments filtered out before submission or moved into a body-only fallback remain excluded.

Update the reference documentation to explain publication and dependency semantics. This change does not weaken branch-protection checks, change credentials or permissions, or address the separate queue-delivery and telemetry failures found during the investigation.

Validation

  • Added regression coverage for null coordinates, partial lookup, reordered results, and ambiguous identities.
  • 166 focused review-buffer and dependency tests passed.
  • make lint-cjs and make agent-report-progress passed.
  • Read-only security review passed with no confirmed vulnerabilities.

No workflows were dispatched or rerun.

@pelikhan
pelikhan marked this pull request as ready for review November 8, 2026 08:08
Copilot AI adaptive review requested due to automatic review settings November 8, 2026 08:08
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_no_action

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.

Generated from PR Specification Reviewer · gpt56 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.7K · ◷

Generated by PR Specification Reviewer for #75865

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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: reported_no_action

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.

Generated from Design Decision Gate 🏗️ · routed: opus55 medium · ~12 AIC · ⌖ ~2 AIC · ⊞ 7.7K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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.

Generated from Test Quality Sentinel · routed: gpt56 max · ~1 AIC · ⌖ ~2 AIC · ⊞ 6.3K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 8, 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 Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated from Ponytail Reviewer · routed: gpt56 max · ~3 AIC · ⌖ ~1 AIC · ⊞ 118 · ◷

Generated by Ponytail Reviewer for #75865

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-08T08:12:01Z
review_event: REQUEST_CHANGES
top_themes: [partial lookup empty-match crash, side normalization loses identity enrichment]
files_reviewed: [actions/setup/js/pr_review_buffer.cjs, actions/setup/js/pr_review_buffer.test.cjs, docs/src/content/docs/reference/safe-outputs-pull-requests.md]
comment_count: 2

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.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.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again

Comment thread actions/setup/js/pr_review_buffer.cjs Resolved
Comment thread actions/setup/js/pr_review_buffer.cjs Resolved

@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.

Found two blocking correctness issues in the new identity enrichment path:

  • Partial lookups can throw when matches is empty instead of preserving the submitted anchor.
  • Missing submitted side values can prevent enrichment when GitHub returns RIGHT.

Please guard the empty-match case and normalize side defaults, with regression coverage.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again

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.

🟢 Approval recommended

No active review issues remain for the inline-comment publication and dependency-handling changes.

No open issues 🎉

What changed in this PR

This PR preserves evidence of successfully published inline review comments in gh-aw, preventing optional identity lookups from incorrectly marking comments as skipped and blocking dependent safe outputs.

Changes:

  • Preserve submitted anchors and attach comment identities only when matches are unique in both lists.
  • Add regression coverage for null coordinates, partial results, reordered results, and ambiguous identities.
  • Document when buffered inline comments satisfy safe-output dependencies.
File Description
docs/​src/​content/​docs/​reference/​safe-outputs-pull-requests.md Clarifies publication and dependency semantics.
actions/​setup/​js/​pr_review_buffer.test.cjs Tests anchor preservation and dependent-output eligibility.
actions/​setup/​js/​pr_review_buffer.cjs Makes identity lookup optional enrichment without replacing submitted anchors.

Review effort: Balanced (auto)

@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 (triage: bug fix). Verdict: COMMENT. The fix is sound, and the new regression test fails on pre-fix code and passes with this change. Three non-blocking suggestions are inline.

📋 Verification and details

What I verified

  • Traced identity lookup through safe_output_outcomes.cjs and safe_output_dependencies.cjs. Filtered-out comments still end as skipped, which safe_output_outcomes.test.cjs:78 already covers.
  • Rebuilt the pre-fix pr_review_buffer.cjs. All four it.each scenarios fail on it and pass on this branch, so the test guards the regression.
  • Probed duplicate submitted anchors against a single API match. Neither comment receives an ID, which is the safe outcome.

Limits

  • vitest, prettier, and make lint-cjs were not run. Sandbox TLS interception blocked npm, so these results come from a standalone Node harness that loads the real modules.

Positive highlights

  • ✅ Null or ambiguous identity keeps the submitted anchor instead of marking a published comment as skipped.
  • ✅ The uniqueness check covers both the API side and the submitted side.
  • ✅ The docs paragraph matches the implementation.

@copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~12 AIC · ⌖ ~2 AIC · ⊞ 5.4K
Comment /matt to run again

]);
expect(records.every(record => !record.skipped && !record.result.buffered && !record.result.deferred_manifest)).toBe(true);
expect(checkSafeOutputDependencies(plan, 2, records, false)).toEqual({ state: "ready" });
expect(review.review_comments[0].id).toBe(scenario === "null anchors" || scenario === "ambiguous identities" ? undefined : 200);

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.

[/tdd] The expected IDs come from a ternary on scenario, so each row's expectation is hard to read and easy to get wrong. Use an explicit per-scenario table with the expected IDs for both comments, so each named case states its outcome directly.

@copilot please address this.

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.

Fixed in 03b3c16: each named scenario now declares its lookup response and expected IDs for both comments directly in the table. All focused regressions pass.

Comment thread actions/setup/js/pr_review_buffer.cjs Resolved
Comment thread actions/setup/js/pr_review_buffer.cjs Resolved
@pelikhan

pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

In response to comment 6719097274: accepted as an informational status report, with no code change requested. reported_no_action is not independent verification of specification coverage or publication capability.

@pelikhan

pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

In response to comment 6719098636: accepted as an informational status report, with no code change requested. The no-op outcome does not independently verify design requirements or publication capability.

@pelikhan

pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

In response to comment 6719098651: accepted as a test-analysis status report, with no actionable change requested. The side-matching update has focused regression coverage; this no-op notice alone does not establish test adequacy.

@pelikhan

pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

In response to comment 6719099188: accepted as a reviewer activity marker rather than an actionable finding. No code change is needed, and the marker does not establish review completion.

@pelikhan

pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

In response to comment 6719101666: accepted as an informational status report, with no code change requested. The no-op outcome is not independent verification of review coverage or publication capability.

@pelikhan

pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

In response to comment 6719103737: accepted as a completion notice, with no separate change requested by this comment. Both actionable inline findings were evaluated individually: side normalization was fixed, and the empty-match crash claim was declined because the existing guard short-circuits safely.

@pelikhan

pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

In response to comment 6719153433: partially accepted; side-default enrichment is fixed in 2860d14 with passing regressions, while the reported empty-match crash is prevented by the existing short-circuit guard. The managed memory body was left untouched.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (actions/setup/js/pr_review_buffer.test.cjs:452): [/tdd] The expected IDs come from a ternary on scenario, so each row's expectation is hard to read and easy to get wrong. Use an explicit per-scenario table with the expected IDs for both comments, so each named case states its outcome directly. - Preserve submitted review anchors during comment identity lookup #75865 (comment)
  3. Review (actions/setup/js/pr_review_buffer.cjs:654): [/tdd] [/diagnosing-bugs] This uniqueness guard is the only thing that stops one returned comment ID from being assigned to two submitted comments, but no test covers duplicate submitted anchors. The ambiguous identities case duplicates the API result, not the submitted comments. - Preserve submitted review anchors during comment identity lookup #75865 (comment)
  4. Review (actions/setup/js/pr_review_buffer.cjs:655): [/diagnosing-bugs] When identity is unresolved, the record keeps the submitted anchor but loses id and url, even though GitHub returned them. The null anchors case shows both IDs as undefined although the API returned 200 and 201. Null coordinates leave no safe key to match on, so this trade-off is expected. Document it in the docs paragraph so users do not expect a URL on these comments. - Preserve submitted review anchors during comment identity lookup #75865 (comment)
  5. Fix failing check JS Tests (shard 3/8) (FAILURE): https://github.com/github/gh-aw/actions/runs/42462877203/job/128675829742.

Once you start work, post this work summary as a PR comment without the leading Copilot mention, including the Sous-chef head, work, and state lines below, to record that the assignment is running. Apply the necessary fixes on this PR's existing branch, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved; stop when only human review or CI remains. Do not merge or trigger CI.

Sous-chef requested-head: 2860d14
Sous-chef requested-work: 4abda31131600b8ff4d73bd7f3bf534a014465b854fafd42d5113bf9f4d854ee 5647e89e729ffca7ca6fa93973b5810c6a2dd0563bb8357a2ffeed8b10dd889d c5db637ed3021349e99c79747ce0ae247cbe793ea9c12fcd412b1dcdc069d94d d7d3d525a755c53a5f5be12e0ec36432d143cd8b5cb6894823c63880ef3cb87c
Sous-chef requested-state: f3d956a488e346c802a4b537491a8521a2c847d669b604df83ea907a4b4e7a78

Generated by 👨🍳 PR Sous Chef · pi · haiku45 · ~15 AIC · ⌖ ~12 AIC · ⊞ 1.2K · ◷
Comment /souschef to run again

Copilot AI commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

@copilot

Copilot assignment requested for the following outstanding work:...

Assignment running:

  1. Update this branch with the latest main using make merge-main, resolving conflicts and preserving the intended changes.
  2. Replace scenario-dependent ternaries with explicit expected IDs for both comments.
  3. Add regression coverage for duplicate submitted anchors.
  4. Document that unresolved identity enrichment leaves IDs and URLs unavailable.
  5. Investigate and fix JS Tests (shard 3/8) using the linked job logs.

Sous-chef requested-head: 2860d14
Sous-chef requested-work: 4abda31131600b8ff4d73bd7f3bf534a014465b854fafd42d5113bf9f4d854ee 5647e89e729ffca7ca6fa93973b5810c6a2dd0563bb8357a2ffeed8b10dd889d c5db637ed3021349e99c79747ce0ae247cbe793ea9c12fcd412b1dcdc069d94d d7d3d525a755c53a5f5be12e0ec36432d143cd8b5cb6894823c63880ef3cb87c
Sous-chef requested-state: f3d956a488e346c802a4b537491a8521a2c847d669b604df83ea907a4b4e7a78

No PR merge or CI dispatch will be performed.

Copilot AI requested a review from gh-aw-bot November 8, 2026 11:09
@pelikhan
pelikhan merged commit 96e720d into main Nov 8, 2026
60 checks passed
@pelikhan
pelikhan deleted the pelikhan/safe-output-failures branch November 8, 2026 16:22
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants