Skip to content

feat(sync): held rows in cloud status, doctor sync-journal and pull results (T13271) - #1925

Merged
kryptobaseddev merged 5 commits into
mainfrom
feat/T13271-held-surfaces
Oct 7, 2026
Merged

kryptobaseddev merged 5 commits into
mainfrom
feat/T13271-held-surfaces

Conversation

@kryptobaseddev

Copy link
Copy Markdown
Owner

Task: T13271

The remaining journal spec §3.5 Rule 5 surfaces for held rows. Stacked on #1924. The data API (listHeldOps) shipped with R-3 (#1920).

What changes

  • cleo cloud status.
    • Contracts gain CloudStatusHeld / CloudStatusHeldRow, and CloudStatusSyncStream.held, which carries the count, the oldest hold, and the long holds with their conflict preview.
    • readStoreSyncStream fills it from holdsReport, read-only on the snapshot.
    • The human clause adds "N held by a rebase (M older than 7 days)". It is extracted as syncStreamClause so it can be tested.
  • cleo doctor sync-journal. SyncRepairResult.holds is a HoldsReport (total, oldest, long holds past HELD_WARN_DAYS = 7), in both the dry run and --repair.
  • Pull results. ApplyReport.held lists the local txns the call left held. replayTxns returns what it held, and the list drops any txn a later page of the same call applied.

Tests

  • In the held-insert test (real replicas):
    • the pull reports held: [lk];
    • cloud status has held.count = 1;
    • the doctor has total = 1 with long: [] now, and lists the hold, with its dangling-ref reason, once the clock is past 7 days;
    • after the echo, the pull reports held: [] and the status count is 0.
  • A new test: one call with pageOps: 1 holds an insert on B's page and applies it on C's page, and reports held: [].
  • CLI clause unit tests.
  • Mutation checks: all 6 mutants killed (report add, still-held filter, long cutoff, status count, both CLI clauses).

Locally green:

  • 149 targeted tests;
  • tsc -b for contracts, core and cleo;
  • biome on every file changed vs main;
  • gates 3, 4, 6 (--check), 10, 19, 25, 28, 38 (--base origin/fix/T13275-page-clock) and 40;
  • skill coverage;
  • changeset lint.

🤖 Generated with Claude Code

…esults (T13271)

Journal spec §3.5 Rule 5 surfaces (the data API shipped with R-3):
- CloudStatusSyncStream.held (contracts): count, oldest, long holds
  (older than HELD_WARN_DAYS = 7) with their conflict preview; the human
  clause names them.
- cleo doctor sync-journal: SyncRepairResult.holds (holdsReport).
- ApplyReport.held: local txns a pull left held (a later page of the same
  call that applied one drops it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lyReport, CLI (T13271)

The implementation b3b3e12's message describes; only its changeset and
test were committed (a git stash pop around a gate check left the source
unstaged, and the next PR's commit picked it up). One task per PR: this
moves it back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kryptobaseddev added a commit that referenced this pull request Oct 6, 2026
# Conflicts:
#	packages/cleo/src/cli/lib/nexus-cloud-cli.ts
#	packages/contracts/src/nexus-cloud.ts
#	packages/core/src/cloud/nexus-cloud-status.ts
#	packages/core/src/doctor/sync-repair.ts
#	packages/core/src/store/sync/apply/applier.ts
Base automatically changed from fix/T13275-page-clock to main October 7, 2026 14:50
…aces

# Conflicts:
#	packages/core/src/cloud/nexus-cloud-status.ts
@kryptobaseddev

Copy link
Copy Markdown
Owner Author

Merging at the approved head e26f713 (review-hotfix APPROVE merge e26f713 (main merge, hand-resolved import checked); CI: 108 checks, all green).

@kryptobaseddev
kryptobaseddev merged commit 92e6291 into main Oct 7, 2026
112 of 203 checks passed
@kryptobaseddev
kryptobaseddev deleted the feat/T13271-held-surfaces branch October 7, 2026 17:16
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