Repository navigation
docs: document which components depend on stored data, at three storage levels - #569
Conversation
3b4bb7c to
f905787
Compare
| each time. These are `extract_llm`, `summarize`, `cache_aware_summarizer` and `agentdiet`. | ||
| - **2 are special cases.** `skeleton` refuses to run without storage. `extract_llm_sweep` could | ||
| repeat its removals from a flag, but its cheap question to the model needs last turn's text. | ||
| - **The proxy keeps content after the user opts out**, in 7 places. The worst are 2 full request |
There was a problem hiding this comment.
The credentials are not needed after the Dispatcher change.
There was a problem hiding this comment.
Fixed in a178909. Thank you.
The page now says Context Guru keeps only a handle, and the host's Dispatcher holds the credential, masked, until the hold ends. In the proxy binary, that is proxy.Dispatcher.
So the core no longer keeps the credential, but the proxy binary still does while a ping is armed. That part still needs storage to be on, so #595 stays open for it. I will correct its wording.
| | **Metadata only** | Hashes, counts, ids, token numbers, timestamps and flags, in the Store and in memory. No content. | **No.** The "Metadata only" columns say what the code would do with a Store that refuses content. [What "metadata only" would need](#what-metadata-only-would-need) lists the changes. | | ||
| | **Everything** | Content and metadata. | Yes. This is the default. | | ||
|
|
||
| ## Why the proxy stores rewrites at all |
There was a problem hiding this comment.
cg can be used as a library (cortex). Everywhere we use "proxy", we should say "contextguru".
There was a problem hiding this comment.
Fixed in a178909.
The page now says "Context Guru" wherever it means the product. It says "the proxy binary" only where it means that binary. I also added a "Host" term: the program that runs Context Guru, either the proxy binary or another program that uses it as a library.
Add docs/data-dependence.md. It lists, for every registered component and for each feature outside the pipeline, whether it keeps content or only metadata, where, whether it needs it, what it does with storage off, a plain-words reason, and who decided it. It also lists every opt-out switch and what each one does not turn off. The audit found content kept after the user opts out (the prefix-ask body stash, keep-alive, declaration_text, in-memory copies), and components that pay for model calls or lose their spending limit with storage off. The page records these; it changes no behaviour. Add a "Metadata first" rule to CLAUDE.md, a PR template with a required "Data dependence" section, and components/all/datadep_test.go. The test fails when a registered component has no row, when a row names no component, or when a reason is empty, too short, or only a code reference. Closes #428 Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
Split the single "with storage off" column into three levels: off, metadata only (does not exist yet), and everything. Add what a metadata-only level would need, and open questions for the owner. Correct one finding: with storage off, summarize and cache_aware_summarizer do not start, because they cannot tell how full the window is. They waste model calls only once the billed-token record is kept, which is the metadata-only case. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
The client sends its own transcript every turn and only appends the response, so it never keeps a rewrite. A rewrite that depends only on the message needs no storage; storage is needed only for model-written text and for gated rewrites. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
Lead with a summary of the results. Define every term on first use (Store, original, frozen decision, breaks the cache, body stash). Use active voice and short sentences, and one word for one meaning. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
Replace the switch table at the top with "Will my setup work?": one row per preset and per cache strategy, marked works, partly or does not work at each storage level, and what "partly" means. Move the switch table to a technical note at the end. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
- dash.Options.CaptureContent said "Opt-OUT ... defaults on". The zero value and --dashboard-content are both off. - tenant.Tenant.CaptureContent said "Off by default". Register sets it on for a new account; only the column DEFAULT is 0. - dash.Options.LifecycleSignals said "Off by default". The flag --dashboard-lifecycle-signals defaults to on. Comment-only change. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
A component that pays a model call or a cache write for a saving that lasts one turn does not work; drop the "partly" mark. Every plugin preset except conservative is now marked as not working with storage off, and the summary says what to use instead. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
Add a yellow "works, metadata" mark for every cell where a component or feature works by keeping only hashes, counts or timestamps. Give every cell a mark. Say why 5-min-ping needs storage and 1-hour-head does not: a ping is a new request the proxy sends by itself, while 1-hour-head only relabels the request the client sends anyway. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
Review comments from David Boaz on #569: - Context Guru is also used as a library, so the page says "Context Guru" where it meant the product, and "the proxy binary" only where it means that binary. Add a "Host" term. - After the Dispatcher change, the keep-alive core keeps only a handle. The host's Dispatcher holds the credential, masked. Say that, instead of "keep-alive keeps the credential". Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
34f8e51 to
a178909
Compare
The cache strategy table (none, auto with the alias 5-min-ping, 1-ping, 2-ping, 1-hour-head, and Codex's 30-min-ping) now lives in config/strategy.go. proxy.yaml gets the optional key cache.strategy; a key set in the file wins over the name. The new subcommand `context-guru-proxy strategies` prints the table and the preset names as JSON. Drift tests pin the table to the Claude Code and Codex plugins; the plugins do not change. Closes #980. Behavior change: `context-guru-proxy strategies` used to start the proxy, because the proxy ignored the extra word. Now it prints the table and exits. A file without cache.strategy loads exactly as before. Owner's yes, 2026-11-09, in the integrator session: "yes I approve and as long as it doesnt block the release it should go in". Data dependence: no change. The strategy rows keep "Decided by: David Amid, #569". Reviews: 2 offload reviews (GLM), round 2, both approve at df2c4b7. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
Summary
This PR adds a page that says, for each component and feature, whether it needs stored customer data. It shows what each one does at three storage levels: off, metadata only and everything. It also adds a rule and a test so the page stays right.
This PR changes no behaviour. It records what the code does today.
Closes #428.
What we found
expandtool.extract_llm,summarize,cache_aware_summarizer,agentdiet. A model writes their text, and the words differ each time.declaration_textis never deleted, not even by an account purge.corefhas no spending limit.summarizepays for a summary every turn and throws it away.Why the proxy stores rewrites at all
The client sends its whole transcript every turn, and only adds the response to it. It never sees the rewritten request. So the proxy must make the same rewrite every turn.
What changed
docs/data-dependence.md: the page, with one row per component and per feature, all opt-out switches, the findings and open questions. Added to the site nav under Concepts.CLAUDE.md: a "Metadata first" rule under "Hard boundaries"..github/pull_request_template.md: a required "Data dependence" section, with the three levels.components/all/datadep_test.go: fails when a registered component has no row, a row names no component, a cell is empty, or a reason is short or only a code reference.How it was tested
On the eval box:
-tags cg_skeleton.see linecap.go:134.go test -race ./components/all/ ./config/passes.Open questions
Technical notes
skeletonregisters only with thecg_skeletonbuild tag. The test allows its row in a default build.