Monorepo UI + Common Lisp control plane (document & graph CRUD) #3

Merged
lost-rob0t merged 62 commits from agent/monorepo-ui-control-plane into main 2026-08-11 02:58:43 +00:00
lost-rob0t commented 2026-07-30 03:36:44 +00:00 (Migrated from github.com)

Summary

Advances #2 and resolves the review blockers in #4–#14.

Closes #4
Closes #5
Closes #6
Closes #7
Closes #8
Closes #9
Closes #10
Closes #11
Closes #12
Closes #13
Closes #14

  • Imports the React UI into the monorepo without removing desktop, mobile, graph, actor, settings, or investigation surfaces.
  • Makes Common Lisp the single-writer authority for migrated document and durable graph state. Cytoscape and PouchDB are projections; migrated writes do not fall back to PouchDB.
  • Adds deep transaction isolation, rollback and inverse correctness, atomic persistence-before-ack/event behavior, authoritative paged snapshots, stable graph/document integrity rules, and ordered transaction events.
  • Adds a bounded Lisp-owned staging protocol for large document imports: byte-limited chunks build one isolated candidate, then persist and install once with one revision/event. Failed or aborted imports never change authoritative state.
  • Keeps large-corpus browser memory bounded: Cytoscape stores only projected graph fields, normal Lisp snapshots no longer duplicate the corpus into PouchDB, successful staged imports avoid an immediate second full snapshot, and large graphs use adaptive rendering instead of a hard block.
  • Preserves JSON false/null/true distinctly across the Lisp protocol.
  • Adds bounded reconnect/deduplication behavior, per-workspace revision tracking, immediate pending-request failure, and fresh snapshot recovery.
  • Secures the WebSocket boundary with Origin, session/principal, workspace, capability, StarLang, size, rate, audit, and workspace-scoped broadcast enforcement.
  • Fixes real CLOG/WebSocket startup, supervised root development commands, production asset/SPA/PWA serving, and clean resource shutdown.
  • Reconciles graph membership on node create/update/delete, keeps all-documents null-safe, and rejects relation-document retyping while graph edges still reference the relation.
  • Ports current mobile navigation and capability-boundary documentation into the monorepo and resolves the branch against current main without restoring the obsolete frontend gitlink.

Verification

GitHub Actions is green on current head f69242e5bce8a38a8d96710e44011136e31d3cb6 with the complete product pipeline:

  • root install plus format, lint, typecheck, boundary, and static checks
  • full frontend unit and integration suites
  • Common Lisp transaction, persistence, protocol-scalar, graph-integrity, staged-import, event, and security tests
  • real quasar-web system load
  • real Vite + CLOG + WebSocket startup/protocol/shutdown smoke
  • real-stack Playwright desktop/mobile/mutation/reload paths
  • large-import regression proving a 2,001-document corpus renders adaptively instead of hitting the retired hard-block screen
  • packaged production build/serve, nested SPA/PWA routing, WebSocket security, rate-limit, and shutdown smoke

Earlier manual corpus validation also imported and reloaded /home/unseen/Downloads/starintel-complete-corpus.jsonl with 4,613 candidates and 4,613 saved, zero invalid/write/parse errors, no browser error or disconnect, on the default SBCL heap.

Genuinely deferred work

The store boundary is atomic and restart-tested with a reused store instance, but the development memory store is not process-durable. A process-durable store remains follow-up work. Actor/research lifecycle, settings, and external integration migration listed in docs/UI-MIGRATION.md also remain later #2 slices; their existing visible UI behavior is preserved in this PR.

Source UI import

  • Source repository: lost-rob0t/quasar-ui
  • Original source commit: 6998da47eec49bf8a78c4829b38c032ebc4ddb36
  • No frontend submodule remains; CI enforces the monorepo layout.

Integrated UI follow-up

The current mobile navigation, Black & Gold styling, persistent redacted diagnostics, icons, PWA metadata/install flow, service-worker registration, capability-boundary docs, and adaptive large-graph behavior are retained.

## Summary Advances #2 and resolves the review blockers in #4–#14. Closes #4 Closes #5 Closes #6 Closes #7 Closes #8 Closes #9 Closes #10 Closes #11 Closes #12 Closes #13 Closes #14 - Imports the React UI into the monorepo without removing desktop, mobile, graph, actor, settings, or investigation surfaces. - Makes Common Lisp the single-writer authority for migrated document and durable graph state. Cytoscape and PouchDB are projections; migrated writes do not fall back to PouchDB. - Adds deep transaction isolation, rollback and inverse correctness, atomic persistence-before-ack/event behavior, authoritative paged snapshots, stable graph/document integrity rules, and ordered transaction events. - Adds a bounded Lisp-owned staging protocol for large document imports: byte-limited chunks build one isolated candidate, then persist and install once with one revision/event. Failed or aborted imports never change authoritative state. - Keeps large-corpus browser memory bounded: Cytoscape stores only projected graph fields, normal Lisp snapshots no longer duplicate the corpus into PouchDB, successful staged imports avoid an immediate second full snapshot, and large graphs use adaptive rendering instead of a hard block. - Preserves JSON false/null/true distinctly across the Lisp protocol. - Adds bounded reconnect/deduplication behavior, per-workspace revision tracking, immediate pending-request failure, and fresh snapshot recovery. - Secures the WebSocket boundary with Origin, session/principal, workspace, capability, StarLang, size, rate, audit, and workspace-scoped broadcast enforcement. - Fixes real CLOG/WebSocket startup, supervised root development commands, production asset/SPA/PWA serving, and clean resource shutdown. - Reconciles graph membership on node create/update/delete, keeps `all-documents` null-safe, and rejects relation-document retyping while graph edges still reference the relation. - Ports current mobile navigation and capability-boundary documentation into the monorepo and resolves the branch against current `main` without restoring the obsolete frontend gitlink. ## Verification GitHub Actions is green on current head `f69242e5bce8a38a8d96710e44011136e31d3cb6` with the complete product pipeline: - root install plus format, lint, typecheck, boundary, and static checks - full frontend unit and integration suites - Common Lisp transaction, persistence, protocol-scalar, graph-integrity, staged-import, event, and security tests - real `quasar-web` system load - real Vite + CLOG + WebSocket startup/protocol/shutdown smoke - real-stack Playwright desktop/mobile/mutation/reload paths - large-import regression proving a 2,001-document corpus renders adaptively instead of hitting the retired hard-block screen - packaged production build/serve, nested SPA/PWA routing, WebSocket security, rate-limit, and shutdown smoke Earlier manual corpus validation also imported and reloaded `/home/unseen/Downloads/starintel-complete-corpus.jsonl` with 4,613 candidates and 4,613 saved, zero invalid/write/parse errors, no browser error or disconnect, on the default SBCL heap. ## Genuinely deferred work The store boundary is atomic and restart-tested with a reused store instance, but the development memory store is not process-durable. A process-durable store remains follow-up work. Actor/research lifecycle, settings, and external integration migration listed in `docs/UI-MIGRATION.md` also remain later #2 slices; their existing visible UI behavior is preserved in this PR. ## Source UI import - Source repository: `lost-rob0t/quasar-ui` - Original source commit: `6998da47eec49bf8a78c4829b38c032ebc4ddb36` - No frontend submodule remains; CI enforces the monorepo layout. ## Integrated UI follow-up The current mobile navigation, Black & Gold styling, persistent redacted diagnostics, icons, PWA metadata/install flow, service-worker registration, capability-boundary docs, and adaptive large-graph behavior are retained.
lost-rob0t commented 2026-07-30 03:47:06 +00:00 (Migrated from github.com)

maintainer her, hard fail
ϟ npm run dev

quasar@0.2.0 dev
node scripts/dev.mjs

Starting Quasar development stack...
repository: /home/unseen/Documents/Projects/starintelV4/quasar/

control-plane: ws://127.0.0.1:8081 (WebSocket)
control-plane: http://127.0.0.1:8080 (CLOG host)
vite: http://127.0.0.1:5173 (React UI)

[control-plane] This is SBCL 2.6.4, an implementation of ANSI Common Lisp.
More information about SBCL is available at http://www.sbcl.org/.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
[vite] npm warn exec The following package was not found and will be installed: vite@8.1.5
[vite] vite.config.ts (2:24) [UNRESOLVED_IMPORT] Could not resolve 'vite' in vite.config.ts
╭─[ vite.config.ts:2:25 ]
│
2 │ import { loadEnv } from "vite";
│ ───┬──
│ ╰──── Module not found, treating it as an external dependency
───╯

[vite] vite.config.ts (3:45) [UNRESOLVED_IMPORT] Could not resolve 'vitest/config' in vite.config.ts
╭─[ vite.config.ts:3:46 ]
│
3 │ import { configDefaults, defineConfig } from "vitest/config";
│ ───────┬───────
│ ╰───────── Module not found, treating it as an external dependency
───╯

[vite] vite.config.ts (4:18) [UNRESOLVED_IMPORT] Could not resolve '@vitejs/plugin-react' in vite.config.ts
╭─[ vite.config.ts:4:19 ]
│
4 │ import react from "@vitejs/plugin-react";
│ ───────────┬──────────
│ ╰──────────── Module not found, treating it as an external dependency
───╯

