fix(spec-hygiene): project only active campaigns into active.json (campaign GC) - #283
Merged
Merged
Conversation
…mpaign GC) _rebuild_active_projection wrote every campaign group — including complete and cancelled ones — into state/campaigns/active.json, the projection OperatorConsole's campaign pane reads. Terminal campaigns are history (their record lives in Plane), but they accumulated in the projection forever, so the status pane filled with finished campaigns (observed: 11 records, 10 terminal, 0 genuinely active). Skip non-active campaigns when rebuilding the projection so active.json reflects only in-flight work. A one-time manual prune of active.json does not stick — the file is rebuilt every spec-hygiene cycle — so this projection filter is the durable prune. +1 test (a mix of active/cancelled/done issues → only the active one is projected). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
_rebuild_active_projectionwrote every campaign group — includingcompleteandcancelledones — intostate/campaigns/active.json, the projection OperatorConsole's campaign pane reads. Terminal campaigns are history (their record lives in Plane), but they accumulated forever, so the status pane filled with finished campaigns.Observed live: 11 campaign records — 9 cancelled, 1 complete, 1 stale-"active" (already done, spec merged as #266), 0 genuinely active.
Fix
Skip non-
activecampaigns when rebuilding the projection, soactive.jsonreflects only in-flight work.Why not a one-time prune?
active.jsonis rebuilt every spec-hygiene cycle from Plane, so a manual edit is overwritten within minutes. The projection filter is the durable prune — once this lands and the spec watcher picks it up, the pane drops the 10 terminal records automatically.Test
+1: a mix of active / cancelled / done campaign issues → only the active one is projected. Full spec-hygiene + spec_author suites pass; audit clean;ruffclean.🤖 Generated with Claude Code