Skip to content

Bind actors use the module's storage root; only the daemon module recovers the call ledger - #1018

Merged
ualtinok merged 4 commits into
mainfrom
land/actor-storage-ledger-recovery
Oct 27, 2026
Merged

ualtinok merged 4 commits into
mainfrom
land/actor-storage-ledger-recovery

Conversation

@aft-alfonso

@aft-alfonso aft-alfonso Bot commented Oct 26, 2026

Copy link
Copy Markdown

Two fixes found while diagnosing the #984 merge-group failures.

  • Fresh subc bind actors (and actors recreated for a previously live root) started from Config::default(), so a module started with an explicit storage path (library, CLI and test fixtures) split its data between that path and the default data home. Actors now start from the storage root the module selected at startup, the one its daemon storage lease covers. Users choose storage with AFT_STORAGE_DIR, which already applied to both, so nothing changes for them.
  • Call-ledger recovery settles every unsettled row in aft.db, and standalone processes ran it too when a project was configured, so a standalone OpenCode or Pi session sharing storage with the daemon could settle the daemon's in-flight calls as not_started or unknown. Only the subc module, the one process that admits ledger rows, now runs recovery. The comment at recover() records the remaining limit: one module process per aft.db; two modules sharing a root would need an owner column first.

Tests: a fresh bind actor's SQLite file is under the module's storage root; a standalone configure leaves another process's Prepared and DispatchStarted rows untouched, and the provider process still recovers them.

@ualtinok
ualtinok added this pull request to the merge queue Oct 27, 2026
@ualtinok
ualtinok removed this pull request from the merge queue due to a manual request Oct 27, 2026
@ualtinok
ualtinok added this pull request to the merge queue Oct 27, 2026
@ualtinok
ualtinok removed this pull request from the merge queue due to a manual request Oct 27, 2026
ualtinok and others added 4 commits October 27, 2026 07:05
…odule recovers the call ledger

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit a296566b075417657083f926e34504f7f296f9d8)
…light calls alone

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 543bc0342423ac6061ad3048cc81bee412df7dff)
…ledger-recovery

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…ed by #984

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
@ualtinok
ualtinok force-pushed the land/actor-storage-ledger-recovery branch from 0405f03 to 087e6c5 Compare October 27, 2026 06:22
@ualtinok
ualtinok added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 11f9647 Oct 27, 2026
91 checks passed
@ualtinok
ualtinok deleted the land/actor-storage-ledger-recovery branch October 27, 2026 12:46
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