Commit graph

9 commits

Author SHA1 Message Date
matt wilkie
ad285ada1a fix: include comment bodies in export and fix same-second dedup on import (#3009)
Fixes data-loss: exports now retain comment bodies. Import dedup now includes comment text to prevent same-second collision. Conflict in export.go resolved (allComments→commentsMap). Thanks to the contributor!

Co-authored-by: sms <223721492+s070681@users.noreply.github.com>
2026-04-05 17:37:53 -07:00
matt wilkie
299b5f620f
fix: use ResolveCustomTypesInTx in create path to honor YAML custom types (GH#2793) (#2930)
* fix: use ResolveCustomTypesInTx in create path to honor YAML custom types (GH#2793)

* fix(lint): suppress gosec G122 false positive in noms LOCK cleanup

Amp-Thread-ID: https://ampcode.com/threads/T-019d4484-6dd9-753d-ac34-ce51db572a4f
Co-authored-by: Amp <amp@ampcode.com>

* fix: handle JSON array format in ResolveCustomTypesInTx (fixes gate test)

Amp-Thread-ID: https://ampcode.com/threads/T-019d4484-6dd9-753d-ac34-ce51db572a4f
Co-authored-by: Amp <amp@ampcode.com>

* ci: trigger re-run

Amp-Thread-ID: https://ampcode.com/threads/T-019d4484-6dd9-753d-ac34-ce51db572a4f
Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-03-31 12:49:41 -07:00
coffeegoddd☕️✨
c36c5fcaca /{cmd,internal}: maybe create 2026-03-17 16:24:24 -07:00
beads/crew/emma
de5f0b986a Merge PR #2622: feat: add --no-history flag to separate Dolt commit skipping from GC eligibility
Separates two concerns bundled by --ephemeral: skipping Dolt commit
history and GC eligibility. NoHistory beads route to wisps table
(no DOLT_COMMIT) but remain non-GC-eligible. Fixes agent identity
beads being incorrectly garbage collected.

Also adds --exclude-type to wisp gc, --type filter to wisp list,
and fixes ExcludeTypes self-join subquery.

Closes #2619

PR: https://github.com/steveyegge/beads/pull/2622
Author: mmlac
2026-03-15 18:33:32 -07:00
mayor
869cc17fcd feat: add --no-history flag to bd create — skip Dolt commits without 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/beads#2619
Refs: steveyegge/gastown#2768

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 19:28:48 +00:00
human
fca3d3cd47 fix: complete UUID primary keys cleanup across codebase
Follow-up to 1ce765ee (UUID primary keys for federation-safe events).
The core migration changed types and schema, but many files still
referenced the old AUTO_INCREMENT design. This commit makes the
codebase internally consistent:

- Update embedded Dolt schema SQL files to use CHAR(36) UUID PKs
- Fix backup restore: json.Number -> string for UUID event/comment IDs
  (fixes TestBackupRestoreRoundTrip)
- Remove dead LastEventID field from backup state (never set)
- Update comments in issueops/create.go, import test, git_remote_test
- Update docs/audit-sync-mode-complexity.md (mark auto-increment resolved)
- Update version history in info.go

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 10:12:04 -07:00
Patrick Farrell
ef654a9957 fix: prevent comment duplication on re-import
PersistComments uses an auto-increment PK, so ON DUPLICATE KEY UPDATE
never fires — every re-import blindly creates duplicate comment rows.

Fix: check for existing identical comment (same issue_id, author,
created_at) before inserting. Skip if already present.

Adds regression test: re-import with comments must not duplicate them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 17:32:39 -07:00
coffeegoddd☕️✨
c0a702aa4a /internal/storage/{embeddeddolt,issueops}: pr feedback 2026-03-12 17:06:06 -07:00
coffeegoddd☕️✨
c07a3cd33c /internal/storage/{embeddeddolt,issueops}: add issueops helper to use in both stores 2026-03-12 16:27:23 -07:00