Skip to content

feat: add --no-history flag to separate Dolt commit skipping from GC eligibility#2622

Merged
steveyegge merged 1 commit intosteveyegge:mainfrom
mmlac:issue/2619
Mar 16, 2026
Merged

feat: add --no-history flag to separate Dolt commit skipping from GC eligibility#2622
steveyegge merged 1 commit intosteveyegge:mainfrom
mmlac:issue/2619

Conversation

@mmlac
Copy link
Contributor

@mmlac mmlac commented Mar 15, 2026

Summary

  • Adds --no-history flag to bd create and bd update that routes beads to the wisps table (skipping DOLT_COMMIT) while keeping them non-GC-eligible (ephemeral=0)
  • Adds --history flag to bd update to undo --no-history (symmetric with --ephemeral/--persistent)
  • Adds --exclude-type flag to bd mol wisp gc and --type filter to bd mol wisp list
  • Includes type/labels in wisp list JSON output
  • Moves ephemeral/no-history mutual exclusion validation to Issue.ValidateWithCustom
  • Handles table migration (issues ↔ wisps) when toggling --no-history or --ephemeral on update
  • Fixes ExcludeTypes filter inefficient self-join subquery
  • Ensures JSONL export/import preserves no_history field
  • Removes dead AllEphemeral function (replaced by AllWisps)
  • Migration 011 adds no_history column to both issues and wisps tables

Motivation: --ephemeral bundles "no git history" with "GC-eligible", causing agent identity beads to be incorrectly garbage collected. This separates the two concerns.

Closes #2619
Refs: steveyegge/gastown#2768

Test plan

  • TestWispGC_SkipsNoHistoryBeads — verifies GC filter excludes NoHistory beads
  • CLI tests for bd create --no-history, wisp gc --exclude-type, wisp list --type
  • TestDemoteToWisp — table migration on update
  • JSONL export/import roundtrip test for no_history field
  • Validation test for ephemeral/no-history mutual exclusion

🤖 Generated with Claude Code

…GC eligibility

Separates "no git history" from "garbage-collectible" for beads stored in the
wisps table. Previously --ephemeral bundled both behaviors, causing agent identity
beads to be incorrectly GC'd.

Changes:
- Add NoHistory field to types.Issue and wisps/issues schema (migration 011)
- Route NoHistory issues to wisps table, skip DOLT_COMMIT, but leave ephemeral=0
- Wire --no-history flag in bd create and bd update (with --history to undo)
- Add --exclude-type flag to bd mol wisp gc
- Add --type filter flag to bd mol wisp list
- Include type and labels in wisp list JSON output
- Move ephemeral/no-history mutual exclusion to validation layer
- Migrate issues between tables when --no-history/--ephemeral set on update
- Fix ExcludeTypes filter self-join subquery inefficiency
- Ensure JSONL export/import roundtrip preserves no_history
- Remove dead AllEphemeral function (superseded by AllWisps)
- Comprehensive test coverage for all new flags and edge cases

Resolves: steveyegge#2619
Refs: steveyegge/gastown#2768

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@steveyegge steveyegge merged commit de5f0b9 into steveyegge:main Mar 16, 2026
timvisher-dd added a commit to timvisher-dd/beads that referenced this pull request Mar 16, 2026
PR steveyegge#2622 added migration 011 (add_no_history_column) but did not bump
currentSchemaVersion. Databases already at version 7 take the fast path
in initSchemaOnDB and skip RunMigrations entirely, causing "column
no_history could not be found" errors on every bd command.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
timvisher-dd added a commit to timvisher-dd/beads that referenced this pull request Mar 16, 2026
PR steveyegge#2622 added migration 011 (add_no_history_column) but did not bump
currentSchemaVersion. Databases already at version 7 take the fast path
in initSchemaOnDB and skip RunMigrations entirely, causing "column
no_history could not be found" errors on every bd command.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: separate --no-history from --ephemeral; include type/labels in wisp list

2 participants