Skip to content

Add optional error handoff to repository-local canvas boards - #5706

Merged
aaronpowell merged 16 commits into
mainfrom
aaronpowell-canvas-error-handoff
Oct 27, 2026
Merged

aaronpowell merged 16 commits into
mainfrom
aaronpowell-canvas-error-handoff

Conversation

@aaronpowell

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, workflow, or canvas extension file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, workflow, or canvas extension with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the main branch for this pull request.

Description

Handled canvas errors should be actionable without manually copying diagnostic details into another conversation. Adds an optional Send to agent action to the Open PR, External Plugin Review, Duplicate Review, and Resource Staleness boards under .github/extensions/ only. Public canvases under extensions/ are unchanged.

The additive error tray preserves existing messages, retry controls, and recovery behavior. Clicking dispatches a bounded, redacted diagnostic request, deduplicates repeated clicks, and displays success only after an actual child-session ID is confirmed. Dispatch and creation failures remain visible. A canonical runtime and generated local copies keep the four boards consistent; regression coverage and maintainer documentation describe the contract.


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • New canvas extension.
  • Update to existing instruction, prompt, agent, plugin, skill, workflow, or canvas extension.
  • Other (please specify):

Additional Notes

The extension runtime does not expose direct child-session creation. Handoff therefore uses the supported parent-agent messaging path: the parent calls create_session and reports the actual child ID or failure through record_error_handoff. Message admission alone is never reported as creation. Real desktop child creation has not been exercised; browser checks used a mocked parent for confirmed success and failure. The Copilot integration checklist item remains unchecked for that reason. No new paid service integration is introduced, and this updates existing canvases rather than adding one.

Validation:

  • node --experimental-vm-modules --test --test-reporter=spec eng\canvas-error-handoff.test.mjs eng\*board*.test.mjs eng\resource-staleness-*.test.mjs - passed, 278 tests after narrowing the scope.
  • node eng\sync-canvas-error-handoff.mjs --check - passed, exactly four canvases.
  • npm start - passed; generated README and marketplace remained unchanged.
  • npm run plugin:validate - passed, 108 local plugins and 82 external entries.
  • npm run website:data - passed.
  • bash eng/fix-line-endings.sh - passed.
  • git diff --cached --check - passed before committing.
  • node --experimental-vm-modules eng\canvas-smoke-test.mjs --all --install never - failed on an existing Draw scanner false positive: unchanged private #require is classified as a nonliteral require. That public canvas is outside this PR's scope.

By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

Offer optional, redacted Send to agent requests with confirmed child-session outcomes across the four local boards.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@aaronpowell
aaronpowell requested a review from a team as a code owner October 27, 2026 00:45
Copilot AI max review requested due to automatic review settings October 27, 2026 00:45
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🚦 Submission status: 👀 Ready for review

Risk tier: merge-risk:high — Privileged execution, automation, or review-policy change
Required to merge: passing submission-gate checks plus 1 approval from reviewers with write access, including a maintainer with admin or maintain permission.

Why this tier
  • .github/extensions/duplicate-review-board/error-handoff.mjs is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • .github/extensions/duplicate-review-board/extension.mjs is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • .github/extensions/duplicate-review-board/lib/publish.mjs is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • .github/extensions/duplicate-review-board/lib/state.mjs is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • .github/extensions/duplicate-review-board/public/app.js is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • .github/extensions/external-plugin-review-board/README.md is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • .github/extensions/external-plugin-review-board/error-handoff.mjs is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • .github/extensions/external-plugin-review-board/extension.mjs is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • .github/extensions/external-plugin-review-board/lib/request-fixes.mjs is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • .github/extensions/external-plugin-review-board/lib/server.mjs is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • .github/extensions/external-plugin-review-board/lib/state.mjs is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • .github/extensions/external-plugin-review-board/public/app.js is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • .github/extensions/open-pr-board/README.md is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • .github/extensions/open-pr-board/error-handoff.mjs is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • .github/extensions/open-pr-board/extension.mjs is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • …and 21 more

Automated checks

