fix(dreaming): version the topic map so an extractor fix reaches existing workspaces (v0.281.2) - #501
Merged
Merged
Conversation
…ting workspaces (v0.281.2) v0.281.1 fixed WHAT gets extracted as a topic, but `topics` is a cumulative map: counts compound across passes and decay only on a 21-day half-life. So on any workspace already running, the words the OLD extractor admitted keep their large counts and keep headlining the guidance line that rides in every agent's prompt. Live instapods: 300 stored topics led by drafts(61), sweep(59), automated(58) — all artefacts of one shouted prompt header, none of which the fix could remove. DreamState now carries `topicsVersion`. A state written by an older extractor has its map cleared and rebuilt from the current corpus. The reset runs BEFORE the no-activity early return, so a quiet workspace stops serving the stale line today rather than at its next busy pass. Audited `learning.topics.reset`. Verified against a copy of the live instapods state: 300 topics (version undefined) → 0 topics (version 2), guidance topic line drops until the map rebuilds. Every tenant self-heals on its next pass — no hand-edited databases. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Jul 31, 2026
fix(dreaming): drop opaque ids from topics; require a sample before the approval nag (v0.281.3)
#502
Merged
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.
Caught while verifying #500 on the live fleet: the extractor fix had no effect on any workspace that was already running.
state.topicsis a cumulative map — counts compound across passes and decay only on a 21-day half-life. Fixing what gets extracted doesn't remove what was already extracted. The live instapods state:Every one of those is an artefact of a single shouted prompt header (
AUTOMATED INCREMENTAL SUPPORT SWEEP …) that #500 stopped extracting — and every one would have kept headlining the guidance line in every agent's system prompt for weeks, being reinforced faster than it decayed.Fix
DreamStategainstopicsVersion. When a stored state's version is older thanTOPICS_VERSION, its topic map is cleared and rebuilt from the current corpus.The reset runs before the no-activity early return — otherwise a quiet workspace would keep serving the stale line until its next busy pass. Audited as
learning.topics.resetwith the dropped count.The alternative was hand-editing five production databases; this way every tenant (including insta-ai and expresstech, which nobody is looking at today) self-heals on its next pass, and the next extractor change is a one-line version bump.
Verified
Against a copy of the live instapods state:
The topic line disappearing until the map rebuilds is the intended behaviour: saying nothing is correct, saying
sweep, automated, draftswas not.137/137 governance + 18/18 tier-A policy.
🤖 Generated with Claude Code