Skip to content

authority: owner's history import lands past the owner reserve, keeping held rows (OWNER-RESERVE-IMPORT-PARTIAL) - #10023

Open
olety wants to merge 2 commits into
mainfrom
opus-anchorsec/owner-reserve-import-partial
Open

olety wants to merge 2 commits into
mainfrom
opus-anchorsec/owner-reserve-import-partial

Conversation

@olety

@olety olety commented Nov 20, 2026

Copy link
Copy Markdown
Member

Row OWNER-RESERVE-IMPORT-PARTIAL, option B of Engine RULING OWNER-RESERVE-IMPORT = A (15 Nov 17:50; C stays out). Past the owner reserve of [AUTHORITY-LOG-SIGNER-FLOOD], the owner's history import through his verb vault.authority.history.import refused whole when it carried one row that is not the owner's work, so his own rows waited until he raised the floor row and imported again. Now his import lands the rows the store door admits and keeps the rest until the floor lets them land.

What changes

  • The owner's verb lands partially (verbs/authority_history.rs -> Vault::import_owner_authority_history, new authority/history_transfer/owner_import.rs).
    • A row the store door holds at the owner's reserve is kept as evidence, with every row of the import that stands on it, even the owner's work: landing one would leave the history incomplete.
    • Every other row lands. Any other refusal still refuses the import whole: a stranger's shared bound, a handoff no slip issuer signed, a signature, a missing parent, retired standing, a conflicted root.
    • entry_refs names the import's rows stored now. The owner's typed check (authority_log_checks, authority_log_owner_reserve) names the reserve while a kept row waits, as before.
  • How rows stage. The first run is the whole import in a child writer, so an import the door admits whole costs what it did.
    • A run the door refuses (AuthorityLogFull) rolls back. Its rows before the refused one stage again, and the refused row is judged on them by the reserve's own branch of the door (held_at_owner_reserve_in_txn, log_budget/owner_reserve.rs, split out of authority_door unchanged).
    • A row held there is kept and staging goes on. Any other refusal refuses the import.
    • The next run starts one row long and doubles with each run that lands, so a long run of held rows costs one row each. The checks after staging (retired standing, conflicted root, judge) read the landed rows only.
  • The kept rows live in a new side table AUTHORITY_HISTORY_RESERVE_HELD (key hash32, value the row's signed bytes; [restore: live], as AUTHORITY_HISTORY_PENDING). It is evidence that admits nothing: no fold reads it.
    • After each write of the observation policy (set_authority_observation_policy, the floor row) the kept rows are imported again as the owner's import. Each lands once the log with it fits under the reserve's start; the rest stay kept.
    • A kept row leaves when an import lands it, when the H72 leave-out drops it, or when a re-import refuses for something other than the reserve (logged; the source still holds the rows). A failure never fails the policy write.
  • Why not FIX 2989's pending table. Its retry re-folds every pending row after every authority commit and builds one closure per pending row (quadratic for a chain). The floor's least is 1 GiB, so a flood an owner's import carries could put tens of thousands of rows there. The kept rows are retried only when the floor row is written, the one act that moves the reserve, in one linear pass.

What does not change

  • No import passes the reserve (option C stays out). A row that is not the owner's work lands past it only once the floor row lets it, never because the owner's import carried it.
  • The other import doors stay whole: import_signed_authority_history (world key bundle import, tests), the sealed-kit restore (_judged, its prelude adopts the image), the authority pages and repair pages.
  • No fold rule, no row shape, no verb wire change, no grant.

Stored change: keep (one new side table, additive; nothing stored changes meaning). No new verb. The existing owner verb still revalidates the owner first (owner.revalidate).

Tests

RUSTFLAGS="--cfg oneiron_test_support" cargo test --locked -p oneiron --all-features --test authority_log_owner_reserve_import (fixture tests/owner_reserve/two_installs.rs):

  1. The owner's import of his host-root row from a second install plus the flooder's held row. The whole-history door still refuses it whole (AuthorityLogFull, nothing written). Through the verb, his row lands, entry_refs names it alone, and the held row waits with the reserve check named. After the floor is raised, the held row lands with no second import, and the fold is clean.
  2. The held row and a flooder row on it, imported through the verb. Nothing lands (entry_refs empty). A floor write that still holds them keeps them, and the reserve check is named. After the floor is raised, both land.

Red pin opus-anchorsec/owner-reserve-import-partial-red-bc81e7a5 (main a4da017 + the tests, no lib change): both tests fail at the verb, which refuses the whole import. The old test in authority_log_owner_reserve.rs is renamed a_whole_history_import_past_the_reserve_refuses_whole_and_lands_once_the_floor_is_raised and still passes: it covers the whole-history door.

…ng held rows

FIX [OWNER-RESERVE-IMPORT-PARTIAL], option B of RULING OWNER-RESERVE-IMPORT = A.
Past the owner reserve the owner's verb vault.authority.history.import lands the
rows the store door admits and keeps each row the door holds at the reserve, with
every row standing on it, in AUTHORITY_HISTORY_RESERVE_HELD (evidence no fold
reads). Each write of the observation policy (the floor row) imports the kept rows
again, so they land once the floor lets them. Any other refusal refuses the import
whole; the other import doors stay whole. No import passes the reserve (C stays out).

- log_budget/owner_reserve.rs: the reserve branch of authority_door as
  held_at_owner_reserve, and held_at_owner_reserve_in_txn for the import.
- history_transfer/owner_import.rs: staging in runs in child writers (a refused
  run rolls back, its prefix restages, the refused row is judged on it; runs
  restart at one row and double), the held table, the drain after a floor write.
- history_transfer.rs: one import body with a staging mode; post-staging checks
  judge the landed rows only.
- Stored change: keep (one new side table, additive).
…-IMPORT-PARTIAL)

authority_log_owner_reserve_import: through the owner's verb, the owner's row
lands and the flooder's held row waits, landing once the floor is raised with no
second import; a row standing on a held row waits with it, a floor write that
still holds them keeps them, and both land once the floor lets them. The old
whole-door test is renamed for the door it covers.
@greptile-apps

greptile-apps Bot commented Nov 20, 2026

Copy link
Copy Markdown

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 10 billable files and costs up to $2.50.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 56 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 151 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 436c6e5 and bc81e7a.

Files selected for processing: 10

  • crates/oneiron/src/authority/history_transfer.rs
  • crates/oneiron/src/authority/history_transfer/owner_import.rs
  • crates/oneiron/src/authority/log_budget.rs
  • crates/oneiron/src/authority/log_budget/owner_reserve.rs
  • crates/oneiron/src/authority/observation_policy.rs
  • crates/oneiron/src/authority/tables.rs
  • crates/oneiron/src/verbs/authority_history.rs
  • crates/oneiron/tests/archive_side_catalogue_unclassified.txt
  • crates/oneiron/tests/authority_log_owner_reserve.rs
  • crates/oneiron/tests/authority_log_owner_reserve_import.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

This branch has not been deployed

No deployments
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