Repository navigation
Add local resource staleness review canvas - #5251
aaronpowell wants to merge 2 commits into
Conversation
Add meaningful-history inventory, resource contents previews, and reusable child-session reviews with explicitly confirmed publication. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🚦 Submission status: 👀 Ready for reviewRisk tier: Why this tier
Automated checks
Review
Commands
Updated for |
|
🟡 Contributor Reputation Check: MEDIUM risk
Maintainers: please review this contributor before merging. |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved safety and content-integrity issues affect the review-to-publication flow.
7 open issues
Require UI confirmation before queuing publication · New Resolve preview paths and enforce containment before serving · New Bind fingerprints to locked state updates · New Return compact results from mutating canvas actions · New Require publication URLs to target the configured repository · New Handle existing prepared work before allowing new work · New Move revision checks into the forwarded child assignment · New
What changed in this PR
Adds a project-scoped maintainer canvas for reviewing resource staleness locally, using reusable child sessions to prepare changes before separately confirmed publication. The scheduled staleness workflow remains unchanged.
Changes:
- Inventories resources using meaningful Git history, grouped assets, and content fingerprints.
- Adds filtering, read-only previews, persistent review state, and child-session work routing.
- Documents operating boundaries and adds focused regression coverage.
| File | Description |
|---|---|
eng/resource-staleness-board.test.mjs |
Covers inventory, persistence, work routing, HTTP endpoints, and previews. |
.github/extensions/resource-staleness-board/README.md |
Documents usage, history rules, child sessions, and publication boundaries. |
.github/extensions/resource-staleness-board/public/styles.css |
Styles the responsive board, previews, and confirmation dialog. |
.github/extensions/resource-staleness-board/public/index.html |
Defines filters, resource details, and publication confirmation. |
.github/extensions/resource-staleness-board/public/app.js |
Handles filtering, previews, live updates, and work requests. |
.github/extensions/resource-staleness-board/lib/work.mjs |
Builds child-session assignments and publication instructions. |
.github/extensions/resource-staleness-board/lib/state.mjs |
Persists reviews, work tokens, and prepared changes under a file lock. |
.github/extensions/resource-staleness-board/lib/preview.mjs |
Provides size-limited working-tree previews and binary detection. |
.github/extensions/resource-staleness-board/lib/inventory.mjs |
Groups resources, analyzes Git history, and fingerprints content. |
.github/extensions/resource-staleness-board/extension.mjs |
Registers canvas actions and connects scanning, persistence, and HTTP serving. |
Review effort: Max
Support selected and oldest-resource background reviews. Address PR feedback on publication authorization, locked revision checks, compact action results, prepared work, and preview containment. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Regarding submission status comment #5251 (comment): Partially accepted. Fixed the codespell failure without weakening validation, and local spelling, build, line-ending normalization, and all 30 regression tests pass; the new push will rerun CI, while the required maintainer approval remains outstanding. |
|
Regarding contributor reputation comment #5251 (comment): Acknowledged as an informational maintainer-review requirement; no code change is appropriate. The contributor workflow passed with Profile MEDIUM and Credential audit NONE, and the human review remains outstanding. |
There was a problem hiding this comment.
🟡 Changes recommended
Publication can include commits outside the confirmed staged diff, and core state-handling defects remain unresolved.
7 open issues
Validate child branch ancestry before publishing · New Throttle intermediate scan notifications · New Limit batch review size before queuing · New Preserve semantic whitespace in bundled code comparisons · New Propagate persisted changes across open board stores · New Reconcile published work before follow-up actions · New Restore focus for preview and published-PR links · New
7 resolved since last review
Resolve preview paths and enforce containment before serving Require UI confirmation before queuing publication Move revision checks into the forwarded child assignment Handle existing prepared work before allowing new work Require publication URLs to target the configured repository Return compact results from mutating canvas actions Bind fingerprints to locked state updates
Review effort: Max
| Require HEAD to equal prepared.baseSha and the SHA-256 of the raw stdout bytes of | ||
| git diff --cached --binary to equal prepared.diffHash. Reject any additional unstaged/untracked changes affecting this work. |
| return await store.sync(await scanInventory(root, { | ||
| progress: (value) => { store.progress = value; store.emit(); }, | ||
| })); |
| if (!Array.isArray(input.ids) || !input.ids.length || input.ids.some((id) => typeof id !== "string" || !id.trim()) || | ||
| new Set(input.ids).size !== input.ids.length) { | ||
| throw new Error("Choose one or more unique resource IDs for batch review."); | ||
| } |
| export function body(text, file) { | ||
| const normalized = text.replace(/\r\n/g, "\n"); | ||
| const content = file.endsWith(".md") ? normalized.replace(/^---\n[\s\S]*?\n---(?:\n|$)/, "") : normalized; | ||
| return content.replace(/\s/g, ""); |
| subscribe(listener) { | ||
| this.listeners.add(listener); | ||
| return () => this.listeners.delete(listener); |
| !/^\/github\/awesome-copilot\/pull\/[1-9]\d*$/.test(url.pathname) || url.search || url.hash) { | ||
| throw new Error("Expected a canonical HTTPS GitHub pull request URL for github/awesome-copilot."); | ||
| } | ||
| item.publication = { url: url.href, at: new Date().toISOString() }; |
| const focusKey = document.activeElement?.getAttribute?.("data-focus-key"); | ||
| renderDetailContent(detail); | ||
| const restored = scroll && [...detail.querySelectorAll("[data-scroll-key]")].find((node) => node.getAttribute("data-scroll-key") === scroll.key); | ||
| if (restored) restored.scrollTop = scroll.top; | ||
| if (focusKey && !detail.contains(document.activeElement)) detail.querySelector(`[data-focus-key="${focusKey}"]`)?.focus(); |


Pull Request Checklist
npm startand verified thatREADME.mdis up to date.mainbranch for this pull request.Description
Bring the resource-staleness workflow into a local maintainer canvas so resources can be inspected and acted on individually without publishing a report or changing GitHub state.
The board scans local meaningful Git history, groups skill and hook assets, and supports filtering and read-only working-tree file previews. Reviews propose concrete improvements; removal recommendations must explain which current native capability supersedes the resource rather than treating age as proof of obsolescence.
Item work is routed to isolated project child sessions, retaining and reusing each resource's child context. Reviews and preparation stay local. Publishing requires separate confirmation tied to the prepared staged-diff hash. Persistent local state and content fingerprints reject stale or cancelled results.
Type of Contribution
Additional Notes
This is a project-scoped maintainer customization under
.github/extensions, not a marketplace plugin. It reuses the Open PR Board's token-protected loopback server. The scheduled staleness workflow is unchanged.Validation:
node --experimental-vm-modules --test eng\resource-staleness-board.test.mjs: passed, 17 tests.npm start: passed afternpm ci --no-audit --no-fundrestored missing dependencies; generated README and marketplace outputs remain unchanged. Existing external-plugin metadata warnings remain.bash eng/fix-line-endings.sh: passed.node --check .github\extensions\resource-staleness-board\extension.mjs: passed.node --check .github\extensions\resource-staleness-board\public\app.js: passed.git diff --cached --check: passed before committing.The user has opened the board locally. Full child-session review/publication and extension-reload behavior have not been verified end to end. The existing open provider returned a missing
POST /api/read_fileroute after the preview was added, consistent with an older provider process serving updated static assets; an extension reload is required to load the new server route.Paid-service guidance is not applicable to this local maintainer customization.
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.