M5c-1 plan: task 02, loopd logs the speaker and sends the turn's number
loopd copies the Turn's speaker onto the User record it logs, as it came (not checked, not neutralised), and never into a request; after a finished turn it sends SessionUpdated with the turn's number, the count of User records in the session's log (Session::turns), so the first turn is 1, a failed turn that was logged counts, and the count goes on after a reopen or a restart. Failed turns are still not told. Given: speaker_turn.rs (8 tests) and new versions of loopd's memory.rs, turn_broker.rs, end_to_end.rs and support/turn.rs (run_turn gains speaker, MemorySource::updated gains turn). Task 01 now copies memory.rs-task01, its own version. Checks: the reference passes make gate with 1138 tests (1130 + 8); the task replayed from its text on a fresh ref-01 worktree with its own target is byte-identical to the reference and passes the gate; /tmp unchanged around both gate runs; 15 one-line mutations (speaker not logged or dropped by the channel or neutralised, speaker in the request at log time or at replay, turn 0-based or +1, counting Assistant records, all records or only speakers' turns, a global or per-process counter, told before logging or on failure, MemoryPort sending 0) all caught; speaker_turn run 60 times under load, no failure; no chat-template tag in the plan or given files; task lines within 100 characters but tables. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -69,7 +69,8 @@ This is the complete list. Each one is covered by an edit below or by a given fi
|
||||
`crates/brokerd/tests/broker.rs`; `crates/bxctl/tests/chat.rs`;
|
||||
`crates/loopd/tests/baseline.rs`, `channel.rs`, `instance.rs`, `memory.rs`,
|
||||
`neutralise_replay.rs`, `session.rs`, `turn_done_untrusted.rs`;
|
||||
`crates/memoryd/tests/serve.rs`, `crates/memoryd/tests/support/logs.rs`
|
||||
`crates/memoryd/tests/serve.rs`, `crates/memoryd/tests/support/logs.rs`. Your `loopd`
|
||||
`memory.rs` is the given `memory.rs-task01`: the given `memory.rs` is task 02's.
|
||||
- Do not copy anything under `docs/plans/M5c1/files/crates/memoryd/tests/fixtures/honcho/`:
|
||||
it is for later tasks.
|
||||
- Modify: `crates/bxcore/src/wire.rs`, `crates/bxcore/src/log.rs`, `crates/bxcore/src/memory.rs`,
|
||||
@@ -429,7 +430,8 @@ becomes
|
||||
cp docs/plans/M5c1/files/crates/loopd/tests/baseline.rs crates/loopd/tests/
|
||||
cp docs/plans/M5c1/files/crates/loopd/tests/channel.rs crates/loopd/tests/
|
||||
cp docs/plans/M5c1/files/crates/loopd/tests/instance.rs crates/loopd/tests/
|
||||
cp docs/plans/M5c1/files/crates/loopd/tests/memory.rs crates/loopd/tests/
|
||||
cp docs/plans/M5c1/files/crates/loopd/tests/memory.rs-task01 \
|
||||
crates/loopd/tests/memory.rs
|
||||
cp docs/plans/M5c1/files/crates/loopd/tests/neutralise_replay.rs crates/loopd/tests/
|
||||
cp docs/plans/M5c1/files/crates/loopd/tests/session.rs crates/loopd/tests/
|
||||
cp docs/plans/M5c1/files/crates/loopd/tests/turn_done_untrusted.rs crates/loopd/tests/
|
||||
|
||||
Reference in New Issue
Block a user