Package the local Coven Memory dashboard - #7
Merged
Conversation
Signed-off-by: Val Alexander <bunsthedev@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Packages the Coven Memory dashboard as a publishable npm artifact with a loopback-only executable entrypoint, while hardening privacy boundaries (sanitized build manifests + strict packaged-file allowlist) and surfacing daemon contract incompatibility as an explicit “update required” state in both API and UI.
Changes:
- Add a
coven-memory-dashboardbin entry and restrict published contents to a curated runtime subset, with packaging verification scripts. - Introduce a build-artifact sanitizer/scan that removes absolute build roots and enforces policy checks over required runtime paths.
- Treat legacy/missing daemon routes as
daemon_update_required(HTTP 426) and gate the dashboard UI behind an update-required screen.
Reviewed changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Excludes Node --test packaging tests from Vitest discovery. |
| src/server/memory-gateway.ts | Detects legacy/missing daemon contracts and raises a dedicated incompatibility error. |
| src/server/memory-gateway.test.ts | Adds coverage for legacy contract + missing route → incompatibility classification. |
| src/server/memory-contract.ts | Adds a legacy list schema used only for incompatibility detection. |
| src/server/api-response.ts | Maps daemon_incompatible to daemon_update_required with HTTP 426. |
| src/features/memory/use-memory-dashboard.ts | Derives a top-level updateRequired state from API error codes. |
| src/features/memory/use-memory-dashboard.test.tsx | Verifies updateRequired derivation on compatibility response (426 + code). |
| src/features/memory/memory-update-required.tsx | New UI gate component prompting users to update/retry. |
| src/features/memory/memory-dashboard.tsx | Replaces panes with the update-required gate when needed. |
| src/features/memory/memory-dashboard.test.tsx | Tests that update-required gating hides the normal panes/controls. |
| src/app/globals.css | Adds styling for the update-required gate. |
| src/app/api/memory/routes.test.ts | Verifies API route maps incompatibility to 426 + no-store payload. |
| scripts/smoke-dashboard.mjs | Allows smoke to launch an installed dashboard entry (and suppress browser open). |
| scripts/sanitize-build-artifact.test.mjs | Tests sanitization removes synthetic absolute roots and rejects /Users//home remnants. |
| scripts/sanitize-build-artifact.mjs | Implements manifest sanitization + runtime policy scanning across packaged paths. |
| scripts/package-contents-test.mjs | Enforces an allowlist/required-list for npm pack --dry-run contents. |
| scripts/dashboard-bin.test.mjs | Node-level tests for loopback URL parsing, browser command selection, and signal handling. |
| README.md | Documents global install + launch behavior and privacy guarantees of the published artifact. |
| pnpm-lock.yaml | Locks dependency graph updates to support runtime tsx usage. |
| package.json | Makes package publishable, adds bin/files/publishConfig, and adds package build/test scripts. |
| bin/coven-memory-dashboard.mjs | Adds the executable entrypoint that launches the production server and validates/opens the loopback URL. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
pnpm check(18 files / 143 tests)pnpm test:package(7 tests)pnpm audit:prodblocker_count=0,smoke_status=ok)Privacy guard review
scripts/sanitize-build-artifact.test.mjscontains three synthetic/Users/example/private-checkoutinputs annotated withgitleaks:allow. They are required to prove machine-root removal from packaged manifests and contain no real local path or secret.Bead:
cmem-8qg.4.1