Skip to content

docs: the per-NIP porting ledger, and the gate's first reading - #1180

Merged
cameri merged 2 commits into
rewrite/mainfrom
docs/nip-ledger
Nov 19, 2026
Merged

cameri merged 2 commits into
rewrite/mainfrom
docs/nip-ledger

Conversation

@chappie-daemon

Copy link
Copy Markdown
Collaborator

What

docs/rewrite/nip-porting.md — the per-NIP ledger that docs/rewrite/kpis.md §1 names as the
only one of its six KPIs with no artifact yet. One row per advertised NIP (the 25 in
package.json:7 at 041fe34e), each with:

  • the oracle — the TypeScript test at 041fe34e that pins the behaviour today;
  • the rust test — the Rust test on rewrite/main that proves the same behaviour;
  • the teeth — the inversion that would turn that test red;
  • the status — ported, partial or open.

First reading

15 of 25 ported, 8 partial, 2 open, at f01cb5f3.

Every Rust citation was checked to exist at that commit; the two open rows were read in the
code rather than inferred from a missing file:

  • NIP-11 — nothing serves an HTTP information document yet (decision D1 defers it), so
    supported_nips.rs asserts a constant and no reading of it proves a served document.
  • NIP-77 — the relay answers NEG-OPEN with ["NOTICE","invalid: Invalid input"] and both
    encoders return NotImplemented; negentropy_parity.rs asserts library frames, never relay
    sync.

So the cutover gate cannot reach 25/25 by writing tests alone: two rows need building.

The eight partial rows are branches a test was never written for — limit: 0 on the wire,
the restricted-read default, the nonce/difficulty tag, reaction content and store/serve,
kinds 43–49, a non-empty COUNT, rank ordering, and the kind 13534 membership list.

Why the denominator is the v3 set

crates/nostream-core/src/constants.rs:17 carries 34 ids, and the two sets differ in both
directions (10 added, 15 dropped). §1 of the document states both and why the gate uses the
v3 set: it measures whether the rewrite reproduces what v3 promised, while the Rust list is a
decision about what the rewrite will claim afterwards.

kpis.md §1 and §8 are updated to point at the built artifact.

Refs #860

One row per advertised NIP with its v3 oracle, the Rust test that proves
the same behaviour, the inversion that would turn that test red, and a
status. 15 ported, 8 partial, 2 open at f01cb5f.

Every Rust citation was checked to exist at that commit; the two open
rows were read in the code, not inferred from a missing file. NIP-11
has no HTTP surface and NIP-77 answers NEG-OPEN as an invalid frame, so
neither can be closed by writing a test.
@changeset-bot

changeset-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4274b87

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

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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: 566b5444-f40a-4381-9a50-b4c051e7f3a3

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

@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The documentation changes appear safe to merge.

Summary

Adds a per-NIP evidence ledger and records the first cutover reading: 15 of 25 ported, 8 partial, and 2 open.

  • The rewrite KPI now tracks each advertised NIP against Rust test evidence.

All three previous findings are addressed. No new issues found.

Reviews (2) · Last reviewed commit: "docs: correct three ledger rows Greptile..." · Reviewed by Greptile

Comment thread docs/rewrite/nip-porting.md Resolved
Comment thread docs/rewrite/nip-porting.md Resolved
Comment thread docs/rewrite/nip-porting.md Resolved
- NIP-16 cited a strategy test that asserts the upsert *call* on an
  empty fixture, so it could not catch an old event being kept; the
  wire-level kind-41 replace test can, and is now cited first.
- NIP-22's test asserts each tag with contains, so reordering stays
  green; the teeth column now claims only a dropped tag.
- NIP-50's rank order is already proven in parity_lmdb; the row cites
  those three tests and narrows the gap to served-frame order.
- NIP-43 needs code, not a test: no kind 13534 membership list exists,
  so it is split out of the test-only rows.
@cameri
cameri merged commit 4b42c00 into rewrite/main Nov 19, 2026
17 checks passed
@cameri
cameri deleted the docs/nip-ledger branch November 19, 2026 13:22
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