Repository navigation
Adopt rocksdb-js getRegistryStatus() in place of the deprecated registryStatus() alias - #3429
Merged
Merged
Conversation
…tryStatus() alias rocksdb-js 2.11.0 renamed registryStatus() to getRegistryStatus() and kept the old name as a deprecated alias slated for removal in v3.0.0. Harper pins 2.12.0, so switch every call site, log message, and design note to the new name. Closes #3359 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates references from registryStatus to getRegistryStatus across the codebase, including documentation, database resources, transaction managers, and unit tests, to align with the updated @harperfast/rocksdb-js library. Feedback suggests simplifying the initialization of registryStatusFn in resources/longLivedTransactions.ts by removing a redundant runtime check, as getRegistryStatus is unconditionally imported.
The typeof feature-detect and the module-level registryStatusFn existed for rocksdb-js versions without the registry API; the exact 2.12.0 pin rules those out. Drop the indirection and the setRegistryStatusForTests seam, and have tests stub the rocksdb-js export through testUtils' fakeRegistryStatus instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AGENTS.md bars new sinon uses, and testUtils already has a plain save-and-assign stub. Note in the helper that the fake only reaches the CommonJS build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cb1kenobi
marked this pull request as ready for review
October 21, 2026 21:30
kriszyp
approved these changes
Oct 22, 2026
… export Patching rocksdb-js's CommonJS export never reaches the reporter under --conditions=typestrip, which binds the package's separate ESM build, so the synthetic-registry tests would read the real registry there. Restore a module-local reader with setRegistryStatusForTests, which works under either loader, and drop the testUtils export-patching helpers. The dead typeof feature-detect and its early returns stay removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The warning described transactionDetails as a property of the returned array and offered upgrade advice the exact 2.12.0 pin makes moot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#3322 and #3084 each passed the design-doc check alone and together took the file to 1001 lines, failing Lint Source Code on main. Tighten the nested-selection convention and the RocksDB teardown note; no facts dropped beyond restatements. 991 lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Dispatch-Task: main-red-kriszyp_harper_0a030f35a_5684deb1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Dispatch-Task: main-red-kriszyp_harper_0a030f35a_5684deb1
Main added 13 lines to resources/DESIGN.md after #3430's prune branched, so that prune alone leaves the file at 1004 lines. Tighten two notes in the audit-clock section; only a stage-history clause is dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kriszyp
added a commit
that referenced
this pull request
Oct 23, 2026
Apply the resources/DESIGN.md pruning already merged in #3429, preserving this branch's confirmation eligibility notes. Dispatch-Task: pr-maint-355475e820ee481125db34713182ae84 Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Oct 23, 2026
Apply the resources/DESIGN.md prose-only trim from main commit 489eebc (#3429), reducing the note from 1014 to 998 lines so the design-doc gate passes on this PR without rebasing or changing runtime behavior. Dispatch-Task: pr-maint-3d73ce37e83a10641219417272e78bdf Co-Authored-By: GPT-5 Codex <noreply@openai.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 23, 2026
Apply the resources/DESIGN.md prose-only trim from main commit 489eebc (#3429), reducing the note from 1014 to 998 lines so the design-doc gate passes on this PR without rebasing or changing runtime behavior. Dispatch-Task: pr-maint-3d73ce37e83a10641219417272e78bdf Co-Authored-By: GPT-5 Codex <noreply@openai.com>
This was referenced Oct 23, 2026
kriszyp
added a commit
that referenced
this pull request
Oct 23, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Oct 24, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 24, 2026
Apply the resources/DESIGN.md prose-only trim from main commit 489eebc (#3429), reducing the note from 1014 to 998 lines so the design-doc gate passes on this PR without rebasing or changing runtime behavior. Dispatch-Task: pr-maint-3d73ce37e83a10641219417272e78bdf Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Oct 24, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Oct 26, 2026
…ersion (#3402) * Send each MQTT client the CONNACK refusal code of its own protocol version mqtt-packet writes reasonCode to a v5 client and returnCode to a 3.1.1 client, but the refusal sites had the two swapped, so a v5 client got the 3.1.1 code and the reverse. Bad credentials are now 0x86 / 4, not authorized 0x87 / 5, unspecified 0x80 / 5. An authorizeClient error whose numeric code is an HTTP status is mapped to Not authorized instead of being written to the wire; a code is passed on only if it is a refusal code in the client's own version. Refs #3298 Dispatch-Task: harper-mqtt-connack-reason-codes Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BeYyDXfTjDKHwpzUXyTHDZ * Send 3.1.1 "server unavailable" for an unspecified CONNACK refusal and pass on only CONNACK-legal v5 codes Dispatch-Task: harper-mqtt-connack-reason-codes Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BeYyDXfTjDKHwpzUXyTHDZ * Refuse a bare authorizeClient throw as Not authorized, not as a server fault A hook refuses a CONNECT by throwing, usually a plain Error. That reached a 3.1.1 client as return code 3 (server unavailable), which clients retry, for what is a permanent denial. The hook now has its own catch that defaults to Not authorized; storage and takeover failures keep the unspecified code. Dispatch-Task: pr-maint-3d73ce37e83a10641219417272e78bdf Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * docs: reuse upstream design-note trim to restore lint budget Apply the resources/DESIGN.md prose-only trim from main commit 489eebc (#3429), reducing the note from 1014 to 998 lines so the design-doc gate passes on this PR without rebasing or changing runtime behavior. Dispatch-Task: pr-maint-3d73ce37e83a10641219417272e78bdf Co-Authored-By: GPT-5 Codex <noreply@openai.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: GPT-5 Codex <noreply@openai.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 26, 2026
Apply the resources/DESIGN.md prose-only trim from main commit 489eebc (#3429), reducing the note from 1014 to 998 lines so the design-doc gate passes on this PR without rebasing or changing runtime behavior. Dispatch-Task: pr-maint-3d73ce37e83a10641219417272e78bdf Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Oct 26, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Oct 27, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Oct 27, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Oct 28, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Oct 29, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Oct 29, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Oct 29, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Oct 30, 2026
…wn protocol version (conflicts → v5.3) (#3555) * Send each MQTT client the CONNACK refusal code of its own protocol version mqtt-packet writes reasonCode to a v5 client and returnCode to a 3.1.1 client, but the refusal sites had the two swapped, so a v5 client got the 3.1.1 code and the reverse. Bad credentials are now 0x86 / 4, not authorized 0x87 / 5, unspecified 0x80 / 5. An authorizeClient error whose numeric code is an HTTP status is mapped to Not authorized instead of being written to the wire; a code is passed on only if it is a refusal code in the client's own version. Refs #3298 Dispatch-Task: harper-mqtt-connack-reason-codes Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BeYyDXfTjDKHwpzUXyTHDZ * Send 3.1.1 "server unavailable" for an unspecified CONNACK refusal and pass on only CONNACK-legal v5 codes Dispatch-Task: harper-mqtt-connack-reason-codes Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BeYyDXfTjDKHwpzUXyTHDZ * Refuse a bare authorizeClient throw as Not authorized, not as a server fault A hook refuses a CONNECT by throwing, usually a plain Error. That reached a 3.1.1 client as return code 3 (server unavailable), which clients retry, for what is a permanent denial. The hook now has its own catch that defaults to Not authorized; storage and takeover failures keep the unspecified code. Dispatch-Task: pr-maint-3d73ce37e83a10641219417272e78bdf Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * docs: reuse upstream design-note trim to restore lint budget Apply the resources/DESIGN.md prose-only trim from main commit 489eebc (#3429), reducing the note from 1014 to 998 lines so the design-doc gate passes on this PR without rebasing or changing runtime behavior. Dispatch-Task: pr-maint-3d73ce37e83a10641219417272e78bdf Co-Authored-By: GPT-5 Codex <noreply@openai.com> * Resolve the v5.3 cherry-pick conflict in the resources design notes Keep the upstream prose trim of the audit-record clocks paragraph (the commit's own change, on a paragraph v5.3 has). Drop the two notes the conflict hunk pulled in from main, the RocksDB teardown wrapper note (#3201) and the .mdb rescan note (#3065): both are v5.4 changes whose code is not on v5.3. v5.3's note stays under the design-doc line budget. Dispatch-Task: cherry-resolve-kriszyp_harper_3402-f9635b6b Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UYJCjxjMDRrj8hBGJebKRi --------- Co-authored-by: Kris Zyp <kriszyp@gmail.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Oct 30, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Oct 31, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Nov 1, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Nov 2, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Nov 2, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Nov 2, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp
added a commit
that referenced
this pull request
Nov 5, 2026
Reuse the prose-only cleanup already merged in #3429 so this branch passes the design-documentation lint gate without unrelated runtime changes. Dispatch-Task: pr-maint-f92ba507f948d116e9103e9b6cf148ff Co-Authored-By: GPT-5 Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves Harper off rocksdb-js's deprecated
registryStatus()alias and callsgetRegistryStatus()directly. No runtime behavior changes.⊙ Problem
rocksdb-js 2.11.0 renamed
registryStatus()togetRegistryStatus()(HarperFast/rocksdb-js#887 — Add getRegistryStatus() and deprecate the registryStatus() alias). The old name is now a deprecated alias that rocksdb-js v3.0.0 removes. Harper pins 2.12.0 but still calls the old name everywhere. Closes #3359.❓ Your call: is a standalone rename worth a PR now?
Yes: it is mechanical, and doing it now means the rocksdb-js v3 bump will not break on a removed export. Folding it into that bump instead would mix a rename into a riskier change.
💡 Solution
getRegistryStatus(). It is the same function, so behavior does not change.typeofguard and its early returns covered rocksdb-js versions the exact 2.12.0 pin rules out.⚖️ Alternatives
coresubmodule and follow the next pointer bump.testUtils: tried in an earlier commit. Under typestrip the module binds the separate ESM build, so the fake never applies.registerHooksfake in a child process: works under both loaders, but moves about 40 tests into a child.❓ Your call: overrule the planning review's forwarding helpers?
It suggested keeping
fakeRegistryStatus/restoreRegistryStatusand forwarding them to the setter. Overruled on size: againstmain, that is 124 changed test lines plus a helper, versus 26 rename-only lines here.❓ Your call: also drop the
transactionDetailsdegraded branch?Kept, with its warning reworded. The 2.12.0 pin makes it unreachable, and removing it also deletes its test. A small follow-up if you want it gone.
🔧 Changes
resources/longLivedTransactions.ts: import; module-localreadRegistryStatusreplaces thetypeof-guardedregistryStatusFn, used by the sweep and holder candidates; guards removed from startup and holder reports;setRegistryStatusForTestsdefaults to the real reader; degraded-mode warning reworded.resources/databases.ts: import, incomplete-drop resume check, detached-root handle check indropDatabase.resources/branchDatabase.ts: import,branchReferenceCount.dataLayer/rocksdbBackup.ts: import,verifyDatabaseClosedpoll.dataLayer/DESIGN.md: three prose references in the restore notes.resources/DESIGN.md: brings it back under its 1000-line budget, whichmainexceeds and the requiredrunLintercheck enforces. It carries Prune resources/DESIGN.md back under its 1000-line budget (fixes main's Lint Source Code) #3430's two prune commits (1, 2), which alone leave it at 1004 lines aftermain's newer notes. It also condenses two audit-clock notes (1, 2), dropping only a stage-history clause.✅ Verification
End-to-end route: the existing integration suite, which drives drop, branch and backup/restore through these call sites.
restore-backup-online,restore-backup-preflightanddrop-table-restart-recreatepass 11/11. That covers the online-restore closure poll and the drop paths end to end.test:integration:all: green in CI on this head, 24 jobs (6 shards × Node v24, Windows, Bun, uWS) (run). Locally it stalls atsql-engine-differential.test.mjs, which needs two loopback addresses; this machine has one.longLivedTransactions.test.js+commitConflictDeadline.test.js: 60 passing. Withdistpatched to call rocksdb-js directly instead of the reader, 24 fail, so the seam is load-bearing. Typestrip cannot load the module from source today (4 pre-existing breaks, typestrip dev runtime is broken on main (unattributed JSON import) and no CI job runs test:unit:typestrip #2623), so the dual-loader property rests on the seam being module-local.registryStatusremains (git grep -w). The test edits are the same rename, so each still asserts against the real registry:rocksdbBackup.test.js,perFileDatabaseTeardown.js,checksDatabases.js,closeLoadedDatabases.test.js,commitConflictDeadline.test.js,databaseAliasIdentity.test.js,databases.test.js,evictionBusy.test.js,longLivedTransactions.test.js,txn-tracking.test.js,testUtils.js.evictionBusy.test.jslanded on main during this work. After the rebase, it andlongLivedTransactions.test.jspass 57/57.Full unit gates and lint (run before the seam change)
test:unit:main(excludingapplicationSpawn.test.js, which hangs locally): 7351 passing, 16 failing. All 16 fail the same way on base (module resolution, preload, process-group and bundle-pack suites).test:unit:resources: 4494 passing, 1 failing (transaction.test.jsaudit refs). That file passes 49/49 on its own, on both branch and base, so the failure is order-dependent.authCredentialDeferral.test.js, which this PR does not touch.🤖 Generated by Claude Code (Claude Opus 5.5); posted via @cb1kenobi.
Release target: main — dependency-API rename, no backport needed
Related PRs: #3323 overlaps (merged; added the evictionBusy.test.js call site migrated here), #3430 overlaps (its resources/DESIGN.md prune commits are carried here; identical hunks)
Complexity: easy
Framing-Verdict: better-alternative-exists (3815b60cf479)
Review-Coverage: authored=claude; ran=codex,gemini,cursor-grok,cursor-muse; adjudicated=domain; declined=cursor-composer,cursor-kimi; rounds=3; full=2 @ 5bf547d
Review-Attention: study ~15m (critical: rocksdbBackup.ts, branchDatabase.ts +2; decisions: retain-transactiondetails-fallback, setter-default-restores) @ 5bf547d