Skip to content

docs(grid): L0-2 dispatch slicing — delete-as-we-go contract - #1458

Merged
joelteply merged 1 commit into
canaryfrom
grid/l0-2-design
May 29, 2026
Merged

joelteply merged 1 commit into
canaryfrom
grid/l0-2-design

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Refines GRID-MIGRATION-ROADMAP L0-2 into three shippable slices that each delete proportional TS in the same PR. Doc-only — no code path touched.

Why this exists

A single L0-2 PR replacing all of handleItem + bookmarks + adapter routing + dispatch + executor would be ~5k Rust against ~4k TS. Unreviewable, untestable, single-failure-mode-bricks-the-merge. The doctrine says delete-as-we-go, not delete-all-at-once.

The slices

Slice Adds (Rust) Deletes (TS)
L0-2a Pop+emit shell, PersonaSlot wiring, circuit breaker — (gives L0-2b a place to attach without fallback)
L0-2b Message dispatch through PersonaCognitionEngine, Drop-guard bookmark PersonaAutonomousLoop.ts (–358 LOC) + its 3 fallback nests
L0-2c Task dispatch + stale-task handling PersonaTaskExecutor.ts (–1,438 LOC)

kloc budget

Path Lines
PersonaUser.ts 2,385
PersonaAutonomousLoop.ts 358
PersonaTaskExecutor.ts 1,438
system/user/server/modules/**/*.ts 23,429
L0-5 final TS cull ≈27,610 lines

What this doc enforces

  • Every slice ships strictly green or rolls back via revert. No "Rust path with TS fallback" at any boundary.
  • VDD discipline: bench against current TS path BEFORE, bench Rust path AFTER, ship the number not the hypothesis.
  • Feature flags used during A/B are dev-only — deleted in the same PR. Runtime feature flags are themselves fallbacks.
  • Errors propagate. The 3 fallback nests in TS handleItem (classify-catch, task-domain-fallback, response-catch-swallow) do not survive into Rust.

Next action

Open PR for L0-2a (pop+emit shell). Branch: grid/l0-2a-pop-emit. Base: canary.

🤖 Generated with Claude Code

…persona migration

Refines GRID-MIGRATION-ROADMAP L0-2 into three shippable slices
(L0-2a pop+emit, L0-2b message dispatch + PersonaAutonomousLoop.ts
deletion, L0-2c task dispatch + PersonaTaskExecutor.ts deletion)
under Joel's 2026-05-29 doctrine: no fallbacks, we delete, obsessive
elegance, reduce kloc.

Captures the kloc budget — ≈27,610 TS lines under the L0-5 cull —
so every slice can justify its added Rust against deleted TS.

VDD discipline pinned: bench before, bench after, delete in the same
PR. No feature flags that survive merge. Errors surface, slices
roll back via revert.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@joelteply
joelteply merged commit a51d9c7 into canary May 29, 2026
2 checks passed
@joelteply
joelteply deleted the grid/l0-2-design branch May 29, 2026 20:29
joelteply added a commit that referenced this pull request Oct 3, 2026
…e state, not paged history (card d1266021) (#4685)

The pin (92a7901, 2026-09-23) predates airc #1457/#1458 (a72b324): presence is the
channel's live state and a heartbeat is never a durable row. Two costs on the IntelMac
trace straight to the stale pin:

- Idle CPU. `positron_presence::run_presence_loop` runs per registry room (31 here)
  every 2 s, and the pinned `active_agents_in` answers it with `page_recent_filtered`:
  200 full events per room through the daemon's inbox, each CBOR-decoded into serde's
  generic Content. `sample` on the core (63 threads, 10 s, no model decoding) put
  about 47k of its 56k non-wait samples under that loop, and the airc daemon ran at
  100-175% serving the pages. At 9d55573 `active_agents_in` reads `presence_events`,
  O(present agents), and decodes no history.
- Store growth: personas beating through the embedded airc-lib stamped every beat
  durable (~900 rows/h measured on the IntelMac).

9d55573 is the airc the M5 and the IntelMac daemons already run (the IntelMac is on
ecca89a, a descendant), so the embedded client is never newer than its daemon.


Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant