Refactor Melissa into Sento actor subsystem #26

Merged
lost-rob0t merged 10 commits from agent/melissa-sento-subsystem into main 2026-08-11 06:47:17 +00:00
lost-rob0t commented 2026-08-10 02:40:03 +00:00 (Migrated from github.com)

Summary

Moves Melissa ownership into a dedicated Common Lisp/Sento subsystem in the monorepo instead of browser-owned workflow logic.

PR #3 is merged. This branch has been rebuilt as one clean commit directly on current main (24e4627386406db1e6972f2767a7f21ffc484c8c), with head eed1f1688f588f8c12b3bc1f1fbbfb8a4a906780.

  • adds typed Melissa message contracts and canonical person/target entities
  • adds supervisor, request router, Sento round-robin lookup worker pool, normalizer, and requestor forwarder
  • preserves stable external request-id values while using request-specific reply actors so duplicate caller IDs cannot steal each other's callbacks
  • adds backend Melissa transport with injectable fake transport for tests
  • adds asynchronous melissa.request and synchronous melissa.status control-plane commands on quasar.control.v1
  • registers Melissa through the standard WebSocket capability boundary
  • keeps QUASAR_MELISSA_LICENSE_KEY and Melissa configuration on the backend
  • forwards expected and unexpected lookup failures back to the original requestor
  • unexpected worker faults terminate through Sento lifecycle handling; the supervisor replaces the worker and rebuilds the round-robin router
  • fails pending bridge requests during shutdown and unregisters both Melissa commands
  • treats a Melissa record set containing only error result codes as a normalization failure rather than a successful enrichment
  • uses restart-safe per-subsystem actor identities so immediate stop/restart does not depend on asynchronous actor teardown completing first

Browser boundary

The monorepo frontend no longer owns Melissa execution or privileged actor configuration.

Removed:

  • browser actor-configuration registry/storage and settings bridge
  • generic context.configuration injection into browser actors
  • Run-all configuration gating
  • Melissa actor pack/runtime/installation modules
  • Melissa browser credential/configuration storage
  • Melissa Personator/browser network helpers
  • Melissa-specific browser actor host exception

A migration-only bridge deletes obsolete browser storage keys, strips persisted quasar.actor.melissa-* actors, and resets the old pack flags. It performs no Melissa lookup or network work.

A static regression test fails if browser actor configuration injection or the retired actor-configuration module returns.

Actor topology

quasar.control.v1 command
  -> Melissa control-plane bridge
  -> request-specific reply actor
  -> request router
  -> round-robin lookup worker
  -> normalizer
  -> requestor forwarder
  -> request-specific reply actor
  -> original control-plane response callback

Lifecycle regression

Adds an explicit immediate restart regression that repeatedly performs:

start Melissa
  -> execute melissa.request
  -> stop Melissa
  -> immediately start Melissa again

The test also verifies capability registration/unregistration on each cycle. Melissa subsystem actors now use unique per-instance names so restart correctness does not rely on asynchronous :stop messages completing before actor names are reused.

Validation

GitHub Actions is green on the exact current head eed1f1688f588f8c12b3bc1f1fbbfb8a4a906780 (CI run 389 / 31462061608) across the complete product pipeline:

  • monorepo layout verification
  • format, lint, type, boundary, and static checks
  • full frontend unit and integration tests
  • production frontend build
  • Common Lisp transaction, persistence, control-plane, Melissa concurrency/requestor-isolation/duplicate-ID/shutdown/all-error/worker-recovery tests
  • new immediate Melissa stop/restart lifecycle regression
  • real quasar-web system load
  • complete development-stack smoke
  • real-stack Playwright desktop/mobile/mutation/reload paths
  • packaged production build/serve, routing, PWA, and security smoke

Merge status

PR #26 is now directly based on current main, one commit ahead and zero commits behind. GitHub reports the PR mergeable and the exact current head is green.

## Summary Moves Melissa ownership into a dedicated Common Lisp/Sento subsystem in the monorepo instead of browser-owned workflow logic. PR #3 is merged. This branch has been rebuilt as **one clean commit directly on current `main`** (`24e4627386406db1e6972f2767a7f21ffc484c8c`), with head `eed1f1688f588f8c12b3bc1f1fbbfb8a4a906780`. - adds typed Melissa message contracts and canonical `person`/`target` entities - adds supervisor, request router, Sento round-robin lookup worker pool, normalizer, and requestor forwarder - preserves stable external `request-id` values while using request-specific reply actors so duplicate caller IDs cannot steal each other's callbacks - adds backend Melissa transport with injectable fake transport for tests - adds asynchronous `melissa.request` and synchronous `melissa.status` control-plane commands on `quasar.control.v1` - registers Melissa through the standard WebSocket capability boundary - keeps `QUASAR_MELISSA_LICENSE_KEY` and Melissa configuration on the backend - forwards expected and unexpected lookup failures back to the original requestor - unexpected worker faults terminate through Sento lifecycle handling; the supervisor replaces the worker and rebuilds the round-robin router - fails pending bridge requests during shutdown and unregisters both Melissa commands - treats a Melissa record set containing only error result codes as a normalization failure rather than a successful enrichment - uses restart-safe per-subsystem actor identities so immediate stop/restart does not depend on asynchronous actor teardown completing first ## Browser boundary The monorepo frontend no longer owns Melissa execution or privileged actor configuration. Removed: - browser actor-configuration registry/storage and settings bridge - generic `context.configuration` injection into browser actors - Run-all configuration gating - Melissa actor pack/runtime/installation modules - Melissa browser credential/configuration storage - Melissa Personator/browser network helpers - Melissa-specific browser actor host exception A migration-only bridge deletes obsolete browser storage keys, strips persisted `quasar.actor.melissa-*` actors, and resets the old pack flags. It performs no Melissa lookup or network work. A static regression test fails if browser actor configuration injection or the retired actor-configuration module returns. ## Actor topology ```text quasar.control.v1 command -> Melissa control-plane bridge -> request-specific reply actor -> request router -> round-robin lookup worker -> normalizer -> requestor forwarder -> request-specific reply actor -> original control-plane response callback ``` ## Lifecycle regression Adds an explicit immediate restart regression that repeatedly performs: ```text start Melissa -> execute melissa.request -> stop Melissa -> immediately start Melissa again ``` The test also verifies capability registration/unregistration on each cycle. Melissa subsystem actors now use unique per-instance names so restart correctness does not rely on asynchronous `:stop` messages completing before actor names are reused. ## Validation GitHub Actions is green on the exact current head `eed1f1688f588f8c12b3bc1f1fbbfb8a4a906780` (CI run **389** / `31462061608`) across the complete product pipeline: - monorepo layout verification - format, lint, type, boundary, and static checks - full frontend unit and integration tests - production frontend build - Common Lisp transaction, persistence, control-plane, Melissa concurrency/requestor-isolation/duplicate-ID/shutdown/all-error/worker-recovery tests - new immediate Melissa stop/restart lifecycle regression - real `quasar-web` system load - complete development-stack smoke - real-stack Playwright desktop/mobile/mutation/reload paths - packaged production build/serve, routing, PWA, and security smoke ## Merge status PR #26 is now directly based on current `main`, one commit ahead and zero commits behind. GitHub reports the PR mergeable and the exact current head is green.
lost-rob0t (Migrated from github.com) reviewed 2026-08-10 03:43:28 +00:00
lost-rob0t (Migrated from github.com) left a comment

Current review: not merge-ready yet.

The Sento ownership split is the right architectural direction, and the current PR is mergeable with a green CI run, but there are correctness/lifecycle issues to fix first.

  1. The HTTP bridge makes command request-id globally unique across the entire Melissa subsystem. pending is keyed only by request-id, and melissa.request forwards the control-plane command id directly into that table. The control plane only requires a non-empty command id; it does not namespace or globally deduplicate ids across clients. Two concurrent clients can therefore both legally send id 1, and the second request gets a synthetic duplicate-id failure. Use an internal correlation id or key pending state by requestor/session + external request id while preserving the external id in the reply.

  2. stop-melissa-integration stops actors but leaves melissa.request and melissa.status registered in the control plane and does not fail outstanding bridge callbacks. If integration is stopped while the plane stays alive, capabilities still advertise stale handlers; a later melissa.request can target the stopped bridge and never reply. Unregister/disable the handlers during stop and deterministically fail every pending request. Also cover stop/restart and stop-with-in-flight-request in tests.

  3. An all-error Melissa record set is normalized as success. first-usable-record returns the entire raw result when every returned record satisfies result-code-error-p; normalize-melissa-result then emits a canonical entity and the forwarder sends melissa-completed. If no usable record exists, propagate a melissa-error instead of converting the response into a successful enrichment. Add a test with Records containing only error result codes.

  4. Merge ordering needs resolution with #3. This PR is based on the current submodule-era layout (src/... plus the frontend gitlink), while #3 replaces that layout with the monorepo (control-plane/src/... plus an in-tree frontend). The branches diverged at the same older base. If #3 remains the intended foundation, merge/fix #3 first and port this actor subsystem onto that layout rather than merging two incompatible structural histories.

Please fix the correlation/lifecycle/error-result cases and then rebase/port against the chosen post-#3 architecture before the final merge gate.

