Skip to content

Latest commit

 

History

History
201 lines (173 loc) · 27.7 KB

2026-09-26-nip-implementation-coverage.md

File metadata and controls

201 lines (173 loc) · 27.7 KB

NIP implementation coverage after the September 26 sync

The current work implements selected protocol checks, privacy boundaries, and relay paths against the specifications in nips/. It does not complete all NIPs or all Coder application roles. The source inventories now identify the current upstream revisions separately from the revisions behind older fixtures. A source-count assertion, JSON parser, or stored event does not establish a working client, agent, payment service, or complete relay extension.

This report follows the source-sync assessment and its official and Block reviews. Those documents describe the gaps at the source-only sync; this report records subsequent implementation scope. The implementation plan remains the backlog.

Subsequent application slices

This report originally described the source-sync implementation. Later September 26 work added the durable task owner, private knowledge integration, and the free labor runtime. The latter now has retained local relay evidence. The read-only iOS history reader also adds SESS's separately admitted retained-history observer profile through coder-history, coder-connect, and coder-mobile. Its reader receipt and QR bootstrap receipt record the bounded read-only path. These are scoped implementations, not blanket conformance for their NIPs. Use the migration tracker for application delivery and this report for the lower-level source-sync boundary.

Source identity and evidence boundaries

Lane Current source What the inventory establishes
Official b82211e96c6dad616ed2ea43034c1c621256b745; 99 specifications and the upstream index. lane.rs accounts for every specification, including A3. Current client reviews and the prior behavior baseline are separate.
Block 781d39510cf23cfe224e8f521ae06a23377e06de; 17 specifications. block_lane.rs includes FI and PMA. Retained subset fixtures do not certify every role at the new pin.
OpenAgents The 27 authored specifications, plus shared contracts. Each contract's implemented portion and remaining host obligations appear below. There is no blanket OpenAgents conformance claim.

The manifest remains the upstream source authority. Verification must bind to the actual implementation tree. Named tests below identify intended coverage; their presence alone is not a passing execution record. Final gate results must distinguish pure tests, live PostgreSQL/HTTP checks, omitted prerequisites, and deployment verification. This change does not establish the state of a production deployment.

Official and Block work in this change

Surface Implementation scope Remaining limitation
Official 02 follow.rs renders traversal-order slash petnames and resolves supplied follow graphs. NIP-05 roots require caller-verified bindings; no directory or network resolution is implied.
Official 22 and 84 Comments accept kind-1 roots and parents under the existing scope checks. Highlights handle structured i, text r, optional sources, and quote URL markers. Parsing does not fetch or authenticate external source content.
Official 30 emoji.rs scopes replacement tokens to the declaring event, including comments. No remote image fetching, rendering, or UI integration.
Official 42 and 67 eose.rs distinguishes an authentication opportunity from current-view completeness and tolerates unrelated hints. No automatic client authentication or new relay hint-emission policy.
Official 43 relay_access.rs checks signed declarations and fresh join/leave requests. This is not a claim issuer, durable membership service, or claim-redemption implementation. The upstream createclaim ambiguity remains documented.
Official A3 payment_target.rs parses typed targets and produces escaped, inert URIs; event admission checks the kind's syntax. No network-specific address validation, invoice creation, wallet authority, or payment.
Private event visibility Stored queries, gateway delivery, and migration 0010 apply owner/recipient boundaries and remove private content from the search index. NIP-78 owner state, private 3188 artifacts, PMA refusal, and mailbox/group separation have explicit paths. Existing disclosure cannot be undone. History, COUNT, ID lookup, search, live delivery, import/restore, and revocation require the corresponding integration evidence; one query test cannot stand in for all paths.
Block AP agent_persona.rs handles typed persona fields, portable aliases, catalog redaction, foreign adoption, preserved local commands, source digests, and session-restart decisions. No agent launcher, team-projection consumer, or persona UI. A published command grants no execution authority.
Block CW thread_window.rs checks whole batches, request-bound signed 39007 records, and shared sticky budgets. Client-written 39007 is refused. The channel path rechecks access after reading rows. The HTTP query path refuses unsupported thread modes. Thread SQL, auxiliary reconstruction, thread-batch access refresh, and live thread-window delivery remain unimplemented.
Block RS read_state_snapshot.rs validates raw requests, descriptors, signed events, coordinate uniqueness, digests, and byte/count bounds. The store and HTTP query path add a configured writer-database snapshot with Host binding and replay-checked NIP-98 authorization. Live HTTP/PostgreSQL snapshot acceptance passed, including restart and retained expiration. This does not establish the separate cross-process, cross-subscription WebSocket EOSE barrier or a synchronized Coder view.
Block FI federated_identity.rs bounds compact tokens and checks configured community/issuer, token class, asymmetric algorithm allowlists, audience, time, key, session deadline, and issuer-partitioned deny state. A mandatory verifier supplies cryptographic evidence. No concrete JWT implementation, JWKS lifecycle, session disconnects, or HTTP/NIP-42 integration is supplied; FI remains unadvertised.
Block PL push_lease.rs validates leases and excludes 39007 from push kinds. The relay executor commits each lease with its event, effective state, and generation watermark in one transaction (store, migration 0011); enforces endpoint uniqueness and quota in that transaction; ignores NIP-09 deletion of leases; matches from a durable cursor into idempotent jobs; claims each job for one worker at a time; rechecks the lease generation, expiry, endpoint, and the author's current read access before every send; and retries with bounded backoff into a dead-letter state. Transports post the PL relay-delivery request, with NIP-98 authorization, to a credential-holding gateway for APNs or FCM; a test transport records requests. One executor serves several application profiles at once, such as an APNs profile and an FCM profile: it advertises each in push.app_profiles, refuses a lease whose profile is not configured with its transport (invalid: transport mismatch), and sends each job through its own profile's transport with that profile's retry bounds and optional lease quota. Delivery stays off unless NOSTR_RELAY_PUSH_SECRET is set, and a partial configuration refuses. The live suite covers lease create, renew, expire, and revoke, restart and single claim, retry and dead letter, revocation, group-membership loss, one executor with APNs and FCM profiles (per-profile quota, retry, dead letter, and a withdrawn profile), and one end-to-end wake. The push gateway holds the APNs and FCM credentials; its live test has one relay wake an iOS-profile lease through APNs and an Android-profile lease through FCM in the same run, against local fake providers. No real APNs or FCM delivery has run; see the verification records for push leases and push profiles. Priority classes are validated but not sent to the transport. One current executor key and direct relay-membership checks (not NIP-AA virtual membership) are supported.
Block PMA validate_block_ingest refuses reserved kind 30179; stored visibility and search also exclude it. No PMA privacy/CAS/migration/recovery service is implemented. Rejection is the supported behavior.

Official 01/29 lifecycle checks, NIP-86 allow/ban consistency, and the live privacy/snapshot tests must retain their individual results. Do not advance unchanged behavior to a new conformance status merely because its inventory pin matches. The current code also carries the minor NIP-73 Ethereum identifier example correction in external IDs.

The RS snapshot checks retained expiration in the same database statement as its rows and admission policy. An expired own-author coordinate that remains stored causes HTTP 503 until the expiration sweep physically removes it; the relay never calls a cut complete after silently omitting that retained state. The HTTP fixture verifies refusal, isolation from other authors, and recovery after the real sweep.

OpenAgents contracts: pure checks and remaining runtime work

Contract Implemented foundation Concrete remaining work
Shared contracts Strict JSON/JCS; exact artifact/schema/definition/event references, locks, effects, evidence, context, receipts, and outcomes in contracts. private_artifact authenticates encrypted declarations and exact inline or resolved bytes. Complete bounded remote resolution and durable application stores. Shape, signature, and encryption checks do not grant authority.
CAP cap.rs parses definitions/preferences, discovery tags, service contracts, and effect/bound coverage; local capability probes exist. Actual admission and support probing for each new adapter feature, including X402. Exact host grants and verified bindings remain separate.
PRG prg.rs validates definitions, envelopes, and results; Coder has a local program runtime. General admitted remote invocation, complete implementation resolution, and retained execution evidence. Discovery must not activate a program.
EXT ext.rs checks records/manifests, operations/functions/skills, lifecycle transitions, migration pairs, freshness, and closure; accepts eval-suite components, and eval_ext.rs checks a suite's package. Latest foreign-import provenance and component-set compatibility; complete remote distribution and host activation/rollback.
CJ decision.rs and execution.rs cover bodies, encrypted routing, correlation, pins, bounds, and idempotency; cj_conversation.rs checks conversation offers, cards, and the test-set draft. Each new profile's binding admission, complete remote artifact resolution, and actual dispatch. Confirm profiles independently.
RUN run.rs checks journal shape/order, fork retention, recovery boundaries, and fencing. Persistent multi-controller arbitration and reconciliation with actual effects; complete application-profile evidence.
CTX Shared evidence and context parsers. Task-frame, selection, expansion, and cache contracts; source/recipient admission; complete history and unknown handling.
POL CAP grants/preferences and shared evidence/bound vocabulary. Scoped instructions, exact-action approvals, disclosure, learned-preference activation/revocation, routing/cost records, and enforcement by the acting host.
COORD RUN generation/fencing helpers and existing local coordination foundations. Authoritative shared task claims, persistent atomic ownership, background subscriptions, findings, and cross-host deduplication.
EVAL KB-linked signed publication/report subset in kb.rs; local Gym evidence; gym-bridge implements a separately granted private live-board/recipe profile over encrypted 3188 messages; eval_ext.rs builds and checks the extension evaluation profile's case manifests, suites, reports, oa:ext-eval:v1 publications, and check linkage (no runner uses them yet). General frozen suite/trial/partition/comparison and promotion contracts, leakage checks, and evaluator admission.
OPT PRG/CJ/EVAL and local optimization foundations. Semantic signatures, exact implementations, studies, data partitions, candidates, trial accounting, and promotion.
KB Signed immutable versions, heads, withdrawal, equivocation, and EVAL evidence in kb.rs; publication/sync commands. Wider promotion and evaluator trust. Signatures establish attribution, not quality or a positive network effect.
XP xp.rs validates signed quests, awards, revocations, and the kb-transfer, reproduce, playtest, eval-check, and eval-adopt acceptance rules; xp_ledger derives the reader's trusted ledger. Verse displays quests and XP. Reader trust, available evidence, and source-task exclusions still determine whether an award counts. XP is not spendable money or proof of a paid labor market.
CTRL Twelve closed artifact parsers and a bounded local-owner bridge: authenticated pairing, independent rights, exact commands, expiry/revocation, finite private projections, and durable retry identity. Complete client products, full signed RUN history, controller handoff, remote creation/start, and broader SESS/CTX integration. Partial projections and a scoped host are not complete CTRL conformance.
MKT market_contracts validates signed offerings/heads, exact terms, authenticated RFQ/quote/order/ack, OrderRef, bounded per-issuer history, replay/equivocation, and receipt-time freshness. Public admission uses these parsers. Durable host reservations/confirmation, full domain validation, remaining fulfillment/cancellation/dispute/closure records, and live market operation. Paid negotiation and payment records explicitly refuse in this component.
LAB market_contracts::labor checks closed terms, checker policies, rights, roles, deadlines, rework bounds, criterion sets, reuse restrictions, and required recipients. Its MKT adapter checks exact policy bytes. coder-labor now supplies an admitted free-only graph, durable role journals, execution linkage, delivery, independent checks, and acceptance. General profiles, public provider operation, paid settlement, and dispute resolution remain unimplemented; dispute records alone do not resolve a dispute.
SESS The retained-history observer implements explicit root/client pairing, a short-lived single-device QR bootstrap with same-device retry recovery, NIP-42 connections, signed encrypted private 3188 reads, exact reply binding, bounded raw transcript pages, expiry/revocation, and source-change detection. The iOS client supplies Rust-owned cache and a SwiftUI observation surface. Managed engine sessions, actual adapter-feature/effective-configuration admission, durable input queues, submit/steer/interrupt, elicitation versus approval, terminal causes, and managed/imported history accounting. The observer neither invokes CJ engine work nor grants CTRL task rights; it does not recover records the original harness never retained.
WS Shared artifacts, local snapshots, and the separate Block RS work. activity_summary.rs encodes, bounds, redacts, seals, opens, and orders audience-bound activity summaries as private 3188 artifacts. Resource/document/checkpoint identity and conditional mutations; exact view definitions/cuts/pages/deltas and structural-gap handling. No host publishes activity summaries yet, and no client reads them. RS does not implement WS by implication.
WORK WS/CJ relationship designs. Authority-scoped planning graph, exact-revision proposals/admission, disposition, delegation, evidence, and bounded synchronization.
AUTO Existing local scheduling concepts. Frozen plans, triggers, occurrence identity, bounded admission/accounting, queued-turn reconciliation, durable skip/coalesce/cancel, and checked continuation.
ENV Existing execution-boundary and subprocess mechanisms. Lease/materialization authority, real runtime attachment, per-CJ deduplication, participant disclosure, cleanup uncertainty, and persistent reconciliation.
LIVE Existing media concepts and shared artifacts. Consented session/recipient admission, input/speaking floors, capture anchors, observation-bound device effects, bounded teardown, and receipts.
X402 x402.rs checks exact Lightning terms, actual-request bindings for HTTP/MCP and explicitly enabled native Nostr, authenticated BOLT11 invoices, expiry, payee, preimages, and network/payment-hash consumption keys. It reproduces the seven retained digest vectors. Wallet authority and enforceable fee bounds, durable payment/proof consumption, provider execution intent/recovery, and live HTTP/MCP/native interoperability. No payment service is established by offline cryptographic checks.
REACH coder-reach supplies the private directory/presence, reachability, authenticated direct-channel, and placement subset, with retained synthetic verification. Relay publication, WebSocket transport, and full host/client integration remain unimplemented. Placement neither allocates ENV resources nor transfers RUN control.
HOST coder-access implements bounded host/device enrollment and scoped access through private artifacts. coder-host serves the direct artifact, direct-channel, and CAP/CJ bindings through one admission path. Access rights cannot replace POL approval.
TERM coder-pty implements host-owned terminal sessions with real-PTY tests on macOS. Resident-host wiring of HOST rights, REACH channels, and private-artifact transport remains separate; replay is bounded and gaps are explicit.
SOV Designed restoration of historical SA, composed from the existing contracts. No SOV schema validator or host role is implemented. Identity/custody policy admission, bounded lifecycle and checkpoint recovery, guardian quorum consumption, durable treasury reservations, supported signing/decryption adapters, and agent market integration. Generic private envelopes and offline payment checks do not supply these roles.
ATIF Designed on 2026-09-28. crates/atif writes and reads ATIF logs locally; the manifest and chunk schemas and a worked fixture are checked by crates/nostr (atif_nip) and crates/atif (nip_atif_fixture). A publisher and reader for private 3188 and public 3198/3199 carriage, a verifier that renders and checks steps_digest, redaction before public publication, and AO/AM conversion. No trajectory is published over Nostr today.
MV Verse publishes/reads world presence and state. Preserve the documented role limits: peers do not establish authoritative simulation or complete world-definition publication.

Market and labor boundaries

The market module recognizes four closed negotiation bodies. It requires OpenEnvelope provenance; supplying a pubkey beside arbitrary JSON cannot create a trusted record. Quotes require exact provider-authenticated terms. A mutable discovery head cannot amend an agreement. Public admission checks 3192/30192 syntax, signatures, and tag agreement without asserting that referenced artifacts are available.

The in-memory negotiation tracker retains gaps and equivocation, blocks conflicting sequences, binds exact quote/terms/order identities, and permits at most one confirmed order. Live expiry uses the caller's receipt time; backdated issuer timestamps cannot force admission. Duplicate logical records retain identity across newly encrypted envelopes. A new tracker instance does not supply crash-safe replay protection: the host must retain original signed declarations, resolved terms, receipt times, decisions, and reservations.

The initial negotiation tests use an explicit no-op domain fixture. LAB's LaborProfile adds strict terms/policy/rights validation but requires a ClosureAdmission host implementation for the remaining exact reference graph and supported execution semantics. There is no default that accepts opaque labor inputs. Even a valid free agreement grants no credentials, admits no CJ job, proves no delivery, and creates no buyer acceptance.

Current payment boundaries stay unchanged: MKT/LAB's fixed-price profile pays after acceptance; X402 purchases an exact operation upfront. NWC is wallet transport. Zaps sign a different description-hash commitment. L402/LSAT is a distinct protocol. None can silently substitute for another or make a payment record into evidence of correct work. See the x402 integration assessment.

Lightning validation boundary

The new x402 validator is a fresh Rust implementation of the pinned public specification, independent of the older zap parser. It validates recoverable ECDSA invoice signatures, exact millisatoshi amounts, currency, payee, description-hash request binding, invoice lifetime, and the SHA-256 preimage proof. Its invoice feature interpretation cites the reviewed BOLT commit in the decoder.

HTTP binding preserves exact URI/query order and raw body bytes. MCP binding distinguishes absent, empty, and null selected metadata values; missing arguments normalize to {}, and null arguments are refused. Native Nostr support requires an explicit profile selection. Untrusted JSON must pass strict parsing before canonicalization, including duplicate-member rejection. A consumed-proof key includes the network and payment hash. The returned retention value is an upstream minimum, not permission to discard a native purchase with a longer recovery deadline or unresolved obligations.

These functions neither debit a wallet nor consume a proof. A service still needs durable atomic proof consumption and execution intent, admitted budgets and enforceable fees, response recovery, and actual transport interoperability. No feature advertisement or production payment path was added.

Verification and remaining release gates

The retained verification record binds results to the tested code, distinguishes the full run from scoped recoveries, and retains the earlier failures and their corrections. Source inventory counts and passing tests remain narrower than whole-NIP conformance.

The relevant pure fixtures live with the market validator, LAB validator, profile admission, and the new Block and official modules linked above. They exercise malformed fields, tampering, wrong authority, replay, missing dependencies, expiry, unsupported profiles, and refusal boundaries.

Live acceptance is separate:

  • Store tests cover stored privacy and management behavior against PostgreSQL.
  • Gateway tests cover authenticated versus anonymous access and WebSocket lifecycle behavior.
  • RS snapshot tests cover the configured HTTP/database snapshot path and its refusal cases.
  • The manual verification gate records the tested tree, commands, feature scope, failures, and omitted prerequisites. Production configuration and wallet/provider interoperability require their own evidence.

The persisted free labor rehearsal subsequently passed in the retained #9679 record. It resolves an admitted LAB graph, confirms exact free terms, binds a bounded execution, retains delivery and independent checks, and records buyer acceptance through real loopback WebSocket transport and private local storage. Public synthetic identities and one operator establish a reproducible fixture, not an independently operated or paid labor market. The next market milestones are independent provider operation, broader recovery evidence, and separately admitted settlement.