Skip to content

Commit b551306

Browse files
enriquephlclaude
andcommitted
docs: bundle dead sync-path removal into the override spec
Add §2.8: remove the unrouted pipeline::run orchestrator + ActionHandler trait/handlers as the first commit on the branch, keeping every helper the live SSE path shares. Removes the last non-streaming model apply-site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent dfb5c89 commit b551306

1 file changed

Lines changed: 44 additions & 7 deletions

File tree

docs/superpowers/specs/2026-05-25-model-name-display-override-design.md

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ Only the **streaming SSE path** (`crates/eros-engine-server/src/pipeline/stream.
3030
| Replay Meta | `replay_stream`, ~L537 | DB `row.model` |
3131
| Ghost Meta (live + replay) | ~L345 / ~L517 | none — no model involved |
3232

33-
Not client-facing (left untouched):
33+
Not client-facing:
3434
- `pipeline/mod.rs` sync `run` builds `ChatResponse.model` (~L177) but is
35-
**unrouted dead code**; the gift route returns `reply: None`. Out of scope —
36-
not wired to the override (§1 non-goals).
35+
**unrouted dead code** (the gift route returns `reply: None`). It is
36+
**removed** in this task as bundled cleanup — see §2.8.
3737
- Background tasks (affinity / memory / dreaming) build requests with the
3838
resolved model and never expose it to a client.
3939

@@ -67,8 +67,9 @@ shipped `examples/model_config.toml.example` sets
6767
`AssistantInsert.model`, or any usage logging — all keep the **real** id.
6868
- Persisting the display name (so the DB stays the source of truth for the
6969
real model; see the replay note in §2.6).
70-
- Wiring the override into the dead sync `pipeline::run` path (§0) — it is
71-
unrouted; out of scope until/unless that path is revived.
70+
- Reviving the sync `pipeline::run` path or supporting a non-streaming chat
71+
response — instead it is removed as bundled cleanup (§2.8).
72+
- Removing core's public `ChatResponse` type — see §2.8.
7273

7374
---
7475

@@ -180,8 +181,9 @@ In `stream.rs`:
180181
builds via `resolve(CHAT_TASK, None)` too), so one resolve covers all rows.
181182
- **Ghost** (both live and replay): `model: None`.
182183

183-
The dead sync `pipeline/mod.rs` path (`ChatResponse.model`, ~L177) is left
184-
unchanged — it is unrouted (§0) and out of scope.
184+
There is no sync apply site: the dead `pipeline/mod.rs` chat path is removed in
185+
this task (§2.8), so the SSE Meta frames are the only place the override is
186+
applied.
185187

186188
### 2.6 Replay consistency (explicit consequence)
187189

@@ -201,6 +203,36 @@ path. No other task reaches an apply site, so the override is honored for
201203
and is silently inert — consistent with the absence of `deny_unknown_fields`
202204
elsewhere in the config.
203205

206+
### 2.8 Bundled cleanup — remove the dead sync orchestrator
207+
208+
`pipeline::run` and the `ActionHandler` dispatch it drives have been unreached
209+
since the sync `POST /comp/chat/{id}/message` handler was replaced by the SSE
210+
endpoint (`stream::run_stream`). Remove them in this task rather than leave a
211+
dead apply-site for the override to reason about. **Do the removal first**, then
212+
build the feature on the slimmed-down stream path.
213+
214+
**Remove (server crate only):**
215+
- `pipeline/mod.rs`: `run`, `load_session_ids`, `load_affinity_with_decay`,
216+
`clear_ghost_streak` (all `#[allow(dead_code)]`, sync-only); the
217+
`handlers::{ActionHandler, …}` import; the module-level note about the sync
218+
orchestrator; and any imports left unused after the removal.
219+
- `pipeline/handlers.rs`: the `ActionHandler` trait and all four structs +
220+
impls (`ReplyHandler`, `GhostHandler`, `GiftHandler`, `ProactiveHandler`);
221+
the `async_trait` and `AffinityDeltas` imports; trim the module doc comment
222+
that references them.
223+
224+
**Keep (shared with the live SSE path — do NOT remove):**
225+
- `build_reply_request`, `build_gift_request`, `assemble_chat_request`,
226+
`audit_from_event`, and every recall / insight / trait helper.
227+
- `compute_signals_for_session` and `log_openrouter_usage` in `mod.rs` (used by
228+
`stream` / `post_process` / `dreaming`).
229+
- `pipeline/sync.rs` — an unrelated marketplace self-heal job, still spawned in
230+
`main.rs`.
231+
232+
**Out of scope:** core's public `ChatResponse` type (`eros-engine-core`) stays —
233+
it's library surface for embedders. Drop the `async_trait` crate dependency only
234+
if it turns out unused workspace-wide after the import is gone.
235+
204236
---
205237

206238
## 3. Testing
@@ -222,6 +254,9 @@ elsewhere in the config.
222254
- **Committed example config:** `resolve("chat_companion", …).display_model(id)`
223255
returns the real id (because the example sets `= true`); an untouched task
224256
with no override → `None`.
257+
- **Dead-path removal (§2.8):** the crate builds with no new dead-code warnings,
258+
`cargo clippy` is clean, and the existing `pipeline` / `handlers` test suites
259+
still pass (none of them exercise `run` or the removed handlers).
225260

226261
---
227262

@@ -238,3 +273,5 @@ elsewhere in the config.
238273
- Additive TOML schema; **default wire behavior changes** (model omitted when
239274
unset) — the shipped example opts back into showing the real id so OSS users
240275
see no behavior change out of the box.
276+
- Bundled cleanup (§2.8): remove the dead sync `pipeline::run` orchestrator and
277+
the `ActionHandler` trait/handlers as the first commit on the branch.

0 commit comments

Comments
 (0)