Check Status Details
Line endings ✅ Passed Passed · logs
Spelling ✅ Passed Passed · logs
Generated README consistency ✅ Passed Passed · logs
Contributor reputation ✅ Passed Passed · logs
Duplicate resource scan ✅ Passed Passed · logs
PR quality signal ✅ Passed Passed · logs

Review

  • Approvals: 0/1
  • Assigned reviewer: not assigned yet — comment /request-review to ask for one
  • Review target date: not set
  • Still needed: 1 more approval(s); an approval from a maintainer with admin or maintain permission
  • The core-maintainers pool is not staffed yet; an approver with admin or maintain permission is required instead.

Commands

Command Who What it does
/rerun-checks PR author, maintainers Re-runs failed or incomplete checks and re-evaluates this gate
/request-review PR author, maintainers Asks the review rotation to assign a reviewer (adds needs-reviewer)

Updated for 0b96b6b · gate run · This comment is maintained automatically — see submission gate docs.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Contributor Reputation Check: MEDIUM risk

Check Risk
Profile MEDIUM
Credential audit NONE

Maintainers: please review this contributor before merging.
See the workflow run for full details.
Automated check powered by AGT.

@github-actions github-actions Bot added needs-review:MEDIUM Contributor reputation check flagged MEDIUM risk ready-for-review Submission passed intake validation and is ready for maintainer review and removed awaiting-automation labels Oct 27, 2026
Comment thread eng/canvas-error-handoff/runtime.mjs
Comment thread .github/extensions/open-pr-board/error-handoff.mjs
Comment thread .github/extensions/external-plugin-review-board/error-handoff.mjs
Comment thread .github/extensions/duplicate-review-board/error-handoff.mjs
Comment thread .github/extensions/resource-staleness-board/error-handoff.mjs
Comment thread eng/canvas-error-handoff/runtime.mjs

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.

🟡 Changes recommended

Confirmed security, handoff correctness, and accessibility defects remain unresolved.

8 open issues
What changed in this PR

Adds optional Send to agent handoff to four repository-local canvas boards, leaving public canvases unchanged.

Changes:

  • Introduces a shared error tray with diagnostic redaction and parent-mediated child-session confirmation.
  • Integrates generated helpers and error markers into the existing boards.
  • Adds synchronization tooling, regression coverage, and maintainer documentation.
File Description
eng/​sync-canvas-error-handoff.mjs Generates and checks local helper copies.
eng/​canvas-error-handoff/​runtime.mjs Implements error capture, handoff requests, and confirmation.
eng/​canvas-error-handoff.test.mjs Covers redaction, requests, UI behavior, and synchronization.
docs/​maintainers/​canvas-evidence-and-metrics.md Documents privacy, behavior, and maintenance.
.github/​extensions/​resource-staleness-board/​public/​app.js Marks preview and resource errors.
.github/​extensions/​resource-staleness-board/​extension.mjs Connects SDK and server wrappers.
.github/​extensions/​resource-staleness-board/​error-handoff.mjs Adds the generated staleness-board helper.
.github/​extensions/​open-pr-board/​README.md Documents the optional handoff action.
.github/​extensions/​open-pr-board/​public/​app.js Marks detail-loading errors.
.github/​extensions/​open-pr-board/​lib/​server.mjs Uses the handoff server with an injectable factory.
.github/​extensions/​open-pr-board/​extension.mjs Configures SDK wrappers.
.github/​extensions/​open-pr-board/​error-handoff.mjs Adds the generated Open PR helper.
.github/​extensions/​external-plugin-review-board/​README.md Documents the optional handoff action.
.github/​extensions/​external-plugin-review-board/​public/​app.js Marks issue-detail errors.
.github/​extensions/​external-plugin-review-board/​lib/​server.mjs Uses the handoff server wrapper.
.github/​extensions/​external-plugin-review-board/​extension.mjs Configures SDK wrappers.
.github/​extensions/​external-plugin-review-board/​error-handoff.mjs Adds the generated plugin-review helper.
.github/​extensions/​duplicate-review-board/​public/​app.js Marks background-review errors.
.github/​extensions/​duplicate-review-board/​extension.mjs Connects SDK and server wrappers.
.github/​extensions/​duplicate-review-board/​error-handoff.mjs Adds the generated duplicate-review helper.

Review effort: Max

Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread eng/sync-canvas-error-handoff.mjs Outdated
Comment thread .github/extensions/duplicate-review-board/public/app.js Outdated
Comment thread .github/extensions/resource-staleness-board/public/app.js
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Keep capabilities in canvas URL fragments rather than HTTP bootstrap responses, and reject unauthorized dispatch and status requests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI max review requested due to automatic review settings October 27, 2026 01:10
Comment thread eng/canvas-error-handoff/runtime.mjs
Comment thread .github/extensions/open-pr-board/error-handoff.mjs
Comment thread .github/extensions/external-plugin-review-board/error-handoff.mjs
Comment thread .github/extensions/duplicate-review-board/error-handoff.mjs
Comment thread .github/extensions/resource-staleness-board/error-handoff.mjs
Redact complete cookie fields with bounded processing, deduplicate diagnostics across operations, exclude expected notices and rendered content, and keep handoff controls inside the active modal without covering recovery actions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added awaiting-automation ready-for-review Submission passed intake validation and is ready for maintainer review and removed ready-for-review Submission passed intake validation and is ready for maintainer review awaiting-automation labels Oct 27, 2026
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread .github/extensions/open-pr-board/public/app.js Outdated
Comment thread .github/extensions/external-plugin-review-board/public/app.js Outdated
Comment thread .github/extensions/duplicate-review-board/public/app.js Outdated
Comment thread .github/extensions/resource-staleness-board/public/index.html Outdated
Comment thread .github/extensions/resource-staleness-board/public/app.js Outdated

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.

Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread .github/extensions/duplicate-review-board/public/app.js Outdated
Comment thread .github/extensions/resource-staleness-board/public/app.js Outdated
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread eng/sync-canvas-error-handoff.mjs Outdated
Copilot AI max review requested due to automatic review settings October 27, 2026 01:30
Sanitize URLs before token replacement, propagate child safety boundaries, retain receipts, deduplicate board error prefixes, and exclude expected guidance toasts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added awaiting-automation ready-for-review Submission passed intake validation and is ready for maintainer review and removed ready-for-review Submission passed intake validation and is ready for maintainer review awaiting-automation labels Oct 27, 2026
Comment thread eng/canvas-error-handoff/runtime.mjs
Comment thread .github/extensions/open-pr-board/error-handoff.mjs
Comment thread .github/extensions/external-plugin-review-board/error-handoff.mjs
Comment thread .github/extensions/duplicate-review-board/error-handoff.mjs
Comment thread .github/extensions/resource-staleness-board/error-handoff.mjs
Comment thread eng/canvas-error-handoff/runtime.mjs

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.

Comment thread eng/canvas-error-handoff/runtime.mjs
Comment thread .github/extensions/external-plugin-review-board/lib/state.mjs
Comment thread .github/extensions/open-pr-board/extension.mjs
Comment thread .github/extensions/open-pr-board/public/app.js
Comment thread .github/extensions/resource-staleness-board/extension.mjs
Copilot AI max review requested due to automatic review settings October 27, 2026 04:01
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread eng/canvas-error-handoff/runtime.mjs
Comment thread .github/extensions/open-pr-board/error-handoff.mjs
Comment thread .github/extensions/external-plugin-review-board/error-handoff.mjs
Comment thread .github/extensions/duplicate-review-board/error-handoff.mjs
Comment thread .github/extensions/resource-staleness-board/error-handoff.mjs
Comment thread .github/extensions/open-pr-board/public/app.js
Comment thread .github/extensions/external-plugin-review-board/public/app.js
Comment thread .github/extensions/duplicate-review-board/public/app.js
Comment thread .github/extensions/resource-staleness-board/public/app.js

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.

Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread eng/canvas-error-handoff/runtime.mjs

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.

🔵 Needs a closer look

Unresolved runtime defects and the unverified desktop handoff require correction and maintainer validation.

3 open issues
1 resolved since last review

