Add Linear round-trip fidelity integration test (#3187)#3199
Open
harry-miller-trimble wants to merge 10 commits intogastownhall:mainfrom
Open
Add Linear round-trip fidelity integration test (#3187)#3199harry-miller-trimble wants to merge 10 commits intogastownhall:mainfrom
harry-miller-trimble wants to merge 10 commits intogastownhall:mainfrom
Conversation
…#3187) Add TestLinearRoundTripCoreFields which verifies that a push→pull round-trip through Linear preserves title, description, priority, status, and external_ref. Uses a stateful mock GraphQL server that only stores what the client actually sends. Also adds TestLinearRoundTripRelationships as a skipped spec test documenting that parent-child, blocking deps, and issue type don't yet survive the round-trip (push doesn't send these fields). This becomes a regression gate when those features land. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add cross-project inbox infrastructure for the inbox pattern feature: - Migration 0027: CREATE TABLE beads_inbox with UUID PK, sender dedup constraint, imported/rejected/expires tracking, and JSON columns aligned with the issues table schema - InboxItem type in internal/types with full JSON serialization - InboxStore interface in internal/storage (separate sub-interface) - DoltStore CRUD: Add/Get/GetPending/MarkImported/MarkRejected/Clean/Count - EmbeddedDoltStore CRUD: matching implementation via withConn pattern - ON DUPLICATE KEY UPDATE semantics for idempotent resends Closes: bd-2pz Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bd send: deliver issues to other projects via shared Dolt server bd inbox: list/import/reject/clean pending inbox items Part of the cross-project inbox epic (bd-fhk). Closes bd-4sl, bd-vz8. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When pending inbox items exist, bd ready now shows: - JSON mode: adds inbox_pending count to response object - Text mode: appends notification with inbox commands Closes bd-ftn. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tests cover: add/get, idempotent resend, pending filtering,
import/reject marking, clean, count, and expiry filtering.
Fix: include inbox_id in INSERT, default empty labels/metadata
to valid JSON ([] and {}) to avoid Dolt JSON validation errors.
Closes bd-jls.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Covers bd send, bd inbox, bd ready integration, schema details, idempotent resends, import process, and example workflow. Closes bd-803. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Runs a polling loop that checks for pending inbox items and logs when the count changes. Useful for long-running server deployments. bd inbox watch # poll every 60s bd inbox watch --interval 30 # poll every 30s Closes bd-k3a. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1. SQL injection: validate --to flag against strict regex, use dedicated sql.Conn instead of pool, defer DB context restore on all paths 2. Dependency-aware import: serialize blocking deps in metadata during send, topological sort (Kahn's algorithm) on import 3. Atomic import: check GetIssueByExternalRef before creating to prevent duplicate issues on retry/crash 4. Fix resend test: verify title actually updated (was passing accidentally) Also: remove unsafe 'beads' fallback from getCurrentDatabase, add UUID generation for inbox items during send, batch all inserts into single DOLT_COMMIT in target. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1. Labels/metadata preserved: serialize labels to JSON during send, parse and AddLabel on import 2. Prefix lookup: GetInboxItemByPrefix with LIKE + LIMIT 2 for ambiguity detection; resolveInboxItem tries exact then prefix 3. --expires flag: bd send --expires 7d sets TTL via timeparsing 4. Federation scope: docs clarified as shared-server-only for now 5. Send transaction: already batched in P1 fix (single DOLT_COMMIT) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace all SQL NOW() with parameterized time.Now().UTC() in both DoltStore and EmbeddedDoltStore for consistent timezone behavior - Extract raw SQL from cmd/bd/send.go into DoltStore.SendToInbox() so CLI layer no longer touches raw DB connections - Add ValidateInboxItem() with max size limits (title 500, desc 100K, metadata 50K) enforced in AddInboxItem and SendToInbox - Add TestInboxSizeValidation covering all validation paths Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
7d574a0 to
2c2f95e
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
Summary
Implements the round-trip fidelity integration test requested in #3187.
What's included
TestLinearRoundTripCoreFields— Full push→pull integration test that:TestLinearRoundTripRelationships— Skipped spec test documenting that parent-child hierarchy, blocking dependencies, and issue type do not yet survive a round-trip (push doesn't send parent/relation/label fields). Becomes a regression gate when those features land.Mock server design
The
mockLinearServeris a statefulhttptest.Serverthat:Key design decisions
runLinearSyncbut avoids global state/flag noiseWhat's NOT asserted (documented gap)
Per the issue's assertion table, these fields are requested but push doesn't currently support them:
parentIdThe skipped spec test documents this gap and will automatically become a regression gate when those features are implemented.
Closes #3187