Repository navigation
fix(dash): delete declaration_text with retention and account purge - #1472
Merged
Merged
Conversation
Stored tool declarations and system prompts stayed in declaration_text after the requests they came from were deleted (#689). The inventory trigger now deletes a text row when the last declaration row that names it goes. It keeps a row that another session or account still names. A partial index on tool_declarations(text_hash) makes the check cheap. A start-up sweep removes rows orphaned before this change. The writer no longer keeps a memo of stored hashes. The trigger can delete a row at any time, so the memo could point new rows at missing text. Closes #689 Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
amiddavid
commented
Nov 26, 2026
amiddavid
left a comment
Collaborator
Author
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 | 767d6bc45f71 |
blocking |
Verdict: blocking
Findings
- docs/data-dependence/page.md.tmpl:331 — the technical-notes table still says retention and size limits do not remove
declaration_text- What fails: a user reads
docs/data-dependence.md:389(generated from this template) and sees two opposite claims on one page. The "Does not turn off" column of--dashboard-retentionand size limits listsdeclaration_text. The Dashboard-database row, which this PR edits, says "Retention, a size trim, an archive move and an account purge remove it when the last declaration that names it goes." After this PR the table cell is false: every deletion path goes throughDELETE FROM requests(dash/store.go:883, dash/store.go:1365), and the new trigger fires on each. - Proof:
grep -n "dashboard-retention" docs/data-dependence.md→ line 389 listsdeclaration_textunder "Does not turn off". The PR diff touchesfeatures/dashboard-database.mdand the generated page's row, but notpage.md.tmpl. The data-dependence page is the record CLAUDE.md mandates for what each switch deletes, and this PR's whole change is that deletion behavior. - Fix: edit the
--dashboard-retentioncell indocs/data-dependence/page.md.tmpl(dropdeclaration_textfrom "Does not turn off", or say it follows the declarations). Rungo run ./cmd/gen-datadep. Commit the template and the regenerated page.
- What fails: a user reads
Non-blocking
docs/data-dependence/page.md.tmpl:238(generated page line 296): audit finding 3 still says "Nothing deletesdeclaration_text". The section is a dated record of the audit at commit 2a7a86f, so leaving it is defensible. But this PR closes that finding (#689). A short "fixed by #689" note would stop the page disagreeing with itself.dash/dedupetext_test.go:461-465: the comment onTestWriterForgetsTextFromARolledBackTransactionstill explainsinvWriter.storedText. This PR removes that field. A reader looks for a field that is gone.dash/schema.go:778: the comment says "the delete above counts the other users first". The trigger lives below the table comment, inadditiveDDL2. "Above" points the wrong way.- Perf, acknowledged: the memo removal re-issues one
INSERT ... ON CONFLICT DO NOTHINGper distinct text per transaction. The removed comment measured ~87k such inserts over the corpus, each binding a kilobyte or two. The code comment and the PR body state the reason (a memo would point at purged bytes). The cost is a conflict discard. Acceptable.
What I checked
- Full diff, all 7 files, and the code around each change.
- Trigger correctness. The text delete runs before the declaration delete, in one statement. The "other user" check is scoped by (tenant, session), which matches the writer's key. Shared text survives a purge of one namer. Tests cover same-tenant and cross-tenant sharing.
- Deletion paths. Every path that removes a session deletes from
requests: dash/archive.go:346, dash/janitor.go:416, dash/purge.go:143, dash/store.go:883, 1135, 1365, 1499, dash/schema.go:1155. The trigger covers each. The PR body's "no new delete path" claim holds. - Fail-open and the read invariant. The writer stores text and its naming rows in one transaction. The trigger removes text and its namers in one statement. The sweep removes only rows no declaration names. So no committed state names a hash whose bytes are gone, and the reader (
declTextJoin, a LEFT JOIN with COALESCE) tolerates a missing row anyway. A sweep failure logs a warning and the recorder starts anyway. - Sweep placement. It runs in
dedupeLoop(dash/capture.go:347) at every recorder start, before the dedupe backfill. The dedupe marker's short-circuit sits insidededupeDeclarationText, after the sweep, so the sweep runs even on databases whose backfill is done. - Writer memo removal. No code references
storedTextorrememberTextafter the change. The rolled-back-transaction test keeps its database-level assertion. The restore-after-purge test covers the case the memo would have broken. - Old databases.
additiveDDL2runs on every open, on both paths, so the DROP plus CREATE replaces the old trigger.OpenReadOnlyruns no DDL, so the unconditional DROP does not break read-only opens.TestOpenReplacesTheOldInventoryTriggercovers the replacement. - Data dependence. The new paragraph matches byte-for-byte between
features/dashboard-database.mdand the generated page. The level does not change; only the deletion time does. The row-file procedure was followed, except for the template cell in finding 1. - Host boundary and client rules. The change extends the dash database's own schema and lifecycle. No Cortex-visible behaviour, no client rules, no route-path lookups.
- Behavior change. The PR names it at the top, with old and new behavior and how to turn it off. Round 1: I did not read the PR comments, so I cannot confirm the human yes is recorded. Merge requires it.
- Tests were not run. Live tests are not approved for this review.
amiddavid
commented
Nov 26, 2026
amiddavid
left a comment
Collaborator
Author
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 | 767d6bc45f71 |
blocking |
Verdict: blocking
Findings
-
dash/schema.go:850 — the recreated trigger can fail a concurrent open, and a failed open hides all history
- What fails: two processes run
dash.Openon the same file at the same time (a proxy restart whilecmd/cg-backfill-projectstarts, or two proxy instances on one file).additiveDDL2runsDROP TRIGGERandCREATE TRIGGERas two separate auto-committed statements. If both processes run their DROP before either runs its CREATE, the second CREATE fails with "trigger trg_tool_inventory_gc already exists".migratereturns the error,Openfails, andNewRecorder(dash/capture.go:273) falls back to an in-memory database. The dashboard then looks healthy and records nothing to disk. - Proof: dash/schema.go:849-850 issues
DROP TRIGGER IF EXISTSthen a bareCREATE TRIGGER. modernc.org/sqlite executes the multi-statement string statement by statement, each in its own auto-commit, so SQLite's write lock serializes single statements, not the pair. The codebase already treats this exact case as real:runImportedHistoryPurge(dash/schema.go:1158) usesINSERT OR IGNOREbecause "two processes opening the same old database" happens, and the schema comments call the in-memory fallback the worst outcome ("the dashboard comes up looking healthy with every row of history gone. Observed doing exactly that."). The window is narrow — the two statements sit microseconds apart — but the fix costs nothing. - Fix: write
CREATE TRIGGER IF NOT EXISTS trg_tool_inventory_gc .... The DROP above still replaces an old build's trigger; the IF NOT EXISTS only stops a second process from failing on the first one's identical trigger.
- What fails: two processes run
-
dash/dedupetext.go:263 — the dedupe backfill now aborts its pass when the new trigger deletes a hash between its two transactions
- What fails: the backfill migrates a session's rows (tx 1 inserts
declaration_textand setstext_hash). Before tx 2 verifies and clears, a concurrent retention or purge pass deletes that session's last request row. The new trigger then removes the text row too, because no other declaration names it. Tx 2's read (SELECT text_gz FROM declaration_text WHERE hash = ?) returnssql.ErrNoRows, anddedupeOneBatchreturns it as an error.dedupeDeclarationTextstops the whole pass and logs "stopped early". Before this PR nothing deleted fromdeclaration_text, so this error path was unreachable. - Proof: dash/dedupetext.go:262-265 returns the scan error. The design comment at dash/dedupetext.go:248-251 says a row that "was deleted by the GC trigger" between the two transactions "is not an error" — but that comment covers the
tool_declarationsrow; the code now also loses thedeclaration_textrow and takes the error path. The rows the backfill walks are the oldest (rowidorder), which is exactly what retention deletes, so the overlap is more likely than random. No data is lost and the next start resumes, but the migration can stop early on every start while retention runs, and the code's own stated intent is to skip, not abort. - Fix: treat
sql.ErrNoRowsfrom that read as "the row went with its session": skip the row (do not clear) and continue the batch.
- What fails: the backfill migrates a session's rows (tx 1 inserts
Non-blocking
- dash/dedupetext_test.go:460-468 — the comment describes the removed
storedTextmemo. The test still asserts the right things, but its doc paragraph explains machinery this PR deleted. Rewrite it around the per-transactiondonemap. - Writer cost of the removed memo (dash/toolinventory.go:977-989). Every transaction now re-issues one
INSERT ... ON CONFLICT DO NOTHINGper distinct text, binding the gzip blob each time. The removed comment measured ~87k such inserts over the corpus. This runs on the background writer goroutine, so it does not touch the request path, and the trade is required for correctness (a memo would point at purged bytes). Worth a line in the PR, not a change. - Orphans from writer lag wait for the next start. A capture that lands after retention deleted its session's request rows writes declarations and text that nothing names. The sweep only runs at start. Bounded and small, but it is a steady source, not only the "rows orphaned before this rule" the comments name.
- The human's yes for the behavior change. The PR names the change at the top, as the rules ask. Round 1 forbids me to read PR comments, so I could not verify that a human said yes. The integrator should check that before merge.
What I checked
- Read the full diff and the code around each change:
dash/schema.go,dash/toolinventory.go,dash/dedupetext.go, the new test file, and both docs files. - Traced every
DELETE FROM requestspath against the new trigger: retention (PruneWith), the size rule (pruneBySize,DropOldestSessions), disk-pressure eviction (evictSessions, both the archive and the delete fallback), the archive moves (ArchiveSessionContent,ArchiveSessionFull),PurgeTenant,trimTenantToQuota, and the imported-history purge. All fire the trigger; none deletestool_declarationsbeforerequests, so the trigger's subquery always sees the session's own rows. The archive objects hold request events only, so no reachable data is lost on an archive move. - Checked the trigger's SQL semantics: the text delete runs before the declaration delete inside one trigger body; the NOT EXISTS probe excludes the dying session's own rows by (tenant, session); NULL text hashes are filtered; the new partial index
idx_tooldecl_text_hashcovers the probe, andaddColumnsaddstext_hashbeforeadditiveDDL2runs, on both the fresh and the existing-database path. - Checked the writer invariant the PR relies on: blob-first insert order, the per-transaction
donemap, andON CONFLICT DO NOTHING. A text row deleted between two writer transactions is re-inserted before any declaration names it, so no committed state points at missing bytes. The memo removal is required for this, not just safe. - Checked the sweep: it runs before the dedupe backfill on the shared migrations goroutine, and its single DELETE cannot observe the writer's half-committed state (SQLite allows one writer at a time).
- Checked the open/upgrade path:
migraterunsadditiveDDL(createsdeclaration_text) beforeadditiveDDL2on both paths, andmigrateToolUsesProject's trigger drop is still followed byadditiveDDL2's create. - Read the new tests and the helpers they use (
storedTextsreads through the same join the reveal serves, so the assertions test the real read path). - Checked the data-dependence rule: the row file
docs/data-dependence/features/dashboard-database.mdand the regenerated page carry the same new paragraph, the level does not change, and the PR says so at the top. - Read the PR description (not the reviews or comments). Did not run builds or tests; live tests are not approved for this review.
- Create the GC trigger with IF NOT EXISTS after the DROP, so two concurrent opens do not fail. - The dedupe backfill skips a row whose text the trigger removed between its two transactions, and keeps the batch. - The data-dependence page no longer says nothing deletes declaration_text; audit finding 3 is marked fixed by #689. - Fix two stale comments. Make the retention test count orphan rows in the table, so it fails on the old trigger. Refs #689 Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
Collaborator
Author
|
Round 1 replies. All findings are fixed in Reviewer 1
Reviewer 2
Extra check: the new tests fail on the old trigger.
Tests: |
amiddavid
commented
Nov 26, 2026
amiddavid
left a comment
Collaborator
Author
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 | 6836874881d8 |
approve |
Verdict: approve
Findings
None. Both round-1 findings are fixed and verified. No new defect in the new commit.
Earlier findings
- Reviewer 1, finding 1 (dash/schema.go:850, concurrent open fails on the trigger CREATE): fixed. The DDL is now
DROP TRIGGER IF EXISTSthenCREATE TRIGGER IF NOT EXISTS(dash/schema.go:850-851). I checked every interleaving of two concurrent opens: each process drops first, so no old trigger survives, and the second CREATE is now a no-op instead of an error. A failedmigrateand the in-memory fallback can no longer come from this pair. The new comment states both reasons for the DROP-plus-IF-NOT-EXISTS shape, and it is accurate. - Reviewer 1, finding 2 (dash/dedupetext.go:263, the backfill aborted when the trigger removed a hash between its transactions): fixed. The verify read now treats
sql.ErrNoRowsas "the row went with its session" and skips it, keeping the batch (dash/dedupetext.go:266-271). I checked the skip is safe in both states it can meet: if the declaration row is gone (the normal case — the same trigger statement that removed the hash removed the row), there is nothing to clear; if the row somehow survives, itstext_gzwas not cleared, so the reader'sCOALESCE(t.text_gz, d.text_gz)still serves the text. The new test drives the real trigger through a seam between the two transactions and fails with "the batch aborted" without the fix. - Reviewer 1, non-blocking items: addressed. The stale
storedTextcomment onTestWriterForgetsTextFromARolledBackTransactionis rewritten around the no-memo design. The PR body now states the writer cost and the writer-lag orphans. - Reviewer 2, finding 1 (docs/data-dependence/page.md.tmpl:331, the switch table still listed
declaration_textunder "Does not turn off" for retention and size limits): fixed. The cell now lists onlytenant_spendandarchived_sessions, and the regenerateddocs/data-dependence.mdcarries the identical change. I checked both hunks match each other. - Reviewer 2, non-blocking items: addressed. Audit finding 3 in the template and the page now says "Fixed by #689". The schema.go comment says "the delete below", which is the right direction. The test comment is rewritten (same item as mine).
New code in this commit
TestBackfillSkipsATextRowTheTriggerRemoved(dash/dedupetext_test.go:518-542): sound. It seeds two legacy rows, deletes one session's requests through the real trigger via the seam, and asserts the batch completes and the surviving row migrates. I traced the hashes: only the "gone" session names its hash, so the trigger removes it, the read misses, and the skip path runs.dedupeAfterCommit(dash/dedupetext.go:300-301): acceptable. A package-level test seam, nil in production, commented as a seam, reset by a defer in the test. Not a defect.- The strengthened retention test (dash/declarationtextpurge_test.go:54-64): correct and stronger. Counting orphan rows in
declaration_textitself closes the gap the author found — the reveal goes through declaration rows, which are gone under both triggers, so the old assertion could not see an orphaned text row. TheNOT INsubquery filterstext_hash IS NOT NULL, so NULLs cannot make the predicate never-true.
Non-blocking
- The human's yes for the behavior change is still not visible in the conversation. The PR names the change at the top, as the rules ask. The round-1 replies come from the PR author's account, so I cannot tell a human's yes from a session's reply. The integrator should confirm it before merge, as both round-1 reviews asked.
- The
DROP+CREATEpair leaves the database with no GC trigger for the microseconds between the two statements. ADELETE FROM requestsin that window would skip the inventory cleanup once. The next open recreates the trigger, and the start-up sweep plus the per-session trigger catch up. Not worth a change.
What I checked
- Last review: round 1, 767d6bc, 2026-11-26T15:16:23Z.
- New commits read: 1 —
68368748"fix(dash): address review round 1 on declaration_text purge". - Read in full: 2 reviews, 1 comment, 0 inline comments (from
.review-in-reviews.txt,.review-in-comments.txt,.review-in-inline.txt). - New items since my last review, and what I did about each:
- Commit
68368748(17:22): read the full diff and the final state of each changed file at the new head. Reviewed above; no new finding. - Comment by amiddavid at 15:23:04Z (round-1 replies): checked each claim against the code. The "fixed" claims for both reviewers' findings hold. The "the retention test passed on the old trigger at first" observation matches the gap the stronger assertion closes.
- PR body update: the two new bullets (writer cost, writer lag) match the code.
- Commit
- Verified the fix sites in the working tree at the new head: the trigger DDL (dash/schema.go:849-851) and the
ErrNoRowsskip (dash/dedupetext.go:266-271). - Confirmed the template and the generated data-dependence page agree with each other and with the code's new deletion behavior.
- Did not run builds or tests; live tests are not approved for this review.
amiddavid
commented
Nov 26, 2026
amiddavid
left a comment
Collaborator
Author
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 | 6836874881d8 |
approve |
Verdict: approve
Findings
None.
Earlier findings
- Mine, round 1 (page.md.tmpl:331, retention cell): fixed. Both the template and the generated page drop
declaration_textfrom "Does not turn off" for--dashboard-retentionand size limits (page.md.tmpl:329, docs/data-dependence.md:390). The two edits are identical, so the generator stays in sync. The remainingdeclaration_textmentions on the page are the fixed audit finding and the--dashboard-contentcell, both correct. - My non-blocking items: all fixed. Audit finding 3 now reads "Fixed by #689" with accurate wording. The schema comment says "below", not "above". The stale
storedTexttest comment is rewritten around the current design. The PR body now states the writer cost and the writer-lag orphans. - Reviewer 1, finding 1 (concurrent open fails on the bare CREATE): fixed, and I checked it myself. The fix is
DROP TRIGGER IF EXISTSthenCREATE TRIGGER IF NOT EXISTS(dash/schema.go:852-853). Convergence argument: each process runs its DROP before its own CREATE, so in any interleaving of two processes the last statement is a CREATE IF NOT EXISTS, which cannot fail on existence. Every CREATE uses the new body, and both DROPs run, so an old-build trigger cannot survive. A brief window with no trigger remains (one process's DROP can remove the other's fresh trigger before its own CREATE). A purge in that window leaves an orphaned text row, which the next start's sweep removes. Fail-open and bounded. Not a defect. - Reviewer 1, finding 2 (backfill aborts when the trigger removes a text row between its two transactions): fixed, and I checked it myself. The verify read now treats
sql.ErrNoRowsas "the row went with its session" and skips it (dash/dedupetext.go:268-273). Placement is right: thehashes[i] == ""check comes first, and the skip is before the compare and the clear. The skipped row's declaration row is deleted by the same trigger statement that deleted the text, so nothing dangles. Even in a mismatch case the skip does not cleartext_gz, so the row keeps its own blob and reads fine through the COALESCE. The sweep cannot race the backfill the same way: tx 1 commits the namer and the text together, so another process's sweep sees the namer. The new testTestBackfillSkipsATextRowTheTriggerRemoveddrives the exact window through a seam between the two transactions.
Non-blocking
- The human yes for the behavior change is still not recorded in the PR conversation. The PR names the change at the top and asks for the yes. The integrator should confirm it before merge.
dedupeAfterCommit(dash/dedupetext.go:301) is a package-level var with no lock. Safe today: no dash test callst.Parallel(), and only one test sets it, synchronously. Worth a lock or aDBfield if a second test ever uses it in parallel.
What I checked
- Last review: round 1, 767d6bc, 2026-11-26T15:15:23Z.
- New commits read: 1 (
6836874"fix(dash): address review round 1 on declaration_text purge"). - Read in full: 2 reviews, 1 comment, 0 inline comments (from the three files in my folder).
- New items since my last review: the fix commit, reviewer 1's round-1 review (2 findings, 4 non-blocking), and the author's reply comment. I verified each fix myself; see "Earlier findings".
- The fix commit, file by file:
dash/schema.go: DROP plus CREATE IF NOT EXISTS, comment updated. Verified the convergence argument above.dash/dedupetext.go: the ErrNoRows skip and the test seam. Verified the placement, the dangling-row argument, and that the skip cannot clear a blob it did not verify. Theerrorsimport is used.dash/dedupetext_test.go: the rewritten comment is accurate. The new test's seam fires between the two transactions, deletes one session's requests, and the trigger removes that session's declarations and its text. The assertion checks the surviving session's row was migrated. The seam is reset with a defer.dash/declarationtextpurge_test.go: the retention test now counts orphan rows indeclaration_textdirectly, so it fails on the old trigger. The SQL filters NULLtext_hashin the subquery, soNOT INis safe.docs/data-dependence/page.md.tmplanddocs/data-dependence.md: identical edits in both, so the generated page matches its source. All remainingdeclaration_textmentions on the page are correct.
- Re-checked the full PR diff against base for anything the fix commit could have broken: the trigger body, the index, the sweep, and the writer are unchanged from the head I reviewed in round 1.
- PR body re-read: it now states the writer cost and the writer-lag orphans, as the author's comment claims.
- Tests were not run. Live tests are not approved for this review.
amiddavid
added a commit
that referenced
this pull request
Nov 26, 2026
Only the generated docs/data-dependence.md conflicted, after #1472. It is regenerated with go run ./cmd/gen-datadep. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Behavior change: needs a human yes.
declaration_textfor ever. Retention and an account purge did not remove them.trg_tool_inventory_gc(dash/schema.go) to restore the old behavior.Summary
Closes #689. Stored prompt text is customer data. It now follows the request rows it came from.
What changed
Trigger.
trg_tool_inventory_gcnow deletesdeclaration_textrows first. It deletes a row only when no other (tenant, session) declaration row names the same hash. A shared row stays.One path for all deletions. Retention, size trim, archive and account purge all delete from
requests. The trigger covers all of them. No new delete path.Old databases. The trigger is dropped and created again on open.
CREATE IF NOT EXISTSwould keep the old one.Index. New partial index
idx_tooldecl_text_hashmakes the "still named?" check cheap.Start-up sweep.
sweepOrphanDeclarationTextremoves rows already orphaned. It runs once before the dedupe backfill.Writer memo removed.
invWriter.storedTextassumed nothing deletes fromdeclaration_text. That is no longer true. The writer now runs oneINSERT ... ON CONFLICT DO NOTHINGper distinct text per transaction.Data dependence. The row
dashboard-databasesays when the text is deleted. The level does not change.docs/data-dependence.mdis regenerated.Writer cost. One
INSERT ... ON CONFLICT DO NOTHINGper distinct text per transaction, on the background writer only.Writer lag. An orphan row from a late write waits for the next start sweep.
How a row still in use is kept
How it was tested
Local tests: waived (owner rule)
macOS, Go 1.27.4, no
-race:go test ./dash/ -run 'DeclarationText|PartialTrim|PurgeTenantRemoves|WriterRestores|SweepRemoves|OpenReplaces|Retention|WriterForgets|Dedupe'passes.go test ./dash/passes (92 s).dash/declarationtextpurge_test.go: retention removes text and keeps shared text. A partial trim keeps text. A purge removes one account and keeps shared text. The writer stores text again after a purge. The sweep removes only orphans. An old trigger is replaced on open.Open questions