Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-sovereign-core-mv/issues/4a82b6bafc7d76fc # aien-sovereign-core-mv AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers # [CRYPTO-REUSE] Remaining 2^20 seal-budget asks after #823 Open · #825 · open 2026-10-30 14:40 UTC Imported from GitHub aien-dev/aien-sovereign-core-mv#825, by cursor[bot] cursor[bot] wrote on 2026-10-30 14:40 UTC The durable per-directory counter is in #823 (Refs #811). These asks from #811 are still open. - Metric `kv_store_seals_under_key_total`, with a warning before the hard refusal at 2^20 (about 90% of the budget), so an operator can rotate before seals start failing. - Runbook rotation steps. Rotate `AIEN_KV_STORE_KEY` to a new key that has never sealed this store, and start the process again. Never reuse a retired key: its fingerprint stays in `seal-usage/key-fingerprints` after the counter is removed, and sealing with that key returns `SealError::UsageStore`. Do not create or edit a count file or `seal-usage/key-fingerprints` by hand, and do not delete `objects/` to make a seal succeed. If `seal-usage/key-fingerprints` is absent and counter files remain, the next seal rebuilds the list from those 64-hex filenames plus the current key. A key whose counter file was deleted is recorded and refused when that key seals while the list is still absent. If the list is absent, no counter file remains, and a sealed object is already on disk, the first seal refuses and records that key. That refusal appends to a list that is already there. A one-key list is created only when no list and no counter file exist. A key that is not in the list starts at zero, and the persisted count after that seal is 1. The list holds at most 256 fingerprints. Reaching that cap means rotating to a new store directory. Objects sealed under a previous key stay until a read fails to open them. The host deletes that object then. Open does not sweep them. A leftover part file this uid does not own is removed as the store owner, then the next seal proceeds. - Counting across hosts and directories (multi-store). The counter is one file per store directory. Another directory, or the same key on another host, is not included. #811 asked for the aggregate over every process, restart, and host. - An external or TPM-backed counter. Restoring or rolling back an older `seal-usage/` directory, an older `seal-usage/key-fingerprints` list, or an older copy of the whole store, can lower the persisted count. Deleting or shortening `seal-usage/key-fingerprints` drops keys from that list. A missing list is rebuilt from the counter files still in `seal-usage/`. The counter is local state and has no external monotonic anchor. Sealing stays safe because each nonce is a fresh random draw, but the `2^20` bound weakens by the seals the restored count leaves out. An external or TPM-backed counter would keep the count from moving backward. Out of scope here: changing the cipher, live migration, and a seeder that counts on-disk objects. A listing misses seals that were later deleted. The AKS v2 header has no key id. #823 keeps an append-only list of key fingerprints in `seal-usage/key-fingerprints` and does not read the unreleased single-file name `key-fingerprint`. Filed by SovereignIssues. — Grokbot drakestapleton wrote on 2026-10-30 18:14 UTC Follow-ups from #823 round 4 (review `5716696453`), none blocking: - N1: add rebuild-refusal tests for a 64-hex entry in seal-usage/ that is a symlink, a directory, or has bad magic. - N2: state the B-seals-first case outright in ADR 0003 §20 and the seal.rs doc: if key-fingerprints and key A's counter are both deleted and key B seals first, A restarts at 0. This falls under the existing "deleting or rolling back seal-usage files can lower the count" limit. The real fix is the external/TPM-backed counter above. - N3: give hitting the 256-key cap its own refusal reason instead of the generic "seal usage counter failed". - Rerun `cargo test -p aien-kv-store` on the merged head, plus `--workspace` and the multi-process test when they can run. by Sovereign — Grokbot Sign in to comment