Skip to content

feat(cloud): cloud status reports the seen-txn ledger size per store (T13317) - #1972

Open
kryptobaseddev wants to merge 2 commits into
feat/T13315-typed-skipfrom
feat/T13317-seen-txn-doctor
Open

kryptobaseddev wants to merge 2 commits into
feat/T13315-typed-skipfrom
feat/T13317-seen-txn-doctor

Conversation

@kryptobaseddev

Copy link
Copy Markdown
Owner

Task: T13317

Stacked on #1970 (feat/T13315-typed-skip).

Why

Team-lead's T13256 decision (option 3): seen-txn pruning stays off, as #1959 left it, until a proven refusal floor exists (T13318). Until then, the ledger's growth is made visible.

cleo doctor sync doesn't exist as a command. The store's sync report, including the undo budget the spec assigns to "doctor sync", is cleo cloud status's sync block, so the report goes there.

Change

  • contracts: a new CloudStatusSeenTxns {rows, bytes, byStream} type. CloudStatusSyncStream.seenTxns is a required field.
  • core: seenTxnReport(db) (store/sync/pull.ts) groups rows by stream. The byte estimate is the stored stream and txn text plus an 8-byte seq per row, with no page overhead. readStoreSyncStream fills seenTxns.
  • CLI: the human sync clause adds <n> seen txn(s), about <size> KiB once the ledger has rows.
  • No code path prunes the ledger.

Verification

  • Tests:
    • cloud-sync-status: per-stream counts and the exact byte estimate across two streams; a second read sees the same rows (a read never prunes); the flags-off case reports zeroes.
    • nexus-cloud-cli-sync: the clause shows KiB with one decimal under 10 KiB and rounded above, and nothing while the ledger is empty.
    • Together with pull, 18/18 pass.
  • Mutations: 2/2 killed (seq bytes set to 0; clause hidden).
  • Typecheck: tsc --noEmit is clean for contracts, core and cleo.
  • Biome: clean.
  • Gates: 28, 38 (--base), 40, 4, 10, 32 (--base) and 6 (--check, as CI runs it) pass; lint-changesets passes.

🤖 Generated with Claude Code

kryptobaseddev and others added 2 commits October 7, 2026 07:26
…(T13317)

Seen-txn pruning stays off (#1959) until a proven refusal floor exists
(T13318). CloudStatusSyncStream.seenTxns {rows, bytes, byStream} from
seenTxnReport (stream + txn text + 8-byte seq per row); the human clause
names rows and KiB once non-empty. Tests: per-stream count and byte
estimate, a read never prunes, the clause text; mutations on the byte
estimate and the clause both fail a test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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