Review effort: Max

Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread eng/canvas-error-handoff.test.mjs Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread eng/canvas-error-handoff/runtime.mjs
Preserve periodic refresh provenance and error handoff classification.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated

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.

Comment thread eng/canvas-error-handoff.test.mjs Outdated
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread eng/canvas-error-handoff/runtime.mjs

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.

Comment thread .github/extensions/duplicate-review-board/error-handoff.mjs Outdated
Comment thread .github/extensions/external-plugin-review-board/error-handoff.mjs Outdated
Comment thread .github/extensions/open-pr-board/error-handoff.mjs Outdated
Comment thread .github/extensions/resource-staleness-board/error-handoff.mjs Outdated
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread .github/extensions/open-pr-board/public/app.js
Comment thread .github/extensions/open-pr-board/public/app.js
Preserve literal inline configuration and suppress expected approval preflights.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread eng/canvas-error-handoff/runtime.mjs
Comment thread .github/extensions/open-pr-board/error-handoff.mjs
Comment thread .github/extensions/external-plugin-review-board/error-handoff.mjs
Comment thread .github/extensions/duplicate-review-board/error-handoff.mjs
Comment thread .github/extensions/resource-staleness-board/error-handoff.mjs
Comment thread eng/canvas-error-handoff/runtime.mjs
Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread .github/extensions/open-pr-board/public/app.js
Comment thread .github/extensions/external-plugin-review-board/public/app.js

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Comment thread eng/canvas-error-handoff/runtime.mjs Outdated
Comment thread .github/extensions/open-pr-board/public/app.js
Comment thread eng/canvas-error-handoff/runtime.mjs
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread eng/canvas-error-handoff/runtime.mjs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Comment on lines +50 to +53
const fragment = text.slice(start, end + 1);
let sanitized = fragment;
try { sanitized = JSON.stringify(sanitizeJson(JSON.parse(fragment), nesting + 1)); }
catch { sanitized = "[redacted invalid JSON diagnostic]"; }
Comment on lines +50 to +53
const fragment = text.slice(start, end + 1);
let sanitized = fragment;
try { sanitized = JSON.stringify(sanitizeJson(JSON.parse(fragment), nesting + 1)); }
catch { sanitized = "[redacted invalid JSON diagnostic]"; }
import * as gh from "./lib/github.mjs";
import { buildReviewPrompt, buildRereviewPrompt, REVIEW_FIELDS_SCHEMA } from "./lib/review-prompt.mjs";
import { startBoardServer, expectedError } from "./lib/server.mjs";
import { expectedNotice } from "../open-pr-board/lib/errors.mjs";
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
import { randomBytes } from "node:crypto";
import path from "node:path";
import { expectedNotice } from "../../open-pr-board/lib/errors.mjs";
Comment on lines +50 to +53
const fragment = text.slice(start, end + 1);
let sanitized = fragment;
try { sanitized = JSON.stringify(sanitizeJson(JSON.parse(fragment), nesting + 1)); }
catch { sanitized = "[redacted invalid JSON diagnostic]"; }
Comment on lines +50 to +53
const fragment = text.slice(start, end + 1);
let sanitized = fragment;
try { sanitized = JSON.stringify(sanitizeJson(JSON.parse(fragment), nesting + 1)); }
catch { sanitized = "[redacted invalid JSON diagnostic]"; }
Comment on lines +49 to +52
const fragment = text.slice(start, end + 1);
let sanitized = fragment;
try { sanitized = JSON.stringify(sanitizeJson(JSON.parse(fragment), nesting + 1)); }
catch { sanitized = "[redacted invalid JSON diagnostic]"; }
Comment on lines +81 to +83
try { diagnostic = JSON.stringify(sanitizeJson(JSON.parse(raw))); }
catch { diagnostic = sanitizeEmbeddedJson(raw); }
return sanitizeText(diagnostic);

This branch was successfully deployed

1 active deployment
github-pages — 0b96b6bb Deployed Oct 27, 2026 by aaronpowell via deploy #1166
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk:high needs-review:MEDIUM Contributor reputation check flagged MEDIUM risk ready-for-review Submission passed intake validation and is ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants