Skip to content

Alpha gap analysis: prioritized feature backlog - #298

Merged
joelteply merged 1 commit into
mainfrom
docs/alpha-gap-analysis
Mar 12, 2026
Merged

joelteply merged 1 commit into
mainfrom
docs/alpha-gap-analysis

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

  • Definitive prioritized backlog for pre-open-source work
  • 9 priorities from architectural integrity to continuous learning
  • Current metrics: 831 production any casts, 2213-line PersonaUser, 21 panic-risk mutex sites
  • Each priority is a feature branch → PR → merge. No mixing concerns.
  • Supersedes 6 older planning docs (referenced, not deleted)

Test plan

  • Document review — no code changes

9 priorities from architectural integrity to continuous learning,
with current metrics (831 any casts, 2213-line PersonaUser, etc.)
and concrete implementation order.
Copilot AI review requested due to automatic review settings March 12, 2026 14:57
@joelteply
joelteply merged commit af10277 into main Mar 12, 2026
3 of 4 checks passed
@joelteply
joelteply deleted the docs/alpha-gap-analysis branch March 12, 2026 14:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new planning document intended to be the single prioritized backlog for remaining pre–open-source work, consolidating and superseding several older planning docs.

Changes:

  • Introduces a 9-priority implementation order (architectural integrity → continuous learning loop).
  • Captures “current state” subsystem readiness plus quantified debt metrics (e.g., any casts, oversized files, Rust panic-risk sites).
  • References (but does not remove) superseded planning documents for historical context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +112 to +121
**Change**: `getProbabilisticMaxResponders()` reads `BackpressureService.pressureLevel`

| Pressure | Max Responders |
|----------|---------------|
| Normal | 1 (70%), 2 (25%), 3 (5%) |
| Warning | 1 (85%), 2 (15%) |
| High | 1 only |
| Critical | 0 (all rejected) |

**~20 lines of code**. Highest impact change in the pressure system.

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Priority 2A describes adding pressure-awareness to ThoughtStreamCoordinator.getProbabilisticMaxResponders(), but this method already reads BackpressureService.pressureLevel and is documented as pressure-aware in src/system/conversation/server/ThoughtStreamCoordinator.ts. Also, the behavior described here (Critical ⇒ 0 responders) does not match current implementation (Critical/High currently return 1). Please reconcile this section with the current code (either mark as done, or document the delta you still want to implement).

Suggested change
**Change**: `getProbabilisticMaxResponders()` reads `BackpressureService.pressureLevel`
| Pressure | Max Responders |
|----------|---------------|
| Normal | 1 (70%), 2 (25%), 3 (5%) |
| Warning | 1 (85%), 2 (15%) |
| High | 1 only |
| Critical | 0 (all rejected) |
**~20 lines of code**. Highest impact change in the pressure system.
**Status**: Implemented. `getProbabilisticMaxResponders()` already reads `BackpressureService.pressureLevel` and is documented as pressure-aware.
| Pressure | Max Responders (current behavior) |
|----------|-----------------------------------|
| Normal | Probabilistic 1–3 responders |
| Warning | Probabilistic 1–2 responders (biased to 1) |
| High | 1 responder |
| Critical | 1 responder (no full shutdown) |
No additional code changes needed here; remaining pressure work focuses on downstream gating (see 2B, 2C).

Copilot uses AI. Check for mistakes.
Comment on lines +123 to +135
### 2B. Voice Broadcast Gating

**File**: `system/voice/server/VoiceOrchestrator.ts`
**Change**: After `textAIs` filter, limit broadcast targets by pressure level.

| Pressure | Broadcast Targets |
|----------|------------------|
| Normal | All text AIs |
| Warning | Max 3 |
| High | Max 1 |
| Critical | None (let in-progress TTS finish) |

**~15 lines of code**. Closes the biggest gap — voice has ZERO pressure awareness today.

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Priority 2B states that voice broadcasting has “ZERO pressure awareness” and proposes adding pressure-gated limiting after the textAIs filter in system/voice/server/VoiceOrchestrator.ts. That pressure gating already exists in VoiceOrchestrator.onUtterance() (Warning ⇒ max 3, High ⇒ max 1, Critical ⇒ return). Please update this backlog item/wording so it doesn’t instruct work that’s already implemented.

Copilot uses AI. Check for mistakes.
Comment on lines +198 to +200
- Missing `@typescript-eslint/eslint-plugin`
- Can't catch type errors, unused imports, style violations
- Technical debt accumulates unchecked

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section says ESLint is missing @typescript-eslint/eslint-plugin and therefore can’t catch TS issues, but src/package.json includes @typescript-eslint/eslint-plugin/parser, src/.eslintrc.json is configured to use them, and there is a lint script. Please update this item to reflect the real current gap (e.g., lint not run in CI, config not applied to some subpackages/paths, rules too lax, etc.) instead of stating the plugin is missing.

Suggested change
- Missing `@typescript-eslint/eslint-plugin`
- Can't catch type errors, unused imports, style violations
- Technical debt accumulates unchecked
- `@typescript-eslint` plugin/parser present, but lint is not enforced in CI
- Lint runs manually only; type errors, unused imports, and style violations can land on `main`
- Technical debt can still accumulate between lint runs

Copilot uses AI. Check for mistakes.

| Fix | Files | Impact |
|-----|-------|--------|
| `.lock().unwrap()` → `.lock().ok()` or match | logger.rs, orchestrator.rs | Prevents panic on mutex poison |

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Rust panic-safety row suggests changing .lock().unwrap() to .lock().ok(), and cites logger.rs, orchestrator.rs as targets. In the current codebase those files already avoid .lock().unwrap() (they use unwrap_or_else(|e| e.into_inner())), and switching to .ok() would also silently drop poison errors instead of preserving the inner value. Please update this plan to reference the actual .lock().unwrap() sites and align the recommended pattern with the existing poison-handling approach (optionally with logging/metrics).

Suggested change
| `.lock().unwrap()` → `.lock().ok()` or match | logger.rs, orchestrator.rs | Prevents panic on mutex poison |
| Replace `.lock().unwrap()` with poison-aware handling (e.g., `unwrap_or_else(|e| { /* optional log/metric */ e.into_inner() })`) | Modules with remaining `.lock().unwrap()` sites (see CodeQL report) | Prevents panic on mutex poison while preserving inner state |

Copilot uses AI. Check for mistakes.
joelteply added a commit that referenced this pull request Aug 2, 2026
…the operator's focused room (#298) (#2105)

Joel: "I still see they're all in a kimi k3 room. You never took this room
bug on. We can't launch with these hacked rooms."

The hack chain: discover_default_room_name() shells `airc room` and takes
the OPERATOR daemon's current-room pointer — whatever room the human/agent
CLI last focused. PersonaAircRuntime::bootstrap then force-joined every
persona to it on EVERY boot. Since the operator scope was parked in
k3-serving (an MoE-serving coordination room), the entire resident
population was born into and re-joined to it forever. Their home followed
my CLI usage. Bonus defect: the runtime stored the passed-in RoomId, not
the actually-joined channel — the two could silently diverge.

Fix: bootstrap resolves the home room with airc.current_room() — the
persona's OWN durable subscription default, loaded from HER airc home.
airc's canonical fresh-scope semantics land a new mind in #general
(subscribe + set_default + presence + identity card); a resumed persona
keeps her real membership. The operator's focus pointer no longer exists
on the birth path: default_room/default_room_name are deleted from
bootstrap, PersonaBirth, and PersonaInstanceManagerModule::new. The
runtime now stores the actually-joined room.

Operator/node surfaces (grid_capacity gossip, nav seed, node presence
emitter) still ride the discovered room — that's the operator plane,
correct and unchanged.

The deleted parameters ARE the regression guard: there is no longer any
way to thread an operator room into a persona birth. The fresh-scope →
#general semantics are airc-lib's own tested current_room() contract.