[vite] failed to load config from /home/unseen/Documents/Projects/starintelV4/quasar/frontend/vite.config.ts
[vite] error when starting dev server:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite' imported from /home/unseen/Documents/Projects/starintelV4/quasar/frontend/node_modules/.vite-temp/vite.config.ts.timestamp-1785383124492-fb9eafa7a2e1c.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:314:9)
at packageResolve (node:internal/modules/esm/resolve:768:81)
at moduleResolve (node:internal/modules/esm/resolve:855:18)
at defaultResolve (node:internal/modules/esm/resolve:985:11)
at #cachedDefaultResolve (node:internal/modules/esm/loader:747:20)
at ModuleLoader.resolve (node:internal/modules/esm/loader:724:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:320:38)
at ModuleJob._link (node:internal/modules/esm/module_job:182:49) {
code: 'ERR_MODULE_NOT_FOUND'
}

[vite] exited with code 1

Shutting down all services...
terminating control-plane (pid 3322885)
terminating vite (pid 3322891)

maintainer her, hard fail ϟ npm run dev > quasar@0.2.0 dev > node scripts/dev.mjs Starting Quasar development stack... repository: /home/unseen/Documents/Projects/starintelV4/quasar/ control-plane: ws://127.0.0.1:8081 (WebSocket) control-plane: http://127.0.0.1:8080 (CLOG host) vite: http://127.0.0.1:5173 (React UI) [control-plane] This is SBCL 2.6.4, an implementation of ANSI Common Lisp. More information about SBCL is available at <http://www.sbcl.org/>. SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information. [vite] npm warn exec The following package was not found and will be installed: vite@8.1.5 [vite] vite.config.ts (2:24) [UNRESOLVED_IMPORT] Could not resolve 'vite' in vite.config.ts ╭─[ vite.config.ts:2:25 ] │ 2 │ import { loadEnv } from "vite"; │ ───┬── │ ╰──── Module not found, treating it as an external dependency ───╯ [vite] vite.config.ts (3:45) [UNRESOLVED_IMPORT] Could not resolve 'vitest/config' in vite.config.ts ╭─[ vite.config.ts:3:46 ] │ 3 │ import { configDefaults, defineConfig } from "vitest/config"; │ ───────┬─────── │ ╰───────── Module not found, treating it as an external dependency ───╯ [vite] vite.config.ts (4:18) [UNRESOLVED_IMPORT] Could not resolve '@vitejs/plugin-react' in vite.config.ts ╭─[ vite.config.ts:4:19 ] │ 4 │ import react from "@vitejs/plugin-react"; │ ───────────┬────────── │ ╰──────────── Module not found, treating it as an external dependency ───╯ [vite] failed to load config from /home/unseen/Documents/Projects/starintelV4/quasar/frontend/vite.config.ts [vite] error when starting dev server: Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite' imported from /home/unseen/Documents/Projects/starintelV4/quasar/frontend/node_modules/.vite-temp/vite.config.ts.timestamp-1785383124492-fb9eafa7a2e1c.mjs at Object.getPackageJSONURL (node:internal/modules/package_json_reader:314:9) at packageResolve (node:internal/modules/esm/resolve:768:81) at moduleResolve (node:internal/modules/esm/resolve:855:18) at defaultResolve (node:internal/modules/esm/resolve:985:11) at #cachedDefaultResolve (node:internal/modules/esm/loader:747:20) at ModuleLoader.resolve (node:internal/modules/esm/loader:724:38) at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:320:38) at ModuleJob._link (node:internal/modules/esm/module_job:182:49) { code: 'ERR_MODULE_NOT_FOUND' } [vite] exited with code 1 Shutting down all services... terminating control-plane (pid 3322885) terminating vite (pid 3322891)
lost-rob0t commented 2026-07-30 04:04:04 +00:00 (Migrated from github.com)

Deep review verdict: changes required before merge

The monorepo import is useful, but this PR is not yet a completed document/graph control-plane migration. The green CI run validates only a reduced surface and misses confirmed runtime and correctness failures.

Confirmed blockers

  1. The documented development startup is broken.

    • The root package no longer declares frontend as an npm workspace.
    • The README says npm install at the repository root, which does not install frontend/devDependencies.
    • scripts/dev.mjs launches npx vite, causing Vite alone to be downloaded while vitest/config and @vitejs/plugin-react remain unavailable.
    • Reproduced locally with unresolved imports from vite.config.ts.
  2. The real UI mutation paths are not connected to Common Lisp.

    • main.tsx initializes the client, but store.jsx still loads and watches PouchDB, calls applyOperation, and saves workspaces locally.
    • The new adapters are isolated wrappers and their tests only verify mocked method forwarding.
    • The PR description claims document/graph paths are migrated while also listing store.jsx adapter wiring as remaining work.
    • Common Lisp is therefore a parallel unused state system; the browser remains authoritative.
  3. The Lisp web startup path contains an undefined function.

    • quasar.app:start calls attach-subscriber.
    • ATTACH-SUBSCRIBER is private to quasar.ws, not exported and not imported into quasar.app.
    • CI never loads quasar-web or starts the application, so this is not exercised.
  4. Graph transaction rollback is not isolated.

    • copy-workspace-state shallow-copies graph JSOWN objects.
    • Candidate and authoritative workspaces share node/edge arrays that are mutated in place.
    • A failed transaction can leak partial graph changes into authoritative state.
    • The current rollback test only covers duplicate documents in a blank candidate and cannot detect this.
  5. Multi-operation transaction events are dropped by the frontend.

    • All transaction events use the same operationId and revision.
    • The frontend event bus rejects duplicate operation IDs and revisions <= lastRevision.
    • Only the first event from a transaction can be delivered.
  6. The store and operation journal are not used.

    • workspace-for does not call load-workspace.
    • Successful mutations do not call save-workspace or append-operation.
    • The declared persistence boundary and operation history are currently decorative.
  7. Reconnect behavior is incomplete.

    • Pending requests are not rejected when the socket closes.
    • The client does not request a fresh workspace snapshot after reconnect.
    • Connection-state handlers exist internally but are not exposed to React.
  8. Production CLOG hosting is broken.

    • The asset path resolves relative to systems/quasar-web.asd, producing systems/frontend/dist/ instead of frontend/dist/.
    • Vite builds with base /, while CLOG attempts to serve under /frontend/.
  9. The authoritative payload contract is insufficient.

    • Mutations return only IDs such as { "created": "person:1" }, not canonical created/updated objects.
    • Events also carry minimal result objects, preventing authoritative replacement after optimistic updates.
  10. Validation and referential integrity are incomplete.

    • Documents require only _id; object type and required StarIntel fields are not validated.
    • Nodes may reference missing documents.
    • Deleting documents or nodes can leave dangling graph references and edges.
    • Backend ID generation is not implemented.
  11. The graph model is unresolved.

    • Existing browser graph workspaces use document membership, positions, viewport, selection, and groups.
    • The new Lisp model stores independent generic node/edge arrays.
    • The frontend also contains a separate canonical graph-document model.
    • A single canonical model must be chosen before wiring durable mutations.
  12. WebSocket workspace isolation and security are absent.

    • Every event is broadcast to every connection regardless of workspace.
    • No Origin allowlist, session token, principal, capability check, message-size limit, or command-rate limit exists.
    • This is especially risky with starlang.load accepting client-supplied source.

CI gaps

The successful workflow:

  • installs dependencies directly inside frontend, unlike the documented root setup;
  • lints only src/control-plane;
  • runs only five selected Vitest files;
  • skips the imported UI unit and integration suites;
  • skips Playwright;
  • does not load quasar-web;
  • does not start CLOG or the WebSocket endpoint;
  • does not run the documented npm run dev path.

This explains why CI is green while the actual development command fails.

Required fix order

  1. Restore a correct root installation workflow and make npm run dev work from a fresh clone.
  2. Export/import attach-subscriber; load and start quasar-web in CI.
  3. Wire document and graph operations into QuasarProvider and remove browser authority for migrated state.
  4. Deep-clone transaction candidate state and add a real graph rollback test.
  5. Correct transaction event IDs/sequencing so every event is delivered.
  6. Use the store for load/save/journaling.
  7. Implement reconnect snapshot recovery and reject pending requests immediately on close.
  8. Return canonical authoritative objects from mutations/events.
  9. Align the graph model and enforce referential integrity.
  10. Fix production CLOG asset paths and Vite base paths.
  11. Add workspace-scoped subscriptions, Origin checks, and session capability authorization.
  12. Run the full frontend tests, integration tests, Playwright parity suite, and a real stack smoke test.

Keep this PR draft until those blockers are fixed. The structural foundation is valid, but the slice is not operational or authoritative yet.

