Skip to content

docs: renumber the Postgres-to-LMDB record as ADR 0013 - #1186

Merged
cameri merged 1 commit into
rewrite/mainfrom
docs/adr-0013
Nov 19, 2026
Merged

cameri merged 1 commit into
rewrite/mainfrom
docs/adr-0013

Conversation

@chappie-daemon

Copy link
Copy Markdown
Collaborator

docs/rewrite/decisions/ carried two records numbered 0012. Jobs 028 (NIP-50 search index, added 2026-11-11) and 029 (Postgres-to-LMDB migration, added 2026-11-12) each took the next free number while running in parallel, so every citation of "ADR 0012" was ambiguous between a search contract and a migration contract.

The later arrival moves to 0013. The earlier file keeps its name, its number and its six prose citations; only the second file's title line changes.

Change Count
File renamed 0012-pg-to-lmdb-migration.md → 0013-pg-to-lmdb-migration.md
Title line # ADR 0013: The Postgres-to-LMDB migration (job 029)
Rust doc comments updated 7, across nostream-cli and nostream-storage
Prose ADR 0012 mentions left alone 6 (five cite the NIP-50 record; one is its own title)

No behaviour changes: comment and document text only. The migration record's D1–D12 set and the search record's D1–D9 set stay separate documents; nothing is merged.

Verification, at the head of this branch

git grep -c 0012-pg-to-lmdb-migration -- crates        # (no output)
git grep -c 0013-pg-to-lmdb-migration -- crates        # 7
ls docs/rewrite/decisions | sort | sed -n '11,13p'     # 0011, 0012-nip50…, 0013-pg-to-lmdb…
grep -rn "ADR 0012" docs | wc -l                       # 6
head -1 docs/rewrite/decisions/0013-pg-to-lmdb-migration.md  # # ADR 0013: …(job 029)

Closes #1185.

Jobs 028 and 029 each took the next free number while running in parallel, so
docs/rewrite/decisions/ carried two 0012s and every citation of "ADR 0012"
was ambiguous. The later arrival (029, 11-12) moves to 0013, which keeps the
numbering in the order the records were written; the NIP-50 record (028,
11-11) keeps 0012 and its six prose citations.

Seven Rust doc comments in nostream-cli and nostream-storage name the file and
follow the rename. No behaviour changes: comment text only.

Closes #1185
@changeset-bot

changeset-bot Bot commented Nov 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7af3883

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nostream Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1af624ea-9410-40a4-920c-79f859eea8c8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

Comment thread Cargo.lock Resolved
@chappie-daemon
chappie-daemon changed the base branch from main to rewrite/main November 19, 2026 15:38
@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This documentation-only change appears safe to merge.

Summary

Renumbers the Postgres-to-LMDB decision record to ADR 0013, removing its number clash with the NIP-50 record. No runtime behavior changes.

  • The migration decision record now has the distinct number ADR 0013.

No actionable issues found.

Reviews (3) · Last reviewed commit: "docs: the Postgres-to-LMDB record is ADR..." · Reviewed by Greptile

@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Comments Outside Diff

These findings could not be posted inline.

  • P1 Old exits stop replacement workers crates/nostream-services/src/workers/dvm_orchestrator.rs:417 ▶

    Old exits stop replacement workers. kill_worker empties the child slot before the old driver reports its exit. A dispatch tick can start a replacement and assign it a job during that gap. When the old Exit arrives, handle_exit clears the replacement's slot and fails all pending jobs, including the new job.

    Give each child and its events an identity, and ignore exits from children that no longer own the slot.

  • P1 Closed stdout prevents worker termination crates/nostream-services/src/workers/dvm_orchestrator.rs:607 ▶

    Closed stdout prevents worker termination. When a worker closes stdout but stays alive, drive_worker leaves the loop and waits for the process to exit. It no longer listens to killed, so later timeouts cannot stop that child. kill_worker clears the slot anyway, allowing another child to start while the old one remains alive.

    Keep listening for termination requests while waiting after stdout closes, or terminate the child when its output closes.

  • P1 Security Unfinished handshakes bypass connection limits crates/nostream-relay/src/relay.rs:329 ▶

    Unfinished handshakes bypass connection limits. handle_socket waits for transport::upgrade before checking either connection limit. That upgrade has no timeout. A remote client can open many TCP sockets and leave their handshakes unfinished; each keeps a task and socket without taking a connection slot or reaching the rate limiter. Enough sockets prevent other clients from connecting.

    Bound the handshake time and count sockets before waiting for the upgrade.

    How this was verified: The accept loop spawns every socket, while both connection checks run only after the unbounded handshake wait.

@chappie-daemon

Copy link
Copy Markdown
Collaborator Author

These findings were raised against a diff this PR no longer carries.

The PR was opened with main as its base. docs/rewrite/decisions/ exists only on rewrite/main, so the diff at that point was the entire rewrite — 434 files — and the review covered relay connection handling that this change does not touch. Every finding above names a file outside the six this PR edits.

The base is now rewrite/main, and the diff is:

File Change
docs/rewrite/decisions/0012-pg-to-lmdb-migration.md → 0013-pg-to-lmdb-migration.md renamed; title line renumbered
four files under crates/nostream-cli and crates/nostream-storage seven doc comments updated to the new path
.changeset/adr-0013-renumbering.md empty changeset, as this repo requires

Comment and document text only — no behaviour changes, no code paths touched.

@greptileai review

@cameri
cameri enabled auto-merge November 19, 2026 15:49
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 44571205861

Coverage decreased (-0.006%) to 77.582%

Details

  • Coverage decreased (-0.006%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 12081
Covered Lines: 9792
Line Coverage: 81.05%
Relevant Branches: 6342
Covered Branches: 4501
Branch Coverage: 70.97%
Branches in Coverage %: Yes
Coverage Strength: 758.72 hits per line

💛 - Coveralls

@chappie-daemon

Copy link
Copy Markdown
Collaborator Author

Closing to reopen: this fires a real pull_request run. The base retarget meant no such event ever reached CI Checks, and a manual workflow_dispatch cannot substitute — Changeset Required is gated on github.event_name == 'pull_request', so it skips under a dispatch and a skipped required check keeps the merge blocked.

auto-merge was automatically disabled November 19, 2026 17:01

Pull request was closed

@cameri
cameri enabled auto-merge November 19, 2026 17:03
@cameri
cameri merged commit 37e5d8c into rewrite/main Nov 19, 2026
32 of 35 checks passed
@cameri
cameri deleted the docs/adr-0013 branch November 19, 2026 17:05
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.

docs(rewrite): two decision records are numbered 0012

3 participants