Repository navigation
refactor(components): remove offloaders that delete by heuristic - #474
OsherElhadad wants to merge 12 commits into
Conversation
A component may now remove only content that is provably redundant (duplicates, superseded copies, formatting, boilerplate) or that it parks behind an expand handle chosen from the content itself. The following deleted by age, size, run order or prediction and are removed: failed_run, collapse, mask, linecap, smartcrush, readlifecycle, coref, agentdiet and skeleton (with the tree-sitter dependency). Presets, docs, the plugin component list, stats fields and benchmark arms no longer name them. A stored config that still does loads, logs a warning and runs without the component (the agentdiet preset likewise), so an old document cannot stop the proxy at boot. Refs #471 Signed-off-by: Osher-Elhadad <[email protected]>
Signed-off-by: Osher-Elhadad <[email protected]>
|
CI is green. Task-success check: the default |
|
Review of 20057e6 + c6b6242. Verified in a fresh worktree: go build, go vet clean; go test ./... passes except dash (SQLITE_BUSY, load-dependent) and one proxy test (database is locked); both fail the same way on origin/main under the current host load (load avg ~40), neither touches code this PR changes. TestRemovedComponentsAreIgnoredNotFatal and TestEveryPresetBuilds pass. Blocking
Non-blocking Safety: house pipeline unchanged; no defaults changed; go.mod drops the tree-sitter deps only. Privacy: nothing found in the diff. Attribution: no AI/Co-Authored-By lines in the two commits. Not labelled ready-to-merge until item 1 is fixed. |
Signed-off-by: Osher-Elhadad <[email protected]>
…e on /compact too Signed-off-by: Osher-Elhadad <[email protected]>
|
Re-review of 03b92fe: blocker 1 is resolved (the PR body carries no measurements). Item 3 is fixed and covered by TestRemovedPresetResolvesToEmptyPipeline. Build and vet are clean; config, cmd and components tests pass. The one failure, TestExtractLLMDoesNotBookASingleFlightFollowersSaving, is a flake that fails the same way on origin/main (29 of 40 runs on main, 31 of 40 here) and is unrelated. Remaining nit, not blocking: comments in components/offload/state.go (lines 59, 258, 287, 378, 429) and config/form.go (65, 509) still name mask, failed_run and linecap. Historical wording, fine to leave or tidy later. Approving; labelled ready-to-merge. |
Signed-off-by: Osher-Elhadad <[email protected]> # Conflicts: # context-guru-plugin/skills/insights-components/SKILL.md
…sk is removed Signed-off-by: Osher-Elhadad <[email protected]>
OsherElhadad
left a comment
There was a problem hiding this comment.
Review: APPROVE at f0a0237. (Posted as a comment: GitHub does not let the author account approve.)
- Merge 83be4b8. Its only conflict was
context-guru-plugin/skills/insights-components/SKILL.md, and it was resolved to main's version: the file has no diff against main and names none of the removed components. - Removed components.
failed_run,collapse,mask,linecap,smartcrush,readlifecycle,coref,agentdietandskeletonare no longer referenced by any preset, shipped config, plugin script or doc except in historical notes. A stored config that still names one keeps loading:dropRemoveddrops it with a warning, andpreset: agentdietwarns and runs the pipeline as written. - Fixtures. f0a0237 drives the thread-cache fixtures with
extract, and the test still fails ifextractacts on nothing ("the comparison proves little"), so the fixtures still test something. - Checks.
gofmtandgo vet ./...are clean.go testpasses for./config,./components/...,./apply,./context-guru-plugin,./proxyand./dash. CI is green. All new commits, including the merge, are signed off with no AI attribution. It merges cleanly with #475 and #500.
Non-blocking:
- The removed
TestKeptVerbatimNotRecompactedwas the only end-to-end pipeline test of the kept-verbatim guarantee, and it drovemask. The sharedskipReducepath still enforces it, but porting the test toextractwould keep it pinned. - Some
deploy/harbor/cfg-iter02*.yamlexperiment configs still listcollapseandcoref. They load with a warning; delete or annotate them as historical.
Signed-off-by: Osher-Elhadad <[email protected]> # Conflicts: # components/offload/skeleton_measure_test.go # components/offload/testdata/read_lifecycle.json # docs/components/offload-reducers.md # docs/components/skeleton.md
OsherElhadad
left a comment
There was a problem hiding this comment.
Re-review: APPROVE at 4e22725 (main merged; last approved f0a0237).
- Conflicts.
git show --remerge-diff 4e22725cshows four, all on files this PR deletes:skeleton_measure_test.go,testdata/read_lifecycle.jsonanddocs/components/skeleton.mdwere modify/delete conflicts. Main's only edits to them were path placeholders from #529, so dropping those edits is correct.- In
docs/components/offload-reducers.md, the resolution keeps the intro and the dedup/extract sections. It removes only the blocks for removed components: failed_run, linecap, smartcrush, mask, collapse and read_lifecycle. - Nothing else from main is lost.
- Leftovers. No build-time or config reference to the removed components remains. What does remain is historical comments, a CI comment about the old preset breakage,
internal/coref(still used by extract_llm_sweep), and test stubs that use the names only as strings.mkdocs build --strictpasses. - Tests. On a local merge with today's main,
gofmtandgo vet ./...are clean../config,./components/...,./apply,./context-guru-plugin,./proxyand./dashall pass. CI is green, and the merge commit is signed off.
The earlier non-blocking note (port the end-to-end "kept verbatim" test to extract) still stands. This approval covers 4e22725.
Resolve the conflicts with main and bring the PR up to date. - Take main's code where it does not depend on a removed component (proxy.go, tenant.go, go.mod, the sweep and commit-gate tests). - Keep the removal of failed_run, collapse, mask, linecap, smartcrush, readlifecycle, coref, agentdiet and skeleton, and of their tests. - Move the cg-transcript-replay tests and the marker-cap tests off the removed components. - Drop the removed components' data-dependence rows. Fix the counts in the page template and regenerate the page. - Say 14 obsolete presets (agentdiet is gone), and keep obsolete presets loading without the removed components. Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
amiddavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.332 | offload-review skill, @amiddavid's session | fresh | 2 of 2 | 1 of 2 | 7dfca4131039 |
blocking |
Verdict: blocking
Findings
-
deploy/harbor/replay2.py:31 — the sweep still runs arms for removed components.
- What fails: a
replay2.pyrun writespipeline: [failed_run](andmask,collapse,smartcrush,skeleton) per arm (replay2.py:92). After this PR,dropRemoveddrops the name and the proxy runs an empty pipeline. The arm is labeledfailed_runbut measuresoff. The benchmark numbers are silently wrong. - Proof:
replay2.py:31-32lists the five removed names inDET_CONFIGS;config/config.go:506(dropRemoved) removes them with only a log warning. The PR edited the siblingdeploy/harbor/replay.pythe same way but missed this file. The PR body claims "the benchmark sweep arms no longer name the removed components". - Fix: remove
failed_run,mask,collapse,smartcrushandskeletonfromDET_CONFIGSinreplay2.py, as done inreplay.py.
- What fails: a
-
docs/data-dependence/page.md.tmpl:36 — a lost newline merges two bullets in the Terms section.
- What fails: the Metadata bullet now renders inside the Content bullet:
output are content too.- **Metadata**: values that do not let you read the content back.... The Terms section loses the Metadata definition as its own bullet. - Proof:
page.md.tmpl:36and the generateddocs/data-dependence.md:36both carrycontent too.- **Metadata**:. The base (7a02270f) had a newline betweencontent too.and- **Metadata**:. The PR's edit of the template removed it, and the generated page carries it too. - Fix: restore the newline in
page.md.tmpland rungo run ./cmd/gen-datadepagain.
- What fails: the Metadata bullet now renders inside the Content bullet:
-
examples/llm-d-service/build.sh:5 — the example still requires a C toolchain for the removed
skeletoncomponent.- What fails:
build.shsetsCGO_ENABLED=1and its comment says theskeletoncomponent links tree-sitter via cgo.README.md:75tells the user a C toolchain is required. Both claims are false after this PR. A user installs a C toolchain for no reason. - Proof:
examples/llm-d-service/build.sh:4-13,examples/llm-d-service/README.md:75. The PR fixed the same claim indocs/setup.md,.goreleaser.yaml,Makefileand both workflows, but missed this example. - Fix: drop
CGO_ENABLED=1frombuild.sh(or keep it with the race-test reason) and fix the README line.
- What fails:
-
docs/results/REPRODUCE.md:60 — the reproduce guide still builds with
-tags cg_skeleton.- What fails: the guide tells a user to run
CGO_ENABLED=1 go build -tags cg_skeleton ...andgo test -tags cg_skeleton ./..., and says the tag needs cgo/tree-sitter. The tag and the component no longer exist. The prerequisite list (REPRODUCE.md:15) demandsCGO_ENABLED=1for the same wrong reason. - Proof:
docs/results/REPRODUCE.md:15,58-61. No file in the tree carries thecg_skeletonbuild constraint after this PR (internal/treesitterandcomponents/offload/skeleton.goare deleted). - Fix: update the build commands and the prerequisite line to the plain build.
- What fails: the guide tells a user to run
-
components/offload/payload_rederive_test.go (deleted) — the end-to-end proof for the short stash horizon is gone, and a kept test still cites it.
- What fails:
TestAReclaimedPayloadIsReDerivedBeforeItsMarkerGoesUpstreamwas the only test that drove the #190 property end to end: a reclaimed stash payload is re-derived before its marker goes upstream. That property is what makesstore.DefaultStashTTL(a fifth ofttl_seconds) safe. It still applies to the kept componentsdedupandextract— the rewritten comment instore/store.go:519-528names exactly these two and their exposure. The PR re-drove other mask tests withextract, but deleted this one.store/payload_ttl_test.go:16-17still says the test exists "in components/offload, which drives the re-derivation end to end" — a pointer to a deleted file. - Proof: the file is deleted in the diff; grep for the test name over the tree returns nothing;
store/payload_ttl_test.go:16cites it. No remaining test setsStashTTLSecondsbelowTTLSecondsto drive the re-derivation path. - Fix: re-drive the test with
extractordedup, as the PR did for the marker-mode and replay tests. If that is not possible, fix the pointer inpayload_ttl_test.goand say the property is untested.
- What fails:
Non-blocking
- Dead code left behind in
components/offload/common.go:hasError(:223),headPeek(:64) andresolveBudget(:48) have no non-test callers now.components.Ctx.TailOnlyCold(components/component.go:853) has no callers at all. Consider removing them in a follow-up. - Stale comment pointers to removed code:
extract_llm.go:126,summarize.go:111andcache_aware_summarizer.go:120say "see AgentDiet.modelClient";modelcfg.go:36listsagentdietas a model component;dedup.go:107cites "the rule coref.go";state.go:288says "mask and failed_run buildprefix + headPeek(...)";stashreserve_test.go:15says "linecap will certainly rewrite". docs/components.md:29still listsagentdietamong the presets that "run little or none" of the lossless trio, anddocs/reference/reference.md:160sayscost_source: host_total"also carriessummarizeandagentdiet". Both are stale.PresetPipeline's doc comment still says "a plain map lookup"; the function now special-casesagentdietand logs.proxy/proxy.go:1163,proxy/tenancy.go:635andproxy/security_test.go:305still name tree-sitter as an example of slow pipeline work.deploy/harbor/dump_unique.py:18maps marker text of removed components to categories. This is correct for old dump files, so no change is needed.
What I checked
- The full diff
7a02270f..HEAD(129 files) and the code around each change. - The behavior-change rule: the change is named at the top of the PR, with the owner's yes recorded (2026-11-26). The six current presets and
housename no removed component. - Old-config handling:
dropRemovedinLoadBytesandBuild, theagentdietearly return inapplyPreset, andPresetPipeline("agentdiet")returning an empty pipeline. All three/compactand dash call sites (proxyapp/main_run.go:824,dash/adaptcompaction.go:101,342) handle the empty result without error.TestRemovedComponentsAreIgnoredNotFatalandTestRemovedPresetResolvesToEmptyPipelinecover the new behavior. - Preset arithmetic: 14 obsolete presets, 15 kept components,
presetConfigsentries carry no removed name,TestEveryPresetBuildsnow fails on a removed or unregistered name. - Data dependence: 9 row files deleted, 15 remain, the template's counts (5+2+1+3 = 11 of 15; 3 cannot work without content; 1 special case) match the row files' kinds. The generated page carries the template, including the defect in finding 2.
- Deleted tests vs kept behavior: gate labels, kept-verbatim, stash-reserve refusal, commit-gate and sweep tests were re-driven with
extract,cmdfilterordedupand still cover the kept components. The one gap is finding 5. flattenForCorefmoved fromcoref.gotoextract_sweep.gobyte-identical;internal/corefstays and has three live callers.- go.mod: only removals (
go-tree-sitter,go-sitter-forest/*,go-pointer); no new pin, so the tag rule holds. - Host boundary and client rules: no new logic in a host package, no client-specific rule added. The
late_rewritetest component lives in acmdtest only. - Docs sweep for stale names:
docs/setup.md,presets.md,components.md, mkdocs nav and the plugin'sinsights.pyare consistent; the leftovers are findings 3, 4 and the non-blocking notes.
amiddavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.332 | offload-review skill, @amiddavid's session | fresh | 1 of 2 | 1 of 2 | 7dfca4131039 |
blocking |
Verdict: blocking
Findings
- deploy/harbor/replay2.py:31 — the replay harness still offers arms named after removed components, and each arm now silently measures the baseline.
- What fails:
replay2.py --configs mask(orfailed_run,collapse,smartcrush,skeleton) writespipeline: [mask]to the config file (replay2.py:85,spec = PIPE.get(config, ("pipe", config)), and replay2.py:92,cfg.write_text(f"pipeline: [{config}]\n")).config.LoadBytesnow drops the name with a log warning only (config/config.go:496-521). The arm runs an empty pipeline and reports its numbers under the removed component's name. A reader cannot tell the arm from a real result. - Proof:
DET_CONFIGSat deploy/harbor/replay2.py:31-32 still listsfailed_run,mask,collapse,smartcrush,skeleton. The PR cleaned the sibling scripts (deploy/harbor/replay.py,sweep.py,swebench.py,terminalbench.py,deploy/eval-containers/sweep.py) and the PR body says "the benchmark sweep arms no longer name the removed components". These two tools were missed.docs/results/component-gating.md:10still tells a reader to reproduce withreplay2.py <capture> --configs .... - Fix: remove the removed names from
DET_CONFIGSin replay2.py and fromFREEandVARIANTSinscripts/analysis/cc_replay_sweep.py(see finding 1b). Update the two docs that point at them.
- What fails:
1b. scripts/analysis/cc_replay_sweep.py:15 — the transcript sweep still runs and searches over removed components.
- What fails:
FREE(lines 15-16) still listsfailed_run,linecap,smartcrush,collapse,mask,coref,readlifecycle.VARIANTS(lines 19-24) still buildspipeline: [readlifecycle],[mask]and[collapse]docs. Each single-component run now measures an empty pipeline. Worse, the greedy search (lines 110-134) draws its pool fromFREE, so it pays for a run per removed name and can print a "best custom pipeline" that contains a name which saves nothing. - Proof:
res["single"][c] = run(args, "single-" + c, "-pipeline", c)at line 111 drives the shipped binary with each name;dropRemovedinLoadBytesturns each into a no-op with a warning in the log only.scripts/analysis/README.md:693-715documents this tool as the way to see "what would each component have saved". - Fix: drop the removed names from
FREEand delete the removedVARIANTSentries. Say so in the README section.
- docs/data-dependence/page.md.tmpl:36 — the Metadata term lost its line break and is glued onto the Content bullet.
- What fails: the line now reads
output are content too.- **Metadata**: values that do not let you read the content back.... In rendered markdown the Metadata definition is no longer its own list item. It appears as literal text inside the Content bullet, so the Terms section loses one of its two definitions. - Proof:
grep -n "content too.- \*\*Metadata" docs/data-dependence/page.md.tmpl docs/data-dependence.mdhits line 36 in both files. The generated page carries the same defect, so the page and the template agree — the defect is in the template edit itself, not the regeneration. - Fix: restore the newline before
- **Metadata**inpage.md.tmpl, then regeneratedocs/data-dependence.mdwithgo run ./cmd/gen-datadep.
- What fails: the line now reads
Non-blocking
- Dead code in
components/offload/common.go.resolveBudget(line 48) andhasError/errWords(lines 218-228) have no callers left anywhere, andheadPeek(line 64) is used only bycommon_test.go. The comments there already say "a removed component" used them. Delete them, or moveheadPeekinto the test file. - The fixed-restore table lost its
reapplyFrozenrow.components/offload/expand_restore_test.go:21-24still says the table covers "one offloader per route into it", but the rows left areextract(skipReduce) andextract_llm(its own check).cmdfilterstill routes throughreapplyFrozen, and that route intoisKeptVerbatim/Ctx.Restorednow has no row. Consider a cmdfilter row. Config.Buildis now a mutating method.dropRemoved(config/config.go:496) writesc.Pipelineand deletes from the sharedc.Componentsmap on every Build. Every current path pre-cleans throughLoadBytes, so I found no live race. But a caller that builds a shallow copy sharing theComponentsmap (the shapeproxyapp/main_run.go:819uses forPipelineFor) would race ondeleteif the config still named a removed component. A comment, or a read-only pass in Build, would remove the hazard.- Stale comments still name removed components, after commit b43170c claimed to drop them:
components/offload/state.go:60and:288,schema/validate.go:76,config/form.go:65and:535,proxy/control.go:1300,proxy/agentcompaction_test.go:466("linecapdoes not act on these short bodies" — the pipeline is nowextract),docs/components.md:29(agentdiet"run little or none of it" — it now runs nothing),docs/reference/reference.md:160(thecost_sourcetext still countsagentdietinsidehost_total). proxyapp/main_run.go:106still listsagentdietamong the obsolete presets that "still load". It does load, as an empty pipeline. Wording only.
What I checked
- Read the full diff
7a02270f..HEAD(7 commits, 129 files, +517/-12038) and the code around each change. - Config resolution.
dropRemovedinLoadBytesandBuild; theagentdietspecial case inapplyPresetandPresetPipeline; the/compactpath throughproxyapp.PipelineFor(proxyapp/main_run.go:818-834) andproxy.go:854-866; the dash callers ofPresetPipeline(dash/adaptcompaction.go:101, 342). The fail-open rule holds: a stored config that names a removed component loads, warns, and runs without it.TestRemovedComponentsAreIgnoredNotFatalandTestEveryPresetBuildscover both entry points. - Presets. Compared every edited preset list in
config.goagainstdocs/reference/presets.md(lines 68-81) andcontext-guru-plugin/scripts/insights.py. They agree. The obsolete count is 14, as the text says. The six current presets andhousename no removed component, so the default behavior does not change. - Registrations. The 15 remaining registered components match the 15 remaining row files under
docs/data-dependence/components/. No code still registers a removed component. Nocg_skeletonreference remains in Go, the Makefile, CI or goreleaser. - Moved code.
flattenForCorefmoved from the deletedcoref.gointoextract_sweep.go;internal/corefstays andextract_sweep*.gostill calls it. The new test helperscallMsgs/asstMsg(components/offload/helpers_test.go) are used bydedup_test.goandsummarize_keepfirst_test.go. - Data dependence. The generated page and the template agree (the generator output matches the row files; only the glued bullet, finding 2, is wrong). The counts in the page check out: 15 components, 11 without stored content, 3 model-written, 1 special case. The PR names the data-dependence change and no kept component changed its row.
- Behavior change. Named at the top of the PR with the owner's yes on 2026-11-26, per the repo rule.
- Host boundary and client rules. No business logic was added to a host package:
proxy.goandmetrics.goonly lose the agentdiet counters;dash/schema.gochanges a comment. No client rule was added or moved;docs/client-coverage.mdneeds no change. - go.mod. Only
go-tree-sitter,go-sitter-forest/*andgo-pointer(indirect) are removed. No pin is added, so the tag-only rule holds. - Docs. Checked the mkdocs nav against the deleted pages, and grepped the docs for links to
skeleton.md,coref.mdand removed anchors. None remain. - Test swaps. The collapse/mask/linecap fixtures replaced with
extractkeep each test's premise (a tool output above the floor, noise extract removes).TestRewriteOfSentMessageIsABreaknow brings its own test-only component, which is the right fix now that no shipped component rewrites a sent message on purpose. - I did not run builds or tests (live tests not approved).
…oval - Remove the removed component names from replay2.py and cc_replay_sweep.py, and note it in the docs. - Restore the newline before the Metadata term in the data-dependence template. - Drop the C toolchain and cg_skeleton text from the llm-d example and REPRODUCE.md. - Drive the reclaimed-payload re-derivation tests with extract again. - Add a cmdfilter row to the fixed-restore table. - Delete dead code in components/offload/common.go. - Make Config.Build read-only. - Fix stale comments and docs that name removed components or tree-sitter. Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
|
Round 1 replies. All the findings are fixed in the commits up to Both reviewers
Reviewer 2
Non-blocking (both reviewers): all fixed
Tests (macOS, Go 1.27.4, no
|
amiddavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.332 | offload-review skill, @amiddavid's session | resumed | 2 of 2 | 2 of 2 | cb5c0adbb5eb |
approve |
Verdict: approve
Round-1 findings
All five of my round-1 findings are fixed. I verified each fix in the diff, not only in the author's reply.
- replay2.py arms for removed components — fixed.
DET_CONFIGS(deploy/harbor/replay2.py:31) now lists only live names.scripts/analysis/cc_replay_sweep.py(reviewer 1's finding 1b, which I checked myself) is cleaned too:FREEholds only live components andVARIANTSis deleted with its loop.scripts/analysis/README.mdanddocs/results/component-gating.mdcarry the matching notes. - Lost newline in the Terms section — fixed.
page.md.tmpl:36and the regenerateddocs/data-dependence.md:36both have the Metadata bullet on its own line again. The page and the template agree. - llm-d example C toolchain — fixed.
build.shusesCGO_ENABLED=0and the README says the build is pure Go. - REPRODUCE.md
cg_skeletonbuild — fixed. The prerequisite line and both build commands use the plain build andgo test ./.... - Deleted re-derivation test — fixed.
payload_rederive_test.gois back, driven byextract:TestAReclaimedPayloadIsReDerivedBeforeItsMarkerGoesUpstreamkeeps the original shape: promise on turn 1, reclaim paststash_ttl_seconds, re-derive and re-stash on turn 2, with theExpired/Revivedpair asserted.- The second test is correctly re-scoped:
extracthas no frozen replay, so a full reserve makes it decline, and the test now assertsstash_refusedmoves,stash_missingdoes not, and no marker goes upstream. This matches the rewritten comment instore/store.go:519-528. - The pointer in
store/payload_ttl_test.go:16names a test that exists again. - All helpers the tests use exist:
newExtract,userMsg,tool,StashStats,PutStash,StashRefusals,StashMissing.
Reviewer 1's findings 1, 1b and 2 are the same defects as my 1 and 2, plus cc_replay_sweep.py. I checked them myself and they are fixed. Their non-blocking items are all fixed as well: the dead code in common.go is deleted (headPeek moved into common_test.go as the clipRunes fixture), the fixed-restore table has a cmdfilter reapplyFrozen row (helpers newFilterComp and cmdToolMsg exist), Config.Build is read-only, and the stale comments are reworded.
Findings
None.
Non-blocking
scripts/cc-demo.sh:3still suggests building withCGO_ENABLED=1, andscripts/cc-demo.sh:19describes theagentpreset as "mask/dedup/failed_run/extract". The preset now runs the cleaned pipeline, so the comment names three removed components. The demo itself works (--preset agentloads). Comment-level only.
What I checked
- Last review: round 1,
7dfca41310391a4f18404bc4f3a40d72f47e2059, 2026-11-26T18:34:40Z. - New commits read: 2 —
8ac1d67e(merge origin/main) andcb5c0adb(fix(components): address round 1 review of the heuristic-deletion removal). - Read in full: 4 reviews, 7 comments, 0 inline comments (from the three files; the inline file is empty).
- New items since my last review: the author's round-1 reply (comment, 2026-11-26T18:57:54Z). I checked every claim in it against the diff; each held. The two earlier OsherElhadad reviews and comments predate my round 1 and name no new request.
- The fix commit
cb5c0adbin full: config (Buildread-only viawithoutRemoved(),dropRemovednow only inLoadBytes, with a test asserting the caller's Config is unchanged), the restoredpayload_rederive_test.go, the cmdfilter row inexpand_restore_test.go, the dead-code deletion incommon.go, and every doc and comment fix. - The merge
8ac1d67e:git show --remerge-diffis empty, so no conflict resolution dropped anything from main. The main side it brings in is #1445 (tool deferral accounting), already reviewed as its own PR. Ctx.TailOnlyColdstays, correctly:apply/apply.go:2023calls it. My round-1 note that it had no callers was wrong — I had grepped onlycomponents/.- Final sweep for removed names in scripts, deploy and examples: only historical results pages,
dump_unique.py(correct for old dumps) and thecc-demo.shcomment above remain.
amiddavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.332 | offload-review skill, @amiddavid's session | resumed | 1 of 2 | 2 of 2 | cb5c0adbb5eb |
approve |
Verdict: approve
Findings
None. Both round-1 findings are fixed, and I found no defect in the new commits.
Round-1 findings, re-checked
Mine:
- replay2.py arms for removed components — fixed.
DET_CONFIGS(deploy/harbor/replay2.py:31) now holds only live names and presets.docs/results/component-gating.mdcarries a note that says the figures below are history and a current build cannot reproduce them.
1b. cc_replay_sweep.py — fixed.FREE(scripts/analysis/cc_replay_sweep.py:15) now lists 7 live components.VARIANTS, its run loop and its print are deleted; grep finds no leftover use, so noNameErrorpath remains.scripts/analysis/README.mddrops "a few non-default settings". - Glued Metadata bullet — fixed. The newline is back in
docs/data-dependence/page.md.tmpl:36-37and in the generateddocs/data-dependence.md:36-37. Template and page agree.
Non-blocking, mine: all fixed. resolveBudget, hasError and errWords are deleted from common.go; headPeek moved into common_test.go as the fixture for clipRunes. The fixed-restore table gained a cmdfilter row for reapplyFrozen (expand_restore_test.go:50-60), and its head comment now names all three routes. Config.Build is read-only: withoutRemoved() filters into a fresh slice, dropRemoved is called only from LoadBytes (config/config.go:468), and TestRemovedComponentsAreIgnoredNotFatal now asserts the caller's Config is unchanged. Every stale comment and doc line both reviews listed is fixed; I checked each one at its new line.
Reviewer 2's:
- llm-d example C toolchain — fixed.
build.shsetsCGO_ENABLED=0and the README says the build is pure Go. - REPRODUCE.md
-tags cg_skeleton— fixed. The prerequisite line and both build commands use the plain build. - Deleted re-derivation test — fixed.
payload_rederive_test.gois back, driven byextract.store/payload_ttl_test.go:17points at a test that exists again. The author's reason for reworking the second test is right:extracthas no frozen replay, so with a full reserve it declines and sends the message verbatim.TestAReclaimedPayloadThatCannotBeReStashedIsDeclinedNotDanglingasserts exactly that — verbatim output, no marker upstream,stash_refusedmoves,stash_missingdoes not — which matches the comment instore/store.go:519-528.
Reviewer 2's non-blocking claim that Ctx.TailOnlyCold has no callers is wrong: apply/apply.go:2023 calls it. The author's reply says so and the code confirms it. Keeping the method is right.
Non-blocking
deploy/harbor/cfg-iter02*.yaml(11 files) still namecollapseandcorefin their pipelines. They load with a warning. This is OsherElhadad's note from 2026-10-15, still open. Historical experiment configs; delete or annotate them in a follow-up.
What I checked
- Last review: round 1, 7dfca41, 2026-11-26T18:35:02Z.
- New commits read: 2 —
8ac1d67e(merge origin/main 17e5633, no conflicts) andcb5c0adb(fix(components): address round 1 review). - Read in full: 4 reviews, 4 comments, 0 inline comments (from
.review-in-reviews.txt,.review-in-comments.txt,.review-in-inline.txt). - New items since my last review: the author's reply comment (2026-11-26T18:57:54Z), which claims every finding fixed — I verified each claim in the diff; the merge commit; the fix commit.
- The fix commit, in full. Read every hunk of
cb5c0adb(32 files): the config read-only rework, the dead-code removal, the movedheadPeek, the new cmdfilter restore row, the restoredpayload_rederive_test.go(both tests, line by line), the harness cleanups and the comment fixes. The new test's helpers (newFilterComp,cmdToolMsg,StashStats,PutStash) all exist, so the file compiles against the tree as I read it. - The merge.
git diff 17e5633c..HEADtouches noaccrec/,tooldefer/,dash/or accountant file, so the branch does not revert any of main's #1445/#1465/#1504 work; the tooldefer changes I read in the range diff arrived from main through the merge, not from this branch. The PR's removals are all still present at HEAD. - The new payload tests' premise.
extractre-derives its cut from the re-sent original each turn, and the re-stash goes through the refusablecommitMark. The decline-when-refused behavior the second test asserts is the onestore/store.godocuments for the no-replay family. I could not run the tests (live tests not approved); the author reports both pass. - Leftover names. Grepped the tree for the removed names:
replay2.py,cc_replay_sweep.py, the llm-d example and REPRODUCE.md build commands are clean. What remains is history text in results docs (REPRODUCE.md:96, :337 describe past runs) and thecfg-iter02*.yamlnote above.
The comments named CGO_ENABLED=1 and removed components. No code changes. Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
|
The approvals at |
|
@OsherElhadad, the owner decided on part of this PR. The rest is for you to decide. Decided (owner, 2026-11-27):
For you to decide: the other 8 components stay in the code for now:
This PR stays on hold until you answer. It merged |
…oaders, and retire coref (#1538) refactor(config): delete the obsolete presets that use heuristic offloaders, and retire coref Delete the 9 presets that name a component that deletes by a heuristic: balanced, aggressive, coding, mcp, agent, general, agentdiet, codesmart and codesafe. A config that names one loads, logs a warning and runs no preset components. An explicit pipeline in the same document still runs. Remove the coref component. A config that names it loads and drops the name with a warning. internal/coref and every use of it by the sweep stay. The other 8 components stay as they are: failed_run, collapse, mask, linecap, smartcrush, readlifecycle, agentdiet and skeleton. A hand-written pipeline reaches them. Their docs say so. Move the tests that used a retired preset to a current one. Remove the retired presets from the benchmark scripts, the plugin and the docs. Update the data-dependence page counts. Refs #1412, #471, #474 fix(config): address round 1 review of the preset retirement - Split the --preset help into obsolete presets (run as before) and retired presets (load, warn, run nothing). - Remove coref from the data-dependence feature row for billed-token records, and rebuild the page. - Remove coref from the cc_replay_sweep arm list and skeleton from the replay arm lists. Extend the drift test to scan those lists. - Say that nine offloaders (searchcap included) are in no preset, without a shared history claim. - Fix stale comments that name coref or the retired presets as current. fix(config): address round 2 review of the preset retirement - Name the real reader of the per-thread billed record: the warm gate of extract_llm_sweep. - Say in prefix_econ.go that no component rewrites the cached prefix now. The gate and the horizon stay only as the reference for the guard tests. - Remove phi_evict and skeleton from the replay and sweep arm lists. The drift test now scans sweep.py CONFIGS too, and only `off` is exempt. - Say which case is which: an unregistered name fails Build, a removed name runs an empty pipeline. Behavior change (9 obsolete presets retired: a config naming one loads with a warning and runs no preset components; the coref component removed) approved by the owner in the integrator session: "1538 yes". Built, vetted and tested on the current main before the merge; the data-dependence page needed no change. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
Behavior change: needs a human yes. The owner said yes to this change on 2026-11-26.
balanced,aggressive,coding,mcp,agent,general,codesmartandcodesafe. Theagentdietpreset is also affected.agentdietpreset runs no components. The proxy does not stop.off,conservative,medium,high,xhigh,ultrahigh) andhouse. None of them names a removed component.Part of #471.
Summary
This PR removes 9 components that delete content by a heuristic. The heuristic is age, size, run order or a guess about the future. A component may now remove only content that is provably redundant, or content it parks behind an expand handle.
Removed:
failed_run,collapse,mask,linecap,smartcrush,readlifecycle,coref,agentdiet,skeleton. The tree-sitter dependency goes withskeleton.internal/corefstays, becauseextract_llm_sweeppasses its index to the model.Kept:
format,textclean,searchfold,toon,dedup,extract,cmdfilter,extract_llm,extract_llm_sweep,summarize,cache_aware_summarizer,cachesplit,cacheinject,toolschema,toolfilter.The evidence is in the private research notes.
What changed
agentdietpreset is removed.config.LoadBytesandConfig.Builddrop a removed name and log a warning.PresetPipeline("agentdiet")returns an empty pipeline. Test:TestRemovedComponentsAreIgnoredNotFatal.TestEveryPresetBuildsfails if a preset names a removed or unregistered component.docs/data-dependence/components/. The counts inpage.md.tmplchange from 24 to 15 components. The page is regenerated withgo run ./cmd/gen-datadep. No kept component changes its data dependence.go-tree-sitter,go-sitter-forest/*andgo-pointerare removed. No pin is added.proxy.go,tenant.go,go.mod, the sweep and commit-gate tests).agentdietandmasktests are removed from them.cg-transcript-replaytests and the marker-cap tests now useextract. The cache-break test uses a small test-only component.How it was tested
Run on macOS, Go 1.27.4, with
GOFLAGS=-p=2. No-raceonproxyordash.go build ./...andgo vet ./...pass.go testpasses for./config,./components/...,./proxy/...,./dash/...,./tenant/...,./apply/...,./proxyapp/...and./cmd/....insights.pyand the docs pass (-run 'Insight|Preset|Component|Docs').origin/main:TestCGScriptsAreVendoredIntoCodex:cg.pydiffers between the two plugin folders on main.TestBobReleasePythonSuiteruns past the 9-minute limit. The Bob suite is on hold.mkdocs buildwas not run: mkdocs is not installed on this machine.Local tests: waived (owner rule)
Open questions
Validatereject a removed name at settings-save time? Today it accepts the name and the warning shows only in the log.marker_mode: summary|offhas no expand handle and is in no preset. It stays as it is (flagged in Compaction cleanup: remove failed_run, collapse and other heuristic-deletion components #471).