## Deep review verdict: changes required before merge The monorepo import is useful, but this PR is not yet a completed document/graph control-plane migration. The green CI run validates only a reduced surface and misses confirmed runtime and correctness failures. ### Confirmed blockers 1. **The documented development startup is broken.** - The root package no longer declares `frontend` as an npm workspace. - The README says `npm install` at the repository root, which does not install `frontend/devDependencies`. - `scripts/dev.mjs` launches `npx vite`, causing Vite alone to be downloaded while `vitest/config` and `@vitejs/plugin-react` remain unavailable. - Reproduced locally with unresolved imports from `vite.config.ts`. 2. **The real UI mutation paths are not connected to Common Lisp.** - `main.tsx` initializes the client, but `store.jsx` still loads and watches PouchDB, calls `applyOperation`, and saves workspaces locally. - The new adapters are isolated wrappers and their tests only verify mocked method forwarding. - The PR description claims document/graph paths are migrated while also listing `store.jsx` adapter wiring as remaining work. - Common Lisp is therefore a parallel unused state system; the browser remains authoritative. 3. **The Lisp web startup path contains an undefined function.** - `quasar.app:start` calls `attach-subscriber`. - `ATTACH-SUBSCRIBER` is private to `quasar.ws`, not exported and not imported into `quasar.app`. - CI never loads `quasar-web` or starts the application, so this is not exercised. 4. **Graph transaction rollback is not isolated.** - `copy-workspace-state` shallow-copies graph JSOWN objects. - Candidate and authoritative workspaces share node/edge arrays that are mutated in place. - A failed transaction can leak partial graph changes into authoritative state. - The current rollback test only covers duplicate documents in a blank candidate and cannot detect this. 5. **Multi-operation transaction events are dropped by the frontend.** - All transaction events use the same `operationId` and revision. - The frontend event bus rejects duplicate operation IDs and revisions `<= lastRevision`. - Only the first event from a transaction can be delivered. 6. **The store and operation journal are not used.** - `workspace-for` does not call `load-workspace`. - Successful mutations do not call `save-workspace` or `append-operation`. - The declared persistence boundary and operation history are currently decorative. 7. **Reconnect behavior is incomplete.** - Pending requests are not rejected when the socket closes. - The client does not request a fresh workspace snapshot after reconnect. - Connection-state handlers exist internally but are not exposed to React. 8. **Production CLOG hosting is broken.** - The asset path resolves relative to `systems/quasar-web.asd`, producing `systems/frontend/dist/` instead of `frontend/dist/`. - Vite builds with base `/`, while CLOG attempts to serve under `/frontend/`. 9. **The authoritative payload contract is insufficient.** - Mutations return only IDs such as `{ "created": "person:1" }`, not canonical created/updated objects. - Events also carry minimal result objects, preventing authoritative replacement after optimistic updates. 10. **Validation and referential integrity are incomplete.** - Documents require only `_id`; object type and required StarIntel fields are not validated. - Nodes may reference missing documents. - Deleting documents or nodes can leave dangling graph references and edges. - Backend ID generation is not implemented. 11. **The graph model is unresolved.** - Existing browser graph workspaces use document membership, positions, viewport, selection, and groups. - The new Lisp model stores independent generic node/edge arrays. - The frontend also contains a separate canonical graph-document model. - A single canonical model must be chosen before wiring durable mutations. 12. **WebSocket workspace isolation and security are absent.** - Every event is broadcast to every connection regardless of workspace. - No Origin allowlist, session token, principal, capability check, message-size limit, or command-rate limit exists. - This is especially risky with `starlang.load` accepting client-supplied source. ### CI gaps The successful workflow: - installs dependencies directly inside `frontend`, unlike the documented root setup; - lints only `src/control-plane`; - runs only five selected Vitest files; - skips the imported UI unit and integration suites; - skips Playwright; - does not load `quasar-web`; - does not start CLOG or the WebSocket endpoint; - does not run the documented `npm run dev` path. This explains why CI is green while the actual development command fails. ### Required fix order 1. Restore a correct root installation workflow and make `npm run dev` work from a fresh clone. 2. Export/import `attach-subscriber`; load and start `quasar-web` in CI. 3. Wire document and graph operations into `QuasarProvider` and remove browser authority for migrated state. 4. Deep-clone transaction candidate state and add a real graph rollback test. 5. Correct transaction event IDs/sequencing so every event is delivered. 6. Use the store for load/save/journaling. 7. Implement reconnect snapshot recovery and reject pending requests immediately on close. 8. Return canonical authoritative objects from mutations/events. 9. Align the graph model and enforce referential integrity. 10. Fix production CLOG asset paths and Vite base paths. 11. Add workspace-scoped subscriptions, Origin checks, and session capability authorization. 12. Run the full frontend tests, integration tests, Playwright parity suite, and a real stack smoke test. Keep this PR draft until those blockers are fixed. The structural foundation is valid, but the slice is not operational or authoritative yet.
lost-rob0t commented 2026-07-30 04:07:18 +00:00 (Migrated from github.com)

Deep review blockers were split into focused issues for this PR:

  • #4 — Fix monorepo dependency installation and broken npm run dev
  • #5 — Wire real Quasar UI mutations to the Common Lisp control plane
  • #6 — Fix quasar-web startup and add a real stack smoke test
  • #7 — Make workspace transactions deeply isolated and truly atomic
  • #8 — Fix transaction event sequencing and frontend deduplication
  • #9 — Use the workspace store for loading, atomic saves, and operation history
  • #10 — Complete WebSocket reconnect, pending-request, and connection-state handling
  • #11 — Align the canonical graph model and enforce document/edge integrity
  • #12 — Fix production CLOG asset paths and Vite base-path routing
  • #13 — Add WebSocket origin, session, workspace, and capability security
  • #14 — Expand CI to test the real monorepo, web stack, and UI parity

