Skip to content

Document consistent subscription catch-up and live delivery - #679

Open
kriszyp wants to merge 9 commits into
mainfrom
kris/subscription-superseded
Open

kriszyp wants to merge 9 commits into
mainfrom
kris/subscription-superseded

Conversation

@kriszyp

@kriszyp kriszyp commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Document the v5.3 subscription default: catch-up suppresses record mutations whose version does not match the current stored primary entry, consistently with live delivery. Explain the includeSuperseded opt-in, retained-history limits, and the explicit opt-in that preserves intermediate publications for durable MQTT QoS 1/2 subscriptions.

Companion implementation: Skip superseded subscription updates during catch-up.

For the human reviewer

  1. Requirements and compatibility: the requested default unifies live and catch-up version comparison. This compares primary metadata, which publications also advance; it is not a separate last-record-mutation clock. Missing records and removed tombstones cannot establish a matching current version. Consumers requiring retained mutation history must opt in, while raw-event consumers retain their existing default.
  2. Durable publications: durable MQTT QoS 1/2 subscriptions opt into superseded versions for both live delivery and catch-up. This preserves intermediate retained publications and permits older updates in delivered history without changing the winning stored record. No new MQTT parameter is required.
  3. Replay boundaries: the existing exclusive transaction cursor can be shared by multiple events. The docs warn against treating each event as a safe checkpoint; cursor/acknowledgment crash recovery is not redesigned here. previousCount retains its bounded scan and does not promise a complete history.

Post-review delta: four changed lines in the MQTT reference and release notes, not re-reviewed; these narrowly resolve the reviewed ordering contradiction and migration-warning omissions.

Changes

Verification

  • End-to-end documentation route: npm run build passed, generating the static site with the new links and version badges. Later corrections change prose only.
  • Final npm run format:write, npm run format:check, and git diff --check passed.
  • One full outside review and two delta reviews completed; the latest reviewed cc5524841259. The final narrow prose correction is described above. The companion core change tracks runtime behavior and MQTT regression tests.

Complexity: medium

Origin — the dispatch brief this PR was written from

Document consistent subscription catch-up and live delivery

Maintain #679 (Document consistent subscription catch-up and live delivery) on branch kris/subscription-superseded. Read the current PR head, mergeability, and latest check runs before acting; the dispatch observation may be stale. First read the remote head for refs/heads/kris/subscription-superseded without updating local refs and require it to equal this task's observed head d0ffcb1; if it differs, stop with needs-input because remote history changed after dispatch. Then fetch only refs/heads/main from origin into refs/remotes/origin/main. If Git reports a paused rebase for this task's exact generation branch, require that rebase's recorded original head to equal d0ffcb1 and its recorded onto commit to equal the fetched origin/main tip; stop with needs-input on either mismatch. Only then resume it without repeating the local-HEAD ancestry check or starting another rebase. Otherwise record the remote SHA, verify it is an ancestor of local HEAD, and rebase onto the fetched base. If Context carries companion instructions, follow them exactly for every named gitlink; they override ordinary conflict handling. Preserve both sides' intent for every other conflict. Stop with needs-input on semantic conflicts. Force-with-lease is authorized only for this rebase. Immediately before pushing, re-read the PR's base ref and body plus every companion PR head/state named in Context. The base must still be main, and the declarations and submodule bindings must still match Context. If an open companion advanced, update its named gitlink to the new exact head and rerun relevant tests. If it merged, point the named gitlink at the companion repository's current default-branch tip after verifying that tip contains the merge, then rerun relevant tests. If it closed without merging, stop with needs-input and do not publish its abandoned head. If the base, declaration, binding or any other companion state changed ambiguously, stop with needs-input. Then push the rebased head with git push --force-with-lease=refs/heads/kris/subscription-superseded:EXPECTED_HEAD_SHA origin HEAD:refs/heads/kris/subscription-superseded, substituting the recorded SHA. If the remote head changes, stop with needs-input; never overwrite intervening remote work. Do this before evaluating CI. Then inspect CI for the resulting current PR head, not old-head failures. Wait for relevant pending checks, diagnose remaining failures, fix them, run relevant tests, and push in THIS task. Do not create a separate CI-fix task. Stop with needs-input for judgment calls or an unavailable CI result; report exactly what was verified. No merge is authorized.

Dispatch: task pr-maint-92e4b54bf5b8178a01b68ecdd48dc2b0 · queued by automation · ran by claude/sonnet/high · worker kzyp-xps-1

Review-Coverage: authored=claude; ran=cursor-muse,gemini,codex; adjudicated=domain; declined=cursor-grok,cursor-composer,cursor-kimi; rounds=3; full=1 @ d49f235

Human-Review-Need: 3 (decisions: rawevents-superseded-default, mqtt-qos12-opt-in-superseded, document-core-quirks-as-contract, current-state-catchup-default) @ d49f235

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the documentation and release notes for Harper v5.3.0 to reflect changes in subscription catch-up behavior, where table subscriptions and MQTT durable-session reconnects now skip superseded record updates by default. It documents the new includeSuperseded and rawEvents subscription options. The review feedback recommends avoiding the use of the <VersionBadge> component inline within table cells, suggesting plain text instead to maintain consistent formatting.

Comment thread reference/resources/resource-api.md
@github-actions
github-actions Bot temporarily deployed to pr-679 September 23, 2026 13:57 Inactive
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-679

This preview will update automatically when you push new commits.

1 similar comment
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-679

This preview will update automatically when you push new commits.

@github-actions
github-actions Bot temporarily deployed to pr-679 September 23, 2026 14:07 Inactive
@kriszyp
kriszyp marked this pull request as ready for review September 23, 2026 14:38
@kriszyp
kriszyp requested a review from a team as a code owner September 23, 2026 14:38
@kriszyp
kriszyp requested a review from dawsontoth September 23, 2026 14:38

@dawsontoth dawsontoth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

@kriszyp
kriszyp force-pushed the kris/subscription-superseded branch from d0ffcb1 to 910f8d3 Compare September 30, 2026 13:48
@github-actions
github-actions Bot temporarily deployed to pr-679 September 30, 2026 13:51 Inactive
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-679

This preview will update automatically when you push new commits.

…QoS 1/2

The Upgrade Notes bullet said durable MQTT subscriptions unconditionally
receive every publication, but core only sets includeSuperseded for
durable QoS 1/2 sessions -- QoS 0 durable subscriptions get current-state
delivery like everything else. That contradicted the new Subscription
Catch-up section landed just below it. Cross-model pre-push review caught
the self-contradiction (harper-domain adjudication, finding 5.3.md:27).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Dispatch-Task: pr-maint-92e4b54bf5b8178a01b68ecdd48dc2b0
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-679

This preview will update automatically when you push new commits.

This branch was successfully deployed

1 active deployment
pr-679 — d49f235a Deployed Sep 30, 2026 by github-actions[bot]
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.

2 participants