GeezerVison is showing github.com — spike(id): probe D1 journal sessions (#5864) by dezren39 · Pull Request #6350 · developing-today/code
Conversation
dezren39
commented
Nov 5, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
JournalEntry JSONL bytes → D1 BLOB with a per-world ordinal → bookmark carried to a fresh request → explicit snapshot + ordered tail → exact byte comparison.
This is an isolated local-runtime spike, not a D1 adapter or production storage decision. It assumes #806's single writer per world. #5863's storage contract remains open, so the schema and ordinal cursor are provisional. A D1 bookmark is distinct from #806's proposed ordinal-plus-digest stream cursor.
Evidence
- Before: No D1-backed journal path existed in
pkgs/id; id: F12.13 journal replication (read replicas over a signed stream) #806 requires exact JournalEntry bytes, ordered durable tails, and receiver-side signature/cursor verification.
- After:
TMPDIR=/home/user/.local/share/opencode/tmp/opencode node d1-journal-poc/smoke.mjs (from pkgs/id/worker-poc, Node 24.21.0 / Wrangler 4.147.0): PASS — ordinals 1, 2, 3; bookmark carried to a fresh request/read-your-write; snapshot + ordered tail byte-identical with no gap, duplicate, or reorder.
cargo test --manifest-path pkgs/id/Cargo.toml --lib replication_feed_snapshots_exact_bytes_and_follows_durable_appends: 1 passed.
cargo test --manifest-path pkgs/id/Cargo.toml --lib tampered_payload_is_refused_and_the_committed_replica_is_intact: 1 passed. Both Rust tests are existing independent source/receiver oracles, not wired to the D1 harness.
Local Wrangler proves local D1/session API behavior only. It does not exercise global replica routing or production replica lag, and this PoC does not implement signed-frame authentication, source pinning, cursor hash chaining, or tamper refusal.
Merge Danger
Door: Two-way; this is a removable spike, not a product backend.
Blast Radius: Isolated; only new files under pkgs/id/worker-poc/d1-journal-poc/.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with thumbs up emoji
coderabbitai
Bot
commented
Nov 5, 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 10 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:
35d9f099-66e4-434c-adaf-46562c164b6a
Commits
-
Reviewing files that changed from the base of the PR and between 6741fc5 and 8836caf.
Files selected for processing: 4
-
pkgs/id/worker-poc/d1-journal-poc/README.md
pkgs/id/worker-poc/d1-journal-poc/smoke.mjs
pkgs/id/worker-poc/d1-journal-poc/worker.mjs
pkgs/id/worker-poc/d1-journal-poc/wrangler.toml
- 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.
This was referenced Nov 5, 2026
This was referenced Nov 8, 2026
This was referenced Nov 10, 2026
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-11-12T18:56:54.163344Z |
8836caf |
New commits |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a07fdb2bf4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Comment on lines
+153
to
+154
|
|
async function main() {
|
|
|
stateDir = await mkdtemp(path.join(os.tmpdir(), "id-d1-journal-poc-"));
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reject unsupported arguments before starting the smoke harness
When this standalone harness is invoked with an unsupported option such as --dry-run or a stray positional, it silently executes the full smoke workflow, creating temporary state and starting Wrangler, because it never examines process.argv. This violates the operator-script argument contract in root AGENTS.md. Declare the zero-argument interface in the header and reject supplied arguments with a usage error naming the offending argument and a nonzero exit before performing any side effects.
AGENTS.md reference: AGENTS.md:L47-L51
Useful? React with 👍 / 👎.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 8836caf. smoke.mjs now declares its zero-argument interface in the header and rejects any supplied argument before creating temporary state or starting Wrangler: it prints a usage error naming the offending argument and exits 2. Verified on the laptop: node d1-journal-poc/smoke.mjs --dry-run exits 2 with the usage error, and the plain zero-argument run still PASSes (ordinals 1, 2, 3; bookmark read-your-write; snapshot + ordered tail byte-identical).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex P1 on PR #6350: the standalone smoke harness silently ran the full workflow when invoked with an unsupported option. Declare the zero-argument interface in the header and reject any supplied argument with a usage error naming it (exit 2) before creating temporary state or starting Wrangler. Verified: --dry-run exits 2 with usage; plain run still PASSes.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 14, 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.
|