PR #3 should remain draft until the blocking runtime and correctness issues are resolved. The immediate execution order is #4, #6, #7, #8, #9, #5, #10, #11, #12, #13, then #14 as the final merge gate.

Deep review blockers were split into focused issues for this PR: - [ ] #4 — Fix monorepo dependency installation and broken `npm run dev` - [ ] #5 — Wire real Quasar UI mutations to the Common Lisp control plane - [ ] #6 — Fix `quasar-web` startup and add a real stack smoke test - [ ] #7 — Make workspace transactions deeply isolated and truly atomic - [ ] #8 — Fix transaction event sequencing and frontend deduplication - [ ] #9 — Use the workspace store for loading, atomic saves, and operation history - [ ] #10 — Complete WebSocket reconnect, pending-request, and connection-state handling - [ ] #11 — Align the canonical graph model and enforce document/edge integrity - [ ] #12 — Fix production CLOG asset paths and Vite base-path routing - [ ] #13 — Add WebSocket origin, session, workspace, and capability security - [ ] #14 — Expand CI to test the real monorepo, web stack, and UI parity PR #3 should remain draft until the blocking runtime and correctness issues are resolved. The immediate execution order is #4, #6, #7, #8, #9, #5, #10, #11, #12, #13, then #14 as the final merge gate.
lost-rob0t commented 2026-08-08 22:37:10 +00:00 (Migrated from github.com)

Merge-readiness pass completed at 2813208. The implementation was re-audited against current HEAD, issues #2 and #4–#14, the architecture/migration docs, local runtime behavior, and fresh Actions logs. Both push and pull-request CI runs now pass the full real-product pipeline; the branch is cleanly mergeable. The PR body has been replaced with the verified scope, checks, and genuinely deferred #2 follow-up work.

Merge-readiness pass completed at `2813208`. The implementation was re-audited against current HEAD, issues #2 and #4–#14, the architecture/migration docs, local runtime behavior, and fresh Actions logs. Both push and pull-request CI runs now pass the full real-product pipeline; the branch is cleanly mergeable. The PR body has been replaced with the verified scope, checks, and genuinely deferred #2 follow-up work.
lost-rob0t commented 2026-08-08 23:28:13 +00:00 (Migrated from github.com)

Follow-up startup/debugging validation on d818af7:

  • Plain npm run dev now enters the pinned Nix shell when available, fixing the reproduced missing SQLite failure without implicit package downloads.
  • Production packaging/smoke uses the same native runtime environment; the full build/serve/security smoke passes.
  • Development runtime errors now include redacted JavaScript and React component stacks. Opt-in ?debug=1 tracing records WebSocket lifecycle, command IDs, revisions, reconnect attempts, and pending counts without payloads or credentials.
  • Clean navigation and disconnected-control-plane tests did not reproduce a stack overflow; reconnect remained bounded and non-overlapping.
  • Local checks, 371 unit tests, Lisp/integration suites, 22 Playwright paths, and both GitHub Actions runs are green.
Follow-up startup/debugging validation on d818af7: - Plain `npm run dev` now enters the pinned Nix shell when available, fixing the reproduced missing SQLite failure without implicit package downloads. - Production packaging/smoke uses the same native runtime environment; the full build/serve/security smoke passes. - Development runtime errors now include redacted JavaScript and React component stacks. Opt-in `?debug=1` tracing records WebSocket lifecycle, command IDs, revisions, reconnect attempts, and pending counts without payloads or credentials. - Clean navigation and disconnected-control-plane tests did not reproduce a stack overflow; reconnect remained bounded and non-overlapping. - Local checks, 371 unit tests, Lisp/integration suites, 22 Playwright paths, and both GitHub Actions runs are green.
lost-rob0t commented 2026-08-08 23:50:07 +00:00 (Migrated from github.com)

Large StarIntel corpus import fix on ea6dc91:

  • Removed the large-array spread that reproduced RangeError: Maximum call stack size exceeded at 150,000 documents.
  • File imports now prevalidate once and send ordered transactions capped below the 1 MB WebSocket security limit.
  • Per-document event refresh storms are suppressed during the import; one authoritative refresh follows completion.
  • Lisp now serves size-bounded, revision-consistent snapshot pages, and the client reassembles them for reload/reconnect without oversized frames.
  • Added Lisp paging tests, 150,000-document parser coverage, transaction-byte tests, client page-reassembly coverage, and a real-stack >1 MB / 1,500-document import + reload Playwright test.
  • 375 unit tests and all 23 Playwright paths pass. Both GitHub Actions runs, including production build/serve/security smoke, are green.
Large StarIntel corpus import fix on ea6dc91: - Removed the large-array spread that reproduced `RangeError: Maximum call stack size exceeded` at 150,000 documents. - File imports now prevalidate once and send ordered transactions capped below the 1 MB WebSocket security limit. - Per-document event refresh storms are suppressed during the import; one authoritative refresh follows completion. - Lisp now serves size-bounded, revision-consistent snapshot pages, and the client reassembles them for reload/reconnect without oversized frames. - Added Lisp paging tests, 150,000-document parser coverage, transaction-byte tests, client page-reassembly coverage, and a real-stack >1 MB / 1,500-document import + reload Playwright test. - 375 unit tests and all 23 Playwright paths pass. Both GitHub Actions runs, including production build/serve/security smoke, are green.
lost-rob0t commented 2026-08-09 00:50:20 +00:00 (Migrated from github.com)

Real-corpus runtime fix completed at 19a7595.

  • Replaced per-chunk full-workspace transactions with a Lisp-owned staged import: bounded WebSocket chunks build one isolated candidate, which is persisted and installed once. This removes the quadratic deep-copy/store-copy path that exhausted the default 1 GiB SBCL heap.
  • Kept rollback semantics: chunks are non-authoritative; abort, validation failure, revision conflict, or persistence failure changes no live workspace and emits no event.
  • Preserved JSON false, null, and true distinctly through JSOWN so authoritative reload does not turn valid StarIntel booleans into invalid nulls.
  • Fixed the settings === null ActorManager crash.
  • Verified the exact starintel-complete-corpus.jsonl: 4,613/4,613 saved, zero invalid/write/parse errors, clean reload, no browser errors, no control-plane disconnect, approximately 399 MiB Lisp RSS on the normal heap.
  • Local gates pass: 377 unit tests, integration, Lisp, dev smoke, 23 Playwright paths, and production build/serve/security smoke. Both PR branch CI runs are green.
Real-corpus runtime fix completed at `19a7595`. - Replaced per-chunk full-workspace transactions with a Lisp-owned staged import: bounded WebSocket chunks build one isolated candidate, which is persisted and installed once. This removes the quadratic deep-copy/store-copy path that exhausted the default 1 GiB SBCL heap. - Kept rollback semantics: chunks are non-authoritative; abort, validation failure, revision conflict, or persistence failure changes no live workspace and emits no event. - Preserved JSON `false`, `null`, and `true` distinctly through JSOWN so authoritative reload does not turn valid StarIntel booleans into invalid nulls. - Fixed the `settings === null` ActorManager crash. - Verified the exact `starintel-complete-corpus.jsonl`: 4,613/4,613 saved, zero invalid/write/parse errors, clean reload, no browser errors, no control-plane disconnect, approximately 399 MiB Lisp RSS on the normal heap. - Local gates pass: 377 unit tests, integration, Lisp, dev smoke, 23 Playwright paths, and production build/serve/security smoke. Both PR branch CI runs are green.
lost-rob0t commented 2026-08-09 01:33:28 +00:00 (Migrated from github.com)

Final large-corpus/browser pass completed at 5bb7ade. The Brave freeze was frontend memory amplification, not another Lisp heap failure: full StarIntel documents were copied into every Cytoscape element, authoritative snapshots were synchronously duplicated into PouchDB, and import completion immediately fetched a second full snapshot. The UI now projects only graph fields, keeps Pouch staging exclusive to explicit Couch sync, reuses validated committed import data, and blocks unsafe graph sizes. The exact 4,613-document corpus previously imported and reloaded on the default SBCL heap; the real-stack 2,001-document import/reload/graph-guard regression passes. PWA serving removed by a concurrent UI slice was restored. Current main is merged with its offline-status visual retained. Both push and PR CI runs are green, including 379 unit tests, Lisp transaction/persistence tests, real quasar-web, dev-stack smoke, 23 Playwright paths, and packaged production routing/PWA/security smoke. GitHub reports the PR mergeable with no unresolved review threads.

Final large-corpus/browser pass completed at `5bb7ade`. The Brave freeze was frontend memory amplification, not another Lisp heap failure: full StarIntel documents were copied into every Cytoscape element, authoritative snapshots were synchronously duplicated into PouchDB, and import completion immediately fetched a second full snapshot. The UI now projects only graph fields, keeps Pouch staging exclusive to explicit Couch sync, reuses validated committed import data, and blocks unsafe graph sizes. The exact 4,613-document corpus previously imported and reloaded on the default SBCL heap; the real-stack 2,001-document import/reload/graph-guard regression passes. PWA serving removed by a concurrent UI slice was restored. Current `main` is merged with its offline-status visual retained. Both push and PR CI runs are green, including 379 unit tests, Lisp transaction/persistence tests, real `quasar-web`, dev-stack smoke, 23 Playwright paths, and packaged production routing/PWA/security smoke. GitHub reports the PR mergeable with no unresolved review threads.
lost-rob0t (Migrated from github.com) reviewed 2026-08-10 03:43:14 +00:00
lost-rob0t (Migrated from github.com) left a comment

Current review: not merge-ready yet.

