Skip to content

implement self-healing sync and deterministic hierarchy plan#46

Merged
rgonek merged 22 commits intomainfrom
feat/self-healing-sync-deterministic-hierarchy
Feb 27, 2026
Merged

implement self-healing sync and deterministic hierarchy plan#46
rgonek merged 22 commits intomainfrom
feat/self-healing-sync-deterministic-hierarchy

Conversation

@rgonek
Copy link
Owner

@rgonek rgonek commented Feb 26, 2026

Summary

  • add pull-time state self-healing for .confluence-state.json conflict-marker corruption, including remote/local index rebuild and persisted recovery
  • make push hierarchy deterministic by preferring index pages (X/X.md) over folders and collapsing folder parents when index pages are introduced
  • remove space frontmatter as a sync requirement, add dirty-deletion pull warnings, and introduce check-sync/repair-sync operational commands (with status/clean aliases)

Validation

  • make test
  • make lint

This commit renames the newly added subcommands to be more intuitive, matching familiar git CLI patterns. `conf check-sync` becomes `conf status` and `conf repair-sync` becomes `conf clean`.
The testing package forbids calling t.Parallel() in tests that also use t.Setenv or t.Chdir. Since many of our command tests use these process-global mutations, we must serialize them using the package-level mutex without marking them as parallel. This prevents the 'panic: testing: test using t.Setenv or t.Chdir can not use t.Parallel' seen in CI.
…t and fixing unused parameters

This commit fixes several linting issues in the new test files, including unused testing.T parameters and ensuring all process-global mutating tests correctly use the runParallelCommandTest lock.
This commit ensures all tests in the cmd package that use process-global state (like working directory or environment variables) correctly acquire the runParallelCommandTest lock, fixing potential flakiness and satisfying linting rules for unused testing.T.
@rgonek rgonek merged commit c079f43 into main Feb 27, 2026
2 checks passed
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.

1 participant