Follow-up (same task): one-time heal of existing resident homes whose
durable state inherited k3-serving from the old bootstrap (airc part
tombstones it so re-joins don't resurrect it).


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

Co-authored-by: Claude Fable 5 <[email protected]>
joelteply added a commit that referenced this pull request Aug 2, 2026
…uard on canary (#2118)

The ts-rs Binding Drift Guard has been red on the last 3 canary pushes:
the #298 home-rooms commit changed PersonaInstanceInfo's defaultRoom doc
comment in Rust without committing the regenerated TS, and the nav/close
command's Params/Result bindings were generated but never added. Both
files are pure regeneration output of committed Rust source (cargo test
export_bindings, 1178 green) — no hand edits.


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

Co-authored-by: Claude Fable 5 <[email protected]>
joelteply added a commit that referenced this pull request Aug 6, 2026
…mposed with NO room (#331/#127)

Six citizens across two machines spent a night saying "there are no open tasks available for
me to claim." They were right every time. Their turns carried no room, so EVERY room-scoped
grounding source abstained at once — board, roster, doctrine, wall — and they perceived an
empty world.

FOUND BY THE PROBE, not by reasoning. ~/.continuum/probes/probes.jsonl, class
rag.room_gate.abstain, ×564:

    source:      room-kanban | room-roster | room-doctrine | room-board   (141 each)
    bound_room:  5eedf7b1-…   (#general — CORRECT)
    turn_room:   00000000-0000-0000-0000-000000000000   ← NIL, in 504/564 = 89%

Not a room mismatch. The bound room was right all along; the TURN simply carried no room.
`room_scope_allows` did exactly its job — the nil case is what it was built to refuse (eval
fork / synthetic context). It was firing on LIVE turns, nine times in ten.

THE CHAIN:
  service_loop.rs:709   room_id: turn_room                          the room IS in scope
  service_loop.rs:780   compose_for_turn(&ctx.profile, now_ms)      never passed
  unified.rs:305        RagContext::for_persona(persona_id, now_ms) room = None
                        (for_persona_in_room sits directly beside it, written for this)

A parameter that was never threaded. That is the whole defect.

THIS IS #127 ("Thread the WHERE axis"), MARKED COMPLETED. Gate built, constructor built, probe
built, doc comment written — the one live caller never switched over. And persona/airc_source.rs
papered over it locally by DERIVING the room from transcript events, with a comment saying
"compose_for_turn builds it with airc_room=None". One source worked around it; four starved
silently. Third instance in one night of MECHANISM LANDED, CALLER MISSED, TASK CLOSED (with
#298, where the Rust fix was shadowed by start-server.sh).

THE FIX: compose_for_turn takes `room: Option<Uuid>`. Directed turns stamp Some(turn_room);
self-cycles stamp Some(ctx.identity.default_room) — her home room, since an idle tick has no
triggering message. None stays legal and MEANINGFUL for genuinely room-less work (background
consolidation, dreams): "no room claimed", never "unknown".

THE GUARD — `every_live_compose_for_turn_stamps_the_room_never_none`. A source-scanning test in
this crate's existing style, because the regression is a CALLER FORGETTING, not a logic error
any unit test would reach. It fails with the offending call site quoted. #127 built every
mechanism and nothing that would notice the caller never arrived; this is that missing piece.

Suite: 6841 pass, 0 fail.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 8, 2026
…(daa01102 slice 1) (#2173)

Joel's room-consolidation directive: academy is THE default room; citizens
landing in airc's generic #general lobby is the 'disorganized non-academy
room stuff' that gates positron. Live-measured tonight: both resident
citizens' durable sets show 'room: general, subscribed: (only the current
room)' while the operator holds cambriantech+academy+general — so every
operator message to academy was structurally invisible (BigMama's
single-channel-subscribe root cause, her lane; this slice is the landing
half of the pair).

- CITIZEN_COMMONS_ROOM = "academy" (one constant, persona bootstrap policy)
- bootstrap resolves her home room via Airc::current_room_landing_in(
  CITIZEN_COMMONS_ROOM) — new API from airc canary dd34f687 (PR #1329):
  fresh scopes land in the caller-chosen room; an ESTABLISHED persona's
  durable default always wins, so no living citizen is migrated.
- airc git pins 490dc76 → dd34f68 (canary; includes #1329 only beyond the
  old pin plus intervening canary work — cargo check + airc_runtime tests
  green, airc-lib landing-room tests 3/3 green on canary base).
- error text + docs updated (#298's '#general' references superseded).

Existing citizens stay general-only until the membership migration
(follow-up with BigMama's plural-subscribe fix).


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

Co-authored-by: Claude Fable 5 <[email protected]>
joelteply added a commit that referenced this pull request Aug 14, 2026
… + drop vestigial default_room gate (#432, slices 4+5) (#2303)

Three fixes from the spawn-gate survey, all landing the same contract:
citizens spawn cleanly from recipe registries, and nothing on disk is
silently ignored.

FLOOR ORPHANS (5a): the spawner's plan was sized to CONTINUUM_PERSONA_FLOOR
while ResumeOrMintProvider held every resumed seed — 5 citizens on disk with
floor=1 meant one hosted and four orphaned forever. The boot task now calls
supervisor.set_population(provider.identities_available()) after provider
construction: the floor stays a MINT floor, never a resume CAP. New:
ResumeOrMintProvider::identities_available(), PersonaSpawnerModule/
PersonaSpawnSupervisor::set_population (same >=1 clamp as with_population).

VESTIGIAL ROOM GATE (5b): persona bootstrap zipped daemon_socket with
default_room, so "no default room => no citizens, for no reason" (#298
removed the operator-room birth dep; the zip outlived it). The persona block
now gates on the SOCKET alone; the room stays a dep only for its genuine
consumers — GridCapacityModule (registered when present, loud warn when not)
and the node-presence emitter (pair rebuilt explicitly).

RECIPE OVERLAY IN PROD (4): builtins_with_overlay existed with zero
production callers — "a new experience is a new recipe entry, zero code" was
false in the running system. The chat projection now resolves embedded +
<continuum_root>/recipes (one canonical overlay_dir helper), and #431's
validate_recipe grows the SAME union via known_purposes(overlay_dir), so
validation and resolution cannot drift: an authored on-disk recipe is
spawnable the moment the file exists. A malformed overlay file refuses
loudly naming the file — at boot in the log, and at activity/spawn as the
command error.

Tests: identities_available floor/resume matrix; set_population plan resize
with clamp; overlay-authored purpose validates + malformed overlay refuses
naming the file; all existing recipe/activity/projection tests green.


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

Co-authored-by: Claude Fable 5 <[email protected]>
joelteply added a commit that referenced this pull request Aug 14, 2026
…oded plan_for_tier vec (#430) (#2305)

ExperienceRecipe gains `citizens` (a ROLE list — identity is minted/resumed
at hosting time, the MODEL is the serving daemon's per-host decision, so a
recipe stays portable across the grid). The embedded chat recipe — the
DEFAULT experience fresh minds land in (#298) — declares the shipped floor:
one Helper. RecipeExperienceSource::resident_roles reads it embedded+overlay
with the registry's own later-wins-by-purpose law, so authoring a chat.json
on disk changes the node's resident population with zero code.

Boot injects the recipe roster via PersonaSpawnerModule::with_citizens;
plan_for_tier's hardcoded role vec is gone — plan_for_roles maps DATA roles
onto the serving scaffold (LCD fallback model until with_serving overrides,
as before). plan_for_tier survives only as the documented data-absent floor
for tests/fixtures.

Slice-14 guard moves from a debug_assert to an enforced runtime rule on
DATA: a recipe may author several citizens, but until role-in-seed.json
lands (#133 slice 14) only the FIRST is hosted, with a loud error naming
each deferred role — never a silent cap, never a debug-only tripwire an
author could sail past in release. An EMPTY authored roster is legitimate
(headless serving node) and plans nobody. Malformed overlay while reading
the roster refuses loudly and hosts the embedded floor (#432's arm).

ts-rs: CitizenRecipe.ts new + ExperienceRecipe.ts regenerated.

Tests: embedded chat declares [helper]; authored overlay chat.json replaces
the roster (zero code); with_citizens drives plan (empty -> nobody, coder ->
coder, multi-role -> first only); existing tier-floor tests green.


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

Co-authored-by: Claude Fable 5 <[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.

2 participants