The replace directive never worked for \`go install\` (per \`go help install\`,
replace is not honored for install@version). Removing it fixes \`go install\`
on Linux/macOS; Windows was already broken and stays broken pending GH#3307.
Full analysis in gastownhall/beads#3303.
Use a patched fork of go-mysql-server that adds `!windows` to the CGO
regex build constraint. This ensures `go install ...@latest` on Windows
automatically selects the pure-Go regex backend instead of requiring
ICU C headers.
The fork contains a single two-line change:
- regex_cgo.go: `//go:build cgo && !windows && !gms_pure_go`
- regex_pure.go: `//go:build windows || gms_pure_go`
Upstream PR: https://github.com/dolthub/go-mysql-server/pull/3504
Once merged, this replace directive should be removed.
Closes#3013
Minor version bump. Supersedes Renovate PR #2789 which had unrelated
test failures from a stale branch.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaces the deprecated github.com/charmbracelet/lipgloss v1 with
charm.land/lipgloss/v2. Key changes:
- Import path: github.com/charmbracelet/lipgloss → charm.land/lipgloss/v2
- AdaptiveColor replaced with LightDark() for controlled background
detection (avoids compat package which probes terminal at init time,
reintroducing the OSC 11 leak from GH#1303)
- SetColorProfile() replaced with DisableColors() function that resets
all styles to plain text for hook/non-TTY contexts
- Colors and styles initialized in init() for controlled lifecycle
- Removes direct dependency on github.com/muesli/termenv
Supersedes Renovate PR #2841 which only updated go.mod without fixing
import paths or API changes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bd show --watch used fsnotify to watch the .beads directory for file
changes, but Dolt stores data in a server-side database — not files —
so file watchers never fired. The display never updated even when the
underlying bead changed status (e.g., to closed/done).
Switch to the same polling approach already used by bd list --watch:
query the database on a 2-second ticker and compare snapshots to detect
changes. This matches the pattern in watchIssues() (list.go:116-161).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Renovate bot dependency update. All CI checks pass.
Co-Authored-By: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add the internal/ado package implementing tracker.IssueTracker for Azure
DevOps. Provides bidirectional work item sync via the ADO REST API.
Core components:
- types.go: ADO API types, SecretString with redaction, field constants
- client.go: HTTP client with Basic auth, retry, WIQL query builder
- fieldmapper.go: configurable status/type/priority mapping
- mapping.go: bidirectional IssueToBeads/IssueToTracker conversion
- richtext.go: HTML<>Markdown conversion (goldmark + bluemonday)
- tracker.go: tracker.IssueTracker implementation with init() registration
- bootstrap.go: 4-tier deduplication for first sync
- reconcile.go: deletion detection via periodic reconciliation scan
- links.go: bidirectional link sync with direction normalization
Includes full test suite (218 tests, 92.8% coverage).
Fixes applied during fix-merge:
- errors.New() → fmt.Errorf() to match project conventions (6 instances)
- Added gosec nolint for configured API endpoint SSRF false positive
Co-Authored-By: Harry Miller <harry_miller@trimble.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Minor version bump: thinking-display-setting GA, request cancellation
during retry, model reference update.
Co-Authored-By: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrate from github.com/charmbracelet/huh v0.8 to charm.land/huh/v2.
Updated import path, theme API (ThemeFunc wrapper), and upgraded
transitive dependency charmbracelet/x/cellbuf to resolve API conflicts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrate from github.com/charmbracelet/glamour v1 to charm.land/glamour/v2.
Remove WithAutoStyle() (dark is now default in v2). Update import path.
Bumps go directive to 1.25.8 as required by glamour v2.
Closes renovate PR #2470.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Honorary major version bump with no breaking API changes.
Fix-merge of dependabot PR #2484 (merge conflict with main).
Co-Authored-By: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Manually applied since Renovate PR #2459 became unmergeable after
PR #2454 (x/sync) was merged first.
Co-Authored-By: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the SQLite in-memory test harness in store_unit_test.go with
the Dolt testcontainer infrastructure already used by other tests.
Rewrite doctor_health.go to connect to the Dolt server via MySQL
instead of opening a (broken) SQLite file path. This removes the
last consumer of github.com/ncruces/go-sqlite3.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace 1,046 lines of hand-rolled test server infrastructure (binary
spawning, flock coordination, PID files, zombie reaping) with Docker
testcontainers-go. Pinned to Dolt 1.43.0 due to upstream auth bug
(root@localhost vs root@%) on >= 1.44.
Preserves existing API surface (StartTestDoltServer, IsCrashed,
CrashError) so zero consumer changes needed. Adds new container-native
API (StartIsolatedDoltContainer, EnsureDoltContainerForTestMain,
RequireDoltContainer) matching gastown pattern.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/crew/emma
Rig: beads
Role: crew
Delete 4 sqlite_open CGO variant files (doctor/ and fix/), connstring.go
(SQLite URI builder), handleToSQLiteMigration stubs, and --to-sqlite CLI
flag. ncruces/go-sqlite3 stays in go.mod for extractFromSQLite() legacy
upgrade path.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(otel): comprehensive OpenTelemetry instrumentation
Phase 1 (telemetry foundation + SQL + CLI + AI):
- Add internal/telemetry package: Init/Shutdown, Tracer/Meter helpers,
stdout + OTLP/gRPC exporters, noop providers when disabled
- Add internal/telemetry/storage.go: InstrumentedStorage decorator for
SDK consumers with bd.storage.* counters and duration histograms
- Instrument DoltStore SQL layer (execContext, queryContext, queryRowContext)
with dolt.exec / dolt.query / dolt.query_row spans
- Instrument Anthropic API calls in compact/haiku.go and find_duplicates.go
with bd.ai.input_tokens, bd.ai.output_tokens, bd.ai.request.duration
- Add bd.command.<name> span in PersistentPreRun/PostRun with actor attribute
Phase 2 (VC ops, hooks, sync, metrics):
- Add dolt.commit / dolt.push / dolt.force_push / dolt.pull / dolt.branch /
dolt.checkout / dolt.merge spans for Dolt version-control procedures
(these bypass execContext so needed dedicated spans)
- Add bd.db.retry_count counter in withRetry (server mode retries)
- Add bd.db.lock_wait_ms histogram in AcquireAccessLock (flock contention)
- Add ephemeral.count / ephemeral.nuke spans for SQLite ephemeral store
- Add hook.exec spans in hooks_unix/windows runHook (background root spans)
- Add tracker.sync / tracker.pull / tracker.push / tracker.detect_conflicts
spans with per-phase stats attributes in tracker/engine.go
- Add bd.issue.count gauge (by status) in InstrumentedStorage.GetStatistics
- Fix: call initAIMetrics via sync.Once in newHaikuClient so ai metrics
are actually registered
Configuration:
BD_OTEL_ENABLED=true enable (default: off, zero overhead)
BD_OTEL_STDOUT=true write to stdout for dev/debug
OTEL_EXPORTER_OTLP_ENDPOINT=... ship to Jaeger/Grafana/Honeycomb/etc.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor(otel): align with VictoriaMetrics HTTP stack
- Switch metric exporter: gRPC → HTTP (otlpmetrichttp)
- Activation: BD_OTEL_METRICS_URL presence (no more BD_OTEL_ENABLED flag)
matches GT_OTEL_METRICS_URL convention from the local observability stack
- BD_OTEL_METRICS_URL=http://localhost:8428/opentelemetry/api/v1/push
- BD_OTEL_LOGS_URL=http://localhost:9428/insert/opentelemetry/v1/logs (reserved)
- Traces: stdout only (BD_OTEL_STDOUT=true); noop otherwise since VictoriaMetrics
is a metrics-only backend — no trace overhead in production
- Remove: otlptracegrpc, otlpmetricgrpc
- Update docs/OBSERVABILITY.md to match the diffusiontown README style
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(otel): capture hook stdout/stderr and bd.args in spans
- hook.exec span now records stdout and stderr as span events after
the hook process exits (including partial output on timeout)
- Output is truncated to 1024 bytes; the event carries both the text
(output) and the original size (bytes) as attributes
- bd.command.<name> span now includes bd.args with the raw CLI
arguments (e.g. "create 'title' -p 2")
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(otel): address review feedback — stale comment, span leak, hot-path alloc
1. Fix stale BD_OTEL_ENABLED comment in main.go (actual env vars are
BD_OTEL_METRICS_URL and BD_OTEL_STDOUT)
2. Use defer+named returns in Merge() to prevent span leaks
3. Cache doltSpanAttrs() via sync.Once to avoid per-call allocation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: beads/crew/emma <steve.yegge@gmail.com>