The earlier #4–#14 blockers appear to have been substantially addressed, but current HEAD still has correctness issues and the branch has diverged from main.

  1. apply-node-delete breaks on the canonical all-documents graph when the deleted node has a documentId. all-documents.documentIds is represented as :null; the delete path tests only truthiness and then calls (rest document-ids). Since :null is non-NIL, this attempts (rest :null) and signals instead of deleting the node. The create path already special-cases :null; delete needs the same contract plus a regression test.

  2. apply-node-update can leave graph membership inconsistent. Updating a node's documentId replaces the node but never reconciles the graph's documentIds. A node moved from document A to B can leave A in membership and omit B. Either forbid changing documentId through node update or update membership atomically, with tests for both old/new references.

  3. apply-document-update can violate an existing edge invariant. Edge validation requires an edge documentId to reference a dtype = relation document, but document update allows that referenced document's dtype to be changed to any non-empty dtype without checking graph references. That can leave an already-persisted edge invalid. Block incompatible dtype changes while referenced, or revalidate affected graph edges transactionally.

  4. The branch is currently behind main and GitHub reports it non-mergeable. main has moved three commits past this PR's merge base, including frontend pin/navigation/large-graph changes, while this PR replaces the frontend gitlink with the in-tree monorepo frontend. Reconcile current main before the merge gate and rerun the full real-stack suite.

Please add focused regressions for the three state-integrity cases above, reconcile current main, and rerun the existing real-stack/Playwright/production gates.

Current review: not merge-ready yet. The earlier #4–#14 blockers appear to have been substantially addressed, but current HEAD still has correctness issues and the branch has diverged from `main`. 1. `apply-node-delete` breaks on the canonical `all-documents` graph when the deleted node has a `documentId`. `all-documents.documentIds` is represented as `:null`; the delete path tests only truthiness and then calls `(rest document-ids)`. Since `:null` is non-NIL, this attempts `(rest :null)` and signals instead of deleting the node. The create path already special-cases `:null`; delete needs the same contract plus a regression test. 2. `apply-node-update` can leave graph membership inconsistent. Updating a node's `documentId` replaces the node but never reconciles the graph's `documentIds`. A node moved from document A to B can leave A in membership and omit B. Either forbid changing `documentId` through node update or update membership atomically, with tests for both old/new references. 3. `apply-document-update` can violate an existing edge invariant. Edge validation requires an edge `documentId` to reference a `dtype = relation` document, but document update allows that referenced document's dtype to be changed to any non-empty dtype without checking graph references. That can leave an already-persisted edge invalid. Block incompatible dtype changes while referenced, or revalidate affected graph edges transactionally. 4. The branch is currently behind `main` and GitHub reports it non-mergeable. `main` has moved three commits past this PR's merge base, including frontend pin/navigation/large-graph changes, while this PR replaces the frontend gitlink with the in-tree monorepo frontend. Reconcile current `main` before the merge gate and rerun the full real-stack suite. Please add focused regressions for the three state-integrity cases above, reconcile current `main`, and rerun the existing real-stack/Playwright/production gates.
lost-rob0t (Migrated from github.com) reviewed 2026-08-10 08:09:56 +00:00
lost-rob0t (Migrated from github.com) left a comment

Merge-readiness re-review: the blockers from my earlier review are resolved on current HEAD.

  • graph node create/update/delete now reconcile named-graph document membership and keep the all-documents null-membership contract safe
  • relation documents cannot be retyped while graph edges still reference them
  • the branch is reconciled with current main without restoring the obsolete frontend gitlink
  • current mobile navigation and capability-boundary work are retained
  • the stale large-import hard-block expectation was replaced with adaptive large-graph rendering coverage
  • GitHub reports the PR mergeable
  • the full current-head CI pipeline is green, including frontend checks/tests/build, Common Lisp integrity/persistence tests, real quasar-web, live dev-stack smoke, Playwright, and packaged production/security smoke

Verdict: merge-ready. GitHub does not allow me to approve a PR owned by the authenticated account, so this is recorded as a COMMENT review.

Merge-readiness re-review: the blockers from my earlier review are resolved on current HEAD. - graph node create/update/delete now reconcile named-graph document membership and keep the `all-documents` null-membership contract safe - relation documents cannot be retyped while graph edges still reference them - the branch is reconciled with current `main` without restoring the obsolete frontend gitlink - current mobile navigation and capability-boundary work are retained - the stale large-import hard-block expectation was replaced with adaptive large-graph rendering coverage - GitHub reports the PR mergeable - the full current-head CI pipeline is green, including frontend checks/tests/build, Common Lisp integrity/persistence tests, real `quasar-web`, live dev-stack smoke, Playwright, and packaged production/security smoke Verdict: merge-ready. GitHub does not allow me to approve a PR owned by the authenticated account, so this is recorded as a COMMENT review.
Sign in to join this conversation.
No description provided.