| English | 中文版 |
Status: Draft Version: 0.1 Date: 2026-04-24 Applies-To: NPS-Node Profile §3 — Level 1 Basic Authors: Ori Lynn / INNO LOTUS PTY LTD
This document defines the test cases an implementation MUST pass to claim NPS-Node Profile L1 compliance. Test cases are language-agnostic; the reference implementation uses .NET 10 + xUnit under
impl/dotnet/tests/NPS.Daemon.Conformance.Tests/.
NPS-NODE-L1-CERTIFIED.md to the IUT repository root, fill it in, and sign the attestation with the IUT’s root key.Self-certification is sufficient at this release. Third-party certification (NPS Cloud CA) is targeted for L3 in 2027 Q1+ and is out of scope here.
| Requirement | Value |
|---|---|
| Network | Loopback only; cases do not require external DNS or inter-host routing |
| Peer | Any L1-passing NPS implementation (reference: NPS.Core + NPS.NDP + NPS.NIP + NPS.NWP at NPS v1.0.0-alpha.11 or later) |
| Clock | Wall clock within ±5 s of the peer (ISO 8601 UTC timestamps) |
| File system | Writable directory for the IUT’s key store and inbox persistence |
| Wire encoding | Tier-1 JSON MUST be exercised; Tier-2 MsgPack cases are deferred to L2 |
Every case runs in a fresh IUT state: delete the IUT’s key store / registry / inbox between cases unless the case is explicitly continuation-oriented.
Each case lists the requirement ID from NPS-Node Profile §3, the fixture, the actions, and the acceptance criteria.
Req: N1-NCP-01 Fixture: Peer constructs one valid instance of each L1 frame (HelloFrame, AnchorFrame, IdentFrame, AnnounceFrame, ResolveFrame, ActionFrame, CapsFrame, ErrorFrame). Action: Peer sends each frame to the IUT; IUT echoes the decoded frame back re-encoded. Pass:
Req: N1-NCP-02 Fixture: IUT listening on loopback; peer idle. Action: Peer opens TCP connection, sends HelloFrame, awaits CapsFrame, then publishes an AnchorFrame. Pass:
Req: N1-NCP-03
Fixture: IUT started with default configuration (no --listen override).
Action: Peer probes 127.0.0.1:17433.
Pass:
0.0.0.0:17433) unless the operator has explicitly opted in via configuration.Req: N1-NCP-04 Fixture: IUT configured without Tier-2 support. Action: Peer sends a HelloFrame advertising Tier-2 only. Pass:
tier1-json in its supported tiers.NPS-CLIENT-NEGOTIATION-FAILED (or the peer-observable equivalent).Req: N1-NIP-01 Fixture: Empty key store directory. Action: Start the IUT; locate the persisted root key file. Pass:
0600 on POSIX; equivalent owner-only ACL on Windows.Req: N1-NIP-02 Fixture: Peer holds a known-good IdentFrame; IUT has its own root key. Action: (a) Peer sends its IdentFrame as the first frame after handshake. (b) Peer opens a second connection and sends an IdentFrame whose signature has been corrupted by flipping one byte. Pass:
NPS-AUTH-UNAUTHENTICATED.Req: N1-NIP-03 Fixture: IUT freshly initialized. Action: Read IUT’s advertised NID (via AnnounceFrame or CLI). Pass:
urn:nps:node:<authority>:<id> where <authority> is non-empty and <id> is non-empty.Req: N1-NIP-04 Fixture: IUT supporting sub-NID issuance. Action: Skipped if the IUT declines the capability. Otherwise, a hosted agent requests a session sub-NID. Pass:
NPS-SERVER-NOT-IMPLEMENTED and the case is recorded as N/A rather than failed.Req: N1-NDP-01 Fixture: IUT hosting at least one agent. Action: Peer subscribes to NDP; captures the next AnnounceFrame emitted by the IUT. Pass:
activation_mode field is present."ephemeral" (since L1 supports only ephemeral).Req: N1-NDP-02 Fixture: Peer has fetched the IUT’s IdentFrame public key. Action: Peer captures an AnnounceFrame from the IUT and verifies the signature. Pass:
Req: N1-NDP-03
Fixture: IUT has one hosted agent with known NID A.
Action: Peer sends a ResolveFrame targeting the nwp:// URL of agent A; peer also sends a ResolveFrame for an unknown NID Z.
Pass:
A contains the agent’s physical endpoint and a non-expired TTL.Z is an ErrorFrame with NDP-RESOLVE-NOT-FOUND.Req: N1-NDP-04 Fixture: IUT’s GraphFrame subscription capability. Action: Skipped or attempted as per capability. Full behavior is validated at L2. Pass:
Req: N1-NWP-01
Fixture: IUT hosting agent A; no prior inbox state.
Action: Peer sends an ActionFrame addressed to A.
Pass:
A returns the deposited frame, bit-identical.Req: N1-NWP-02
Fixture: After TC-N1-NWP-01 completes, before the pull step.
Action: Stop the IUT (SIGTERM on POSIX / equivalent on Windows); wait for graceful shutdown. Restart the IUT with the same data directory. Peer then issues the NWP pull for agent A.
Pass:
Req: N1-NWP-03
Fixture: Agent A has 3 pending frames in its inbox.
Action: Peer issues 3 NWP pull requests in sequence.
Pass:
Req: N1-NWP-04
Fixture: Agent A with a pre-filled inbox of 10 000 small (≤ 1 KB) CapsFrame entries.
Action: Peer issues 100 pull requests per second for 10 s (sustained 100 QPS).
Pass:
Req: N1-NWP-05 Fixture: IUT’s push capability. Action: Skipped if the IUT does not claim push support at L1. Full behavior validated at L2. Pass:
activation_endpoint is received bit-identical; N/A if declined.Req: N1-OBS-01 Fixture: IUT started with log output to a capturable destination. Action: Peer initiates a single request/response round trip (AnnounceFrame in, AnnounceFrame ACK out). Pass:
Req: N1-OBS-02 Fixture: Capture of any log entry from TC-N1-OBS-01. Action: Parse the entry (structured formats only — JSON, logfmt, or equivalent; prose-only logs fail this case). Pass:
in / out), frame type, source NID, destination NID, size in bytes.Req: N1-OBS-03 Fixture: IUT configuration exposes log destination choice. Action: Configure the IUT to emit to (a) stdout and (b) a file, in separate runs. Pass:
A conformance run produces a manifest (JSON) summarizing per-case outcomes. The manifest is embedded into NPS-NODE-L1-CERTIFIED.md:
{
"profile": "NPS-Node-L1",
"profile_version": "0.1",
"iut": {
"name": "example-daemon",
"version": "0.1.0",
"nid": "urn:nps:node:example.com:host-01"
},
"peer": {
"name": "nps-dotnet-reference",
"version": "1.0.0-alpha.11"
},
"run": {
"date": "2026-04-24T00:00:00Z",
"environment": "linux-x64 / 1 vCPU / 1 GB"
},
"cases": [
{ "id": "TC-N1-NCP-01", "result": "pass" },
{ "id": "TC-N1-NCP-02", "result": "pass" }
/* ... 19 more ... */
],
"summary": { "pass": 21, "fail": 0, "skip": 0, "na": 0 }
}
Certification is granted when all 21 cases are pass or na (cases N1-NIP-04, N1-NDP-04, N1-NWP-05 may be na when the IUT declines the optional capability).
| Language | Path | Status |
|---|---|---|
| .NET 10 (xUnit) | impl/dotnet/tests/NPS.Daemon.Conformance.Tests/ |
Planned; tracked alongside NPS Daemon MVP |
| Python | impl/python/tests/conformance/node_l1/ |
TODO (Phase 2) |
| TypeScript | impl/typescript/tests/conformance/node-l1/ |
TODO (Phase 2) |
The reference suite’s test names MUST align with the TC-N1-* IDs above so a test-run report maps 1:1 onto the §4 manifest.
| Version | Date | Changes |
|---|---|---|
| 0.1 | 2026-04-24 | Initial draft: 21 test cases covering NCP / NIP / NDP / NWP / Observability, paired-peer methodology, results manifest schema |
Copyright: LabAcacia / INNO LOTUS PTY LTD · Apache 2.0