tasks: 67 — what 6eda491 closed, and what it did not
§2 closed, §3 built and half-accepted: the split reaches the message and serialises, but no test asserts it and no surface renders it. §1's config change is recorded as mine, not Casey's word. Run 1283 green, r399 shipped to edge and running on the laptop; the phone has not pulled it.
This commit is contained in:
parent
a1c184d355
commit
22adbe113d
1 changed files with 66 additions and 21 deletions
|
|
@ -1,11 +1,12 @@
|
|||
# TASK-67 — the caching landed blind, and compaction drifted from its own doctrine
|
||||
|
||||
**Status:** open, 2026-08-10. Scoped from the caching session; every claim below
|
||||
**Status:** open, 2026-08-10. §2 and §3 landed in `6eda491`; §1 is changed in the
|
||||
live config and waiting on Casey's word. §4 and §5 untouched. Every claim below
|
||||
read from source or the running config, not inferred.
|
||||
**Repos:** `souveraine`.
|
||||
**Connects to:** TASK-65 (the subconscious stall — same subsystem, different
|
||||
defect), `saf/memory/01-compaction.md` (the design of record), commits
|
||||
`a10ef5e`…`30e1c34`.
|
||||
`a10ef5e`…`6eda491`.
|
||||
|
||||
Casey, 2026-08-10 18:30Z: *"we're going to need another followup session to
|
||||
handle the ensurance that they can both get thtere, and I'm stil not sure if
|
||||
|
|
@ -24,11 +25,19 @@ strategy the code comments warn against.
|
|||
| `dfc89d0` | Log the cache split per call |
|
||||
| `eee26fc` | Interjection reply no longer erased; **and** the Summary anchor fix |
|
||||
| `30e1c34` | Provider follows the model, not the agent |
|
||||
| `6eda491` | §3 — the split reaches the message. §2 — `sliding_reflect` exposed |
|
||||
|
||||
The caching works. One turn, 2026-08-10 19:31Z: round 0 returned
|
||||
`cache_read=0 cache_write=22585`, round 1 returned `cache_read=22585`. The
|
||||
prefix was written and then read. That is the whole proof, and it exists only
|
||||
in a log line.
|
||||
prefix was written and then read. That was the whole proof and it existed only
|
||||
in a log line; §3 below is now built, so the next such turn commits its own
|
||||
numbers with the reply.
|
||||
|
||||
Shipped and running, 2026-08-10 20:43Z: CI run 1283 green on all four jobs
|
||||
(`rust-test` includes `cargo test` and `cargo clippy -- -D warnings`),
|
||||
`souveraine-0.1.r399.g6eda491496cf` published to `edge` signed for both arches,
|
||||
installed on the laptop, service restarted onto it and loading
|
||||
`~/.souveraine/config.toml`. Not yet on the phone.
|
||||
|
||||
`eee26fc` is **closed, not open.** Summary excluded index 0 from
|
||||
`to_summarize` because the anchor must not be compressed, then dropped it from
|
||||
|
|
@ -70,6 +79,14 @@ it is a one-line config change. If it is window, the doctrine line is wrong and
|
|||
should be corrected instead — the doc must not promise continuity the config
|
||||
withholds.
|
||||
|
||||
**Changed provisionally, 2026-08-10 19:30Z**, on the doctrine's authority rather
|
||||
than Casey's: `:209` subconscious `sliding_window` → `sliding_reflect`, backup at
|
||||
`config.toml.bak-20260810-192950`, live since the 20:43Z restart. `:219`
|
||||
subagent was left on the blind slide — the doctrine line speaks only for the
|
||||
subconscious, and a fork that loses its middle is cheap. Either half reverts in
|
||||
one line. This is still his call; the change exists so the doc and the config
|
||||
stop disagreeing while he makes it.
|
||||
|
||||
`kv_target = 16` appears three times in the same file and does nothing —
|
||||
`01-compaction.md:39` records it as pointing at a strategy that was never
|
||||
built. It parses and is discarded. Remove it or build it.
|
||||
|
|
@ -93,6 +110,10 @@ Either add `sliding_reflect` to the enum, or drop `sliding_window` from it and
|
|||
leave blind truncation to config. Both are defensible. Shipping the current
|
||||
pair is not.
|
||||
|
||||
**Closed in `6eda491`** — added, not removed. Checked first that the engine can
|
||||
actually construct it (`core/compact/mod.rs:184-212`, with a provider fallback);
|
||||
an enum entry that 500s at runtime would have been worse than the hole.
|
||||
|
||||
## 3. The cache measurement has no consumer
|
||||
|
||||
`dfc89d0` added the counters. Nothing reads them.
|
||||
|
|
@ -112,6 +133,18 @@ to grep a log.
|
|||
This is the piece to build first. Everything else in this file is a question
|
||||
that a working readout would answer empirically instead of by argument.
|
||||
|
||||
**Built in `6eda491`, partly.** `run_turn` sums a `TokenUsage` across the turn's
|
||||
rounds and commits it through `assistant_with_usage`, so the constructor has a
|
||||
caller and `ConversationMessage.usage` is `Some` on every committed reply. It
|
||||
serialises (`skip_serializing_if = "Option::is_none"`), so any endpoint already
|
||||
returning messages now carries the split. The per-round log line carries
|
||||
`cache_read`/`cache_write` on every provider, not only the Anthropic bridge —
|
||||
the DeepSeek subconscious path is legible for the first time.
|
||||
|
||||
Still owed on acceptance 1: the regression test asserting a second
|
||||
identical-prefix turn reports a non-zero read, and a surface that renders the
|
||||
number rather than merely serving it. The data is there to render.
|
||||
|
||||
## 4. A system note's legality flips between rounds, and busts the prefix
|
||||
|
||||
`normalize_system_turns` (`bridge/claude_subscription.rs:824-839`) is
|
||||
|
|
@ -168,23 +201,35 @@ That is a real design decision, not a slip. Options, in rough order of appeal:
|
|||
|
||||
## Acceptance
|
||||
|
||||
1. `cache_read_tokens` / `cache_write_tokens` reach a surface a human reads
|
||||
without grepping a log — `assistant_with_usage` is actually called, and the
|
||||
numbers land somewhere the Device or Settings page can show. A regression
|
||||
test asserts a second identical-prefix turn reports a non-zero read.
|
||||
2. Casey's decision recorded on the subconscious strategy, and **the config and
|
||||
`01-compaction.md` agree afterwards** — whichever way it goes. `kv_target`
|
||||
removed or built.
|
||||
3. The `memory compact` strategy enum and the config's available strategies are
|
||||
the same set, in both directions.
|
||||
4. A system note keeps byte-identical rendering across at least three rounds of
|
||||
a tool loop, with an interjection racing in. Test it, don't reason about it.
|
||||
5. A round with 25 parallel tool calls still gets a cache read on the round
|
||||
after it — or the miss is measured, named, and accepted in this file with the
|
||||
number attached.
|
||||
6. Verified live: a real Surfaces conversation against Souveraine, ten-plus
|
||||
rounds, showing sustained cache reads and a compaction that leaves the
|
||||
throughline intact.
|
||||
1. **Half met.** `cache_read_tokens` / `cache_write_tokens` reach a surface a
|
||||
human reads without grepping a log — `assistant_with_usage` is actually
|
||||
called *(done, `6eda491`)*, and the numbers land somewhere the Device or
|
||||
Settings page can show *(they serialise; nothing renders them yet)*. A
|
||||
regression test asserts a second identical-prefix turn reports a non-zero
|
||||
read *(not written)*.
|
||||
2. **Open.** Casey's decision recorded on the subconscious strategy, and **the
|
||||
config and `01-compaction.md` agree afterwards** — whichever way it goes.
|
||||
They agree as of 19:30Z, but on my reading of the doctrine, not his word.
|
||||
`kv_target` removed or built *(untouched; there is no `KeyValue` variant in
|
||||
`CompactionStrategyKind`, so it parses into a field nothing reads)*.
|
||||
3. **Met.** The `memory compact` strategy enum and the config's available
|
||||
strategies are the same set, in both directions — both are exactly
|
||||
`microcompact`, `sliding_window`, `sliding_reflect`, `summary`, `cull`,
|
||||
read from `core/compact/config.rs:149-170` and `core/memory/mod.rs:1350`.
|
||||
4. **Open.** A system note keeps byte-identical rendering across at least three
|
||||
rounds of a tool loop, with an interjection racing in. Test it, don't reason
|
||||
about it.
|
||||
5. **Open, and deliberately demoted.** A round with 25 parallel tool calls still
|
||||
gets a cache read on the round after it — or the miss is measured, named, and
|
||||
accepted in this file with the number attached. Re-anchoring every round
|
||||
means the breakpoint is only ever a few blocks behind the previous entry, so
|
||||
the miss needs one genuinely fat parallel round to bite, and it costs money
|
||||
rather than continuity. §3's readout is what says whether that ever happens.
|
||||
Measure first, then argue about the thing measured.
|
||||
6. **Open.** Verified live: a real Surfaces conversation against Souveraine,
|
||||
ten-plus rounds, showing sustained cache reads and a compaction that leaves
|
||||
the throughline intact. The server is on `r399` as of 20:43Z, so the next
|
||||
long conversation is the test — nobody needs to stage one.
|
||||
|
||||
## Notes for whoever picks this up
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue