Repository navigation
feat(dash): remove the history import - #736
Conversation
vz-ibm
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (claude, user of @vz-ibm) | Claude Code 2.1.310 | offload-review skill, @vz-ibm's session | fresh | 2 of 2 | 1 of 2 | 2cea2930562b |
blocking |
Verdict: blocking
Findings
-
docs/data-dependence.md:219 — The new text says the dashboard "reads no file on your disk". That is false.
- What fails: A user or reviewer reads the data-dependence row and believes the dashboard never reads local files. The dashboard still reads two local trees on every non-hosted install:
~/.claude/projects/*/*.jsonl(Claude Code session transcripts).API.projectGroups()→CachedProjectGroups(a.diskHome())→ProjectGroups→readCwdCountsreads each transcript (dash/api.go:684,dash/projectgroups.go:62-72,:164). The project facet (dash/query.go:1732) andExpandProjectFilter(dash/api.go:674) use the result.~/.claude/plugins(SKILL.md files).skillDescriptions(dash/insightsapi.go:133-141) reads it.
- Proof:
diskHome()returnsnoHomeonly whena.auth != nil(dash/api.go:692-697). A local proxy has no auth, so it reads both trees.cg-backfill-projectalso reads the transcripts (dash/backfillproject.go:110). - Fix: State it correctly. For example: "Every request row comes from traffic the proxy saw itself. To group folders into projects, the local dashboard reads the working folder recorded in Claude Code's session files. It stores none of their text." This doc is the data-dependence record that CLAUDE.md requires, so it must be exact.
- What fails: A user or reviewer reads the data-dependence row and believes the dashboard never reads local files. The dashboard still reads two local trees on every non-hosted install:
-
dash/schema.go:799-817, 932, 940 — When the one-time purge fails,
Openfails. The proxy then runs with an in-memory dashboard. This is not fail-open for an optional cleanup.- What fails:
migratereturns any error frompurgeImportedHistory.openDSNcloses the DB (dash/store.go:280-283).NewRecorderthen falls back toOpen(":memory:")(dash/capture.go:223-227). The dashboard comes up empty, and the proxy records nothing to disk for that run. The comment atdash/schema.go:880-883names this exact symptom as a past real incident. - One concrete trigger: two processes open the same old database at the same time. Examples are a proxy restart that overlaps the old process, or
cg-backfill-projectbeside a starting proxy. Trace:- Both read
metaand getsql.ErrNoRows(:801). This read is outside the transaction. - Process A deletes, inserts the marker, and commits.
- Process B's
DELETEwaits onbusy_timeout, then runs and deletes 0 rows. - Process B's plain
INSERT INTO meta(...)(:814) fails withUNIQUE constraint failed: meta.key, and B'sOpenfails.
- Both read
- Other triggers:
SQLITE_BUSYpast 5 s, because a long trigger-driven delete holds the write lock, or a disk-full error during the delete. - Proof: read of the lines above. Not run, because live tests are not approved.
- Fix:
- Use
INSERT OR IGNOREfor the marker. This removes the race. - Make a purge error non-fatal in
migrate: log it withslog.Warnand continue. The next open retries, because no marker is written. - Add a test that gives the purge a failure and checks that
Openstill returns a file-backed DB.
- Use
- What fails:
Non-blocking
- The "Kept" reason for the transcript reader is wrong, and the change leaves dead code. The PR body and the new header at
dash/transcript.go:13-15sayprojectgroups.gousesReadTranscript. It does not.projectgroups.gohas its ownreadCwdCountsand uses only the constanttranscriptMaxLinefromtranscript.go(dash/projectgroups.go:162-174). After this PR,ReadTranscript,ReadTranscriptChecked,TranscriptTurn,transcriptEntry,transcriptCalledandcontainsStrhave no non-test caller (I grepped the whole repo). Either remove them with their tests, or keep them and correct the header.ReadTranscriptChecked's comment (:96-98) also still says "lets the importer say…". - A comment is now in the wrong place. The
purgeImportedHistorydoc was put inside themigrateToolUsesProjectdoc block (dash/schema.go:776-797). There is no blank line between them. As a result, godoc attaches the whole block, starting with "migrateToolUsesProject adds…", topurgeImportedHistory.migrateToolUsesProjectis left with only "Idempotent: …". Move the new comment so it sits directly abovefunc purgeImportedHistory, aftermigrateToolUsesProject's complete doc. - Some comments still describe the import as current.
dash/schema.go:785-787: "the thousands of invocations imported from the user's own history -- which is the data this whole surface exists to show".dash/event.go:205-213, theEvent.Sourcedoc.dash/redact.go:86-93:sourceOfsays "a report decides whether it may show a waste verdict by asking whether the window contains imported rows". No report does this now.
- The version-mismatch case gives misleading output. An older
install.shrunsimport-history -apply, gets exit 0, writes its marker, and emitshistory_import=donewith the summary "import-history was removed; it does nothing now". The older install skill then tells the user that the history "was imported once". This happens only during a mismatch, so it is acceptable. You could mention it in the PR body. TestImportHistoryIsANoOpThatExits(cmd/context-guru-proxy/importhistory_test.go:34): the conditionstrings.Contains(out,"imported") && strings.Contains(out,"APPLIED")is weak. The!strings.Contains(out, "removed")and no-DB-file checks do the real work. That is acceptable.
What I checked
- I read the full diff (33 files, +268/−2656) and the PR body, with the code around each change. I did this before I read any other review or comment.
tenant_spend: I checked that the purge does not need to adjust it.importedEvent(olddash/importhistory.go:321-339) never calledPrice, soCostUSDandCGLLMCostUSDwere 0, andinsertBatchadded 0 to the rollup (dash/store.go:583).trg_tool_inventory_gc(dash/schema.go:651-659):- It removes
tool_declarationsandtool_usesonly for sessions with no requests left. - A mixed session keeps its measured rows and the merged
MAX(calls, …)counts. The PR documents this limit. - The importer wrote
tenant_id ''on both tables, so the trigger's tenant match holds.request_componentscascades becauseforeign_keys(1)is in both DSNs.
- It removes
- Purge order: the purge runs after
additiveDDL2on both the at-version path and the fresh path. On the fresh pathmetaexists, becauseddlran first. The version-mismatch path re-opens a fresh file, andcarryNonDeriveddoes not carryrequests. - Writers of
source='imported': onlycapture.go's recorder callsinsertBatch, and no JSON ingest ofEventexists. So the run-once marker cannot miss later imported rows. - Prune: removing the
source = ''exemption is correct now that no imported rows exist. - Cleanup UI: without the coverage empty state, an empty timeline is still handled.
insChartreturnsnullwhenbucketsis empty (dash/ui/insights.js:1355).insRangeBannerreadsbuckets[0]only when a range is set.emptytimeline_test.gostill guards the null-to-[]marshal.- The
facetscall withoutmeasured: 1matches the removedFilter.SourceMeasured.
- Leftovers: I grepped the whole repo for
import-history,ImportHistory,history_import,cg-import-history,RunImportHistory,CoverageFor,SourceMeasured,measured=1,TranscriptFilesandhistory-imported. Only the intended no-op and its test remain. The Makefile and the release config do not namecg-import-history. - Plugin: I checked the
install.shremoval, the SKILL.md bullet removal and the line cap lowered to 238. - Rewritten tests: in
tooluseproject_test.go,insertUsegoes through the real key withcalls + 1, so a collapse of two folders would still show. - Not run: I ran no Go builds or tests, because live tests are not approved and Go is not installed.
Data dependence: Context Guru stores less. The dashboard no longer copies request rows from Claude Code's session files on the user's disk; old imported rows are deleted when the database opens. No row of docs/data-dependence.md changes Kind or level: the import was never listed there. The Dashboard database row now states what it still reads from disk (the working folder, for the project picker; skill descriptions) and that it stores neither. With the History tab gone (#731), nothing read imported history for the user's benefit. Every remaining reader worked around the import itself, and the one that would have helped (call counts) never worked: scopedUses drops sessions with tools = 0, which every imported session has. The import cost install time, mixed transcript spend into the Overview and Requests totals, and never expired. Removed: - The importer (importhistory.go), its command (importhistorycmd.go, cmd/cg-import-history) and the imported-invocation folder repair (backfilluseproject.go). - install.sh's route_import_history step, the install skill's history_import bullet, and the line cap raised for it (242 -> 238). - Cleanup's workarounds: the "Nothing measured" empty state, the insights Coverage field, CoverageFor, and the measured=1 picker filter (Filter.Source, Filter.SourceMeasured). - The retention prune's exception for imported rows. - TranscriptFiles, whose only callers were the importer and backfill. Kept: - `context-guru-proxy import-history` as a no-op that exits 0: an older install.sh still runs it, and the name must not fall through and start serving. - The transcript reader (projectgroups uses it for the project picker), cg-backfill-project (fills the project of measured rows), and the requests.source column (old databases have it). - The empty-timeline crash guards, re-seeded without an import, and the tool_uses.project migration tests, seeded through the table's key. Added: - purgeImportedHistory: once, recorded in meta, after additiveDDL2 on both open paths, so trg_tool_inventory_gc clears an imported-only session's declarations and uses. It never fails Open: an error is logged and retried on the next open (a failed Open would send the recorder to an in-memory dashboard), and the marker is INSERT OR IGNORE so two processes opening one old database do not collide. A session that began before the proxy keeps the import's calls, which were merged into the same tool_uses rows with no marker. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Vitaly Zabershinsky <[email protected]> Signed-off-by: Vitaly Zabershinsky <[email protected]> Signed-off-by: Vitaly Zabershinsky <[email protected]>
2cea293 to
a10df46
Compare
Reply to review round 1, and conflicts resolvedRebased onto ConflictsThere was one real conflict, in Git merged the other 5 overlapping files (
Finding 1 (reviewer 2): "reads no file on your disk" is falseCorrect, and fixed. It contradicted this PR's own "Kept" list, which keeps the transcript reader for the project picker. The Dashboard database row now says:
The commit message and the PR description are corrected to match. Finding 2 (reviewer 2): a failed purge fails
|
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.312 | offload-review skill, @amiddavid's session | fresh | 2 of 2 | 2 of 2 | a10df46ac987 |
approve |
Verdict: approve
Both round-1 findings are fixed, and the fix is correct. The rebase onto main broke nothing that I can find. No new blocking finding.
Note: the PR shows as merged (merge commit e9ae8d9, 2026-10-28T08:52:11Z), before this round was posted. I reviewed the merged head a10df46a as asked.
Earlier findings
-
Finding 1 (round 1): "reads no file on your disk" was false — fixed.
docs/data-dependence.md:219now names both disk reads: the working folder from Claude Code's session files, and each skill'sSKILL.mddescription. It says the dashboard stores neither.- I checked the claim against the code again.
diskHome()(dash/api.go:692) still guards the hosted case, and the text matches what the local install reads. The commit message and the PR description carry the same correction.
-
Finding 2 (round 1): a failed purge failed
Open— fixed, with both suggested changes.- The marker is
INSERT OR IGNORE(dash/schema.go:831), so two processes that open one old database cannot collide onmeta.key. - A purge error no longer fails
Open.warnPurge(dash/schema.go:813) logs it, andmigratecontinues on both open paths (dash/schema.go:949,:958). No marker is written on failure, so the next open retries. - Two new tests cover it (
dash/purgeimported_test.go:124,:142). I read both in full. The second one makes theDELETEfail through a trigger, then checks thatOpenstill returns the file-backed database with no marker. This is the test I asked for.
- The marker is
Non-blocking
Not fixed from round 1, all comment-level. The author's reply covered only the two findings, which was the right order.
dash/transcript.go:ReadTranscript,ReadTranscriptChecked,TranscriptTurn,transcriptCalledandcontainsStrstill have no non-test caller.projectgroups.go:162uses onlytranscriptMaxLine. The header atdash/transcript.go:13and the PR's "Kept" list still sayprojectgroups.gouses the reader.dash/schema.go:786-789:migrateToolUsesProject's doc block is now separated from the purge doc by a blank line (good), but it still sits abovepurgeImportedHistory, detached from its own function. It also still calls the imported rows "the data this whole surface exists to show", which this PR's purge now deletes.dash/event.go:205-213anddash/redact.go:86-93still describe the import as a live distinction.- The commit message now carries three
Signed-off-bylines for the same person, one a duplicate. Harmless for DCO.
What I checked
- Last review: round 1,
2cea2930562b5f4a5013a12cf83c88c6b701177d, 2026-10-26T14:58:03Z - New commits read: 18 in
git log 2cea2930..HEAD. The branch was rebased: my round-1 head is not an ancestor of the new head. 17 commits aremain's own (ccb62c7c#757,f136c37a#758,50af4d3c#756,d6edaad0#755,f234587e#753,245982d7#751,514b8be4#747,387664ea#749,d08eff8b#746,1bd627d1#743,4f9f5d2d#744,70bd6c88#741,ab7868aa#742,161076c6#740,3befbfb2#739,8ff7f6aa#735,00cd7fd6#732). One is the PR's own:a10df46a"feat(dash): remove the history import", the round-1 patch rebased plus the fixes below. - Read in full: 1 review (my round 1), 1 comment (the author's reply), 0 inline comments (from the three files). Reviewer 1 posted nothing in round 1.
- New items since my last review:
- The author's comment (2026-10-28T07:44:52Z). I checked each claim: the rebase, the
SKILL.mdconflict resolution, both fixes, and the test list. All check out. I could not re-run their build and tests (live runs not approved, no Go here), so I verified by reading. - The patch delta since round 1.
git range-diff ad87e369..2cea2930 ccb62c7c..a10df46ashows the whole PR changed in six places only: the commit message, theSKILL.mdconflict line,dash/insightsapi.go(main'sdiskHomechange, merged around the PR'sCoverageremoval),dash/purgeimported_test.go(the two new tests),dash/schema.go(warnPurge,runImportedHistoryPurge,INSERT OR IGNORE, both call sites), anddocs/data-dependence.md. Everything else is byte-identical to the patch I read in full in round 1. - The rebase merge results in the six overlapping files. I read
plugin_test.go(cap 238),install.sh(route_import_historygone, no dangling calls),dash/store.go(prune exemption gone; main's checkpoint change intact),dash/insightsapi.go,docs/data-dependence.md, andSKILL.md(238 lines, main's rewordedstatusline=line kept,history_import=bullet gone).
- The author's comment (2026-10-28T07:44:52Z). I checked each claim: the rebase, the
- Leftovers: I grepped the whole tree for every removed name (
TranscriptFiles,CoverageFor,SourceMeasured,RunImportHistory,import-history,history_import). Only the intended no-op incmd/context-guru-proxy/main.go:67, its test, and comments remain. - Purge safety, re-checked at the new head:
OpenReadOnlydoes not callmigrate, so a read-only handle never runs the purge. The:memory:fallback takes the fresh path, deletes nothing, and writes its marker in memory. A crash betweenDELETEandCOMMITrolls back with no marker, so the next open retries. - I ran no builds or tests. Live tests are not approved, and Go is not installed on this machine.
amiddavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | offload-review skill, @amiddavid's session | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.312 | offload-review skill, @amiddavid's session | fresh | 1 of 2 | 2 of 2 | a10df46ac987 |
approve |
Verdict: approve
Earlier findings
- Reviewer 2, finding 1 (data-dependence "reads no file on your disk" was false): fixed. I verified the new text against the code.
CachedProjectGroups(a.diskHome())reads the working folders from Claude Code's session files (dash/projectgroups.go:164,readCwdCounts).skillDescriptionsreads each skill'sSKILL.mdunder~/.claude/plugins(dash/insightsapi.go:141).diskHome()returnsnoHomeonly for a hosted proxy (dash/api.go:692). The doc now says the dashboard reads both and stores neither. That matches the code. - Reviewer 2, finding 2 (a failed purge failed
Open, so the dashboard went in-memory): fixed, both ways.- The marker is
INSERT OR IGNOREinside the purge transaction (dash/schema.go:831). warnPurgelogs the error andmigratecontinues (dash/schema.go:813,:949,:958). No marker is written on failure, so the next open retries.- Two new tests cover it:
TestThePurgeNeverFailsOpenWhenTheMarkerAlreadyExistsandTestAFailedPurgeStillOpensTheDatabase(dash/purgeimported_test.go). The second one makes the delete fail with a trigger and checksOpenstill returns the file-backed database. - I checked the stakes myself:
NewRecorderfalls back toOpen(":memory:")(dash/capture.go:227), so a failedOpenreally would lose all disk recording.
- The marker is
- Reviewer 2, non-blocking items: partly rejected, partly not fixed. See Non-blocking below. The author deferred the dead code and the stale comments to a follow-up, on purpose (PR body, Open question 1). I accept the deferral for
Event.Source/sourceOf/TranscriptTurn.Called: removing them changes how every row is written and read. I do not accept the stated reason for keepingReadTranscript— see Non-blocking 1.
Findings
None. I found no wrong behavior, no data loss, no broken fail-open path, and no missing test for the new behavior.
Non-blocking
- The PR body's "Kept" reason for
ReadTranscriptis false, and round 1 already said so. The PR body says: "The transcript reader (ReadTranscript), whichprojectgroups.gouses for the project picker." It does not.projectgroups.gohas its own reader,readCwdCounts, and shares only the constanttranscriptMaxLine(dash/projectgroups.go:162-174).ReadTranscriptandReadTranscriptCheckednow have no production caller; only tests use them. The new header atdash/transcript.go:10-12also says the project picker is this file's "one use", which a reader will take the same way. Fix the PR body and the header: say the reader is unused and left for the follow-up. Reviewer 2 raised this in round 1; the body was edited after that and the claim stayed. - The
purgeImportedHistorydoc sits insidemigrateToolUsesProject's doc block (dash/schema.go:778-799). There is no blank line between them, so godoc attaches both blocks topurgeImportedHistory, andmigrateToolUsesProjectkeeps only "Idempotent: …" (dash/schema.go:837). Reviewer 2 raised this in round 1; not fixed. Move the new comment belowmigrateToolUsesProject's complete doc. The sentence at:788-789("the data this whole surface exists to show") also still describes the import as current data. - Stale comments that present the import as current:
dash/event.go:205-215(Event.Sourcedoc) anddash/redact.go:88-93(sourceOfsays a report asks whether the window holds imported rows; no report does now). Deferred on purpose in the PR body. Acceptable for this PR; the follow-up should take them. - An old
install.shduring a version mismatch gets a misleading "done". The no-op prints "import-history was removed; it does nothing now" and exits 0. The old script writes its marker and reportshistory_import=done, and the old skill then says the history "was imported once". This only happens in the short mismatch window. The PR body names the no-op but not this summary text. Consider one sentence in the PR body.
What I checked
- Last review: none. No review on the PR starts with
<!-- offload-review reviewer=1. The lookup command returned empty output. I posted no round-1 verdict; the author's comment says the same. So I reviewed the whole PR as if it were a first review. - New commits read: 1. The PR is one commit after the rebase:
a10df46a"feat(dash): remove the history import", baseccb62c7c. Reviewer 2 reviewed2cea2930562bbefore the rebase; that commit is gone from the branch history. - Read in full: 1 review (reviewer 2, round 1), 1 issue comment (the author's reply and rebase note, 2026-10-28), 0 inline comments. Files:
.review-in-reviews.txt,.review-in-comments.txt,.review-in-inline.txt. - New items since my last review: all of them, since I have no last review. What I did about each:
- Reviewer 2's two findings: re-verified the fixes in the code, not only the author's reply. Details under "Earlier findings".
- The rebase onto
main(ccb62c7c, 17 commits): I reviewed the final diff against that base, which contains the merged conflict results. I grepped the repo for every removed name (RunImportHistory,ImportHistory,BackfillUseProjects,importedUse,insertImportedUses,TranscriptFiles,CoverageFor,SourceMeasured,InsightsCoverage,measured=1,cg-import-history,history_import). Only the intended no-op, its test, and the deferredSourceImportedconstant remain. - The author's test claims: not run. Live tests are not approved and Go is not installed on this machine. I read the new tests instead:
purgeimported_test.go(5 tests),sourcecolumn_test.go,emptytimeline_test.go,importhistory_test.go, and the rewrittentooluseproject_test.goseeding through the table's real key. - The two Mac-only test failures the author names: they say these fail on
maintoo and this PR does not touchinsightstimeline.goortoolapi.go. I confirmed withgit diff ccb62c7c..HEAD --stat: neither file is in the diff. Someone should still look at them onmain.
- The diff: all 33 files, +341/−2656, read in full, plus the code around each change (
schema.gomigrate paths,store.goopen paths,insights.jsrender path,projectgroups.go,redact.go,event.go,transcript.go,install.sh,SKILL.md). - The purge, on my own trace: marker read outside the transaction, delete and marker in one transaction,
busy_timeout(5000)with WAL covers the two-process race, and the fresh and at-version paths inmigrateboth run it afteradditiveDDL2, sotrg_tool_inventory_gcexists (dash/schema.go:652).tenant_spendneeds no adjustment: imported rows never carried a price, so the rollup added 0 for them. - The UI after the empty state's removal:
insChartreturnsnullon empty buckets (dash/ui/insights.js:1355) and the render skips a null chart;insRangeBannerreadsbuckets[0]only when a range is set, and a range cannot be set without a chart.emptytimeline_test.gostill guards the null-to-[]marshal through the real endpoint. - The no-op command:
fmtis already imported incmd/context-guru-proxy/main.go, the dispatch happens before flag parsing, so-dbis ignored and no database is created. The test checks exactly that. - The install skill is 238 lines, at its cap (
plugin_test.golowered 242 → 238). - Test helpers orphaned by the deletions: none.
writeJSONL,turnLine,msgLineandjsStringLiteralsare defined in files that remain;stripCommentsmoved totesthelpers_test.goand still has a user (uicalls_test.go).
chore(plugin): bump the Claude Code plugin for v0.6.3 (0.6.3) The Claude Code plugin changed since v0.6.2: #736 removed the history import step from install.sh and the install skill. The Codex plugin did not change, so it stays at 0.2.7. Assisted-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
Summary
This PR removes the history import (
import-history), which copied Claude Code's old session transcripts into the dashboard database. With the History tab gone (#731), nothing used that data in a way that helps the user.What we found
Every remaining reader of imported rows was only a workaround for the import itself:
measured=1)scopedUseskeeps only sessions withtools > 0, and every imported session hastools = 0.The import also cost something:
What changed
Removed:
importhistory.go), its command (importhistorycmd.go,cmd/cg-import-history), and the imported-invocation folder repair (backfilluseproject.go).install.sh'sroute_import_historystep, the install skill'shistory_import=bullet, and the line cap that was raised for it (242 → 238).Coveragefield,CoverageFor, and themeasured=1filter (Filter.Source,Filter.SourceMeasured).TranscriptFiles, whose only callers were the importer and the backfill.projectgroups.gokeeps its own symlink guard.Kept:
context-guru-proxy import-historyas a no-op that exits 0. An olderinstall.shstill runs it during a plugin and proxy version mismatch. Without the name, it would fall through to the proxy's flag parsing and start serving, which hangs the install.ReadTranscript), whichprojectgroups.gouses for the project picker.cg-backfill-project. It fills the project of measured rows and never reads imported ones.requests.sourcecolumn. Old databases have it.emptytimeline_test.go, re-seeded without an import), and thetool_uses.projectmigration tests (seeded through the table's real key, so a collapse would still show).Added: delete old imported rows, once.
purgeImportedHistoryruns afteradditiveDDL2on both open paths, sotrg_tool_inventory_gcexists and clears an imported-only session's declarations and uses.request_componentscascades.Open. An error is logged and retried on the next open, because a failedOpenwould send the recorder to an in-memory dashboard. The marker isINSERT OR IGNORE, so two processes that open one old database do not collide.meta. As a plain statement it would scanrequestson every open (about 60 ms on 500,000 rows; there is no index onsource).tool_usesrows as measured calls (MAX(calls, …)), with no marker, so they cannot be told apart. They can only make a tool look more used, never cause bad removal advice.How it was tested
Test first. Each of these failed before the change, for the intended reason:
TestOpeningADatabaseDeletesImportedRows,TestDeletingImportedRowsIsIdempotent: imported rows survived. Both also fail if the purge deletes nothing.TestThePurgeRunsOnlyOnce: proves a later open skips the scan.TestImportHistoryIsANoOpThatExits: the command imported rows.Suites (after rebasing onto
mainwith #728 and #733):go build ./...,go vet ./...andmake lint: clean.go test ./dash/... ./proxy/... ./cmd/... ./components/...: all pass except two that also fail on cleanmainon this Mac:TestCalculatorPricesFromTheRowsModelNotABlend(passes on Linux) andTestALateFirstByteOnTheRealTransportNeverReachesTheClient(a 5 ms timing test, flaky onmain).go test -timeout 20m ./context-guru-plugin/(the whole package, withANTHROPIC_DEFAULT_*_MODELunset): only the 10 host-dependent install and setup tests that also fail onmainon this Mac.Live, on a copy of a real old database (v0.4.2, opened by this build):
The run-once marker is set. There were no errors.
Data dependence
What it does at each level (see
docs/data-dependence.md):Decided by: the user, in the session that removed the History tab (#731). That decision is now the reason for this change. The import was never a listed row, so there is no row owner to confirm. Please say if you think it should have had one.
Open questions
Event.Source/sourceOf/SourceImported, andTranscriptTurn.Called/transcriptCalled, are now written and never read. Removing them changes how every request row is written and read, and reshapesReadTranscript, whichprojectgroupsuses. A small follow-up can drop them./context-guru:dashboardprobes/api/history(see feat(dash): remove the History tab #731), and an olderinstall.shrunsimport-history, which now does nothing. The plugin and proxy update together, so the window is short.Assisted-By: Claude (Anthropic AI) [email protected]