Current review: not merge-ready yet. The Sento ownership split is the right architectural direction, and the current PR is mergeable with a green CI run, but there are correctness/lifecycle issues to fix first. 1. The HTTP bridge makes command `request-id` globally unique across the entire Melissa subsystem. `pending` is keyed only by `request-id`, and `melissa.request` forwards the control-plane command id directly into that table. The control plane only requires a non-empty command id; it does not namespace or globally deduplicate ids across clients. Two concurrent clients can therefore both legally send id `1`, and the second request gets a synthetic duplicate-id failure. Use an internal correlation id or key pending state by requestor/session + external request id while preserving the external id in the reply. 2. `stop-melissa-integration` stops actors but leaves `melissa.request` and `melissa.status` registered in the control plane and does not fail outstanding bridge callbacks. If integration is stopped while the plane stays alive, capabilities still advertise stale handlers; a later `melissa.request` can target the stopped bridge and never reply. Unregister/disable the handlers during stop and deterministically fail every pending request. Also cover stop/restart and stop-with-in-flight-request in tests. 3. An all-error Melissa record set is normalized as success. `first-usable-record` returns the entire raw result when every returned record satisfies `result-code-error-p`; `normalize-melissa-result` then emits a canonical entity and the forwarder sends `melissa-completed`. If no usable record exists, propagate a `melissa-error` instead of converting the response into a successful enrichment. Add a test with Records containing only error result codes. 4. Merge ordering needs resolution with #3. This PR is based on the current submodule-era layout (`src/...` plus the `frontend` gitlink), while #3 replaces that layout with the monorepo (`control-plane/src/...` plus an in-tree frontend). The branches diverged at the same older base. If #3 remains the intended foundation, merge/fix #3 first and port this actor subsystem onto that layout rather than merging two incompatible structural histories. Please fix the correlation/lifecycle/error-result cases and then rebase/port against the chosen post-#3 architecture before the final merge gate.
lost-rob0t (Migrated from github.com) reviewed 2026-08-10 08:10:51 +00:00
lost-rob0t (Migrated from github.com) left a comment

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

  • external request IDs no longer own bridge callback identity; each request gets a request-specific reply actor, so duplicate caller IDs are isolated
  • shutdown fails outstanding requests, unregisters melissa.request / melissa.status, and stops the supervised subsystem
  • all-error Melissa record sets now fail normalization instead of producing a false success
  • Melissa is ported into the PR #3 monorepo control plane and uses the existing quasar.control.v1 command boundary
  • PR #3's WebSocket implementation is preserved; Melissa capabilities are registered through a small extension
  • browser Melissa/configuration ownership is removed, with migration-only cleanup and a regression guard against restoring context.configuration
  • the branch is exactly one commit ahead of PR #3 and zero commits behind it
  • exact squashed HEAD 2d2395fa05f3c42d9581425578ba1f55de929e0a passed the full CI pipeline: frontend, Lisp/Sento, real quasar-web, live stack smoke, Playwright, and packaged production/security smoke

Verdict: merge-ready after PR #3. The GitHub base-retarget endpoint is returning upstream 502s, so the PR metadata still says main; the branch ancestry itself is correctly stacked on #3. GitHub also 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 the exact current HEAD. - external request IDs no longer own bridge callback identity; each request gets a request-specific reply actor, so duplicate caller IDs are isolated - shutdown fails outstanding requests, unregisters `melissa.request` / `melissa.status`, and stops the supervised subsystem - all-error Melissa record sets now fail normalization instead of producing a false success - Melissa is ported into the PR #3 monorepo control plane and uses the existing `quasar.control.v1` command boundary - PR #3's WebSocket implementation is preserved; Melissa capabilities are registered through a small extension - browser Melissa/configuration ownership is removed, with migration-only cleanup and a regression guard against restoring `context.configuration` - the branch is exactly one commit ahead of PR #3 and zero commits behind it - exact squashed HEAD `2d2395fa05f3c42d9581425578ba1f55de929e0a` passed the full CI pipeline: frontend, Lisp/Sento, real `quasar-web`, live stack smoke, Playwright, and packaged production/security smoke Verdict: merge-ready after PR #3. The GitHub base-retarget endpoint is returning upstream 502s, so the PR metadata still says `main`; the branch ancestry itself is correctly stacked on #3. GitHub also does not allow me to approve a PR owned by the authenticated account, so this is recorded as a COMMENT review.
lost-rob0t (Migrated from github.com) reviewed 2026-08-11 05:08:21 +00:00
lost-rob0t (Migrated from github.com) left a comment

Re-review after #3 landed: not merge-ready yet.

The earlier Melissa correctness blockers look addressed on the isolated one-commit delta, and CI run 351 is green on 2d2395fa05f3c42d9581425578ba1f55de929e0a. However, #3 has now landed on main as 24e4627386406db1e6972f2767a7f21ffc484c8c, and the current #26 branch was not rewritten onto that commit.

