Skip to content

Implement file-backed repositories via .store files#623

Open
KrisSimon wants to merge 1 commit intomainfrom
migrate-open-223
Open

Implement file-backed repositories via .store files#623
KrisSimon wants to merge 1 commit intomainfrom
migrate-open-223

Conversation

@KrisSimon
Copy link
Copy Markdown
Member

Migrated from GitLab MR !223 (open)
feature/store-files-178main
Originally created: 2026-04-02
Author: Kris Simon
Labels: 0.9

Summary

Implements #178 — file-backed repositories via .store files.

  • .store files are YAML files that automatically seed repositories at startup
  • File permissions control writability: chmod o+w enables write-back
  • Write-back uses debounced (1s) atomic writes via temp file + rename
  • aro build rejects writable stores (can't write back into a binary)

Changes

  • Sources/ARORuntime/Store/StoreFileLoader.swift — Discovers and parses .store files
  • Sources/ARORuntime/Store/StoreFlushService.swift — Actor-based write-back with debounce
  • Sources/ARORuntime/Application/Application.swift — Seeds repositories before Application-Start, flush on shutdown
  • Sources/ARORuntime/FileSystem/FormatDeserializer.swift — Fix YAML array parser for multi-line objects
  • Sources/AROCLI/Commands/RunCommand.swift — Verbose logging for store files
  • Sources/AROCLI/Commands/BuildCommand.swift — Reject writable stores at build time
  • Examples/StoreFileDemo/ — Example with read-only product catalog
  • Tests/AROuntimeTests/StoreFileTests.swift — 19 tests (loader, flush, integration)
  • Proposals/ARO-0073-store-files.md — Formal proposal
  • Book/TheLanguageGuide/Chapter36-Repositories.md — Store files section added
  • Wiki — New Guide-Store-Files page, updated Guide-Repositories and sidebar

Test plan

  • swift build passes
  • swift test --filter StoreFile — 19/19 tests pass
  • swift test --filter RepositoryStorage — no regression (19/19 pass)
  • swift test --filter FormatSerializer — no regression (23/23 pass)
  • swift run aro run ./Examples/StoreFileDemo — output matches expected.txt
  • Integration test suite (perl t/run_tests.pl)

Closes #178

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.

Integration test: Enable EventExample test

1 participant