beads/internal/tracker
Steve Yegge 792260c0a0 fix(tracker): repair sync engine bugs unmasked by born-failing engine tests (bd-578h9.1)
Six internal/tracker TestEngine* tests have failed since they were
introduced (083181e1e, fix-merge of PR #2759): locally they self-skip
unless the pinned dolt-sql-server image is cached, and CI only compiles
the package. The Dolt 2.1.4 bump made the cached image match again,
which is what surfaced them. Three were real engine bugs, now fixed:

- Sync() clobbered batch-push warnings: result.Warnings = e.warnings
  overwrote the BatchPushResult warnings appended a few lines earlier.
  Merge instead.
- dependencyIssueResolver never extracted the tracker identifier from
  the *queried* ref, so URL variants of the same issue (e.g. Linear
  URLs with and without the title slug) failed to resolve.
- A bidirectional sync echoed freshly pulled content straight back to
  the tracker: doPull now records created/updated IDs into skipPushIDs.

Plus a timestamp bug shown by the rerun tests: Dolt DATETIME rounds
sub-second values, so a pull's own write can land up to half a second
in the future of the last_sync recorded at sync end; the next pull
then misread the engine's own write as a local edit, skipped the
remote update, and advanced last_sync past it - permanently dropping
that remote change from incremental pulls. last_sync is now recorded
at the next whole second.

Test repairs: the mock tracker's BuildExternalRef now prefers
issue.URL like every real tracker (notion/linear/github), and two
stale tests seed last_sync via SetLocalMetadata, which is what the
engine reads, instead of SetConfig.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 10:26:36 -04:00
..
engine.go fix(tracker): repair sync engine bugs unmasked by born-failing engine tests (bd-578h9.1) 2026-06-11 10:26:36 -04:00
engine_ratelimit_test.go test: split tracker pure-go helpers (#4183) 2026-05-26 16:31:17 -07:00
engine_selective_test.go feat: add IssueIDs filter to SyncOptions for selective sync (#2957) 2026-04-05 22:24:47 -07:00
engine_test.go fix(tracker): repair sync engine bugs unmasked by born-failing engine tests (bd-578h9.1) 2026-06-11 10:26:36 -04:00
errors.go github: classify rate-limit 403s and stop the push loop when one hits (#3624) 2026-05-02 14:24:57 -07:00
multiproject.go feat: multi-project/team support for Linear, Jira, and ADO 2026-03-28 13:40:39 -07:00
multiproject_test.go feat: multi-project/team support for Linear, Jira, and ADO 2026-03-28 13:40:39 -07:00
registry.go feat: add plugin-based issue tracker framework (GH#1150) 2026-02-14 14:09:40 -08:00
registry_test.go feat: add plugin-based issue tracker framework (GH#1150) 2026-02-14 14:09:40 -08:00
test_helpers_pure_test.go fix(tracker): repair sync engine bugs unmasked by born-failing engine tests (bd-578h9.1) 2026-06-11 10:26:36 -04:00
testmain_test.go test: split tracker pure-go helpers (#4183) 2026-05-26 16:31:17 -07:00
tracker.go feat: reimplement Notion sync on REST data sources (fix-merge PR #2759) 2026-03-27 19:20:40 -07:00
types.go Document Linear external_ref pre-linking (#3517) 2026-04-27 06:05:30 -07:00