Current graph evidence:

  • f69242e5... -> 2d2395fa... is exactly 1 commit ahead / 0 behind, so the Melissa change itself is still cleanly isolated from the old #3 head.
  • main -> agent/melissa-sento-subsystem is now diverged: 63 ahead / 1 behind, with merge base bd685c91..., not the merged #3 state.
  • GitHub currently reports the PR as mergeable: false.

So the previous green run does not validate the actual post-#3 merge result. Rewrite the branch so only the Melissa commit sits on current main (for example, rebase 2d2395fa... onto 24e4627... / current origin/main), then rerun the full pipeline and re-check mergeability.

One additional lifecycle validation gap worth closing while touching the branch: add an explicit stop -> immediate start Melissa integration test. The subsystem uses fixed actor names (melissa-supervisor, melissa-http-bridge, etc.) while teardown sends several actor :stop messages asynchronously; the current tests cover stop-with-in-flight requests but not immediate restart/name reuse. I would not call this a proven defect from static review alone, but it is exactly the kind of actor-lifecycle race that should be regression-tested before landing.

Gate: rebase/rewire onto current main -> green CI on the new head -> mergeable=true -> then this is ready for final merge.

Re-review after #3 landed: **not merge-ready yet**. The earlier Melissa correctness blockers look addressed on the isolated one-commit delta, and CI run 351 is green on `2d2395fa05f3c42d9581425578ba1f55de929e0a`. However, #3 has now landed on `main` as `24e4627386406db1e6972f2767a7f21ffc484c8c`, and the current #26 branch was not rewritten onto that commit. Current graph evidence: - `f69242e5... -> 2d2395fa...` is exactly 1 commit ahead / 0 behind, so the Melissa change itself is still cleanly isolated from the old #3 head. - `main -> agent/melissa-sento-subsystem` is now **diverged: 63 ahead / 1 behind**, with merge base `bd685c91...`, not the merged #3 state. - GitHub currently reports the PR as `mergeable: false`. So the previous green run does **not** validate the actual post-#3 merge result. Rewrite the branch so only the Melissa commit sits on current `main` (for example, rebase `2d2395fa...` onto `24e4627...` / current `origin/main`), then rerun the full pipeline and re-check mergeability. One additional lifecycle validation gap worth closing while touching the branch: add an explicit **stop -> immediate start** Melissa integration test. The subsystem uses fixed actor names (`melissa-supervisor`, `melissa-http-bridge`, etc.) while teardown sends several actor `:stop` messages asynchronously; the current tests cover stop-with-in-flight requests but not immediate restart/name reuse. I would not call this a proven defect from static review alone, but it is exactly the kind of actor-lifecycle race that should be regression-tested before landing. Gate: rebase/rewire onto current `main` -> green CI on the new head -> mergeable=true -> then this is ready for final merge.
lost-rob0t commented 2026-08-11 05:39:03 +00:00 (Migrated from github.com)

Post-#3 merge repair complete.

  • rebuilt #26 as one commit directly on current main (24e4627386406db1e6972f2767a7f21ffc484c8c)
  • preserved the reviewed Melissa delta and archived the pre-rebase branch tip
  • added an immediate stop -> restart lifecycle regression (3 cycles, request succeeds each cycle, capabilities register/unregister correctly)
  • hardened subsystem lifecycle by giving supervisor/router/normalizer/forwarder/HTTP bridge instances unique actor names, removing the actor-name reuse race during asynchronous teardown
  • current head: eed1f1688f588f8c12b3bc1f1fbbfb8a4a906780
  • CI run 389 (31462061608) is fully green: static/frontend/build, Common Lisp + Melissa regressions, real quasar-web load, dev-stack smoke, Playwright real-stack paths, packaged production/PWA/security smoke
  • GitHub reports the PR mergeable; it is one commit ahead of main and zero behind

Verdict: merge-ready.

Post-#3 merge repair complete. - rebuilt #26 as one commit directly on current `main` (`24e4627386406db1e6972f2767a7f21ffc484c8c`) - preserved the reviewed Melissa delta and archived the pre-rebase branch tip - added an immediate stop -> restart lifecycle regression (3 cycles, request succeeds each cycle, capabilities register/unregister correctly) - hardened subsystem lifecycle by giving supervisor/router/normalizer/forwarder/HTTP bridge instances unique actor names, removing the actor-name reuse race during asynchronous teardown - current head: `eed1f1688f588f8c12b3bc1f1fbbfb8a4a906780` - CI run 389 (`31462061608`) is fully green: static/frontend/build, Common Lisp + Melissa regressions, real quasar-web load, dev-stack smoke, Playwright real-stack paths, packaged production/PWA/security smoke - GitHub reports the PR mergeable; it is one commit ahead of `main` and zero behind Verdict: merge-ready.
Sign in to join this conversation.
No description provided.