GeezerVison is showing github.com — feat(hosted-worker): async Hrana opener for LibSQLQueueStore against remote Turso (#14592) by dezren39 · Pull Request #14633 · developing-today/code
Conversation
dezren39
commented
Nov 24, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Implements #14592, stacked on #14591 (base = its branch; land after #14591 merges).
Decision (recorded on #14592): async-ify the QueueStore boundary. A synchronous facade over async Hrana cannot exist in a Worker runtime, and atomicity comes from the conditional UPDATE, not from synchronicity — so the interface went async and both stores satisfy one contract.
QueueStore methods now return Promises; FixtureQueueStore and LibSQLQueueStore resolve immediately over their embedded connections; the verb engine (queue.ts), routes, ingestion and queue-records await the boundary. All pre-existing tests pass unmodified in expectation (mechanical async/await updates only).
- New
HranaQueueStore (src/libsql-hrana-queue-store.ts): the same schema DDL and row codecs as the embedded store, spoken over Hrana HTTP (POST /v2/pipeline, stateless per statement, Bearer auth when a token is set, libsql:// → https). Insert ids and affected-row counts come from the execute result — no connection-scoped last_insert_rowid()/changes(). Schema DDL runs lazily on first use; construction stays synchronous for the worker seam.
- Config seam:
QUEUE_LIBSQL_URL + QUEUE_LIBSQL_AUTH_TOKEN → queueStoreFor prefers the remote store when the URL is set, then the file opener, then the fixture. The Hrana opener is injectable (QueueHranaOpener) the same way the file opener is.
Tests (laptop worktree, node --experimental-transform-types --test, the package test script): 214 tests, 212 pass, 0 fail, 2 skipped. New test/libsql-hrana-parity.test.ts mirrors the local parity scenarios for the remote store — full store surface, acceptance 1 cross-door, acceptance 2 race at the seam — over an injected Hrana transport (always runs), plus wire tests against a real endpoint (HOSTED_WORKER_HRANA_URL, else a spawned turso dev) including cross-door file interop with the embedded store. The wire tests skip on this laptop (no sqld available) and run wherever an endpoint exists. Typecheck clean (tsc --noEmit).
Test route note: tests ran in the laptop worktree — the Actions runner cannot check out this stacked branch pre-merge; CI runs on main after the stack lands.
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-24T22:11:39Z",
"session_id": null,
"lane": null,
"host": "amd",
"worktree": null,
"model": null,
"lane_start_issues": [],
"workspace_ref": null,
"auth_subject": "agent-next-20-local",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
… Turso, QueueStore boundary async-ified (#14592)
coderabbitai
Bot
commented
Nov 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Warning
Review limit reached
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 52 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used the included review currently available.
Learn how review limits work.
Review configuration:
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
429fb6f1-b515-4a91-a74f-f22e6ecfac66
Commits
-
Reviewing files that changed from the base of the PR and between fdc36c9 and 3e9ac07.
Files selected for processing: 15
-
pkgs/fleet/hosted-worker/package.json
pkgs/fleet/hosted-worker/src/config.ts
pkgs/fleet/hosted-worker/src/ingestion.ts
pkgs/fleet/hosted-worker/src/libsql-hrana-queue-store.ts
pkgs/fleet/hosted-worker/src/libsql-queue-store.ts
pkgs/fleet/hosted-worker/src/queue-records.ts
pkgs/fleet/hosted-worker/src/queue-store.ts
pkgs/fleet/hosted-worker/src/queue.ts
pkgs/fleet/hosted-worker/src/routes/queue.ts
pkgs/fleet/hosted-worker/src/worker.ts
pkgs/fleet/hosted-worker/test/cli.test.ts
pkgs/fleet/hosted-worker/test/ingestion.test.ts
pkgs/fleet/hosted-worker/test/libsql-hrana-parity.test.ts
pkgs/fleet/hosted-worker/test/libsql-queue-parity.test.ts
pkgs/fleet/hosted-worker/test/queue.test.ts
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…na-opener
# Conflicts:
# pkgs/fleet/hosted-worker/package.json
# pkgs/fleet/hosted-worker/src/config.ts
# pkgs/fleet/hosted-worker/src/queue.ts
# pkgs/fleet/hosted-worker/test/queue.test.ts
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 24, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|