Knotrel Docs

v1.0 contract set: independent AI review (readiness criterion 9, rc gate R3e)

Independent AI review (not a human audit, not a security certification).

   
Reviewed commit e1be11c19cb077f2e4158e71ff0019bdb3a14a73 (main, “docs(api): make storage_stats and the ETT and HDT interfaces stable with documented guarantees (#118)”). Every file:line below refers to this commit
Date 2026-11-22
Reviewer An AI model session: Claude Opus 5.5 (claude-opus-5-5) in Claude Code. It is separate from the sessions that implemented the reviewed changes (#111–#119) and did not write any of them. Three subagents of the same model reviewed the HTTP API, the configuration/metrics/feeder protocol and the Rust API in parallel. The reviewing session re-checked every blocking finding against the code itself, and every other finding it reports, unless marked otherwise
Form As decided in the rc plan (R3e) and readiness criterion 9: an AI review separate from the implementation, with every finding and its resolution tracked in this document. The Resolution column starts as “open”
Status Findings reported at e1be11c. Updated 2026-11-23: B1–B11 resolved and verified (section 8; merged result 1dd97b8); B7, B1 and B10 confirmed by the maintainer on 2026-11-23 (section 9); every other finding open and tracked in the v1.0 backlog. Delta 1dd97b8..711ce05 verified 2026-11-23 (section 10): no blocking finding; DV1, DV2, DV3 and DV5 fixed in #132 and verified (10.6). Delta 711ce05..0c49b2a (candidate 1.0.0-rc.1) verified 2026-11-23 (section 11): no blocking finding. This document changes no code and no other document

1. Scope and method

Scope: the public contract that v1.0.0 is about to freeze, and the changes v0.9.0..e1be11c (84 files) that produced it:

The yardstick is the freeze review: its frozen list (section 5) as amended by the maintainer’s decisions in sections 7 and 7.1.

Method: documents and code were read directly. PR descriptions, the freeze review’s own findings and the sibling sessions’ notes were not used as evidence. Claims were checked with these commands:

Command Result
cargo test --workspace --all-features --locked pass: 614 passed, 0 failed, 1 ignored, across 35 test binaries plus doctests
python3 tests/test_public_api.py pass: 50 tests
python3 scripts/public-api.py check --base v0.9.0 pass: “snapshot, classification, policy and stability.md agree (615 classified keys)”, with “note: the base has no classification file; narrowing check against the base skipped” (see N1)
python3 scripts/check-openapi-compat.py v0.9.0:docs/openapi.yaml docs/openapi.yaml --approved docs/api/approved-breaking-changes.yaml pass: “10 approved breaking change(s), 0 note(s)”
Mutation test of check-openapi-compat.py: busy removed from ErrorCode and hdt from ServerInfo.engine “OpenAPI compatible”, exit 0 (see B2)
Throwaway programs outside the repository (scratch crates that depend on the crates by path, with their own target directories) Panic probes of the core API; oneshot HTTP probes of barrier, drain, inspection and validation order

Not reviewed:

An AI review can miss defects, and the absence of a finding is not evidence of correctness.

2. Summary

Category Count
Blocking defects 11 (B1–B11)
Non-blocking problems 19 (N1–N19)
Suggestions 19 (S1–S15; S16–S19 added during the verification, section 8)

Against the maintainer’s decisions the implementation holds:

Most blocking findings are contract text that the implementation contradicts and can be fixed in the documents. Four need a choice between a code change and a document change (B1, B7, B8, B10), and one is a checker fix (B2).

3. Blocking defects

Criteria (set by the maintainer): a contract statement contradicted by the implementation, an unclassified or misclassified public item, a break of an approved maintainer decision, a reachable panic or data-loss path from public input, or a checker bypass.

ID Area Finding Evidence Concrete impact Proposed resolution Resolution
B1 HTTP / feeder Omitting barrier_source_position always fails with 409 barrier_position_mismatch on an initialized graph, although it is documented as optional with “only delivery sequence validated” Docs: docs/http-api.md:1256 (“If omitted, only delivery sequence $D_B$ is validated”); docs/openapi.yaml:1212 (“if supplied, the source position must match exactly”); docs/openapi.yaml:2877-2883 (not required, nullable, “Optional”). Code: crates/knotrel-server/src/service.rs:1361-1368 compares req.barrier_source_position.as_deref() (None) with self.source_position.as_deref(), which every import sets to Some (service.rs:2588) and nothing clears. HTTP probe after a create_only import at p0, barrier at sequence 0: field omitted gives 409 {"code":"barrier_position_mismatch",…}; field null gives the same; field "p0" gives 200 synchronized. No test sends a barrier without the position at generation > 0 (tests/bootstrap.rs:421 does so only at generation 0) A feeder written against OpenAPI or http-api.md that omits the optional field can never reach ready and stays catching_up/stale indefinitely. integration-contract.md:321 (B7, $P_B == P_{applied}$) matches the code, so the three contract documents disagree with each other Decide which behavior is frozen. Either skip the B7 comparison when the field is absent (a widening, so additive), or document the field as required in practice in OpenAPI and http-api.md. Add a test for the omitted field at generation ≥ 1 either way Resolved: knotrel/knotrel#123, merged as 1dd97b8; verified at head cd6b52c (RESOLVED, §8)
B2 Checker (HTTP) check-openapi-compat.py does not detect removing a value from a response enum: a stable error code, a stable engine value (ett, hdt), or a readiness status scripts/check-openapi-compat.py:164 compares enums only for direction == "request". Mutation test: a copy of docs/openapi.yaml with busy removed from ErrorCode and hdt removed from ServerInfo.engine, compared against the original, prints “OpenAPI compatible: 0 approved breaking change(s)” and exits 0. docs/compatibility.md:149 calls “removing … an error code” breaking; docs/compatibility.md:270-272 says “Breaking changes to stable operations fail the job”. No test in tests/test_openapi_compat.py covers response enums The stable HTTP promises that decisions 7.1-2/7.1-3 added (engine values ett/hdt), and every stable error code, can be removed from the wire contract with CI green. The console regenerates its types from that file, so a removal also propagates silently to the console Flag removed response-enum values as breaking (at least for ErrorCode, ServerInfo.engine, status and mode enums), with tests in tests/test_openapi_compat.py Resolved: knotrel/knotrel#121, merged as 89d6619; verified at head 94aba0e (RESOLVED, §8)
B3 Feeder protocol §8.1 documents import body fields that the server rejects docs/integration-contract.md:507-508 (“Body format (explicit fields): expected_generation, expected_state_version, expected_source_position”). ImportRequest is #[serde(deny_unknown_fields)] without these fields (crates/knotrel-server/src/api.rs:435-448), and OpenAPI has none. The integration contract declares sections 2–10 normative (integration-contract.md:3, :7) A feeder that follows §8.1 gets 422 invalid_request on every import. Only the If-Match header is checked Remove the body-format bullet, or state that only If-Match carries the precondition Resolved: knotrel/knotrel#122, merged as ce0be3c; verified at head 96620f7 (RESOLVED, §8)
B4 Feeder protocol §3.1 wire types of generation and source_epoch are wrong docs/integration-contract.md:132 (generation “a decimal integer or string in JSON”); :145 (source_epoch “UTF-8 string or 64-bit integer”). The code declares u64 for generation (for example crates/knotrel-server/src/api.rs:633, :703) and String for source_epoch (api.rs:442, :637). OpenAPI agrees with the code (docs/openapi.yaml:2411-2412, :2667-2668) A feeder that sends "generation": "3" or an integer source_epoch gets 422 invalid_request Correct §3.1 to the wire types: generation a JSON integer, source_epoch a string Resolved: knotrel/knotrel#122, merged as ce0be3c; verified at head 96620f7 (RESOLVED, §8)
B5 Feeder protocol §3.1 says instance_id is a UUIDv4 and is exposed by GET /ready; neither is true docs/integration-contract.md:118-120. Code: crates/knotrel-server/src/service.rs:595-605 builds srv-{pid:x}-{nanos:016x}-{count:04x}; /ready returns only {"status": …} (crates/knotrel-server/src/lifecycle.rs:646), and OpenAPI’s readiness schemas have no instance_id A feeder that validates a UUID shape, or discovers the instance from /ready, fails. Only /v1/info and /v1/stats expose it Describe it as an opaque string, discovered from GET /v1/info or GET /v1/stats Resolved: knotrel/knotrel#122, merged as ce0be3c; verified at head 96620f7 (RESOLVED, §8)
B6 Configuration KNOTREL_MAX_IMPORT_BODY_BYTES upper bound documented as 1 GiB; the code caps it at 512 MiB docs/http-api.md:750 (“from 1 through 1073741824”). crates/knotrel-server/src/configuration.rs:179-180 (MAX_IMPORT_BODY_LIMIT = 512 * 1024 * 1024), enforced at :711-716; the snapshot docs/api/public-api-knotrel-server.txt carries the same value An operator who sets a value between 512 MiB and 1 GiB, as the stable table allows, gets a startup failure Correct the table to 536870912. Raising the code limit instead would also change the stable constant Resolved: knotrel/knotrel#122, merged as ce0be3c; verified at head 96620f7 (RESOLVED, §8)
B7 Configuration KNOTREL_MODE accepts an undocumented value source-managed, although the stable contract says “exactly standalone or source_managed” crates/knotrel-server/src/configuration.rs:593 (Some("source_managed") \| Some("source-managed")); docs/http-api.md:749 (“Exactly …”); the error text at configuration.rs:596-599 names only source_managed. The alias is used by crates/knotrel-server/examples/external_feeder.rs:98, tests/e2e_rebuild.rs:59 and docs/integration-contract.md:1225 compatibility.md §3 freezes a stable variable’s accepted values. At 1.0 the alias becomes an implicit promise, or its later removal a breaking change Decide: document source-managed as an accepted spelling (stable), or reject it before the freeze and update the example, the tests and the contract text (an approved exception) Resolved: knotrel/knotrel#122, merged as ce0be3c; verified at head 96620f7 (RESOLVED, §8). source-managed is a stable accepted spelling, confirmed by the maintainer on 2026-11-23 (§9)
B8 HTTP / drain (decision 2) While draining, a wrong method on a probe or metrics path gets 405, not 503 shutting_down Docs: docs/openapi.yaml:14-16 (“while draining, they get 503 shutting_down instead”); docs/http-api.md:731-733; router_with_lifecycle rustdoc crates/knotrel-server/src/lib.rs:174-177; docs/stability.md:85 (the drain behavior made Stable by decision 2). Code: crates/knotrel-server/src/lifecycle.rs:683-685 (is_probe tests the path only) and the metrics check ignore the method, so shutdown_gate lets POST /ready, POST /health and POST /metrics through to the router. Probe: draining POST /ready gives 405 with allow: GET,HEAD, connection: close Low practical impact. It contradicts the drain behavior that decision 2 made Stable, and freezing it now would freeze the inconsistency Make the gate match method and path (only GET/HEAD probes and scrapes pass), or document the exception Resolved: knotrel/knotrel#123, merged as 1dd97b8; verified at head cd6b52c (RESOLVED, §8)
B9 Rust API (decision 7.1-2) The documented meaning of two frozen HDT storage fields does not match what they count HdtStorageStats::ordered_payload_bytes (crates/knotrel-core/src/hdt_profile.rs:85, “Live ordered-container key/value payload bytes; excludes B-tree overhead”) also adds the hash maps ids and edges (crates/knotrel-core/src/hdt.rs:536-537, :257-258). HdtLevelStorage::mapping_payload_bytes (hdt_profile.rs:125, “excluding B-tree overhead”) counts local_ids, a hash map (hdt.rs:100, :509). compatibility.md §2.2 freezes “the meaning and unit of every counter and storage field” Users of these Stable diagnostic fields get a wrong description of what the number includes. After the freeze, correcting either the code or the text is a change of meaning Correct the rustdoc to what is counted (ordered and hashed payload) before the freeze; the values themselves stay implementation-dependent Resolved: knotrel/knotrel#122, merged as ce0be3c; verified at head 96620f7 (RESOLVED, §8)
B10 HTTP / threat model Error messages quote client input, contradicting a stated trust-model property docs/http-api.md:86-89 (“Client error messages never quote request input …”); docs/threat-model.md:102 (T1.9: “Error messages never quote input”). Messages that do: crates/knotrel-server/src/service.rs:729 (the If-Match value), :1453 (source_id), :1466 (source_epoch), :1530 (event_id), :2522 (import instance_id), :2529 (import graph_id); api.rs:1384 (graph_id), api.rs:1736 (barrier position). Probe: "request source_epoch 'other' does not match server source_epoch 'e'". The tests T1.9 cites do not cover these paths Message texts are internal (compatibility.md §3), but this sentence is a security claim that the threat model relies on. Operators who forward error bodies to less trusted parties (logs, a gateway) get input echoed Either stop echoing client values on these paths, with a test, or narrow the claim in http-api.md and T1.9 to what holds (for example: no request bodies, parser positions or internal paths; feeder identifiers may be echoed) Resolved: knotrel/knotrel#123, merged as 1dd97b8; verified at head cd6b52c (RESOLVED, §8): echoes removed and the claim narrowed (second option)
B11 HTTP (experimental routes) Inspection path IDs with invalid UTF-8 get a plain-text 400 instead of 422 invalid_request, also with inspection disabled (where 409 inspection_disabled is documented) docs/http-api.md:944-947, :961-962; docs/openapi.yaml:1369-1470 declares no 400 for /v1/nodes/{node} and /v1/nodes/{node}/edges. Code: crates/knotrel-server/src/api.rs:2080-2084 and :2101-2105 extract Path<String> without handling the rejection. Probe: GET /v1/nodes/%FF gives 400 text/plain "Invalid URL: Invalid UTF-8 in \node`”` Experimental routes may change in a minor release, but the stated contract is still wrong, and the response is not the JSON error envelope every client decodes Accept the path as raw bytes or handle the rejection and answer 422 invalid_request (or 409 inspection_disabled first); or document the 400 Resolved: knotrel/knotrel#123, merged as 1dd97b8; verified at head cd6b52c (RESOLVED, §8)

4. Non-blocking problems

ID Area Finding Evidence Concrete impact Proposed resolution Resolution
N1 Checker (Rust) No machine check of narrowing against v0.9.0 exists: the release baseline has no classification file, so --base v0.9.0 skips the check, and the first classification (#113) was compared with nothing scripts/public-api.py:1065-1066; command output “note: the base has no classification file; narrowing check against the base skipped”. By hand, this review compared git show v0.9.0:docs/stability.md with the current classification: the only stable-to-experimental moves are the four [[narrowing]] entries (docs/api/public-api-policy.toml:29-55). Everything else is a widening or was already internal or experimental Today none: the manual comparison found no unrecorded narrowing. From 1.0 on the check compares PR to PR, so the v0.9.0→v1.0.0 step has no automated record Record the manual comparison in the release notes. Optionally run the narrowing check once against a classification reconstructed from v0.9.0’s stability.md open
N2 Checker (HTTP) ErrorCode::ALL is a hand-written #[cfg(test)] array. A new variant left out of it escapes error_codes_match_the_openapi_enum, so a code could be emitted that OpenAPI does not list crates/knotrel-server/src/api.rs:153-204, test at :2612 A future error code could reach the wire unclassified (it would be stable by the blanket rule), against the intent of decision 5 Derive ALL with an exhaustive match guard, for example a function that matches every variant so the compiler fails on a missing one, or a macro open
N3 Checker (HTTP) Approved breaking changes are matched by message text only; the release field is never checked, so an entry never expires scripts/check-openapi-compat.py:325-329 A stale entry could approve an identical change in a later release without review Ignore or fail entries whose release is older than the comparison baseline open (partly addressed by #121: every entry now needs a non-empty release, but it is still not compared with the baseline)
N4 Feeder protocol Re-registering the same session with a higher epoch, or a takeover, moves ready to stale (/ready 503 until the next barrier). The §4.1 transition matrix does not say so crates/knotrel-server/src/service.rs:1157-1172; docs/integration-contract.md:176-182; docs/http-api.md:1286-1296 A feeder that bumps its epoch on restart causes an unexplained readiness drop Document the readiness effect in §4.1 and http-api.md open
N5 Feeder protocol The barrier check order differs from §4.3 and the barrier preconditions: the last_expired_epoch fence is evaluated last, after B7–B9. A barrier under an expired-fenced epoch with a mismatched sequence or position gets barrier_not_reached, superseded_barrier or barrier_position_mismatch, not 409 fenced_feeder_session. The import body instance_id is checked after the permit and the parse, although §3.1 says “before … acquiring permits” docs/integration-contract.md:197-198, :280-299, :123; crates/knotrel-server/src/service.rs:1308-1386 (fence at :1376-1378), :2520-2525 Combined-fault cases return a different code than the contract implies. State is preserved in every case State the actual precedence, or reorder the checks (a code change on a stable route) open
N6 HTTP Every error from reading an import body (client abort, broken chunked encoding) is reported as 413 payload_too_large crates/knotrel-server/src/api.rs:1471-1481; docs/http-api.md:709; docs/openapi.yaml:946 Feeders retrying on 413 by reducing the import size act on a wrong diagnosis Map only length-limit errors to 413; others to 400 Resolved after the review (maintainer request 2026-11-23): knotrel/knotrel#126, merged as 41723b47eeafed1bfaa74ef9376a27cba43c3b83; tracked in the backlog
N7 HTTP The 400 message is documented as fixed (“request body is not valid JSON”) and the 413 example as “request body exceeded 1048576 bytes”. The code returns axum’s texts (“Failed to buffer the request body: length limit exceeded”; body stream errors) docs/http-api.md:176-177; docs/openapi.yaml:445, :642; crates/knotrel-server/src/api.rs:1042 Messages are internal, so no client should depend on them; the documents still state otherwise Remove the “fixed message” claim and update the examples open
N8 HTTP OpenAPI says POST /v1/operations runs “under exclusive graph lock”; queries run under the shared lock docs/openapi.yaml:236-237; crates/knotrel-server/src/service.rs:2706-2729; correct in docs/http-api.md:217-218 and crates/knotrel-server/src/lib.rs:123-125 Misleads capacity reasoning; correctness is unaffected Correct the description open
N9 HTTP docs/http-api.md calls itself “the current HTTP API contract (v0.5.0 …)” and says every statement is backed by a test, but the byte-limit validation order (compatibility.md §3) has no test docs/http-api.md:3-5; no test in crates/knotrel-server/tests/input_limits.rs combines a bound violation with an earlier check. A probe confirmed the code follows the documented order Readers get a wrong version; the order, part of an approved exception, could regress unnoticed Update the header; add order tests (bad graph_id plus bad position gives 400; source_epoch mismatch plus bad position gives 409 and desynchronizes) open
N10 Rust API LifecycleStorage bound engine_vertices <= 2 × catalog_nodes + 1024 is tested only where the constant 1024 term dominates (V far below 1024); §7.1 says each guarantee is covered by a test crates/knotrel-core/src/topology.rs:1196 (compaction at max(V, 1024)); crates/knotrel-core/tests/storage_guarantees.rs:263-327 (64 IDs), tests/topology.rs:574-589 (65 nodes). A probe with V = 3000 and 20,000 removals peaked at 6000 ≤ 7024, so the code is correct A regression in the V > 1024 regime would pass CI Add a test with V > 1024 open
N11 Rust API Graph::neighbors_after documents three errors without their precedence; the code checks unknown node, then unknown cursor, then not enabled crates/knotrel-core/src/lib.rs:605-610 against :631-640 Part of a stable error contract (compatibility.md §3) is unstated, so a later reorder could not be judged breaking or not Document the order open
N12 Rust API / docs Stable rustdoc and crate docs cite old releases: “In v0.5.0 only CompactBfs is supported” (LifecycleError::UnsupportedEngine, LifecycleGraph::supports_engine); “Knotrel v0.1.0 has no authentication” (ServerConfig::new_allowing_non_loopback, and the startup log); KNOTREL_FEEDER_RESERVED_JOBS “(unreleased)” in the crates.io README crates/knotrel-core/src/topology.rs:254-256, :429-431; crates/knotrel-server/src/configuration.rs:222; crates/knotrel-server/src/main.rs:39-42; crates/knotrel-server/README.md:48 The docs.rs and crates.io pages of 1.0 would cite 0.x releases Replace with release-neutral wording; remove the “(unreleased)” label (AGENTS.md “After publication”) open
N13 Rust API ServerConfig::from_env rustdoc lists 12 of the 17 variables; with_max_import_body_bytes and with_dedup_window_size do not state their accepted range or their error crates/knotrel-server/src/configuration.rs:468-486, :283-309 (the code at :710-730 is correct) Rust embedders lack the error contract of stable builders Complete the rustdoc open
N14 Feeder protocol Normative §7.2 names a variable that does not exist (KNOTREL_MAX_CONCURRENT_IMPORTS = 1); the design record names KNOTREL_SERVE_STALE and KNOTREL_FEEDER_TOKEN. The server refuses to start on any unknown KNOTREL_* docs/integration-contract.md:486, :1186-1190, :1212-1216, :1232; crates/knotrel-server/src/configuration.rs:518-520 An operator who sets one gets a startup failure Remove them, or mark them as design-time names that do not exist open
N15 Criterion 3 evidence The traceability is stale in places: rows 9.3-f and 9.3-y still say 503 import_in_progress, while the cited events.rs::test_26 asserts busy; finding F2 is already fixed; 9.1-d cites e2e_rebuild.rs test_22 for 422 event_failed, a test that asserts 409 partial_failure; the header describes the pre-merge branch docs/releases/v1.0-criterion-3-evidence.md:273, :292, :213-222, :239, :3-6; crates/knotrel-server/tests/events.rs:2104-2107; crates/knotrel-server/tests/e2e_rebuild.rs:1863-1890. Every other cited test name exists at this commit The evidence for criterion 3 misstates two requirements and one citation Update the three rows, close F2 and refresh the header Resolved after the review (maintainer request 2026-11-23): knotrel/knotrel#129, merged as 711ce05f4acc4f892f1e4dc242c91197e6fdd7ad; tracked in the backlog
N16 Threat model The threat model was written at 580af3f (v0.9.0 plus docs) and has not changed since (git log -- docs/threat-model.md: only #106). It does not cover the 1.0 changes it says it tracks (§9 “resource bounds”): the input byte limits, the busy lane code, too_many_connections and per-lane metrics. T1.6 cites “feeder-lane tests from 0.9.3” instead of tests/feeder_admission.rs. Its status is still “proposed” docs/threat-model.md:3-7, :99, :297-300 Criterion 7 rests on a document that predates the frozen contract Refresh T1.3, T1.6 and T1.9 (with B10) against e1be11c, and record the maintainer’s acceptance Resolved after the review (maintainer request 2026-11-23): knotrel/knotrel#129, merged as 711ce05f4acc4f892f1e4dc242c91197e6fdd7ad; tracked in the backlog
N17 Threat model / panics N7 of the threat model (an audit of panic sites reachable from input, with a fuzz or property test) is still open. Under fail-stop (T1.15), any such panic is permanent unavailability. This review found no panic reachable from public Rust or HTTP input, by reading and probing, but did not fuzz docs/threat-model.md:108, :279 The strongest availability risk at 1.0 rests on review only Keep N7 as an rc item or record its acceptance explicitly; a property test of arbitrary feeder envelopes per synchronization state would close it open
N18 Release coupling info.version, the workspace and console versions are 0.9.0, and console/package.json supportedServer is >=0.8.0 <0.10.0, so the console treats a 1.0.0 server as unsupported until the mandatory compatibility run docs/openapi.yaml:4; Cargo.toml:6; console/package.json:3, :33; docs/console.md:343 Expected before the version bump; listed so the release gate is not missed Follow the release procedure (versions in lockstep, console check against the rc and 0.9.x) Resolved after the review (maintainer request 2026-11-23): knotrel/knotrel#129, merged as 711ce05f4acc4f892f1e4dc242c91197e6fdd7ad; tracked in the backlog
N19 Docs docs/deployment.md:415 links to ../../evidence/v0.3.0-package4-local-…/deployment/transcript.txt, which is not in the repository docs/deployment.md:415 Broken link in an operator document Remove the link or point to the benchmarks repository open

5. Suggestions

ID Area Suggestion Evidence Concrete impact Proposed resolution Resolution
S1 Checker (Rust) A trait-implementation key omits the implementation’s generics and where-clauses, so a narrowed bound (for example impl<T> Send for X<T> gaining where T: Send) keeps the same key. Only the snapshot diff and cargo semver-checks would show it scripts/public-api.py:88-95, :400-406 None today: no public type is generic Note it in the script’s docstring, or key on the full rendered text open
S2 Checker (Rust) [[semver_exception]] items are not cross-checked. With a future crate-wide lint for signature changes, any stable signature could change with CI green, because the narrowing check looks at classes, not signatures scripts/public-api.py:804-830 None today: only the two non_exhaustive lints are allowed, and the exact non_exhaustive list covers them Restrict which lints may be excepted, or diff the snapshot lines of stable items against the base open
S3 Checker (Rust) The release field of [[narrowing]] entries is required but never compared with anything scripts/public-api.py:738-746 Entries may accumulate without a release check Check release against the workspace version, or drop the field open
S4 Rust API Lifecycle is UnwindSafe/RefUnwindSafe only without test-support. The stable implementations hold for the default build only docs/api/public-api-knotrel-server.txt:46-49; docs/api/public-api-classification.txt:484-495 Only builds that enable the internal feature are affected State in stability.md that stable trait implementations are promised for the default feature set open
S5 Rust API ProbePauseHandle, returned by the test-support method Lifecycle::pause_next_ready_probe, is public in a private module and therefore absent from the snapshot crates/knotrel-server/src/lifecycle.rs:151, :467 Internal in practice Re-export it behind test-support, or make the method return an opaque type that is classified open
S6 Rust API LifecycleStorage is #[non_exhaustive] and output-only, and has no constructor. Decision 1 asked to check construction impact and add constructors where needed crates/knotrel-core/src/topology.rs:206-221 Users can read and compare it but cannot build an expected value Record that none is needed, or add one like EdgeState::new open
S7 Rust API serve needs a Tokio runtime with the time driver and panics without one; this is undocumented crates/knotrel-server/src/serve.rs:68-94, :122 An embedder with a minimal runtime gets a panic at startup Add a # Panics section open
S8 Rust API / docs docs/http-api.md:827-828 says router(Graph) “uses the default limits”; it uses GraphLimits::default() (unlimited), not the server’s default limits crates/knotrel-server/src/lib.rs:128-129; crates/knotrel-core/src/configuration.rs:125-132 An embedder could assume finite limits Say “no graph limits” open
S9 Rust API Graph::connected_with_workspace claims an O(log V) endpoint lookup (it is an expected O(1) hash lookup); ConnectivityGraph::cut and connected state their errors in prose without # Errors crates/knotrel-core/src/workspace.rs:23; crates/knotrel-core/src/configuration.rs:330-352 Cosmetic Correct the wording open
S10 HTTP ServerInfo.experimental is described only as “Whether the engine is experimental”; it reports the engine qualification, not a stability class, and may become false on promotion docs/openapi.yaml:2122-2124; docs/compatibility.md:100-105 Client authors may read it as a stability flag Align the description with compatibility.md §2.2 open
S11 HTTP fenced_feeder_session is described as “an older epoch”; the code also fences another session with an equal epoch docs/openapi.yaml:768-769; docs/http-api.md:688; crates/knotrel-server/src/service.rs:1170; matches integration-contract.md:179 Wording only Say “older or equal epoch from another session” open
S12 Feeder protocol §8.2 item 10 says publication sets the live session and epoch from the import; the code only checks they are equal docs/integration-contract.md:529; crates/knotrel-server/src/service.rs:2557, :2588-2603 The wording implies an import can change ownership Reword as a check open
S13 Configuration Console variables share the server’s KNOTREL_ namespace, where any unknown name stops the server; a shared env file would break the server docs/console.md:99-103; crates/knotrel-server/src/configuration.rs:518-520 Only affects deployments that share one environment file One warning sentence in docs/console.md and the deployment guide Resolved after the review (maintainer request 2026-11-23): knotrel/knotrel#128, merged as e13b3cc62da6d579c85810ec7522a0a9ae6200a1; tracked in the backlog
S14 Configuration The crates.io README of knotrel-server omits KNOTREL_MODE, KNOTREL_METRICS_ENABLED and KNOTREL_INSPECTION and does not link to the full list crates/knotrel-server/README.md:42-51 Incomplete crates.io page Link to docs/http-api.md open
S15 Process Most blocking findings are contract text that disagrees with the code in places no test reads (B3–B6, B9) This review Similar drift will recur after 1.0 Add contract tests that parse the documented tables (variables and bounds, error code per route) and compare them with the code, as error_codes_match_the_openapi_enum does for the enum open
S16 Checker (HTTP) Inline oneOf/anyOf alternatives are compared by repr(), so re-serializing the spec with a different key order reports “request alternatives removed” when nothing changed. This is a false positive, not a bypass; found while verifying #121 scripts/check-openapi-compat.py, variants(); reproduced with a sorted-key yaml.safe_dump round-trip of the import nodes[] schema A harmless edit (reformatting the spec) fails CI Compare a canonical form, for example json.dumps(v, sort_keys=True) open
S17 HTTP (experimental routes) With inspection off, a malformed ASCII node ID (/v1/nodes/abc) gets 422 while a non-UTF-8 one (%FF) gets 409 inspection_disabled. Both cases are documented, but they are uneven, and the precedence sentence names only the query string as parsed before the switch docs/http-api.md:949-952, :965-970; probe at cd6b52c Client authors may expect 409 for every request while inspection is off Treat both alike, or add “and the {node} path” to the precedence sentence open
S18 Feeder protocol ADR 0012 still calls instance_id an “Ephemeral UUID” docs/architecture/0012-external-source-of-truth-integration-contract.md:22 Design record only, not normative, but it is the last text that contradicts B5’s fix Say “opaque string” open
S19 HTTP / threat model After B10, error messages still quote server state that a feeder supplied earlier (the retained event_id, source_id, source_epoch, the applied position). The narrowed T1.9 permits it, and only the session holder can trigger these messages crates/knotrel-server/src/service.rs at 1dd97b8, for example the conflicting_duplicate message “retained sequence 1 has event_id ‘A’ …” Low; most of these values are also visible in /v1/stats and the version headers Keep the T1.9 wording under review if feeder identifiers become sensitive open

6. Checked and found consistent

7. Verdict on the frozen list

The frozen list is section 5 of the freeze review, as amended by the decisions in sections 7 and 7.1.

Verdict after resolution (2026-11-23): ready to freeze. All eleven blocking findings B1–B11 are resolved, and each fix was verified independently (section 8) at its PR head. The merged result on main is 1dd97b8b4644ceb5590fdbe8cc45fe6492df01f3; every squash merge is byte-identical to the head that was verified.

What remains open, and does not block the freeze:

Initial verdict (at e1be11c, kept for the record): not ready to freeze; ready to freeze once B1–B11 are resolved. The reasons were these:

Each resolution is recorded here by replacing “open” in the Resolution column with the PR or decision that closes it.

8. Verification of the resolutions

Done by the same AI review session as sections 1–7, on 2026-11-22 and 2026-11-23. Each fix PR was fetched at its head and checked from its diff, by running tests and by the reviewer’s own probes. The probes were scratch crates outside the repository, sending requests through router_with_config and router_with_lifecycle, and mutation tests of the OpenAPI checker on the real docs/openapi.yaml. The implementer’s descriptions were treated as claims to check. Each PR was merged as a squash commit of exactly the verified head: for every file it changes, the merge commit’s content equals the verified head’s, and for docs/http-api.md and docs/integration-contract.md, which #122 and #123 both change, #123’s merge applies the same hunks as its head.

Finding PR Merge commit Verified head Verdict Evidence
B2 knotrel/knotrel#121 89d6619fd9633b68ca6efc3d07e2f90a873a3f93 94aba0eca5d8f737b78be81e9e73c4cb74d0be99 (after two rounds: ed34ecc PARTIAL, response const and a dropped enum not detected; 6134956 PARTIAL, an approval entry with a null change approved every finding without a schema-level key) RESOLVED tests/test_openapi_compat.py 28 tests OK; against v0.9.0 still “10 approved breaking change(s)”. Mutations now fail the check: ErrorCode value removed or renamed (55 messages), engine hdt/ett removed, readiness draining removed, X-Knotrel-Sync-Status value removed, enum dropped from engine, mode const changed, enum rewritten as oneOf of consts. Adding a code passes. A schema-level approval covers only the named schema value (inline properties, other schemas, header enums, extra removed values and inline enums stay breaking). A malformed approval entry (null, empty or blank change, missing release or justification, a bare string, a non-list file) exits 2
B3, B4, B5, B6, B7, B9 knotrel/knotrel#122 ce0be3cb4fa6eed793e8661625bb92d436acef1c 96620f7aab7ee55d5e18219b4694692f6d4cd8e2 RESOLVED (B7 confirmed 2026-11-23) HTTP probe of the unchanged server code: import with expected_generation gives 422; a string generation (events, barrier) and a numeric source_epoch (events, import) give 422; instance_id appears only in source-managed /v1/info and /v1/stats, never in /ready. The documented 512 MiB equals MAX_IMPORT_BODY_LIMIT. KNOTREL_MODE documents source-managed and the error message names it; the wire value stays source_managed. The HDT payload rustdoc matches hdt.rs:536-544 and :509. git grep at the head found no remaining contradicting text in normative documents
B1, B8, B10, B11 knotrel/knotrel#123 1dd97b8b4644ceb5590fdbe8cc45fe6492df01f3 cd6b52c88473b6564ec58ebf42171e12f38f9058 RESOLVED cargo test --workspace --all-features --locked at the head: 619 passed, 0 failed, 1 ignored, including the five new tests. B1: an omitted or null position gives 200 synchronized/already_synchronized, a wrong one 409, an empty one 422, an early sequence 409 barrier_not_reached. B8: while draining, GET/HEAD on /health, /ready and /metrics are answered; POST, PUT, DELETE and OPTIONS on them get 503 shutting_down with Connection: close. B10: a canary string in 16 client-supplied fields was echoed by none of the error bodies; the remaining quoted values are server state and numbers, which the reworded http-api.md and T1.9 permit. B11: %FF and %C3%28 give 422 JSON invalid_request, or 409 inspection_disabled when inspection is off. The console’s openapiSha256 equals the spec’s digest, and the spec passes the #121 checker against v0.9.0

Not run during the verification: the console’s npm run check and check:api, Clippy and rustdoc; CI runs them on the PRs.

New observations from the verification

They are recorded as suggestions S16–S19 in section 5; none is blocking.

9. Maintainer confirmations (2026-11-23)

Maintainer’s words, translated from Italian:

10. Delta verification 1dd97b8..711ce05 (2026-11-23)

Independent AI review (not a human audit, not a security certification). Requested by the maintainer before the v1.0.0 campaign freeze, as the rule of the qualification plan §3.5 requires for a delta that changes code or contract.

   
Reviewed range 1dd97b8b4644ceb5590fdbe8cc45fe6492df01f3..711ce05f4acc4f892f1e4dc242c91197e6fdd7ad (main): #126 (N6, 41723b4), #128 (S13, e13b3cc), #129 (N15, N16, N18, 711ce05), plus the documentation-only #124 and #125. Every file:line below refers to 711ce05 unless stated otherwise
Also read PR knotrel/knotrel#130 at head a3af07d6fcf458515a9615fae9c0985ae42bf06c (open, not merged): the campaign plan §3.6
Reviewer An AI model session: Claude Opus 5.5 (claude-opus-5-5) in Claude Code. It did not write any of the reviewed changes and is separate from the sessions that did. No subagents
Method Same as section 8: code and documents read directly; PR descriptions and the implementers’ notes treated as claims to check; the reviewer’s own probes, written outside the repository

10.1 Commands

Command Result
cargo test --workspace --all-features --locked pass: 628 passed, 0 failed, 1 ignored, across 35 test binaries plus doctests; includes import.rs test_17–test_21 and the four new configuration.rs unit tests
python3 scripts/public-api.py check --base 1dd97b8 pass: “snapshot, classification, policy and stability.md agree (615 classified keys)”
OpenAPI compatibility as ci.yml runs it: tests/test_openapi_compat.py, then check-openapi-compat.py <v0.9.0 spec> docs/openapi.yaml --approved docs/api/approved-breaking-changes.yaml pass: tests OK; “OpenAPI compatible: 10 approved breaking change(s), 0 note(s)” (unchanged from section 8). Against 1dd97b8: “0 approved breaking change(s)” (descriptions and info.version only)
console/scripts/test-entrypoint.sh (with sh and with ENTRYPOINT_SHELL=dash) pass: 22 cases, “Entrypoint tests passed.”
Console (Node 24): npm ci --ignore-scripts, npm run check:api, tsc --noEmit, vitest run pass: “Generated API types match docs/openapi.yaml (sha256 aa697997…ce66)”, which equals shasum -a 256 docs/openapi.yaml and openapiSha256; typecheck clean; 205 tests passed
Differential render of the console nginx configuration (below) identical non-comment output in six configurations
HTTP probe over raw TCP against the built knotrel-server (below) every case as documented
Citation check of docs/threat-model.md and docs/releases/v1.0-criterion-3-evidence.md (script resolving each file.rs test_N / file.rs::name to a function in that file; mutation-tested with a renamed test) 35 and 189 citations; none missing

Not run: Clippy, rustdoc, cargo semver-checks, the console’s lint, format and build, the Playwright e2e suite and smoke-container.sh (no Docker); CI runs them.

10.2 Probes

N6, raw TCP (source-managed, KNOTREL_MAX_IMPORT_BODY_BYTES=1024, metrics on). Import: chunked body cut inside a chunk and half-closed → 400 invalid_request “request body could not be read”; Content-Length: 500 with 100 bytes then half-close → 400, same body; Content-Length: 2000 with no body sent → 413 payload_too_large at once; chunked 1025 bytes, and 512 + 512 + 1 bytes → 413; chunked exactly 1024 bytes → read in full (then 400 “request body is not valid JSON”); Transfer-Encoding: chunked with a stray Content-Length: 99999, in either header order → the chunked body is read (hyper drops the length), not a 413. /v1/batch with Content-Length: 2097152 and 100 bytes then half-close → 400 unreadable; chunk size overflow → 400 unreadable; /v1/feeder/events truncated chunk → 400 unreadable. Malformed or overflowing Content-Length never reaches the handler (hyper answers 400 or 431). After these failures knotrel_imports_in_progress is back to 0, and a session plus a valid import succeed (201, generation 1).

S13, differential render without Docker. The 1dd97b8 entrypoint and templates were run with the old image’s ENV defaults, followed by an emulation of the nginx image’s 20-envsubst-on-templates.sh (NGINX_ENVSUBST_FILTER=KNOTREL_); the 711ce05 entrypoint was run with the new ENV and its own rendering. Compared: default.conf, api-proxy.inc, console-config.json and both listen files. With the old names on the old side and the new names (or the aliases) on the new side, the non-comment output is identical for: defaults; alias only; every variable set (IPv6 upstream with a path, two listen addresses, wildcard server names, label); aliases for both upstream variables; a value with an embedded newline (same output on both sides, see DV1). Only comment lines differ. Every location, the Host and Origin/Sec-Fetch-Site maps, the allowlist, the header stripping and nginx.conf (one comment) are unchanged, and console/container/knotrel/ is untouched by the range. Behavior differences: an empty KNOTREL_UPSTREAM_TIMEOUT was refused by the old image and now falls back to 35s (documented: an empty value counts as not set, docs/console.md:115); the new alias warnings and the refusal of two different values. The validation regexes are byte-for-byte those of 1dd97b8, applied to the resolved values.

10.3 Verdicts

Item PR Verdict Evidence
N6 #126 RESOLVED api.rs:1502-1534 read_import_body: a declared length above the limit is refused before the read (:1513-1517), each data frame is checked against the remaining budget, and every stream error is Unreadable, so a stream error cannot become a limit error. feeder_import maps only TooLarge to 413 (:1566-1574). body_rejection_response (:1066-1074) gives 413 only for axum’s LengthLimitError and the fixed 400 otherwise; before, the JSON routes already answered 400 for those errors, with axum’s text, so this part is a message change only. permit.received(read.is_ok()) is unchanged, so both failures stay payload_rejected (observability-contract row). Tests test_17–test_21 assert what compatibility.md §3, http-api.md (bounds, validation step 3a, status and code tables), integration-contract.md step 3a and OpenAPI describe. The exception is recorded in compatibility.md §3 and needs no OpenAPI approval entry (descriptions only)
S13 #128 RESOLVED configuration.rs:173-175, :536-538: the prefix and the two legacy names are skipped before Setting::parse; no server setting starts with KNOTREL_CONSOLE_ (setting_names test asserts it); near-miss names still fail (unknown_server_like_names_still_fail). Entrypoint precedence (15-knotrel-console.sh resolve_alias) matches the table in docs/console.md:117-123 in all five rows, tested by test-entrypoint.sh and smoke-container.sh. Gateway allowlist, Host/Origin checks and upstream validation unchanged; rendered configuration equivalent (10.2). stability.md, compatibility.md §3, http-api.md, deployment.md, threat-model T3.1 and T3.10 agree with the code
N15 #129 RESOLVED Rows 9.3-f and 9.3-y now say busy and cite feeder_admission.rs; F2 closed with the §2.3 wording that the server matches (integration-contract.md:80); 9.1-d no longer cites e2e_rebuild.rs test_22 for event_failed (it is cited for the 409 diagnostics in 9.3-p, which it asserts); header refreshed; §3.8 maps the tests added since the soak. Every cited test exists, and the spot-checked claims hold: events.rs test_26 part 2 (busy, no x-knotrel-state-version, resubmission 200), test_20 (event_failed and every index field at first, middle, last), test_29 (unverifiable_duplicate, single and multi-event), e2e_rebuild.rs test_22 (source_predecessor_mismatch, desynchronized)
N16 #129 PARTIAL Content resolved: T1.3 (byte limits, N6 classification), T1.5 (too_many_connections), T1.6 (lanes, busy, feeder_admission.rs), T1.9 (B10 wording), T1.10 (per-lane metrics), new T1.16, T1.17 and T3.10; every cited test exists and asserts what is claimed (for example lifecycle.rs connection_limit_rejects_extra_connections_and_recovers asserts the exact body; metrics.rs enumerates every lane value). Not resolved: the maintainer’s acceptance, which the finding asked to record, is still missing (threat-model.md:11, “The maintainer has not accepted it yet”), and the status line reads “accepted pending maintainer review” (:3), which contradicts it (DV3)
N18 #129 RESOLVED Cargo.toml:6 and the knotrel-core dependency 1.0.0; Cargo.lock; console/package.json 1.0.0 and lock; OpenAPI info.version: 1.0.0; regenerated types and digest match (10.1); supportedServer >=0.9.0 <1.1.0 (console/package.json:33), also in docs/console.md:370 and the release notes draft. The e2e harness no longer passes KNOTREL_SERVER_BIN to the server (console/e2e/harness.ts:45-54). The mandatory console compatibility run against the rc and 0.9.x is a release step, not verifiable here
Plan §3.6 (#130) #130 (open) PARTIAL Complete: git diff --stat 1dd97b8 711ce05 -- crates/ Cargo.toml Cargo.lock rust-toolchain.toml lists exactly the files the section attributes (api.rs, configuration.rs, tests/import.rs, the server README, Cargo.toml/Cargo.lock), knotrel-core source is unchanged, and every changed item has a row. Correct on the qualification-relevant points: the only success-path change is the import body receipt (read_import_body, with one copy into a Vec reserved from the declared length instead of to_bytes), and the JSON extractor change is inside map_err, so error path only; the configuration change runs at startup only. One factual error, DV2: the version bump is said to change the version string in /v1/info and the version headers

10.4 New findings

None is blocking. None was introduced as a regression by the range: DV1 predates it; DV2 and DV3 are documentation errors.

ID Class Finding Evidence Impact Proposed fix
DV1 Non-blocking (pre-existing; a strict reading of “contract contradicted by code” could make it blocking, maintainer’s call) The console entrypoint validates each value with printf '%s' "$v" \| grep -Eq '^…$', which succeeds if any line matches. A value with an embedded newline passes and is rendered verbatim: KNOTREL_CONSOLE_UPSTREAM=$'http://127.0.0.1:8080\n; return 200 injected; #' renders proxy_pass http://127.0.0.1:8080 followed by ; return 200 injected; #/health;, which nginx parses as directives; KNOTREL_CONSOLE_LISTEN=$'8080\n0.0.0.0:80;evil' renders listen 0.0.0.0:80;evil;; a two-line label produces invalid JSON in console-config.json. The 1dd97b8 entrypoint behaves identically (10.2) console/container/entrypoint/15-knotrel-console.sh:60, :63, :65, :70, :74; docs/console.md:129 (“Invalid values stop the container at startup”); test-entrypoint.sh “nginx directive in the upstream” covers only a single-line value Reachable only by whoever sets the container environment (the operator), so no remote input reaches it; but the validation that T3.1 relies on (“upstream fixed by KNOTREL_CONSOLE_UPSTREAM”) can be bypassed by a mistaken or templated value, and the documented guarantee is not true for multi-line values Reject any value containing a line feed before the regex checks (for example case "$v" in *"$nl"*) fail …), and add multi-line cases to test-entrypoint.sh and smoke-container.sh
DV2 Non-blocking The plan says the 1.0.0 version bump changes “the version string in the binaries, /v1/info, the version headers and knotrel_build_info{version}” and attributes it to “every HTTP cell (headers on every response)”. The crate version appears only in knotrel_build_info: /v1/info has no version field, and the “version headers” are graph-state headers (ETag, X-Knotrel-*) crates/knotrel-server/src/metrics.rs:1628 is the only use of CARGO_PKG_VERSION; ServerInfo in docs/openapi.yaml; plan 711ce05:docs/releases/v1.0.0-qualification-plan.md:200, #130 §3.6 row “#129 (N18)” Errs on the safe side (claims more effect than exists) and does not change the perimeter, but the freeze record would cite a wrong effect Say that only the binary metadata and knotrel_build_info{version} change; no HTTP response changes
DV3 Non-blocking The threat-model status reads “accepted pending maintainer review” and, two sentences later, “The maintainer has not accepted it yet” docs/threat-model.md:3, :11 Criterion 7 may be read as met on the strength of the first phrase Say “proposed; refreshed …; not accepted until the maintainer accepts it”, and record the acceptance when given
DV4 Suggestion read_import_body reserves the declared Content-Length (up to the limit, at most 512 MiB) before any body byte arrives. On Linux and macOS this is untouched virtual memory; with the mimalloc allocator on Windows the commit charge may be taken at once. One permit bounds it to one import api.rs:1515 Within the documented sizing (old graph + import body + new graph, T1.8), but a client that holds the permit and sends nothing reserves the full limit until the request timeout Optional: cap the initial reservation (for example to a few MiB) and let the buffer grow; Rmem’s allocation cells will show the effect either way
DV5 Suggestion Small text errors: the entrypoint comment names console/test/entrypoint.test.sh, which does not exist (the tests are console/scripts/test-entrypoint.sh); in console/e2e/harness.ts the class doc comment /** A running knotrel-server owned by the test. */ now sits above serverEnvironment(), so the class lost its doc; plan §3.6 says the JSON-route error path is covered by test_17–test_21, but only test_20 exercises JSON routes 15-knotrel-console.sh:19; harness.ts:44-56; #130 §3.6 row 2 Cosmetic Fix the path, move the comment, cite test_20

Observations, not findings: the JSON routes do not refuse a declared Content-Length above 1 MiB from the headers (they wait for the body, or the request timeout), unlike the import, and a declared-oversize JSON body cut short answers 400, not 413. Both agree with the documents, which promise the up-front refusal only for the import and 413 only when the limit is exceeded. A request completed and then half-closed by the client gets no response (hyper’s default); unchanged by the range and not in the contract.

10.5 Verdict on the delta

The code and contract changes of 1dd97b8..711ce05 are verified: N6, S13, N15 and N18 are resolved; N16 waits only for the maintainer’s acceptance (and the status wording, DV3); plan §3.6 in #130 is complete and its conclusion holds, with one wrong effect to correct (DV2). No blocking finding. DV1 is a pre-existing console validation gap that the maintainer may want closed before the console image is released.

10.6 Follow-up: fixes of DV1, DV2, DV3 and DV5 (knotrel/knotrel#132)

Verified by the same independent AI review session, read-only, on knotrel/knotrel#132 at head 7f0c1fe053dff318f7bb8199c3667fe3becc7881 (branch fix/console-entrypoint-multiline-values, one commit on main at 70d4c1c, the merge of #130). DV4 is recorded in the v1.0 backlog for 1.x and was not re-verified.

Finding Verdict Evidence
DV1 RESOLVED single_line in 15-knotrel-console.sh refuses a line feed or a carriage return, applied to the resolved upstream (so also to the alias), the resolved timeout, the server names, the listen addresses and the label, before each regex check and before anything is rendered. test-entrypoint.sh: 29 cases pass with sh and with dash (22 before, plus 7). Run against the 711ce05 entrypoint, 6 of the 7 new cases fail, so they detect the defect; the carriage-return upstream case passes there too, because the URL regex already refused it. The reviewer’s own probes (with dash): a line feed or a carriage return in each of the five values, via the new name and via either alias, and a trailing line feed, all exit 1 with “<name> must be a single line” (or the different-values refusal when both names are set) and render nothing. Differential render against 1dd97b8 (as in 10.2) for seven valid configurations (defaults, alias only, both names equal, every variable set, both aliases, server names with the default label): identical non-comment output; the templates are unchanged by #132. docs/console.md states the single-line rule
DV2 RESOLVED Plan §3.5 and the §3.6 row “#129 (N18)” now say the bump changes only knotrel_build_info{version} (CARGO_PKG_VERSION); no other mention of /v1/info or version headers remains in the plan
DV3 RESOLVED docs/threat-model.md:3: “proposed; awaiting the maintainer’s acceptance”, consistent with :11. N16 itself stays PARTIAL until the maintainer accepts the threat model
DV5 RESOLVED The entrypoint comment names console/scripts/test-entrypoint.sh; the class doc comment in console/e2e/harness.ts is back above KnotrelServer; plan §3.6 cites test_20 for the JSON routes

Suggestion, not blocking: the carriage-return case could use a value whose first line passes the regex on its own (for example a valid label followed by \r and text), so that it would fail without single_line.

11. Delta verification 711ce05..0c49b2a (2026-11-23)

Independent AI review (not a human audit, not a security certification). Requested by the maintainer (“complete N5a and the alignment to the RC, verify the delta and record the new SHA without reopening the choices already approved”). The approved choices (the barrier precedence, the S10 meaning of experimental, the -rc.N form) were checked against the code and documents, not re-argued.

   
Reviewed range 711ce05f4acc4f892f1e4dc242c91197e6fdd7ad..0c49b2a689ef548f53581c487edecd2ecc63b2df (main, the 1.0.0-rc.1 campaign candidate): #130 (plan, verified in §10), #132 (DV fixes, verified in §10.6), #131 (this document), #133 (approvals, documentation only), #134 (N5a, N5b, S10), #135 (test-only), #136 (1.0.0-rc.1 alignment and release tooling). Every file:line below refers to 0c49b2a
Also read PR knotrel/knotrel#137 at head 107e4d4237048f47df44458a82c2c254b7cd546a (open): plan §3.7 and the §3.5 candidate record
Reviewer The AI model session of sections 10 and 10.6: Claude Opus 5.5 (claude-opus-5-5) in Claude Code. It wrote none of the reviewed changes. No subagents
Method As in section 10: code and documents read directly, PR descriptions treated as claims, the reviewer’s own probes outside the repository

11.1 Commands

Command Result
cargo test --workspace --all-features --locked pass: 630 passed, 0 failed, 1 ignored (35 test binaries plus doctests), including bootstrap.rs test_9, test_22, test_23
python3 scripts/public-api.py check --base 711ce05 pass: “snapshot, classification, policy and stability.md agree (615 classified keys)”
OpenAPI compatibility as ci.yml runs it, against v0.9.0 pass: test_openapi_compat.py 28 tests OK; “OpenAPI compatible: 10 approved breaking change(s), 0 note(s)”. Against 711ce05: “0 approved breaking change(s)” (descriptions and info.version only)
tests/test_release_publishing.py, test_readme_check.py, test_crate_documentation.py, test_public_api.py pass: 48, 11, 4 and 50 tests OK
scripts/check-readme.py . and --release 1.0.0-rc.1 “READMEs consistent” / “READMEs consistent for release v1.0.0-rc.1”
scripts/check-release-notes.sh 1.0.0-rc.1 exit 1: the notes’ status is still “DRAFT, not released”, as release procedure §4.1 intends until the last change before the tag
Console (Node 24): npm ci --ignore-scripts, check:api, tsc --noEmit, vitest run pass: types match docs/openapi.yaml (sha256 1639a0e0…20e9, equal to openapiSha256); typecheck clean; 205 tests
node-semver on supportedServer >=0.9.0 <1.0.0 \|\| >=1.0.0-rc.1 <1.1.0 satisfied by 0.9.0, 0.9.4, 1.0.0-rc.1, 1.0.0-rc.2, 1.0.0, 1.0.5; not by 0.8.9, 1.0.0-rc.0, 1.0.1-rc.1, 1.1.0-rc.1, 1.1.0
#132 merge identity git diff 7f0c1fe 7d3dc8f over the files #132 changes is empty: the merge equals the head verified in §10.6

Not run: Clippy, rustdoc, cargo semver-checks, the console’s lint and build, Playwright, smoke-container.sh, and the release workflows themselves (no tag, no publication); CI runs the first ones.

11.2 N5a probe

Built knotrel-server at 0c49b2a, source-managed, driven over HTTP with real time: session s epoch 1 (1 s lease), import, events to sequence 2 and pos-2, barrier → synchronized; lease left to expire, heartbeat → stale (last_expired_epoch == 1). Before and after every case below the reviewer compared /ready (status and body) and /v1/stats (body and ETag).

Barrier under epoch 1 (fenced), combined with Answer State unchanged
B8 premature sequence; B9 older sequence; B7 mismatched position 409 fenced_feeder_session yes
position of 257 bytes; 129 × U+00E9 (129 characters, 258 bytes); empty position 409 fenced_feeder_session yes
null position with a premature sequence; omitted position with sequence 0; sequence u64::MAX; exact match (B1) 409 fenced_feeder_session yes
a stale generation (checked before the fence) 409 stale_generation yes
a desynchronized graph after a gap (B5 before the fence; separate run) 409 graph_desynchronized yes
another session id; a stale body instance_id; graph_id other; a string sequence 409 fenced_feeder_session, 409 stale_instance_id, 400 invalid_graph_id, 422 invalid_request yes

Under a newly registered epoch 2: B8, B9, B7 answer barrier_not_reached, superseded_barrier, barrier_position_mismatch and an oversized position 422, each without a state change; epoch 1 is then refused by the session check; the exact barrier answers 200 synchronized and /ready 200.

11.3 Verdicts

Item PR Verdict Evidence
DV1–DV3, DV5 #132 RESOLVED Verified in §10.6; merged unchanged (11.1)
N5a #134 RESOLVED service.rs:1305-1386, GraphState::declare_barrier: failed, validate_session_and_lease, generation, B3/B4, B5, then the fence (:1337-1349), then check_optional_source_position, B8, B9, B7, B1/B2, which is the approved precedence. Each check’s code is unchanged; only the fence moved. Probe 11.2 and bootstrap.rs test_22 (six combined faults, /ready, stats and ETag unchanged), test_23 (new epoch reaches B8, B9, B7, then synchronized) and the updated test_9 agree. integration-contract.md §4.3 and §5.3 (guaranteed precedence), http-api.md (barrier error precedence), OpenAPI (barrier 409 description), compatibility.md §3 (approved exception, no OpenAPI entry needed: statuses and codes unchanged) and the rc and 1.0.0 release notes describe the same order
N5b #134 RESOLVED integration-contract.md §3.1 now says the header is checked before any permit and the body instance_id after the parse, which on import is after the import permit and the body receipt; matches service.rs:2512-2526 (parse, then the instance_id comparison, inside the import job)
S10 #134 RESOLVED EngineConfig::is_experimental rustdoc (knotrel-core/src/configuration.rs:68-76), the ServerInfo.experimental field comment (knotrel-server/src/lib.rs:368-372), OpenAPI ServerInfo.experimental, compatibility.md §2.2, stability.md and http-api.md all state: engine qualification, not a stability class; true→false only on promotion in a minor release; never false→true for an existing engine. Documentation only; no behavior change
F1 (test races) #135 RESOLVED measure_e2e_driver.rs: the diagnostic is written before the PID file that triggers SIGINT; the feeder-phase bounds go from 5/10 s to 60/90 s. Test code only
1.0.0-rc.1 alignment #136 RESOLVED Lockstep 1.0.0-rc.1: Cargo.toml:6 and knotrel-core = "=1.0.0-rc.1" (:14), Cargo.lock, console/package.json and its lock, integrations/postgres-feeder, OpenAPI info.version, regenerated types and digest. supportedServer admits the rc and excludes other prereleases (11.1). Release tooling, checked as security-relevant: no permissions: block, trigger or step was added or widened in release.yml, console-release.yml or reproducible-build.yml; the edits are input descriptions and anchored version regexes, and inputs still reach shell only through env:. Every version gate accepts exactly X.Y.Z or X.Y.Z-rc.N (N ≥ 1, no leading zero); reproducible-build.yml and check-reproducible-build.sh were narrowed from any -[0-9A-Za-z.]+ suffix; the console lockstep check now compares the full version instead of dropping the suffix. An rc cannot become “Latest” or stable: create-or-verify-draft-release.sh creates it with --prerelease, and both it and finalize-release.sh refuse an existing release whose isPrerelease does not match the version, in either direction, before gh release edit --draft=false (which passes no --latest); GitHub never marks a prerelease as latest. The console image’s latest tag is refused for an rc (console-release.yml:74-78, pre-existing). check-readme.py keeps the READMEs on the latest stable release during an rc. Release procedure §4.1 documents the rules
Plan §3.7 and §3.5 candidate record #137 (open) RESOLVED git diff --stat 711ce05 0c49b2a -- crates/ Cargo.toml Cargo.lock rust-toolchain.toml lists seven files; §3.7 attributes every one (service.rs N5a; the two documentation comments of S10; Cargo.toml/Cargo.lock; the two test files) and adds #132 as not part of a measured binary. Its claims hold: the reorder changes no check’s code, and on a valid barrier the same comparisons run; the version string reaches only knotrel_build_info{version}. §3.5 records candidate 0c49b2a689ef548f53581c487edecd2ecc63b2df with version 1.0.0-rc.1

11.4 New findings

None is blocking.

ID Class Finding Evidence Impact Proposed fix
DV6 Suggestion The exact knotrel-core = "=X.Y.Z-rc.N" requirement of a candidate, and the return to the caret form for a stable release, are documented but checked by no script or workflow CONTRIBUTING.md (release candidates); release procedure §4.1; no check in release.yml, publish-crates.sh or verify-dry-run-publish.sh If the pin is forgotten, a published server candidate could resolve a later core prerelease or the final 1.0.0 Check the requirement in validate-inputs-and-metadata (exact for -rc.N, caret otherwise)
DV7 Suggestion Plan §3.7 maps only crates/, Cargo.* and the console entrypoint; #136’s release-tooling changes are not listed. They change neither the measured binary nor a timed path, but they are how the candidate is built, checked for reproducibility and published #137 §3.7; git diff --stat 711ce05 0c49b2a -- scripts/ .github/workflows/ Completeness of the freeze record only One row: release tooling, not part of any measured binary

11.5 Verdict on the delta

The code and contract changes of 711ce05..0c49b2a are verified: N5a, N5b, S10, the test-race fix and the 1.0.0-rc.1 alignment are resolved, the rc release tooling cannot publish a candidate as “Latest” or as a stable release, and plan §3.7 covers the range. No blocking finding. Together with section 10, the whole delta from the verified 1dd97b8 to the candidate 0c49b2a689ef548f53581c487edecd2ecc63b2df is verified. N16 still waits for the maintainer’s acceptance of the threat model (section 10.3).