merge: T67 phase 3 documentation update
This commit is contained in:
@@ -213,3 +213,83 @@ New follow-ups discovered during Phase 2.5 execution. None are blocking; pick up
|
||||
- **`_witness_role_for` defensive coding (from T71 review)**: helper returns `"guest"` when `host_bot_id is None`, which is wrong for Phase-1 chats. Defensive: `return "host" if host_bot_id is None or speaker_bot_id == host_bot_id else "guest"`. Not exercised by current tests; harden as a precaution.
|
||||
- **Confidence type tightening (from T74 review)**: `chat/services/addressee.py::AddresseeDecision.confidence` could be typed as `Literal["high","medium","low"]` for stricter validation. Currently `str` with a comment.
|
||||
- **Scene-close-on-cancel UX revisit**: T74.3 pinned the existing behavior (close fires even on cancel). If real play-testing surfaces a regression, revisit.
|
||||
|
||||
## Phase 3 status
|
||||
|
||||
Phase 3 shipped end-to-end across 19 tasks (T49–T67). Events with full lifecycle, time skips, active threads, significance refinements, and meanwhile scenes are functional. Schema baseline is now version 11 (migrations 0009 events, 0010 threads, 0011 meanwhile_scenes). Test count grew from ~247 (Phase 2) to ~315 (+68 new tests across the wave).
|
||||
|
||||
- **Wave 1 — schema + lifecycle handlers (parallel)**:
|
||||
- **T49** `events` table + lifecycle handlers (`event_planned`, `event_started`, `event_completed`, `event_cancelled`, `event_expired`).
|
||||
- **T50** `time_skip` event handlers (elision and jump variants).
|
||||
- **T51** `threads` table + handlers (`thread_opened`, `thread_updated`, `thread_closed`).
|
||||
- **Wave 2 — detection / narration services (parallel)**:
|
||||
- **T52** event-lifecycle detection service (planned→active→completed transitions inferred from narration).
|
||||
- **T53** skip narration service (elision + jump prose).
|
||||
- **T54** synthesized-memories service for jump skips (LLM-summarized intervening time).
|
||||
- **T55** thread-detection service (open/update/close inferred from recent dialogue).
|
||||
- **Wave 3 — promotion + ranking (parallel)**:
|
||||
- **T56** event-completion promotion service (objects → inventory, knowledge → edge knowledge, relationship deltas → edge summary; everything else stays in the closed event).
|
||||
- **T57** significance-aware retrieval ranking — SQL-side `SIGNIFICANCE_RANK_BIAS` plus the existing Python composite re-rank.
|
||||
- **T58** scene compression keeps key quotes when significance ≥ 2; thread emission piggybacks on scene close.
|
||||
- **Wave 4 — drawer UX (single)**:
|
||||
- **T59** drawer additions: events panel, threads panel, skip controls.
|
||||
- **Wave 5a — prompt + turn flow integration (parallel)**:
|
||||
- **T60** prompt assembly includes active events + open threads in the speaker's prompt.
|
||||
- **T61** turn flow invokes event-detection + completion promotion alongside existing post-turn fan-out.
|
||||
- **Wave 5b — natural-language skip surface (single)**:
|
||||
- **T62** classifier-driven skip command at the user-input layer; shared skip controllers extracted into `chat/web/skip.py`.
|
||||
- **Wave 6a — meanwhile schema (single)**:
|
||||
- **T63** meanwhile-scene schema + state (scene config 4: host+guest, no "you").
|
||||
- **Wave 6b — meanwhile turn flow (parallel)**:
|
||||
- **T64** meanwhile turn flow (host+guest, no "you" in the prompt or witness writes).
|
||||
- **T65** meanwhile summary digest surfaces to the next "you"-present scene.
|
||||
- **Wave 7 — integration + docs (parallel)**:
|
||||
- **T66** cross-feature integration tests covering events × skips × threads × meanwhile.
|
||||
- **T67** documentation (this section).
|
||||
|
||||
### Phase 3.5 / 4 backlog
|
||||
|
||||
New follow-ups discovered during Phase 3 reviews and execution. None are blocking; pick up at any time.
|
||||
|
||||
#### From T53 review
|
||||
|
||||
- **`narrate_skip` `timeout_s` not piped through to `client.generate`**: parameter accepted but ignored. Fix: pass `timeout_s=timeout_s` to `client.generate(**...)`, or drop the parameter entirely if Featherless's client doesn't honor it.
|
||||
|
||||
#### From T57 review
|
||||
|
||||
- **`search_memories` docstring should mention SQL-side significance bias**: the function docstring still describes only the Python composite re-rank; add a one-line note about `SIGNIFICANCE_RANK_BIAS`.
|
||||
|
||||
#### From T58 review
|
||||
|
||||
- **Scene close re-close suffix bloat risk**: `_build_key_quotes_suffix` reads from `memories.pov_summary`. If a scene close runs twice, the second pass would read the rewritten text plus the previous "Key quotes:" suffix and append a second one. Either guard for double-suffix or source quotes from `event_log` `assistant_turn`/`user_turn` text instead.
|
||||
- **Thread detection transcript scoping**: `_read_recent_dialogue` returns chat-wide history with no `scene_id` filter (Phase 1 turns lack one). Feeding chat-wide history to `detect_threads` will misattribute threads to the closing scene when the scene boundary falls inside the last 50 turns. Scope by `scene_id` once turns carry it, or by `started_at` against scene-open timestamp.
|
||||
- **Swallowed exceptions in `detect_threads` try/except**: bare `Exception` swallows programmer errors silently. Log at debug level so silent regressions are recoverable.
|
||||
- **Scene close `closed_at` clock divergence**: T58 uses `datetime.now(timezone.utc).isoformat()` instead of chat-clock time. Diverges from chat-clock semantics elsewhere; revisit if event reconstructions need chat-clock ordering.
|
||||
- **Test coverage gaps in T58**: no test for 200-char quote truncation; no test for `thread_updated`/`thread_closed` candidate paths; no test for the `try/except` fallback.
|
||||
|
||||
#### From T61 review
|
||||
|
||||
- **Regenerate doesn't roll back lifecycle transitions from superseded turn**: `event_started`/`event_completed` rows from a superseded turn remain. Phase 3.5 should add a lifecycle-undo step. Caveat: regenerate-after-completion may double-emit promotion artifacts if the new text re-completes the same event.
|
||||
- **Asymmetry in event-detection ordering**: post_turn runs lifecycle BETWEEN interjection and scene-close; regenerate runs lifecycle at the END. Benign because regenerate has no scene-close path, but worth tidying.
|
||||
|
||||
#### From T62 review
|
||||
|
||||
- **Error-message prefix sniff for 404 vs 400 routing**: drawer skip routes use `str(exc).startswith("chat not found")` to distinguish 404 from 400. Fragile if error wording changes. Use a typed exception subclass.
|
||||
- **Skip command bypasses scene close detection**: a user typing "fade out, skip an hour" would skip without closing the scene. Acceptable for Phase 3 but worth noting.
|
||||
|
||||
#### From T63 review
|
||||
|
||||
- **`participants_json` JSON injection** (FIXED in T63 but worth noting in backlog as a "double-check other JSON-string-build sites" task): T63 originally used f-string interpolation; fixed to use `json.dumps`. Audit other state modules for similar patterns.
|
||||
|
||||
#### From T64 review
|
||||
|
||||
- **`record_meanwhile_memory` and `record_turn_memory_for_present` share private `_write_one_memory` helper**: minor DRY note; both helpers are similar enough that a unified API with a `you_present: bool` kwarg might be cleaner long-term.
|
||||
- **Stop button cancellation for meanwhile turns**: T64 fix-up registered tasks in `_in_flight_tasks`; verify the `/turns/cancel` endpoint actually cancels meanwhile streams (the test pins registration but not the cancel-from-route path).
|
||||
|
||||
#### From cross-feature interactions discovered in Wave 6b merge
|
||||
|
||||
- **Cross-feature canned-queue brittleness**: meanwhile-scene close test required a canned response for T65's digest call after T64+T65 merge. Future close-path additions will keep extending the queue; consider a structured fixture builder rather than positional canned arrays.
|
||||
|
||||
#### Discovered during Phase 3 execution
|
||||
|
||||
- **`_witness_role_for` defensive `host_bot_id is None`** (carry-over from Phase 2.5 T71 backlog) — still pending.
|
||||
|
||||
@@ -510,6 +510,8 @@ Written per witness when a scene closes. Different details, different interpreta
|
||||
|
||||
### Phase 3 — events, skips, threads
|
||||
|
||||
**Status: shipped 2026-04-26** (T49–T67, 19 tasks across 8 waves; schema baseline now version 11; +68 tests). See "Phase 3 status" in CLAUDE.md for the per-task breakdown.
|
||||
|
||||
- Events with lifecycles and scoped props.
|
||||
- Time skips: elision and jump.
|
||||
- Active threads.
|
||||
|
||||
Reference in New Issue
Block a user