Skip to content

fix: atomic counter increment + gitignore overhaul (GH#2067)#2123

Merged
steveyegge merged 2 commits intomainfrom
fix-merge/2067-counter-mode-followup
Feb 26, 2026
Merged

fix: atomic counter increment + gitignore overhaul (GH#2067)#2123
steveyegge merged 2 commits intomainfrom
fix-merge/2067-counter-mode-followup

Conversation

@steveyegge
Copy link
Owner

Summary

Fix-merge of PR #2067 (follow-up to GH#2002 counter-mode review by @gm2211), which had merge conflicts with current main.

  • Critical race fix: Replace read-increment-write pattern in nextCounterIDTx with atomic UPDATE SET last_id = last_id + 1 to prevent duplicate issue IDs under concurrent transactions (GH#2002)
  • .beads/.gitignore overhaul: Reorganized sections, added fork protection warning against negation patterns, added legacy file cleanup patterns (daemon logs, JSONL sync files)
  • Lint fixes: Added nolint:gosec annotations for legitimate dynamic path usage across doltserver, migrations, testutil, and scripts
  • Error handling: Fixed unchecked logFile.Close(), rows.Close(), and os.RemoveAll returns
  • Formatting: Cleaned up const block alignment in dolt.go

Changes from PR #2067 that were already on main (via prior merges) and skipped:

  • doltServerConfig signature cleanup (readOnly parameter removal)
  • doctor_test.go Platform map alignment
  • migration.go trailing newline removal
  • gitignore_test.go comment alignment
  • doltserver process-group refactoring (setDetachedProcessGroup -> procAttrDetached)
  • sysproc_unix.go / sysproc_windows.go (superseded by doltserver_unix.go / doltserver_windows.go)

Closes #2067

Test plan

  • go build ./... passes
  • go vet ./cmd/bd/ passes
  • Counter-mode tests pass (TestCreateIssue_CounterMode, TestCounterMode_SeedsFromExistingIssues, TestCounterMode_NoExistingIssues, etc.)
  • CI pipeline validates full test suite

Co-authored-by: gm2211 gm2211@users.noreply.github.com

🤖 Generated with Claude Code

beads/crew/jane and others added 2 commits February 25, 2026 11:05
Apply changes from PR #2067 (follow-up to GH#2002 counter-mode review by gm2211):

- Replace read-increment-write pattern in nextCounterIDTx with atomic
  UPDATE SET last_id = last_id + 1 to prevent duplicate IDs under
  concurrent transactions
- Overhaul .beads/.gitignore with fork protection warning, legacy file
  cleanup patterns, and reorganized sections
- Add nolint:gosec annotations for legitimate dynamic path usage
- Fix unchecked error returns (logFile.Close, rows.Close, os.RemoveAll)
- Clean up const block alignment in dolt.go

Co-authored-by: gm2211 <gm2211@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@steveyegge steveyegge merged commit 99f3d8d into main Feb 26, 2026
6 of 8 checks passed
@codecov-commenter
Copy link

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
4026 1 4025 451
View the full list of 1 ❄️ flaky test(s)
::TestMain

Flake rate in main: 100.00% (Passed 0 times, Failed 9 times)

Stack Traces | 0s run time
WARN: dolt not found in PATH, skipping test server
PASS
coverage: 17.7% of statements
ERROR: test suite modified repo .beads state:
- metadata.json: exists false → true

FAIL	github..../beads/cmd/bd	15.141s

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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.

2 participants