|
2 | 2 |
|
3 | 3 | All notable changes to jcodemunch-mcp are documented here. |
4 | 4 |
|
| 5 | +## [1.108.167] - 2026-07-24 - cue-anchored delivery ledger: measure what we hand over twice |
| 6 | + |
| 7 | +### Added |
| 8 | + |
| 9 | +- **The session now measures how often it re-delivers a symbol it already |
| 10 | + bought.** jcm counted byte-identical repeat calls (`note_call_signature` → |
| 11 | + `yield.repeated_identical_calls`) and did nothing with the count, and that |
| 12 | + counter could not see the shape that actually costs: the **same symbol |
| 13 | + re-delivered under a different query**. `search_symbols("auth handler")` and |
| 14 | + `get_ranked_context("who validates the token")` can return the same three |
| 15 | + bodies at full byte cost with two different `args_hash` values — invisible. |
| 16 | + New delivery ledger in `storage/token_tracker.py` (`_delivered`, capped at |
| 17 | + `_DELIVERED_MAXSIZE = 5000`, insertion-ordered, process lifetime only, never |
| 18 | + on disk) records `{count, tokens, full_source}` per symbol id. |
| 19 | +- **`yield` block gains `redelivered_symbols` / `redelivery_rate` / |
| 20 | + `redelivered_tokens_est`** in `get_session_stats`. This is the P0 |
| 21 | + measurement, and it is the gate: a **pre-registered, binding** decision rule |
| 22 | + (`docs/prd-cue-anchored-delivery.md` §3) says suppression only ships if the |
| 23 | + measured rate clears 10%. Threshold set before the number exists, honored |
| 24 | + after — the v1.108.149 cache-stability precedent, where the measurement was |
| 25 | + the deliverable and the pre-registered threshold told us to hold. |
| 26 | +- **Advisory `_meta.already_delivered`** `{count, symbols[]}` when a response |
| 27 | + carries symbols the session already received. **Annotation only — no response |
| 28 | + body changes and nothing is suppressed.** Telling an agent "you already have |
| 29 | + this" may fix most of it, and costs nothing to find out first. List capped at |
| 30 | + `_DELIVERY_ANNOTATE_MAX = 20` (count stays exact) so a broad re-search can't |
| 31 | + flood the envelope. |
| 32 | +- Recorded at the existing `call_tool` chokepoint via new |
| 33 | + `server._delivery_entries`, covering `search_symbols`, `get_ranked_context`, |
| 34 | + `get_symbol_source` and `get_context_bundle` (both the flat and batch shapes |
| 35 | + of the shape-follows-input pair). |
| 36 | + |
| 37 | +### Notes |
| 38 | + |
| 39 | +- **`note_served` is deliberately untouched.** Its record is what the handoff |
| 40 | + contract ([#374](https://github.com/jgravelle/jcodemunch-mcp/issues/374) / |
| 41 | + [#377](https://github.com/jgravelle/jcodemunch-mcp/issues/377)) attests |
| 42 | + `evidence_refs` against; broadening it to the source-dump tools would silently |
| 43 | + change what a handoff can cite. The delivery ledger is a **parallel** record. |
| 44 | + Likewise `_yield_served`'s value type is a followed-through bool the yield |
| 45 | + block sums over, so the ledger sits beside it rather than extending it. |
| 46 | +- **Only full-source deliveries are priced.** A repeat of a signature/summary |
| 47 | + row is reported but never accrues `redelivered_tokens_est` — re-showing a |
| 48 | + signature is cheap. A symbol first seen as a search row and later fetched in |
| 49 | + full is **new bytes, not a redelivery**. |
| 50 | +- **Edit-eviction is the invalidation that ships.** `note_edited_files` now also |
| 51 | + drops ledger entries for touched files (Windows-separator and suffix-tolerant, |
| 52 | + reusing the existing path matcher), so stale bytes are never annotated as |
| 53 | + "you already have this". `content_hash` invalidation is a stated |
| 54 | + **prerequisite for suppression**, not needed for annotation. |
| 55 | +- **Byte-identical for existing callers**: the `yield` block keeps its exact |
| 56 | + prior shape when nothing was delivered, and no response body changed. NO new |
| 57 | + tool, NO schema/tool-count/`INDEX_VERSION` change. |
| 58 | +- Origin: Token Cost Radar 2026-07-24 research watch (arXiv 2607.20972, |
| 59 | + cue-anchored working memory). Clean-room; the paper's 39% intra-session reread |
| 60 | + figure is **theirs over their harness** and is deliberately not claimed here — |
| 61 | + we publish our own number or none. PRD: |
| 62 | + `docs/prd-cue-anchored-delivery.md`. New `tests/test_v1_108_167.py` (33). |
| 63 | + |
5 | 64 | ## [1.108.166] - 2026-07-24 - absence evidence: cite a zero-result scan as proof (handoff/v2 phase 3, #377) |
6 | 65 |
|
7 | 66 | ### Added |
|
0 commit comments