Skip to content

bundle: own lifecycle and update Anytype v0.12 - #75

Merged
grishy merged 7 commits into
mainfrom
sg-control-flow-improve
Jul 21, 2026
Merged

bundle: own lifecycle and update Anytype v0.12#75
grishy merged 7 commits into
mainfrom
sg-control-flow-improve

Conversation

@grishy

@grishy grishy commented Jul 20, 2026

Copy link
Copy Markdown
Owner
  • Give the bundle one lifecycle owner for startup, runtime failures, and shutdown. Services stop in reverse order; embedded MongoDB and Redis receive SIGTERM together, are always reaped, and unexpected exits fail the bundle.
  • Validate MongoDB, Redis, and S3 configuration at load and creation boundaries without rewriting operator values, hile preserving bundle format 1 compatibility.
  • Update Anytype modules for compatibility timestamp 1784291832, register the v0.12 coordinator invite store, retain upstream S3, and harden the bundle-owned Badger store's durability and goroutine shutdown.

This also aligns Go, Nix, Docker, CI, and contributor documentation with Go 1.26.4 and documents clean shutdown and backup behavior.

Closes #74
GPT5.6 Sol used

grishy added 6 commits July 20, 2026 15:04
Validate MongoDB URIs with the driver without rewriting operator-owned
values. Derive only the consensus URI owned by the bundle.

Cover the historical local and S3 shapes that share bundle format 1,
including compatibility defaults for region and storage limits.
Use one root cancellation path for startup, service failure, and embedded
process exits. Shut services down in reverse order, signal MongoDB and
Redis together, and always reap owned children.

Keep the application watchdog and Compose grace periods under one
shutdown policy while preserving startup and cleanup failures.
Keep tests for repository-owned storage and container boundaries while
removing duplicate checks of dependency behavior.

Exercise S3 request signing and the complete all-in-one shutdown path
instead of treating startup markers as sufficient proof.
Use Go 1.26.4 consistently across modules, containers, CI, and developer
documentation.

Give one Linux runner the race-enabled behavior gate while retaining
representative portability, release-build, Docker, and Nix coverage.
Describe the repository-owned lifecycle, configuration, storage, and
verification boundaries for contributors and agents.

Give operators the matching container stop timeout and require a
completed clean shutdown before backup. Limit the compatibility promise
to bundle configuration format 1.
Update the Anytype node modules to compatibility timestamp 1784291832 and
register the coordinator invite store required by the v0.12 bootstrap.

Keep the wrapper aligned with upstream component ownership by starting shared
transports last and retaining the composite filenode store lifecycle contract.
Make Badger acknowledgements durable, propagate deletion failures, and join its
GC goroutine before releasing the database.

Preserve exact operator cancellation during MongoDB initialization and validate
MongoDB, Redis, and S3 inputs with the same parsers used at runtime. Restore a
full-bundle custom-region S3 integration check and document clean backup and
shutdown bounds.

Refresh Go, Nix, Compose, and maintenance metadata for Go 1.26.4.

Closes #74
@grishy grishy self-assigned this Jul 20, 2026
@github-actions

Copy link
Copy Markdown

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/grishy/any-sync-bundle 0.00% (ø)
github.com/grishy/any-sync-bundle/cmd 22.00% (+10.24%) 🎉
github.com/grishy/any-sync-bundle/config 34.88% (+1.26%) 👍
github.com/grishy/any-sync-bundle/integration 0.00% (ø)
github.com/grishy/any-sync-bundle/lightcmp/lightfilenodestore 36.55% (+2.13%) 👍
github.com/grishy/any-sync-bundle/lightnode 4.38% (+0.73%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/grishy/any-sync-bundle/cmd/infra.go 31.21% (+31.21%) 705 (+705) 220 (+220) 485 (+485) 🌟
github.com/grishy/any-sync-bundle/cmd/mongo.go 25.11% (+25.11%) 235 (+35) 59 (+59) 176 (-24) 🌟
github.com/grishy/any-sync-bundle/cmd/root.go 0.00% (ø) 52 0 52
github.com/grishy/any-sync-bundle/cmd/services.go 40.05% (+40.05%) 437 (+437) 175 (+175) 262 (+262) 🌟
github.com/grishy/any-sync-bundle/cmd/start.go 0.75% (-14.51%) 534 (-711) 4 (-186) 530 (-525) 💀
github.com/grishy/any-sync-bundle/config/bundle.go 35.34% (+1.68%) 566 (+52) 200 (+27) 366 (+25) 👍
github.com/grishy/any-sync-bundle/integration/bundle.go 0.00% (ø) 0 0 0
github.com/grishy/any-sync-bundle/lightcmp/lightfilenodestore/store.go 36.86% (+2.18%) 605 (+11) 223 (+17) 382 (-6) 👍
github.com/grishy/any-sync-bundle/lightnode/anynodes.go 30.77% (+5.13%) 39 12 (+2) 27 (-2) 👍
github.com/grishy/any-sync-bundle/main.go 0.00% (ø) 62 (-2) 0 62 (-2)

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/grishy/any-sync-bundle/cmd/infra_process_test.go
  • github.com/grishy/any-sync-bundle/cmd/infra_test.go
  • github.com/grishy/any-sync-bundle/cmd/mongo_test.go
  • github.com/grishy/any-sync-bundle/cmd/services_test.go
  • github.com/grishy/any-sync-bundle/cmd/start_integration_test.go
  • github.com/grishy/any-sync-bundle/cmd/start_test.go
  • github.com/grishy/any-sync-bundle/config/bundle_test.go
  • github.com/grishy/any-sync-bundle/config/convert_test.go
  • github.com/grishy/any-sync-bundle/integration/integration_test.go
  • github.com/grishy/any-sync-bundle/lightcmp/lightfilenodestore/store_test.go
  • github.com/grishy/any-sync-bundle/lightnode/anynodes_test.go

@grishy
grishy merged commit a77818d into main Jul 21, 2026
13 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.

Update to Anytype release 1784291832

1 participant