Skip to content

fix: seal graph directories, align the two engines, page the query service - #229

Open
johnsonlee wants to merge 37 commits into
mainfrom
claude/busy-ramanujan-0pnilb
Open

johnsonlee wants to merge 37 commits into
mainfrom
claude/busy-ramanujan-0pnilb

Conversation

@johnsonlee

Copy link
Copy Markdown
Owner

Change

Each item of the storage/query review was first reproduced, then fixed, then verified.

  • Data safety. GraphStore.save wrote in place. As a result, save(loadMapped(dir), dir) reloaded as a graph with 0 nodes, and a stale backward.* transpose from an earlier graph answered a new graph's incoming(). Saves now fill a sibling staging directory and swap it in (GraphDirectoryPublication). A directory that cannot be renamed, such as a mount point, has its files replaced instead, with the manifest written last. A target that holds anything other than graph files is refused. Both readers check every file's size against graph.manifest before decoding. Before this, a truncated graph.labels/forward.graph silently answered queries from the wrong bytes, and several other truncations panicked. The Rust reader no longer zero-pads a short graph.labels, and it reports a decoder panic during load as corrupt graph. graphite verify <dir> and GRAPHITE_VERIFY_GRAPHS=1 hash every byte, and pack refuses a damaged sealed directory.
  • Storage evolvability. Every writer seals a graph directory with graph.manifest: @producer, @storage-format, and the size and SHA-256 of every file. A later storage format is refused by name. The CLI's private list of known graph files moved into graphite-storage (OPTIONAL_ENTRIES); it had been missing graph.completeness. The writer no longer needs a list of stale files to delete.
  • Model fidelity. Adds a Rust reader of graph.completeness, and analysisStatus(x) / dispatchGap(c) in both engines. The production query path can now tell a body that was never read from one that calls nothing.
  • Dual-implementation drift. A differential probe of 30 queries found 9 differences. Both engines now use openCypher integer arithmetic (Kotlin returned 7/2 = 3.5) and fail overflow with long overflow (Rust wrapped, Kotlin widened to a double). The Kotlin CLI writes non-finite floats as JSON strings (Gson crashed on sqrt(-1)). Write clauses, invalid regexes and substring bounds fail with one shared one-line message. Kotlin used to print a stack trace or the last line ^ of a regex error, and Rust panicked on substring('abc', 2, -1).
  • Query service. Adds offset/nextOffset paging on the Cypher routes, a bounded and resumable GET /api/graphs/{id}/hierarchy (and /api/hierarchy), and GET /api/capabilities (server contract, plus per-graph producer, format and recorded facts), with matching MCP tools. The JSON interchange can carry supertypes.
  • Scale. NodeId.next() was one process-wide counter, so building the same input a second time in one JVM wrote a node offset index 3× the size. JavaProjectLoader now numbers each build from 1 (NodeId.numbered), and ids allocated afterwards stay above every built id.
  • Engineering. Deterministic clocks and checkpoints replace timing-dependent assertions in the idle-clock tests (Rust), the cancellation test and the explorer start test (Kotlin). Adds .github/scripts/verify-affected.py, which runs only the checks a change can affect, with Rust and JVM in parallel; the full JVM check took 14m46s locally.
  • Extension boundary (a design tradeoff, not a defect): documented in the README (en/zh).

Behaviour changes: integer overflow is an error in both dialects. The Kotlin engine's 7/2 is now 3 and 2^3 is now 8.0.

Verification

  • CI / evidence links: none yet; everything below is local only. Hosted CI has not run.
  • Correctness: the JVM check (with detekt) passes, and the Kover gate is 100% on all 7 modules. Rust: 1056 tests pass; clippy and fmt are clean. Two failures also fail on the unchanged base commit in this container, so they come from the environment: the IPv6 listener test (::1 cannot be bound, os error 97), and GraphParityRegressionTest (41 SwitchExample$1 facts that depend on the local javac). End to end: a real graph was built through the CLI and verifies with producer: graphite-jvm 1.0.0-SNAPSHOT. Every truncation is refused by default, and every same-size flip is refused under GRAPHITE_VERIFY_GRAPHS=1. After the fix, the engine probe shows 3 of 36 differences: two are row order of unordered LIMIT 1 (identical with ORDER BY), and date() is not implemented in the legacy Kotlin engine.
  • Query performance: no multi-graph measurement yet. Query paths change only for the new functions and paging.
  • Graph loading: adds one manifest read plus one stat per listed file per load. Not yet measured on the fixture64 corpus.
  • Graph construction: the save now hashes every file for the manifest and swaps a directory. Not yet measured.
  • Baseline / workload (where performance is affected): fixture64 via the benchmark gates.
  • Acceptance status / pending proof or blockers: performance acceptance is pending the hosted benchmark gates. By default, loading checks sizes only; same-size damage is caught by verify or GRAPHITE_VERIFY_GRAPHS=1, because hashing on every load would exceed the loading CPU limits.

Generated by Claude Code

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

📊 Test Coverage

Module Line Coverage
core ✅ 100.00% (3058/3058)
cypher ✅ 100.00% (6801/6801)
explore ✅ 100.00% (5507/5507)
ir ✅ 100.00% (219/219)
query ✅ 100.00% (379/379)
sootup ✅ 100.00% (6083/6083)
webgraph ✅ 100.00% (8405/8405)

View full logs

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Benchmark report

Base: 70f908cf6acf4b80ce74d038cecba07f119a544b · Head: ad68bda7ac07f2a711f8cebf7f70902e9149d87b

Workflow and raw evidence · Full report

Benchmark correctness and OOM: FAIL

Timing differences are report-only; correctness, OOM and required coverage decide this gate. GitHub runner timings do not establish performance acceptance.

Base: 70f908cf6acf4b80ce74d038cecba07f119a544b
Head: ad68bda7ac07f2a711f8cebf7f70902e9149d87b

frontend-build-save

  • PASS base frontend build/save correctness: fresh real64 build/save plus whole Tika/Hive/Kotlin correctness/readback complete; 7 G1 JVM receipts under 4 GiB; ExitOnOutOfMemoryError rejects even recoverable production OOM
  • PASS base frontend build/save heap: fresh real64 build/save plus whole Tika/Hive/Kotlin correctness/readback complete; 7 G1 JVM receipts under 4 GiB; ExitOnOutOfMemoryError rejects even recoverable production OOM
  • PASS base frontend build/save coverage: fresh real64 build/save plus whole Tika/Hive/Kotlin correctness/readback complete; 7 G1 JVM receipts under 4 GiB; ExitOnOutOfMemoryError rejects even recoverable production OOM
  • PASS head frontend build/save correctness: fresh real64 build/save plus whole Tika/Hive/Kotlin correctness/readback complete; 7 G1 JVM receipts under 4 GiB; ExitOnOutOfMemoryError rejects even recoverable production OOM
  • PASS head frontend build/save heap: fresh real64 build/save plus whole Tika/Hive/Kotlin correctness/readback complete; 7 G1 JVM receipts under 4 GiB; ExitOnOutOfMemoryError rejects even recoverable production OOM
  • PASS head frontend build/save coverage: fresh real64 build/save plus whole Tika/Hive/Kotlin correctness/readback complete; 7 G1 JVM receipts under 4 GiB; ExitOnOutOfMemoryError rejects even recoverable production OOM
  • PASS host OOM events: before=Some({"high": 0, "low": 0, "max": 0, "oom": 0, "oom_group_kill": 0, "oom_kill": 0, "sock_throttled": 0}); after=Some({"high": 0, "low": 0, "max": 0, "oom": 0, "oom_group_kill": 0, "oom_kill": 0, "sock_throttled": 0})
Case Stage Measurement N base/head Base ms Head ms Delta ms Delta %
real64-build-save frontend-build-save JMH SingleShotTime 1/1 342472.953 289767.043 -52705.910 -15.39%

native-real64

  • PASS base-real64-pressure-correctness: All complete responses, repeated-request stability and semantic scope assertions passed
  • PASS head-real64-pressure-correctness: All complete responses, repeated-request stability and semantic scope assertions passed
  • PASS matched-real-source-inputs: source JAR/shard hashes match: true; exact 73 query texts match: true
  • FAIL base-head-reviewed-semantics: Exact queries and complete typed responses, or compiled-in directed expectations bound to both product content identities; exact query match: true; exact response match: false; see semantic-transitions.json
  • PASS fixed-real64-pressure-protocol: 73 cases; concurrency4; first-use1/warmup2/pressure20; pressure p50<100ms selects isolated40 at concurrency1. Selection changes reporting only, never acceptance.
  • PASS native-host-oom: Linux cgroup OOM counters must remain unchanged; every native process must survive all requests. JVM heap ceilings are checked by frontend-build-save
  • PASS base-native-concurrent-error-recovery: Separate real64 server: four concurrent complete requests, outcome metrics, invalid inputs and exact recovery results passed; deterministic rejection/deadline contracts are covered by production-handler unit tests, not these paired network probes; no performance samples
  • PASS head-native-concurrent-error-recovery: Separate real64 server: four concurrent complete requests, outcome metrics, invalid inputs and exact recovery results passed; deterministic rejection/deadline contracts are covered by production-handler unit tests, not these paired network probes; no performance samples
Case Stage Measurement N base/head Base ms Head ms Delta ms Delta %
real64-loading registry-ready single fresh-process boundary 1/1 37240.886 5170.070 UNAVAILABLE UNAVAILABLE
real64-loading startup-through-first-use-oracle single fresh-process boundary 1/1 38478.030 6291.983 UNAVAILABLE UNAVAILABLE
zero/global-wide-four-properties pressure nearest-rank p50 20/20 0.932 0.980 UNAVAILABLE UNAVAILABLE
zero/global-wide-four-properties pressure nearest-rank p95 20/20 3.625 4.911 UNAVAILABLE UNAVAILABLE
zero/global-wide-class-pair pressure nearest-rank p50 20/20 0.630 0.635 UNAVAILABLE UNAVAILABLE
zero/global-wide-class-pair pressure nearest-rank p95 20/20 3.287 5.885 UNAVAILABLE UNAVAILABLE
zero/global-wide-name-pair pressure nearest-rank p50 20/20 0.793 0.881 UNAVAILABLE UNAVAILABLE
zero/global-wide-name-pair pressure nearest-rank p95 20/20 1.980 4.906 UNAVAILABLE UNAVAILABLE
zero/global-wide-caller-class pressure nearest-rank p50 20/20 0.579 0.737 UNAVAILABLE UNAVAILABLE
zero/global-wide-caller-class pressure nearest-rank p95 20/20 4.720 4.104 UNAVAILABLE UNAVAILABLE
zero/global-wide-callee-class pressure nearest-rank p50 20/20 0.533 0.654 UNAVAILABLE UNAVAILABLE
zero/global-wide-callee-class pressure nearest-rank p95 20/20 1.417 2.555 UNAVAILABLE UNAVAILABLE
zero/global-wide-provenance pressure nearest-rank p50 20/20 0.644 0.742 UNAVAILABLE UNAVAILABLE
zero/global-wide-provenance pressure nearest-rank p95 20/20 1.677 4.909 UNAVAILABLE UNAVAILABLE
zero/global-wide-aliased pressure nearest-rank p50 20/20 0.596 0.495 UNAVAILABLE UNAVAILABLE
zero/global-wide-aliased pressure nearest-rank p95 20/20 2.107 1.092 UNAVAILABLE UNAVAILABLE
zero/global-wide-parameterized-as-literal pressure nearest-rank p50 20/20 0.652 0.604 UNAVAILABLE UNAVAILABLE
zero/global-wide-parameterized-as-literal pressure nearest-rank p95 20/20 4.037 1.737 UNAVAILABLE UNAVAILABLE
zero/global-wide-wrapped-case-insensitive pressure nearest-rank p50 20/20 0.580 0.638 UNAVAILABLE UNAVAILABLE
zero/global-wide-wrapped-case-insensitive pressure nearest-rank p95 20/20 2.897 3.301 UNAVAILABLE UNAVAILABLE
zero/global-wide-wrapped-case-insensitive-distinct pressure nearest-rank p50 20/20 0.661 0.694 UNAVAILABLE UNAVAILABLE
zero/global-wide-wrapped-case-insensitive-distinct pressure nearest-rank p95 20/20 4.439 3.071 UNAVAILABLE UNAVAILABLE
targeted/global-wide-four-properties pressure nearest-rank p50 20/20 51.780 52.604 UNAVAILABLE UNAVAILABLE
targeted/global-wide-four-properties pressure nearest-rank p95 20/20 72.909 91.563 UNAVAILABLE UNAVAILABLE
targeted/global-wide-class-pair pressure nearest-rank p50 20/20 2.488 14.280 UNAVAILABLE UNAVAILABLE
targeted/global-wide-class-pair pressure nearest-rank p95 20/20 26.689 90.999 UNAVAILABLE UNAVAILABLE
targeted/global-wide-name-pair pressure nearest-rank p50 20/20 1.059 1.669 UNAVAILABLE UNAVAILABLE
targeted/global-wide-name-pair pressure nearest-rank p95 20/20 4.791 2.851 UNAVAILABLE UNAVAILABLE
targeted/global-wide-caller-class pressure nearest-rank p50 20/20 1.018 1.310 UNAVAILABLE UNAVAILABLE
targeted/global-wide-caller-class pressure nearest-rank p95 20/20 2.077 2.890 UNAVAILABLE UNAVAILABLE
targeted/global-wide-callee-class pressure nearest-rank p50 20/20 1.084 1.185 UNAVAILABLE UNAVAILABLE
targeted/global-wide-callee-class pressure nearest-rank p95 20/20 2.701 3.041 UNAVAILABLE UNAVAILABLE
targeted/global-wide-provenance pressure nearest-rank p50 20/20 1.014 1.011 UNAVAILABLE UNAVAILABLE
targeted/global-wide-provenance pressure nearest-rank p95 20/20 2.338 1.930 UNAVAILABLE UNAVAILABLE
targeted/global-wide-aliased pressure nearest-rank p50 20/20 1.177 0.925 UNAVAILABLE UNAVAILABLE
targeted/global-wide-aliased pressure nearest-rank p95 20/20 2.931 1.990 UNAVAILABLE UNAVAILABLE
targeted/global-wide-parameterized-as-literal pressure nearest-rank p50 20/20 1.009 1.138 UNAVAILABLE UNAVAILABLE
targeted/global-wide-parameterized-as-literal pressure nearest-rank p95 20/20 2.752 1.487 UNAVAILABLE UNAVAILABLE
targeted/global-wide-wrapped-case-insensitive pressure nearest-rank p50 20/20 1.111 1.257 UNAVAILABLE UNAVAILABLE
targeted/global-wide-wrapped-case-insensitive pressure nearest-rank p95 20/20 2.012 2.635 UNAVAILABLE UNAVAILABLE
targeted/global-wide-wrapped-case-insensitive-distinct pressure nearest-rank p50 20/20 1.326 1.567 UNAVAILABLE UNAVAILABLE
targeted/global-wide-wrapped-case-insensitive-distinct pressure nearest-rank p95 20/20 2.690 3.018 UNAVAILABLE UNAVAILABLE
dense/global-wide-four-properties pressure nearest-rank p50 20/20 3.599 3.454 UNAVAILABLE UNAVAILABLE
dense/global-wide-four-properties pressure nearest-rank p95 20/20 6.817 7.581 UNAVAILABLE UNAVAILABLE
dense/global-wide-class-pair pressure nearest-rank p50 20/20 3.990 3.887 UNAVAILABLE UNAVAILABLE
dense/global-wide-class-pair pressure nearest-rank p95 20/20 5.703 6.397 UNAVAILABLE UNAVAILABLE
dense/global-wide-name-pair pressure nearest-rank p50 20/20 3.075 4.131 UNAVAILABLE UNAVAILABLE
dense/global-wide-name-pair pressure nearest-rank p95 20/20 5.120 14.486 UNAVAILABLE UNAVAILABLE
dense/global-wide-caller-class pressure nearest-rank p50 20/20 2.741 2.713 UNAVAILABLE UNAVAILABLE
dense/global-wide-caller-class pressure nearest-rank p95 20/20 4.705 5.605 UNAVAILABLE UNAVAILABLE
dense/global-wide-callee-class pressure nearest-rank p50 20/20 3.327 2.797 UNAVAILABLE UNAVAILABLE
dense/global-wide-callee-class pressure nearest-rank p95 20/20 5.442 5.639 UNAVAILABLE UNAVAILABLE
dense/global-wide-provenance pressure nearest-rank p50 20/20 3.029 3.043 UNAVAILABLE UNAVAILABLE
dense/global-wide-provenance pressure nearest-rank p95 20/20 5.904 4.709 UNAVAILABLE UNAVAILABLE
dense/global-wide-aliased pressure nearest-rank p50 20/20 2.834 3.933 UNAVAILABLE UNAVAILABLE
dense/global-wide-aliased pressure nearest-rank p95 20/20 4.675 6.690 UNAVAILABLE UNAVAILABLE
dense/global-wide-parameterized-as-literal pressure nearest-rank p50 20/20 3.285 3.238 UNAVAILABLE UNAVAILABLE
dense/global-wide-parameterized-as-literal pressure nearest-rank p95 20/20 8.781 4.601 UNAVAILABLE UNAVAILABLE
dense/global-wide-wrapped-case-insensitive pressure nearest-rank p50 20/20 3.102 2.956 UNAVAILABLE UNAVAILABLE
dense/global-wide-wrapped-case-insensitive pressure nearest-rank p95 20/20 6.123 5.216 UNAVAILABLE UNAVAILABLE
dense/global-wide-wrapped-case-insensitive-distinct pressure nearest-rank p50 20/20 9.101 8.968 UNAVAILABLE UNAVAILABLE
dense/global-wide-wrapped-case-insensitive-distinct pressure nearest-rank p95 20/20 104.103 105.144 UNAVAILABLE UNAVAILABLE
localized-early/global-wide-four-properties pressure nearest-rank p50 20/20 1.344 1.523 UNAVAILABLE UNAVAILABLE
localized-early/global-wide-four-properties pressure nearest-rank p95 20/20 2.160 3.574 UNAVAILABLE UNAVAILABLE
localized-middle/global-wide-four-properties pressure nearest-rank p50 20/20 2.495 2.771 UNAVAILABLE UNAVAILABLE
localized-middle/global-wide-four-properties pressure nearest-rank p95 20/20 5.593 5.259 UNAVAILABLE UNAVAILABLE
localized-late/global-wide-four-properties pressure nearest-rank p50 20/20 2.115 2.258 UNAVAILABLE UNAVAILABLE
localized-late/global-wide-four-properties pressure nearest-rank p95 20/20 3.494 4.845 UNAVAILABLE UNAVAILABLE
broad-all-64/global-wide-four-properties pressure nearest-rank p50 20/20 2.979 3.006 UNAVAILABLE UNAVAILABLE
broad-all-64/global-wide-four-properties pressure nearest-rank p95 20/20 3.775 5.729 UNAVAILABLE UNAVAILABLE
schema-label-histogram pressure nearest-rank p50 20/20 1.512 1.274 UNAVAILABLE UNAVAILABLE
schema-label-histogram pressure nearest-rank p95 20/20 2.781 3.192 UNAVAILABLE UNAVAILABLE
schema-key-histogram pressure nearest-rank p50 20/20 3.228 3.045 UNAVAILABLE UNAVAILABLE
schema-key-histogram pressure nearest-rank p95 20/20 7.489 9.065 UNAVAILABLE UNAVAILABLE
schema-relationship-histogram pressure nearest-rank p50 20/20 115.011 120.329 UNAVAILABLE UNAVAILABLE
schema-relationship-histogram pressure nearest-rank p95 20/20 230.136 223.563 UNAVAILABLE UNAVAILABLE
shape-wide-contains pressure nearest-rank p50 20/20 3.890 3.480 UNAVAILABLE UNAVAILABLE
shape-wide-contains pressure nearest-rank p95 20/20 7.369 8.592 UNAVAILABLE UNAVAILABLE
shape-label-scan-callsite pressure nearest-rank p50 20/20 4.019 2.992 UNAVAILABLE UNAVAILABLE
shape-label-scan-callsite pressure nearest-rank p95 20/20 6.366 11.724 UNAVAILABLE UNAVAILABLE
shape-label-scan-method pressure nearest-rank p50 20/20 3.844 2.429 UNAVAILABLE UNAVAILABLE
shape-label-scan-method pressure nearest-rank p95 20/20 8.009 4.971 UNAVAILABLE UNAVAILABLE
shape-label-scan-constant pressure nearest-rank p50 20/20 3.674 2.367 UNAVAILABLE UNAVAILABLE
shape-label-scan-constant pressure nearest-rank p95 20/20 6.639 6.344 UNAVAILABLE UNAVAILABLE
shape-label-scan-field pressure nearest-rank p50 20/20 1.730 2.760 UNAVAILABLE UNAVAILABLE
shape-label-scan-field pressure nearest-rank p95 20/20 4.162 7.591 UNAVAILABLE UNAVAILABLE
shape-all-nodes pressure nearest-rank p50 20/20 3.544 3.658 UNAVAILABLE UNAVAILABLE
shape-all-nodes pressure nearest-rank p95 20/20 10.241 6.879 UNAVAILABLE UNAVAILABLE
shape-equality pressure nearest-rank p50 20/20 86.139 82.893 UNAVAILABLE UNAVAILABLE
shape-equality pressure nearest-rank p95 20/20 92.717 115.235 UNAVAILABLE UNAVAILABLE
shape-inequality pressure nearest-rank p50 20/20 2.739 1.061 UNAVAILABLE UNAVAILABLE
shape-inequality pressure nearest-rank p95 20/20 5.329 4.178 UNAVAILABLE UNAVAILABLE
shape-id-lookup pressure nearest-rank p50 20/20 1.857 2.732 UNAVAILABLE UNAVAILABLE
shape-id-lookup pressure nearest-rank p95 20/20 4.294 5.522 UNAVAILABLE UNAVAILABLE
shape-in-list pressure nearest-rank p50 20/20 1.689 0.997 UNAVAILABLE UNAVAILABLE
shape-in-list pressure nearest-rank p95 20/20 3.912 4.314 UNAVAILABLE UNAVAILABLE
shape-null-check pressure nearest-rank p50 20/20 2.179 1.225 UNAVAILABLE UNAVAILABLE
shape-null-check pressure nearest-rank p95 20/20 6.002 4.493 UNAVAILABLE UNAVAILABLE
shape-regex pressure nearest-rank p50 20/20 1.323 1.942 UNAVAILABLE UNAVAILABLE
shape-regex pressure nearest-rank p95 20/20 4.919 5.120 UNAVAILABLE UNAVAILABLE
shape-one-hop pressure nearest-rank p50 20/20 1.622 1.724 UNAVAILABLE UNAVAILABLE
shape-one-hop pressure nearest-rank p95 20/20 4.304 6.622 UNAVAILABLE UNAVAILABLE
shape-one-hop-typed pressure nearest-rank p50 20/20 1.907 1.518 UNAVAILABLE UNAVAILABLE
shape-one-hop-typed pressure nearest-rank p95 20/20 6.470 3.340 UNAVAILABLE UNAVAILABLE
shape-two-hop pressure nearest-rank p50 20/20 1.785 1.304 UNAVAILABLE UNAVAILABLE
shape-two-hop pressure nearest-rank p95 20/20 6.189 4.633 UNAVAILABLE UNAVAILABLE
shape-incoming pressure nearest-rank p50 20/20 2.455 1.131 UNAVAILABLE UNAVAILABLE
shape-incoming pressure nearest-rank p95 20/20 5.684 3.453 UNAVAILABLE UNAVAILABLE
shape-var-length pressure nearest-rank p50 20/20 1.435 1.609 UNAVAILABLE UNAVAILABLE
shape-var-length pressure nearest-rank p95 20/20 3.501 4.740 UNAVAILABLE UNAVAILABLE
shape-path pressure nearest-rank p50 20/20 2.048 1.822 UNAVAILABLE UNAVAILABLE
shape-path pressure nearest-rank p95 20/20 4.914 3.459 UNAVAILABLE UNAVAILABLE
shape-traverse-filtered pressure nearest-rank p50 20/20 51.747 60.037 UNAVAILABLE UNAVAILABLE
shape-traverse-filtered pressure nearest-rank p95 20/20 64.896 88.604 UNAVAILABLE UNAVAILABLE
shape-count-all pressure nearest-rank p50 20/20 0.655 0.827 UNAVAILABLE UNAVAILABLE
shape-count-all pressure nearest-rank p95 20/20 1.618 2.316 UNAVAILABLE UNAVAILABLE
shape-count-label pressure nearest-rank p50 20/20 0.667 0.587 UNAVAILABLE UNAVAILABLE
shape-count-label pressure nearest-rank p95 20/20 2.257 2.174 UNAVAILABLE UNAVAILABLE
shape-group-count pressure nearest-rank p50 20/20 164.950 132.836 UNAVAILABLE UNAVAILABLE
shape-group-count pressure nearest-rank p95 20/20 196.661 181.439 UNAVAILABLE UNAVAILABLE
shape-distinct pressure nearest-rank p50 20/20 14.929 18.863 UNAVAILABLE UNAVAILABLE
shape-distinct pressure nearest-rank p95 20/20 32.927 36.935 UNAVAILABLE UNAVAILABLE
shape-collect pressure nearest-rank p50 20/20 1.283 1.124 UNAVAILABLE UNAVAILABLE
shape-collect pressure nearest-rank p95 20/20 2.987 5.731 UNAVAILABLE UNAVAILABLE
shape-count-traversal pressure nearest-rank p50 20/20 119.966 117.424 UNAVAILABLE UNAVAILABLE
shape-count-traversal pressure nearest-rank p95 20/20 132.091 130.191 UNAVAILABLE UNAVAILABLE
shape-order-by pressure nearest-rank p50 20/20 3.284 2.445 UNAVAILABLE UNAVAILABLE
shape-order-by pressure nearest-rank p95 20/20 8.609 6.856 UNAVAILABLE UNAVAILABLE
shape-order-by-desc pressure nearest-rank p50 20/20 3.579 1.877 UNAVAILABLE UNAVAILABLE
shape-order-by-desc pressure nearest-rank p95 20/20 8.692 6.138 UNAVAILABLE UNAVAILABLE
shape-skip pressure nearest-rank p50 20/20 2.332 2.481 UNAVAILABLE UNAVAILABLE
shape-skip pressure nearest-rank p95 20/20 7.146 7.457 UNAVAILABLE UNAVAILABLE
shape-function-calls pressure nearest-rank p50 20/20 3.226 3.123 UNAVAILABLE UNAVAILABLE
shape-function-calls pressure nearest-rank p95 20/20 6.165 6.697 UNAVAILABLE UNAVAILABLE
shape-case-expr pressure nearest-rank p50 20/20 1.148 1.030 UNAVAILABLE UNAVAILABLE
shape-case-expr pressure nearest-rank p95 20/20 6.108 5.315 UNAVAILABLE UNAVAILABLE
shape-coalesce pressure nearest-rank p50 20/20 1.954 2.399 UNAVAILABLE UNAVAILABLE
shape-coalesce pressure nearest-rank p95 20/20 4.672 5.991 UNAVAILABLE UNAVAILABLE
shape-labels-fn pressure nearest-rank p50 20/20 2.974 2.287 UNAVAILABLE UNAVAILABLE
shape-labels-fn pressure nearest-rank p95 20/20 6.373 6.004 UNAVAILABLE UNAVAILABLE
shape-with-filter pressure nearest-rank p50 20/20 1.628 1.683 UNAVAILABLE UNAVAILABLE
shape-with-filter pressure nearest-rank p95 20/20 7.296 5.396 UNAVAILABLE UNAVAILABLE
shape-with-aggregate pressure nearest-rank p50 20/20 142.539 138.598 UNAVAILABLE UNAVAILABLE
shape-with-aggregate pressure nearest-rank p95 20/20 182.247 165.424 UNAVAILABLE UNAVAILABLE
shape-cartesian pressure nearest-rank p50 20/20 1.965 1.996 UNAVAILABLE UNAVAILABLE
shape-cartesian pressure nearest-rank p95 20/20 5.275 10.399 UNAVAILABLE UNAVAILABLE
shape-union pressure nearest-rank p50 20/20 1.050 1.271 UNAVAILABLE UNAVAILABLE
shape-union pressure nearest-rank p95 20/20 4.412 5.780 UNAVAILABLE UNAVAILABLE

Full methods, comparability reasons, isolated observations, raw request bodies and logs are retained in the downloadable report/evidence artifacts. UNAVAILABLE never means zero; a zero baseline has no defined percentage change.

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ CI recovered

The workflow passed for ad68bda7ac07f2a711f8cebf7f70902e9149d87b; the earlier failure is resolved.

View full logs

Copy link
Copy Markdown
Owner Author

CI status on 3a43192:

  • run-unit-test (and, on 33641b5, benchmark-base-head for both the base main checkout and the head) failed before compiling anything: Gradle could not resolve io.johnsonlee.sonatype-publish-plugin:2.0.1 from the Gradle Plugin Portal. This PR does not touch the Gradle build files, the base checkout failed identically, and the plugin resolves now (the portal redirects to Maven Central, which returns the 2.0.1 POM with HTTP 200), so this is a transient repository outage, not this PR's. A re-run of the failed jobs should clear it; this session cannot trigger re-runs (403).
  • rust-build-test failed on ed6aee1/33641b5 in backend/bench/test_parity_schema.py: the test's Kotlin stand-in schema did not drop the reviewed offset parameter. That one was this PR's and is fixed in 3a43192 (all 91 backend/bench tests pass locally).

Generated by Claude Code

…rvice

Reproduce, fix and verify the issues of the storage/query review:

- Data safety: GraphStore.save wrote in place, so save(loadMapped(dir), dir)
  left a graph with no nodes and a stale backward.* transpose answered a new
  graph's incoming(). Saves now fill a sibling staging directory and swap it in
  (content replacement for a directory that cannot be renamed), refusing a
  target holding non-graph files. Both readers refuse files whose size differs
  from graph.manifest; the Rust reader no longer pads a short graph.labels,
  panics while decoding the forward graph, or indexes past its arrays on an arc
  to a node it does not hold. `graphite query` reports a record that does not
  decode as an error naming the graph instead of aborting; the server and stdio
  MCP answer it with a failure and keep serving. GRAPHITE_VERIFY_GRAPHS=1 and
  `graphite verify <dir>` hash every file; pack refuses a damaged sealed dir.
- Evolvability: every writer seals a directory with graph.manifest (producer,
  storage format, size and SHA-256 per file); a later format is refused by
  name. The known graph file names live in one list in graphite-storage.
- Fidelity: a Rust reader of graph.completeness; analysisStatus(x) and
  dispatchGap(c) in both engines tell an unread body from one that calls nothing.
- Engine drift: openCypher integer arithmetic and `long overflow` in both
  engines, NaN/Infinity as JSON strings in the Kotlin CLI, one-line errors for
  write clauses, bad regexes and substring bounds (Rust panicked on a negative
  length), and a node's own `type` property printed in the kind's slot as the
  Kotlin map does. CI now runs a byte-for-byte Kotlin-vs-Rust CLI differential.
- Query service: Cypher offset/nextOffset paging over the server's row cap
  (refused in fanout mode), a bounded resumable /hierarchy walk,
  /api/capabilities, and matching MCP tools; the JSON interchange can carry
  supertypes.
- Scale: JavaProjectLoader numbers each build from 1 (NodeId.numbered), so a
  second build in one JVM no longer writes indexes sized by every earlier build.
  The fixture64 gate sees this in two cases (shape-id-lookup,
  shape-traverse-filtered): the same nodes, renumbered per graph.
- Tests: deterministic clocks/checkpoints replace timing-dependent assertions;
  .github/scripts/verify-affected.py runs only the checks a change can affect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
@johnsonlee
johnsonlee force-pushed the claude/busy-ramanujan-0pnilb branch from 1077a99 to 83197d1 Compare November 27, 2026 12:49

@johnsonlee johnsonlee left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against the eight areas in the supplied issue checklist. The implementation makes progress, but the inline findings leave data safety, completeness consistency, bounded query service behavior, pagination correctness, and verification reliability unresolved. Focused independent tests reproduced the manifest, completeness-generation, and two pagination failures. Performance acceptance is not established by this review; current-head CI was still running when checked.

Comment thread backend/storage/src/manifest.rs Resolved
Comment thread backend/storage/src/graph.rs Resolved
Comment thread backend/explore/src/routes.rs Resolved
Comment thread backend/explore/src/routes.rs Resolved
Comment thread backend/explore/src/routes.rs Resolved
Comment thread backend/explore/src/routes.rs Resolved
Comment thread .github/scripts/verify-affected.py Resolved

@johnsonlee johnsonlee left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional concrete dual-engine boundary mismatch in the changed substring implementation.

…ded paging and hierarchy

- A manifest proves itself whole: its last line, `@seal <sha256>`, hashes every
  byte before it, and it must list every file each writer produces. A manifest
  cut at a line boundary (down to its header) or edited no longer certifies the
  files it still names; `verify`, `check_sizes` and both readers refuse it.
- A target that cannot be renamed (a mount point) is refused and keeps its graph
  instead of being emptied and refilled file by file.
- Cypher paging: a page must end within the first 50,000 rows (`offset + limit`),
  since skipped rows are matched to be skipped; a next page exists only when a
  row past `offset + limit` arrives, so a query's own LIMIT ends the pages; the
  total counts the rows consumed, not the requested offset.
- Hierarchy walks run under the query guard on the blocking pool with the
  permit's deadline and cancellation, and examine at most 100,000 entries per
  request.
- Completeness evidence is mapped at load in both engines, so a directory
  replaced after load cannot hand a loaded graph another generation's evidence.
- verify-affected `--all` checks everything even when no path changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
…as the Rust engine saturates

substring('abc', 1, 9223372036854775807) wrapped start + count to Long.MIN_VALUE in the
Kotlin engine and threw, where the Rust engine returned 'bc'. Both engines and the CLI
differential now cover the boundary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
…hrow and return limits

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt

@johnsonlee johnsonlee left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up on 946f117: the focused route suite passes the previous pagination/admission regression cases, but an independent boundary test finds an extra-probe regression in the paging fix.

Comment thread backend/explore/src/routes.rs Resolved

@johnsonlee johnsonlee left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The manifest, refused-publication and completeness-generation fixes pass focused independent storage checks (169 Rust tests and 23 JVM tests). A separate generation regression remains in the lazy backward-graph cache.

…ahead

Running the query to offset + limit + 1 under the executor's probe matched two rows past
the page, so an error in the second (a division by zero in the row after the next page's
first) failed a page that ends before it. The window is offset + limit again; the engine
records whether that window, not the query's own LIMIT, cut a segment whose probe row
arrived (Executor::window_cut), and only then does the page name a next one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt

@johnsonlee johnsonlee left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The single-lookahead regression now passes, but independent route tests expose two remaining pagination cases not covered by the PR's current tests.

Comment thread backend/explore/src/routes.rs Resolved
Comment thread backend/cypher/src/engine/pipeline.rs Resolved

johnsonlee commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner Author

Acceptance evidence matrix for the original issue checklist

Current review status at e430f25e6329f4f3bcbe6065fa3ec3615dd17ba6 (product code independently checked at 4eaf29db) (resource measurements below remain bound to 2d1a62b3): 25 concrete inline findings independently verified fixed and resolved; the specific annotation and schema findings are now closed; the full original checklist is not accepted. Independent measurements now show legacy multi-graph query-tail increases and a construction-fork peak-RSS observation above the +5% limit (details below). The rows below distinguish implemented fixes, remaining implementation scope and missing validation. Historical follow-ups are retained below.

Each subproblem needs an auditable chain: reproducer or concrete baseline/use case → expected behavior → committed regression → baseline result → candidate result → exact revisions and raw evidence. Architecture gaps need concrete extension/use cases, not invented crashes. Coverage percentages, replies and resolved threads do not substitute for this chain.

Original problem Verified progress / available evidence Remaining scope or verification
Model fidelity; absent versus unrecorded facts JVM completeness is implemented; committed acme build→saved graph→both CLI E2E covers ANALYZED, EXTERNAL and DISPATCH_UNRESOLVED. Independent full replay now reproduces baseline unknown-function failure and candidate 10/10. Other statuses have focused tests. Independent latest Rust completeness tests pass 3/3. Apple completeness now has independently verified producer/IR/persisted dual-engine evidence at 4eaf29d (details below); this closes that specific missing-evidence path, not full model fidelity. JavaScript completeness is now independently verified through real build/save/query at 6925e90 (details below). The context-insensitive bytecode projection remains lossy; ANALYZED is within that model, not all original program semantics. Do not equate the three E2E states with production E2E coverage of every state.
Storage evolvability / repeated change points Manifest inventory, producer, format and seal; staged directory publication; Rust CLI/container share file-name inventory. Supertypes exercise the existing metadata path. Independent latest manifest tests pass 8/8. JVM serializer/spill and Rust node codec remain hand-written, requiring multiple edits for a new node property. JVM mandatory-file list is also separate. The existing-metadata supertypes exercise does not prove a new node field can be defined once across implementations.
Data safety / corruption Refused unsafe publication, truncated manifests, completeness binding and old-generation transpose contamination independently reproduced and verified fixed; committed regressions cover them. Replay crash classification, failure propagation and heap guards now independently pass. Default size checks do not detect every same-size mutation: hash verification must be enabled. Legacy unsealed behavior is explicit. This contract must remain visible rather than claiming all corruption is rejected by default.
JVM/Rust errors and JSON Specific original failures and added boundary regressions verified; committed CLI replay records 60/228 baseline mismatches and 0/228 candidate mismatches. Passing differential cases establish those contracts, not complete engine equivalence. Independent original-harness replay now passes candidate 228/228 under a supported UTF-8 locale; initial locale failure is retained.
Query service Pagination/own LIMIT/expression LIMIT/UNION duplicate prefixes and lookahead defects verified fixed. Wide hierarchy pagination and guard/budget/deadline checks pass; capability contract is tested. Latest exact base/head independently passed all 73 cases on the same retained real64 legacy graphs, with complete responses equal. This compatibility smoke does not validate newly produced graphs or performance. Fresh per-revision full validation completed: 71 exact cases and two expected ID transitions, still rejected by the unmodified trusted-base gate.
Memory/scale Per-build numbering removes process-global drift; repeated-build records and sparse-ID tests exist. Indexes still scale with max ID; JVM sparse IDs retain space amplification. Matched legacy-real64 AB/BA now supplies CPU/RSS evidence within +5%, but repeats slower group-count/traversal p50/p95; performance acceptance is not established (measurements below). Synthetic index-size tests and hosted report-only timings cannot replace it.
Engineering / verification duration Scheduling-sensitive tests and deterministic replacements are enumerated; affected-module planner and empty --all path fixed and tested. Complete validation path is explicitly not shortened; comparable full-path before/after evidence is absent. Incremental selection does not close the original complete-path duration concern.
Framework extension boundary Documented design tradeoff. No framework-semantic layer implemented; not treated as a defect or implementation completion.

Latest hosted #229 run 46094928338 fails the existing base-head-reviewed-semantics check for exactly two node-numbering transitions; other reported correctness/OOM checks pass. #230 supplies narrowly bound rules: identities and raw response digests independently checked, and its five committed real-observation tests at 48f67ac have now independently passed, including actual rule-removal failures; review 6095151403 is resolved. Its eventual merge must be followed by actual trusted-base #229 gate validation; policy approval alone does not complete the original checklist.

Independent local validation: exact baseline 70f908cf and candidate 2d1a62b3, isolated release binaries, 64 persisted graphs with verified four source-JAR hashes, 73 queries per arm, complete-response equality, no failures. Graphs were produced by older 7c59d799, so this is compatibility/correctness only. The separate trusted-70f908cf full per-revision run completed with exactly two unapproved semantic transitions (details below); performance acceptance remains incomplete. macOS observations do not supply Linux cgroup OOM evidence. All original failures and later follow-ups remain retained below.

Historical verification record

Follow-up verification at 28e761b7f48cdf68a67215eb6ab632f88e4bfba2

This update supersedes the earlier concrete-defect statuses above, not the broader evidence requirements. The old-generation transpose reproducer that failed before the fix now passes independently (ReviewGenerationTest: 1/1); the PR's GraphDirectorySafetyTest passes 17/17, including eager and mapped replacement cases. The prior UNION ALL page-cap and arithmetic-LIMIT continuation cases are now committed and pass in the 28-test route suite. However, a separate review-local test with 17 repeated values followed by a new value proves the 8x UNION deduplication cutoff loses and duplicates results across pages; see #229 (review). That regression has not been fixed or committed as a PR test at this revision. Its documentation as a limitation does not waive correctness. Latest-head CI/benchmark validation remains pending; no new performance-acceptance claim is made. The architectural, end-to-end reproduction and full-validation evidence gaps in the table remain open until matching evidence is supplied.

Evidence received at 2b5496ceb65b7d8c28f63266cfe6ed1b2a8b3c7a

The PR now commits docs/pr-229-acceptance.md, evidence summaries, a bytecode-to-both-CLIs completeness check, sparse-ID correctness tests, and the wide-hierarchy HTTP regression. The wide-hierarchy test was independently run and passes (3,000 types consumed across three pages, visit-budget rejection, expired-deadline response); this is correctness evidence, not a performance measurement. The completeness script is now replayable from its declared CI fixture, but this review has not independently rerun it yet. Several other evidence files lack the exact harness, complete input identities or per-case outcomes, as noted in the new inline review. The acceptance document explicitly leaves JS/Apple completeness, hand-written codec coupling, max-ID sizing, matched multi-graph resource acceptance and full verification-path improvement unresolved. Those disclosures are useful but do not close the user's all-issues requirement. The known heavy-duplicate UNION pagination failure remains unchanged because this revision does not modify its pipeline implementation. Latest-head CI remains pending.

UNION follow-up at f026363a5b5b83a1456b2e2307ca1eab80dab3d6

The previously failing heavy-duplicate pagination reproducer now passes independently, and both committed union_paging tests pass, including explicit failure when the prefix cannot be established within budget. However, a new independent duplicate-only-tail test fails: UNWIND [1,1,1] AS x RETURN x AS v UNION RETURN 1 AS v at limit=1 advertises total gte2 and nextOffset1 although its only distinct result is 1; the next page is empty with total eq1. See #229 (review). The 29 existing route tests pass but do not cover that case. Broad evidence/reproducibility gaps remain as previously recorded; latest-head CI is still running.

Latest-head gate result for f026363a

Run 46024221818 has completed with FAIL. I inspected the published report and results/native/semantic-transitions.json in evidence artifact 15212859376: exactly two of the 73 cases have unapproved response differences, shape-id-lookup and shape-traverse-filtered. The query hashes match. For the ID lookup, the complete first-use responses change from 1 row in one graph to 64 rows in 64 graphs, consistent with the per-build ID renumbering; that observation alone does not approve the semantic transition. Build/save correctness, heap/OOM and the remaining native checks pass. Resolve the directed semantic changes through the repository's reviewed baseline-owned expectation process (or correct unintended behavior), retaining exact inputs/results; do not suppress the gate or claim performance acceptance from these report-only samples. The previously reported duplicate-only UNION continuation bug and broader evidence requirements remain open.

Follow-up at 88364eebc8e856cc703bc5ad03731888fe670647

The previous duplicate-only UNION continuation reproducer now passes, as do the three committed union_paging tests. A separate independent test finds that deduplicating UNION's max+1 window plus the raw probe evaluates an unnecessary eighth row for a six-row page and fails on its division-by-zero expression. Review 6091864593 records that regression and three replay-harness issues: signal crashes categorized as controlled errors, failure to propagate unexpected setup/candidate failures, and HTTP readiness accepting an unrelated service on the fixed port. The newly committed recipes/full identities/per-flip records address the original missing-material concern, but the harness has only been syntax-checked and narrowly tested in this review, not independently replayed end to end. Effective heap ≤8 GiB is also not demonstrated for every replay Java/JShell invocation: only repeated-builds explicitly caps its child; the other invocations need bounded settings and retained effective-heap evidence. This is an evidence gap, not a claim that the recorded run exceeded the ceiling. Broader all-issues acceptance gaps remain open; latest-head CI is pending.

Follow-up at 5f2b766f58a3bb54c7fe04c0b20addbd4e6153d2

The 20 inline threads are now resolved after independent targeted verification (not solely author replies). At ba36bd6, the three independent UNION regressions, full Cypher/Explore module tests and both modules' all-targets/all-features clippy passed. At 717b45e, all seven committed replay tests and independent failure-then-success cases passed: candidate fuzz exit 3 and completeness-check exit 1 each now abort the replay with exit 1. The classifier and failed-server checks also passed. The current commit changes only documentation/raw replay records, regenerating them with the corrected 717b45e harness; it does not change product code. These records remain author-produced evidence, not an independent full replay.

A new latest-head CI blocker is Run unit tests 46088907546: Gradle fails during build configuration because io.johnsonlee.sonatype-publish-plugin:2.0.1 cannot be resolved from the Gradle Plugin Portal. Tests did not complete; this is not a demonstrated product regression and the log does not establish why dependency resolution failed. Restore dependency resolution and obtain a successful latest-head run. The latest Rust and benchmark runs are still pending. All broader acceptance/effective-heap/performance gaps above remain explicit; resolved inline bugs do not establish that every screenshot category is fully accepted.

Follow-up at 2d1a62b3efd05d44adac4324afc70f19eb299e8d

The replay heap evidence is now recorded, and the inherited-option override found at c428401 is independently verified fixed: all 12 committed replay tests pass, and the original safe 64 MiB/128 MiB override case now logs 64 MiB. All 21 inline threads are resolved. Regenerated records use 4 GiB uniformly for both revisions; they are correctness records, not performance comparisons with earlier heap settings. The previous Gradle dependency-resolution blocker recovered at c428401 (unit workflow 46091056083 passed). Its benchmark run 46091056203 still failed the existing base-head-reviewed-semantics gate; other listed correctness/OOM checks passed. Latest 2d1a62b CI is running. Full replay has not been independently reproduced end-to-end, and the broader category-level scope/acceptance gaps remain unchanged.

Independent full per-revision run (2026-11-28)

Executed the trusted 70f908c controller locally against exact 70f908c baseline and 2d1a62b candidate, in separate clean shared clones with separate physical target directories. Both revisions built their own 64 real persisted graphs from the four pinned, independently hash-checked source JARs. Both frontend build/save/readback and Tika/Hive/Kotlin whole-JAR correctness completed, with seven effective-heap receipts per revision at the required 4 GiB. Native execution completed all 73 first-use observations, 146 warmups, 1,460 pressure requests and 2,920 isolated requests per revision; within-arm repeat checks and concurrent error recovery passed. All failures and original samples are retained locally.

Overall result remains FAIL, correctly: the trusted base does not yet contain #230. Exactly shape-id-lookup and shape-traverse-filtered differ across revisions; their exact query and complete-response digests match #230's two entries. The other 71 complete responses match. This independently confirms the directed transition evidence, not permission to bypass the gate. The report explicitly has performanceAcceptance=false; macOS supplies no Linux cgroup OOM proof, and missing operation-scoped CPU/RSS evidence cannot be inferred from elapsed time. Detailed metric review and the independent author-harness replay remain in progress. Original unimplemented scope items in the current table remain open.

Independent model-fidelity reproduction (baseline and current head)

The previously documented context-insensitive loss is now executed and reproduced, not just a source-level hypothesis. Built the same Java17 fixture with both 70f908cf6acf4b80ce74d038cecba07f119a544b and 2d1a62b3efd05d44adac4324afc70f19eb299e8d, using 4 GiB heaps. The fixture JAR SHA-256 is 1a855419f001ccbdf46f7a228317bf8fde0c2be8024547c89e32061cfe990b9f.

package audit;
public final class IdentityMixing {
    private static String observedA, observedB;
    static String identity(String x) { return x; }
    static void useA(String x) { observedA = x; }
    static void useB(String x) { observedB = x; }
    static void run() {
        useA(identity("A"));
        useB(identity("B"));
    }
    public static void main(String[] args) {
        run();
        System.out.print(observedA + "|" + observedB);
    }
}

Compile with javac --release 17 -g, package the classes, and for each revision run java -jar graphite.jar build fixture.jar -o graph --include audit --interprocedural. Query:

MATCH (s:StringConstant)-[:DATAFLOW*1..12]->(c:CallSite)
WHERE s.value IN ['A', 'B'] AND c.callee_class = 'audit.IdentityMixing'
AND c.callee_name IN ['useA', 'useB']
RETURN DISTINCT s.value AS source, c.callee_name AS sink ORDER BY source, sink

Real Java execution prints A|B. Without --interprocedural, both versions return only (A,useA),(B,useB). With it, both versions return all four pairs, adding (A,useB),(B,useA). Candidate analysisStatus(identity) returns ANALYZED; baseline rejects the function. Thus the new evidence API does not restore the lost call-context association. This is a preserved, explicitly documented model limitation, not a new regression introduced by #229, but the original lossy-model concern is not eliminated. The reproduction is review-local, not a regression newly committed to this PR. Keep this distinction explicit in the acceptance scope; do not close model fidelity solely because analysisStatus works.

Independent original replay completed (2026-11-28)

Executed the unmodified replay.sh from 2d1a62b3efd05d44adac4324afc70f19eb299e8d against exact baseline 70f908cf6acf4b80ce74d038cecba07f119a544b and candidate binaries/JVM artifacts. Full replay exited 0 with candidate CLI parity 228/228, completeness E2E 10/10, and all 487 JVM heap receipts at 4 GiB. The input was independently built core JAR SHA-256 b85aa69589c5310a204543e43f0d4fd5eab3afc0e6434b90b454a49559d73193, identical for both arms; this is not a claim to reproduce the author's exact input artifact.

Repeated builds reproduced baseline nodeoffsets growth 247672→495328→742984→990640 bytes; candidate stays 247672 for all four builds (30957 nodes each). Same-directory save loses baseline edges but candidate preserves CONTROL_FLOW=5 and DATAFLOW=183. Replacing a graph with an existing transpose leaves three stale baseline backward files and returns 155 instead of 188 incoming edges; candidate removes stale files and both readers return 188. These are correctness/index-size observations, not single-graph performance measurements.

The first independent replay exited 1 because macOS did not support inherited C.UTF-8: Java17 selected US-ASCII and 11 error-text comparisons differed. Its original logs remain retained. A separate output directory using supported en_US.UTF-8 eliminated all 11 differences without changing the replay script or product. Local evidence: /Users/johnsonlee/.codex/benchmarks/pr229-independent-20261128/independent-replay-provenance.json and independent-replay-2d1a62b3-utf8/. The remaining model/schema/max-ID/full-feedback scope gaps above are not closed by this successful replay. Matched real64 resource AB/BA measurements are now running separately after compilation/replay stopped; no result is yet asserted.

Independent matched real64 AB/BA: query latency acceptance not met

Exact base 70f908cf6acf4b80ce74d038cecba07f119a544b and candidate 2d1a62b3efd05d44adac4324afc70f19eb299e8d, trusted 70f controller, same freshly baseline-produced real64 corpus (four pinned source JARs). Frozen protocol: AB then BA, 73 cases, each request targets all 64 graphs, concurrency 4, two warmups and 20 pressure samples per case/arm, nearest-rank per-case p50/p95; full HTTP result consumption. All four arms completed 4,599 requests including first-use and isolated stages, all responses matched and no errors occurred. No compilation or replay ran during measurement. Filesystem cache was warmed by input hashing; this is not disk-cold or saturation evidence.

Observed pressure latency, baseline → candidate (ms), with absolute delta:

Case Order p50 p95
shape-group-count AB 51.310 → 54.643 (+3.333) 56.262 → 79.722 (+23.460)
shape-group-count BA 46.892 → 51.288 (+4.396) 55.553 → 78.036 (+22.483)
shape-count-traversal AB 18.509 → 22.510 (+4.001) 20.068 → 32.450 (+12.382)
shape-count-traversal BA 16.066 → 17.230 (+1.164) 18.882 → 38.378 (+19.496)
shape-with-aggregate AB 52.050 → 57.370 (+5.320) 59.278 → 77.459 (+18.181)
shape-with-aggregate BA 46.721 → 50.067 (+3.346) 59.936 → 63.095 (+3.159)

The material group-count p95 increase repeats in both orders; do not declare query latency restored based on aggregate CPU savings or other faster queries. This is observed regression evidence under the declared workload, not a claim that a particular source line has been isolated as its cause. Twenty pressure samples per case and two orders do not establish a tight confidence interval; all raw samples, failures and all other cases are retained without favorable reruns.

Resources (each pair evaluated independently): loading CPU AB 18.859091→18.927915 s (+0.068824, +0.365%); BA 19.014714→19.227550 s (+0.212836, +1.119%). Loading peak RSS AB 3981574144→3983704064 bytes (+2129920, +0.053%); BA 3986735104→3989454848 (+2719744, +0.068%). Pressure server CPU AB 11.685364→11.926205 s (+0.240841, +2.061%); BA 11.039658→11.011226 (-0.028432, -0.258%). Query-lifetime peak RSS AB 5263097856→5251317760 bytes (-11780096, -0.224%); BA 5247156224→5235326976 (-11829248, -0.225%). These measured resource boundaries satisfy +5%; they do not waive the latency requirement. Load-only CPU/RSS includes readiness and controlled stop. Query-lifetime peak includes loading, warmup, pressure and isolated stages and must not be presented as pressure-only peak RSS.

Reproduce using trusted graphite-benchmark local-query --base <70f binary> --candidate <2d1 binary> --manifest <baseline real64 graphs.tsv> --workload regression --mode measure --order ab --output <ab> then order ba in a separate output. Frozen protocol and complete raw reports/samples: /Users/johnsonlee/.codex/benchmarks/pr229-independent-20261128/legacy-resource-protocol.json, legacy-resource-ab/report.json, legacy-resource-ba/report.json and each arm's response artifacts. This tests runtime regression on identical legacy graphs, not new-manifest loading or new per-build-ID graph layout, and does not cover construction CPU/RSS. Those separate boundaries still need evidence. Please retain this as an unresolved acceptance item and investigate the affected multi-graph aggregation/traversal path; no single-graph timing or favorable aggregate can close it.

Independent new-format real64 AB/BA boundary

Completed a separate frozen AB→BA protocol on the existing candidate-produced 64 real saved graphs, with both exact servers reading the same files/IDs and the same 73 queries/control settings as above. Baseline ignores the new manifest; candidate exercises manifest/completeness loading. Both reports are complete/comparable with no errors. This is a different data-format/layout boundary, not a favorable repeat replacing the legacy results.

Pressure p95 baseline→candidate ms: group-count AB 50.837→48.537 (−2.300), BA 51.332→49.007 (−2.325); count-traversal AB 16.604→14.922 (−1.682), BA 18.653→19.570 (+0.918); with-aggregate AB 47.215→46.254 (−0.961), BA 47.519→55.233 (+7.714). These mixed observations do not establish all-case p50/p95 acceptance and do not cancel the repeated legacy-layout regression.

Resources: load-only CPU AB 3.672385→3.805435 s (+0.133050,+3.623%), BA 3.690556→3.758712 (+0.068156,+1.847%); load-only peak RSS AB 1202487296→1196163072 bytes (−6324224,−0.526%), BA 1201553408→1205370880 (+3817472,+0.318%). Pressure server CPU AB 10.381189→9.990390 s (−0.390798,−3.764%), BA 10.416586→10.036413 (−0.380173,−3.650%); query-lifetime peak RSS AB 2616393728→2604138496 bytes (−12255232,−0.468%), BA 2618785792→2608152576 (−10633216,−0.406%). All four declared resource boundaries are within +5% separately in both orders. Boundaries and limitations remain as above; do not compare these values against legacy-layout values to infer an isolated code optimization.

Raw protocol/reports: /Users/johnsonlee/.codex/benchmarks/pr229-independent-20261128/new-format-resource-protocol.json, new-format-resource-ab/report.json, new-format-resource-ba/report.json. All samples retained. Construction CPU/RSS and full lifecycle acceptance remain incomplete. Static review and existing isolated samples do not establish the cause of the legacy pressure-tail increase: the three cases do not use UNION/offset, and probe boundaries did not expand. Extra AST cloning/JSON parsing and checked index traversal are changes worth investigating, not demonstrated causes of the observed milliseconds. No attribution-based inline finding is asserted without stronger evidence.

Independent real64 construction resources: observed RSS exceeds the limit

Completed the predeclared single baseline→candidate pair on exact 70f908cf6acf4b80ce74d038cecba07f119a544b / 2d1a62b3efd05d44adac4324afc70f19eb299e8d. Reused the trusted harness, the same four pinned real JARs and existing prepared JMH artifacts; ran only Fixture64BuildBenchmark.buildAndSaveDistinctRealGraphs, with -f 1 -wi 0 -i 1 -bm ss -bs 1, G1 and 4 GiB. External observer wait4 captured the actual ForkedMain Java child; compilation, launcher, version probes and whole-JAR tasks are excluded. The declared resource boundary includes JVM/JMH startup, all 64 builds/save/index/readback/provenance checks and shutdown; it is not invocation-only CPU/RSS. Correctness, all64 output, original heap guard and normal exit passed for both arms.

Metric Baseline Candidate Absolute change Relative change
Actual construction-fork user+system CPU 388.204686 s 329.183186 s −59.021500 s −15.204%
Actual construction-fork kernel peak RSS 3,013,623,808 B (2874.016 MiB) 3,834,560,512 B (3656.922 MiB) +820,936,704 B (+782.906 MiB) +27.241%
JMH invocation wall 270238.195 ms 234583.195 ms −35655.000 ms −13.194%

The observed peak RSS violates the independently required +5% limit. CPU/time savings cannot offset it, and a 4 GiB maximum heap does not establish acceptable RSS. This was one predeclared pair, not a repeated-confidence estimate; do not overstate its reproducibility or silently retry/select a favorable measurement. The measurement establishes an unresolved resource acceptance failure, not a source-line root cause. Investigate retained/mapped memory and JVM resource behavior on the representative 64-graph lifecycle, preserving all earlier samples and correctness. No single-graph timing can close this item.

Raw protocol, exact commands, artifact hashes, both original wait4 receipts, JMH results, heap evidence and assessment are retained at /Users/johnsonlee/.codex/benchmarks/pr229-independent-20261128/construction-resource/ (protocol.json, base/, head/, assessment.json). No PR or product source was modified. This replaces the earlier missing construction-resource evidence with a measured, scoped non-pass; it does not change the separate legacy query latency findings or architectural gaps.

#230 at 48f67ac185e6a1f4e29ee708f5a3f23a596e76a6 now also passed its hosted benchmark gate: https://github.com/johnsonlee/graphite/actions/runs/46097907251 . It remains open; this policy PR's green checks neither approve #229 performance nor replace a subsequent trusted-base run after policy merge.

Incremental review of db80380: UTF-8 output verified; approval binding stale

New source changes are confined to the JVM query CLI's standard-stream setup and its regression tests; graph construction/storage and native runtime code are unchanged. Independently built in a clean isolated clone and verified at db8038039b5f397a12eeb814b2d39c245523dd04 under POSIX/Java17 with _JAVA_OPTIONS=-Xmx4g: old 2d1 CLI loses Unicode in CSV/JSON/text, new CLI preserves é中文; a 3000-row CSV matches all 33002 expected bytes, and DELETE remains exit1 with the UTF-8 em dash. The direct Unicode argv case RETURN 'é' AS v on a real persisted graph also matches Rust byte-for-byte on this macOS host (760a22c3a9220a); the documented argv-loss limitation was not reproduced here and is not asserted as an observed bug.

Utf8ConsoleTest(3), QueryCommandTest(13), GraphiteCommandTest(13), query detekt and shadowJar pass with a UTF-8 test process. The initial ASCII test-process run is retained: 28/29 passed, including all three new tests; the existing in-memory default-charset capture in QueryCommandTest fails the em-dash assertion. This is not represented as a fully passing ASCII test suite. Product CLI reproductions did not force UTF-8 file.encoding; they exercised the actual POSIX fix. All JVMs were bounded. New jar SHA-256 3c2b3fdce1bced91281bc6b93043685505692c5028395f32a0c14a411a410a7b; raw commands/bytes/results and initial failed-test XML at /tmp/pr229-db803803-utf8-evidence/.

This head's canonical product identity is 5f4a0a23dc8c0247784894ac07c1e23ca51e3dd9c46e96d6db94de2d70eb4a8a. #230 still binds 2d1's eba350a9…; independently evaluating its real rules with the new identity and retained73 observations returns 71exact/2rejected and approved=false. New inline review #230 (review) requests reviewed rebinding and updated committed tests. It does not reopen the already-fixed missing-test finding. New-head CI is pending. Earlier unchanged-path resource observations remain evidence at their recorded revision, not a new-head performance rerun or performance pass.

Latest db80380 hosted gate completed

Run https://github.com/johnsonlee/graphite/actions/runs/46101126635 completed with the already-tracked semantic-policy failure. Independently inspected raw evidence artifact15245559634: all73 observation records (query and full-response hashes) exactly match the prior independently generated 2d1 run; only shape-id-lookup and shape-traverse-filtered are rejected. The reported new product identity exactly matches independently computed 5f4a0a23dc8c0247784894ac07c1e23ca51e3dd9c46e96d6db94de2d70eb4a8a. Other reported build/save/readback/heap/within-arm correctness/concurrent recovery/LinuxOOM checks pass; normal CI passed. This is new-head raw-observation evidence for the existing #230 rebind item, not a new defect or performance acceptance. The author explicitly deferred #230 rebinding until #229's remaining changes are finished; its thread stays open. Original performance/scope findings remain unresolved.

Handoff-only revision 6a1caa6

6a1caa639b3174a577cef36d5d8ef36b2a390529 adds only docs/pr-229-handoff.md; it does not implement the remaining fixes. Reuse the existing unchanged-code evidence instead of rerunning performance. The handoff reports a Linux/JDK21 construction pair with lower head RSS and an unread reverse-order run, with raw files only under the author's ephemeral /tmp/claude-0/. Please persist the exact commands, artifacts/identities, every sample and reverse-order outcome before using those observations as auditable acceptance evidence. The Linux sampled VmHWM/anonymous/file-backed observations are not an independent reproduction of the macOS wait4 result; committed/live heap diagnostics can explain RSS but cannot replace the declared RSS constraint. No performance finding is closed by the handoff.

The plan still lacks an explicit disposition/test for max-ID sparse-index amplification and context-insensitive model information loss, both already tracked above. The framework-semantic implementation is proposed additional scope relative to the original design-tradeoff row, not evidence that those two gaps are solved. #230 remains deliberately unbound to the final head; its open thread is unchanged. New documentation moves product identity too; bind only after final review as planned.

Independent incremental verification: JavaScript completeness at 6925e90

Verified 6925e904d7470149812a3e5f6ad8a396a9bf8cee in isolated checkouts. Web compilation/type checks and all73 committed tests pass; committed CLI integration exits0. Independent compiled-JS fixture → actual CLI build → saved graph → query produces eight exact expected rows: known/value/two constructors ANALYZED with no dispatch gap; broken/missing/callback EXTERNAL plus DISPATCH_UNRESOLVED; JSON.stringify EXTERNAL without a gap. Interchange records the unparsable artifact as RESOLUTION_FAILED. An independently built 6a1caa6 frontend produces identical methods/nodes/edges/classOrigins but no completeness; importing it with the same new importer leaves all eight statuses/gaps unknown. Thus the comparison isolates the new producer evidence, rather than conflating it with changed underlying graph facts.

Rust storage committed tests174/174 and two independent boundary tests pass: Unicode/NUL/supplementary characters, method identities/origins/messages, modified-UTF limits, wrong layout and corrupt binding/payload rejection. JVM AnalysisCompletenessPersistenceTest9/9 and webgraph detekt pass with all JVMs≤4GiB; the new shared golden proves sidecar reader compatibility and SHA binding. This is not a claim of complete JS graph consumption by the Kotlin CLI: the known missing graph.comparisons interoperability limitation remains. CLI E2E evidence uses the production Rust CLI. No performance measurements were repeated.

Evidence: /tmp/pr229-6925-js-evidence/, /tmp/pr229-6925-web-tests.log, /tmp/graphite-review229-js6925-storage-tests.log, /tmp/graphite-review229-js6925-independent-tests.log, /tmp/pr229-6925-jvm-persistence.log, /tmp/pr229-6925-jvm-detekt.log. The first independent corruption probe accidentally changed gzip mtime (not necessarily invalid); its failed test attempt is retained and was corrected to mutate the gzip magic before claiming rejection. No product defect is inferred from that harness mistake.

This closes the demonstrated JS absent-versus-unrecorded evidence gap for the tested producer contracts, not all model fidelity. Apple completeness, context-insensitive information loss, schema duplication, max-ID sparse-index space, full verification-cycle concerns and the recorded performance non-passes remain open. #230 still needs final-head rebinding; CI for this head is pending. The handoff document was removed in this commit, but removal does not dispose of its unresolved acceptance items.

Incremental review of fac3dfc: extension writes and Linux observations

Focused GraphiteContextTest8/8, AdapterResolutionHelpersTest6/6 and sootup detekt pass. An independent real ServiceLoader extension successfully writes annotations through the new context, saves/loads them and queries Annotation nodes; mutating the original Map/List after writing does not mutate stored facts. The harness used newly compiled fac3 SootUp classes with the previous query fat jar for unchanged dependencies, not a freshly rebuilt complete distribution. All JVMs≤4GiB; no performance measurement repeated.

A new independently reproduced P2 remains open: write the same class/member/FQN first with value /first then /second. After save/load, memberAnnotations has only /second, while Cypher returns both Annotation nodes. Review #229 (review) requests consistent duplicate-write semantics and a persisted regression. Evidence /tmp/pr229-fac3-extension-evidence/{metadata.json,query-all.json,src/audit/Extension.java} and /tmp/pr229-fac3-extension-tests.log. Successful single writes do not establish correctness of this conflict case.

The new Linux performance document preserves independent observations and explicitly keeps performance unaccepted. It does not resolve the recorded macOS cases. Raw per-request reports/samples and observer/reproduction scripts are still not available in the PR; construction command contains ellipsis, and full fork arguments/artifact hashes/heap/exit receipts are missing. A 0.5-second VmHWM sample lacks demonstrated terminal coverage; anonymous RSS does not uniquely identify the G1 heap. Interleaving reduces time drift but does not eliminate per-process differences, and the second construction pair overlapped other work. Retain those limits when discussing variance. The 100ms/5% latency and 10% construction tolerances have historical CLAUDE.md provenance; they are not newly invented, but they do not replace the explicit constraints frozen for this review. Attempt326 was reverted without stable verified benefit; no optimization from it remains to accept. Persisted summary tables are useful but do not substitute for the requested raw evidence chain.

Incremental review of b57577d: parallel verification

The new CLI differential preserves the 228-case multiset and 456 CLI invocations in an independent controlled full-script harness. Four private graph directories prevent overlapping pairs and derived-file contamination; differing output, a child-crash mismatch, missing input and executable-launch exceptions fail rather than reporting success. Python compilation passes. These are reviewer-local harness checks, not committed PR regressions or a fresh full product replay.

A new P3 is independently reproduced: invoking the script outside the repository changes resolution of a relative GRAPH argument from ROOT to the caller's cwd in copytree. With real subprocess execution and executable CLI stubs validating cwd and fixture existence, the unchanged previous script passes 228/228 while b57577d raises FileNotFoundError before any CLI invocation. See inline review. Reproducer and raw results: /tmp/pr229-b575-parity-review/external.py, external-results.json, check.py, results.json. Add a committed regression preserving repository-relative fixture resolution.

The Gradle change retains a fresh 4 GiB JVM per test class with two concurrent forks; largeCorpusTest remains serial. Hosted verification is still running, so local timing claims do not yet prove the complete CI critical path improved. Product annotation code is unchanged: the prior P2 remains open. No performance workload was rerun for these harness-only changes.

Hosted correctness blocker at b57577d

Rust run 46113030496 failed in cargo test --release --locked: build_output::replace::tests::only_one_recoverer_repairs_a_killed_publishers_exact_files, cli/src/build_output/replace.rs:596, reports exactly one recoverer wins between true, with both results false (139 passed, 1 failed, exit 101). The failed log is retained at /tmp/pr229-b575-rust-ci-failed.log. This is an observed hosted correctness/test-reliability blocker, not a performance observation. The affected file is unchanged from the PR merge base, so this evidence alone does not establish a regression introduced by the new parallel CLI/Gradle changes. Root-cause and targeted reproduction are under investigation; a retry passing would not by itself explain or close the failure. JVM and benchmark jobs remain in progress.

Recovery-test reliability: deterministic scheduling experiment

At b57577d the unchanged targeted recovery test passes 1/1 in isolation. A reviewer-only experiment forks while its negative-check directory lock is held, keeps the inherited descriptor alive, then closes the parent's handle and races the two recoverers. Both return false, reproducing the CI assertion for between true; immediately after the child exits, recovery returns true. This demonstrates a scheduling-sensitive assumption that dropping the parent's handle immediately releases the lock. It does not prove the historical Linux run used this exact schedule, nor show unsafe product recovery: refusing recovery while another descriptor holds the lock is correct. Fix or isolate the synchronization without weakening the exclusion check, and retain a deterministic regression. Evidence: /tmp/pr229-b575-recovery-baseline.log, /tmp/pr229-b575-recovery-inherited.log, /tmp/pr229-b575-recovery-inherited.patch. These are local review experiments, not committed PR tests. The test source predates this PR.

New head 2962046 adds shared node/file schema specifications and cross-language checks; independent verification of their actual drift-detection coverage is in progress. No acceptance claim is made yet.

Shared-schema verification at 2962046

Restored, unmodified candidate: Rust storage 179/179, all-targets clippy and fmt pass; JVM NodeRecordSchemaTest 4/4 and webgraph detekt pass. Required-file deduplication shows no new production defect in these checks.

Independent mutations demonstrate an acceptance gap: changing LongConstant's declared i64 encoding to f64 keeps both Rust 5/5 and JVM 4/4 schema tests green with codecs and golden bytes unchanged. Swapping CallSite line/receiver declarations also leaves Rust green. The schema walker discards decoded field semantics; comparing importer and golden bytes through the same altered schema cannot detect that disagreement. Separately, zeroing actual JVM tagged Float/Double payload writes leaves the four JVM schema tests green; their FloatConstant/DoubleConstant samples do not exercise tagged Float/Double values. Controls changing a golden byte or adding a field correctly fail. P2 inline review asks for independent named/typed semantic assertions and complete value-branch fixtures. This is a verified test-coverage/acceptance defect, not a claim that the unmodified production codec currently corrupts these values.

Raw evidence: /tmp/pr229-schema296-mutations.json, /tmp/pr229-schema296-{same_width_type,callsite_field_swap,unused_value_encoding,golden_change,extra_field,storage,clippy,fmt}.log; /tmp/pr229-296-schema-tests.log, /tmp/pr229-296-schema-long-mutation.log, /tmp/pr229-296-schema-float-mutation-fixedinit.log and the corresponding retained XML. All reviewer mutations are restored, isolated trees clean, no active local runs or performance measurements. New hosted CI is pending; prior b575 JVM run was cancelled by the newer push, not completed successfully.

New mixed-UNION regression at 9e6d594

The five committed UNION paging tests pass, but a separate reviewer regression fails. RETURN 0 AS v UNION RETURN 1 AS v UNION ALL UNWIND range(1, 100000) AS i RETURN 2 AS v produces 100002 unwindowed rows. With probe and window 5, the new fallback returns [0,1,2] instead of [0,1,2,2,2]; window 3 incorrectly has window_cut=false. Earlier 2962046 explicitly rejects this query past the reread cap, whereas the new revision silently removes required UNION ALL multiplicity. P2 inline review requests branch-appropriate deduplication and a mixed-operator regression. The new generated test picks homogeneous operators per query and does not cover this combination. Evidence: /tmp/pr229-9e6-union.log, /tmp/pr229-9e6-mixed.log, /tmp/pr229-296-mixed.log, reviewer test backend/cypher/tests/review_union_mixed.rs in /tmp/graphite-review229-schema296. Synthetic rows here are correctness evidence only; no performance measurement was performed. The 296 JVM/benchmark runs were cancelled by the new push, so their completion cannot be claimed.

UNION fallback guard closure at 9e6d594

Independent reviewer-only hook triggers after the duplicate-heavy 100000-row query reaches the new DISTINCT fallback (exactly one entry asserted), without changing production segment execution. Setting cancellation, marking timeout, or exhausting the child work budget yields Cancelled, Timeout(0), and BudgetExceeded(10000000) respectively. This targeted check passes; the hook is removed afterward. On restored production sources, committed maintenance-budget tests 4/4, range-cancellation test 1/1 and all-targets Cypher clippy -D warnings pass. Evidence: /tmp/pr229-9e6-guard-independent.log, /tmp/pr229-9e6-guard-test.patch, /tmp/pr229-9e6-maintenance-tests.log, /tmp/pr229-9e6-range-cancel.log, /tmp/pr229-9e6-clippy.log. These are correctness checks, not performance acceptance or proof of a general result-memory bound. The separately reproduced mixed-UNION result-loss finding remains open. No active local test process remains.

Streaming UNION increment at b803f2e

The existing mixed-UNION reproduction still fails: window 5 returns [0,1,2] instead of [0,1,2,2,2] (/tmp/pr229-b803-mixed.log). Its existing review thread stays open; no duplicate comment was added. Six committed UNION tests, including the new cross-graph provenance test, pass (/tmp/pr229-b803-union.log). Two independent checks verify first-occurrence state is reset after success and division-by-zero: reusing the executor for query-authored DISTINCT produces the same provenance as a fresh executor. Pre-cancellation, timeout and zero work budget are honored on the streaming UNION path. Maintenance tests 4/4 and all-targets Cypher clippy pass. Evidence: /tmp/pr229-b803-scope-fixed.log, /tmp/pr229-b803-maintenance.log, /tmp/pr229-b803-clippy-fixed.log, /tmp/pr229-b803-review_union_scope.rs. An initial reviewer-harness include/doc compilation error was corrected and retained separately; it is not a product defect. All local runs ended.

This changes query execution paths, so old measured query performance remains historical evidence at its exact revision, not acceptance of b803f2e. Representative performance validation of affected paths remains pending correctness recovery; no performance measurements were run while the known result-loss bug remains.

Independent incremental verification at 2a8c865 (2026-11-28)

Mixed UNION pagination and relative fixture-path findings are independently verified fixed and their threads resolved (replies 4725809619 and 4725810196). The original 100002-row UNION reproducer now returns correct windows 3/4/5 and continuation. Seven committed UNION tests, two independent executor-state/guard checks, and all-targets Cypher clippy pass. An additional 80 four-branch mixed queries with branch SKIP/LIMIT and windows 0 through result length+1 match an independent left-to-right bag/deduplication oracle. Evidence: /tmp/pr229-2a8-union-tests.log, /tmp/pr229-2a8-oracle.log, /tmp/pr229-2a8-clippy-final.log.

The three committed relative-path tests pass and are discovered by Rust CI's backend/bench/test_*.py discovery. Independent executable CLI stubs launched outside the repository with a same-name decoy graph reproduce old wrong-fixture/exit1, whereas new relative and absolute arguments read only the repository fixture and exit0. The new harness executes 238/238 cases; this is a stub/path regression, not an independent full-product 238-case parity run. Evidence: /tmp/pr229-2a8-parity-review/ (external-results.json, audit JSONL and committed-tests.log).

Both PRs remain open; #229's current CI is still running. Annotation consistency and schema semantic-validation findings remain open; #230 still awaits final identity rebinding. Original checklist scope, durable evidence gaps and performance non-passes remain. Query execution changed after the historical 2d1 measurements, so those measurements cannot certify current-head query performance. No new performance measurement was performed in this targeted correctness review.

Hosted product parity evidence at 2a8c865

Rust CI run 46115757585, job 140889101576 completed successfully. Independently inspected the raw job log (/tmp/pr229-2a8-rust-ci.log): actual Kotlin/Rust CLI differential reports 238 passed, 0 failed of 238, and completeness E2E reports 10/10 engine answers match. The separate engine differential reports 1046/1046, explicitly ignoring 20 rows with the baseline internal single graphId placeholder; that exclusion is retained and this is not an assertion of universal engine parity. This supplements the earlier local stub/path test with hosted actual-product evidence, not an independent local full replay. Existing annotation/schema findings and overall acceptance gaps remain open.

Hosted JVM verification at 2a8c865

JVM run 46115757569 completed successfully; raw log retained at /tmp/pr229-2a8-jvm-ci.log. The actual ./gradlew check -S --no-daemon reports BUILD SUCCESSFUL in 19m 16s; coverage generation and its threshold check also pass. This supplies current-head JVM correctness/lint evidence but does not establish the promised shorter full feedback cycle: the check step alone remains approximately 19 minutes. It is a hosted CI duration, not a graph-performance measurement, and coverage is not substituted for semantic correctness. The baseline benchmark run is still in progress; annotation/schema findings remain unresolved.

Completed trusted-baseline CI at 2a8c865

Run 46115757625 finished FAIL. Independently downloaded report and raw evidence into /tmp/pr229-2a8-ci-report/ and /tmp/pr229-2a8-ci-evidence/, plus failed logs /tmp/pr229-2a8-benchmark-failed.log. The failing report check is base-head-reviewed-semantics: 71 exact cases and only the known shape-id-lookup / shape-traverse-filtered unapproved directed transitions. All 73 observation objects (query and complete typed-response digests) match the prior independent full-run/results/native/semantic-transitions.json exactly. Current head product identity is 7e9cd1fd68539e43837323d59d1050b1d541f597d04b708bebf871d6b07feb86; #230 still binds the older identity. This confirms the existing approval blocker, not a newly observed response regression.

Report checks for both revisions' real64 build/save and whole-JAR correctness/readback, heap receipts (7 G1 JVMs per revision under 4 GiB), native response stability, concurrent error recovery and unchanged Linux OOM counters pass. These are scoped hosted correctness/stability/heap results, not universal absence of regressions. Timing is explicitly report-only and cannot establish performance acceptance; prior RSS/tail findings remain. No duplicate inline comment was posted for the already acknowledged #230 rebind.

Independent fixes and interoperability verification at 2f5f317

  • Annotation duplicate consistency: committed adapter 9/9, context 8/8 and ServiceLoader persistence 3/3 pass. Restoring the old immediate callback makes all three persistence regressions fail, restoring current staging makes them pass. Independent failed-build retained-context/fresh-load persistence test passes. Both builders and saved/reloaded metadata/Cypher facts agree; core/sootup/webgraph detekt pass. Thread resolved with reply 4725975917. Evidence /tmp/pr229-d355-{annotation-tests,red-controls,restored-tests}.log. Existing bytecode-overload metadata loss is explicitly still a model limitation.
  • Schema semantic checking: Rust storage 182/182, JVM schema 6/6, clippy/fmt/detekt pass. Actual Long i64→f64, CallSite name swap and tagged Float f32→i32 mutations each now fail semantic assertions in both languages; zeroed JVM Float/Double payloads fail golden writer. Restoring all mutations restores passing tests. Thread resolved with reply 4725959602. Evidence /tmp/pr229-schema74-*. This establishes covered semantic checks, not generated codecs or all extension costs.
  • Full importer/JS graph JVM reading: committed ImporterGraphInteropTest 5/5 and fresh Rust output-versus-fixture test pass. Independently opened retained actual JS actual.graphite using EAGER and MAPPED, checked all eight expected status/gap rows, and checked them after JVM save/reload; malformed present comparisons are rejected. Restoring the old loader reproduces missing graph.comparisons FileNotFoundException; restored new loader passes. This supersedes the earlier tested-JS full-JVM-load gap, not universal frontend parity. Evidence /tmp/pr229-interop-2f5-tests-fixed.log, /tmp/pr229-interop-audit/, annotation red/restored logs. Reviewer helper first failed only style checks; original log retained.
  • Enum-switch fixture: javac17/21 --release17 old nested enum reproduces differing synthetic class, new separate enum has identical javap instructions/signatures. Baseline preserves all 12,748 facts under 105 class-name substitutions only. Committed GraphParityRegressionTest 2/2 passes. No dropped facts or relaxed assertion found.

All local verification finished with production sources restored; JVMs bounded to4GiB. No performance measurement was performed. Earlier actual resource/tail nonpasses and architecture/Apple/context/max-ID/whole-feedback gaps remain.

New CI dependency-resolution blocker (not the known semantic-policy rejection)

2f5 benchmark run 46119575555 failed in preparation for both base and head: Gradle cannot resolve io.johnsonlee.sonatype-publish-plugin:2.0.1 from the plugin repository (build.gradle.kts:9). Neither arm executes the required workload. Consequently the report's absent runner/coverage/semantic results are missing evidence, not newly observed product-result regressions. Raw preparation and stderr retained under /tmp/pr229-2f5-ci-evidence/; report /tmp/pr229-2f5-ci-report/; failed log /tmp/pr229-2f5-benchmark-failed.log. Dependency access must work and the current-head gate must actually run; earlier2a8 successes cannot substitute. Other current CI is still running. #230 remains unchanged with stale binding.

Independent Apple completeness verification — 4eaf29d; docs-only head 7588730

  • Committed Swift CompletenessTests 1/1 and affected ObjectiveCTests 4/4 passed. Independent real-index fixture also passed inherited-protocol/default implementation, three-level class overrides, and an SDK NSObject override: expected partial/unresolved/no-gap values were checked, not just counts. Logs /tmp/pr229-apple4eaf-{completeness,independent,objc}.log.
  • Actual Swift package build → Apple producer 4eaf29d → IR → newly built JVM 4eaf29d importer → saved archive/unpacked graph → both query engines passed the committed backend/bench/apple-completeness-e2e.py: exact 10 call rows plus 1 exceptional-method row per engine. This covered ABSTRACT, ANALYZED, NO_BODY, EXTERNAL, DISPATCH_PARTIAL, DISPATCH_UNRESOLVED and no-gap cases. The Rust CLI was the retained 6925 build on the unchanged consumer path; this is not a claim of a freshly rebuilt latest Rust binary. Raw /tmp/pr229-apple4eaf-e2e.log.
  • Negative control: replacing only Emitter.swift with exact 2f5f317 code, retaining the new consumer, allowed real build but failed the same E2E with missing graph.completeness. This is an old-emitter control, not an entire old-version run. Raw /tmp/pr229-apple4eaf-old-emitter-e2e.log. Restoring HEAD and rebuilding restores all 22 exact E2E rows (/tmp/pr229-apple4eaf-restored-e2e.log); production sources are restored clean.
  • JVM committed IR tests 13/13 (reader 9, completeness 4) and detekt passed; 3 independent boundary tests verified sparse/unbound/unsigned gap IDs, unknown enums and out-of-table references fail closed, while absent legacy evidence remains null and explicit NO_BODY without body nodes works. /tmp/pr229-ir4eaf-{tests,independent,jar}.log. New JAR SHA-256 c5c0271ea2c082519a382480d828907ca1d49630131f1c9097057243b90e15cf.
  • New docs-only commits 849a33b/75887300 do not change these product paths. Hosted 2f5 JVM and Rust jobs subsequently completed successfully (46119575484, 46119575589); the previously reported benchmark preparation failure remains a separate non-pass. The newly documented hosted timings explicitly use one run per version and do not prove full feedback-cycle recovery.
  • No new concrete defect found in this increment. All 25 prior inline findings remain resolved. Overall acceptance is still open: context/overload metadata fidelity, handwritten schema evolution, max-ID space, full feedback cycle, representative multi-graph performance and Bind PR #229's node-numbering transitions #230 final identity binding. Old 2d1 performance data remains historical and cannot validate the changed current query path. No performance measurements were repeated in this increment.

Hosted current-head verification — 7588730

Independently inspected raw successful Rust job 140909080147 (run46122244365): actual CLI parity 238/238 on the normal fixture and separately 238/238 on the importer-written graph; completeness E2E 10/10; engine parity 1046/1046 with the same explicit exclusion of 20 baseline-internal single graphId rows. This is not an exclusion-free parity claim. Raw /tmp/pr229-758-rust-ci.log.

Apple Linux job140909080036/run46122244266 also executes the committed real package completeness E2E with this head's built components: exact 10 call + 1 method rows on each engine pass. This adds current-head hosted evidence beyond the local test's explicitly reused Rust binary. Raw /tmp/pr229-758-apple-ci.log; macOS and Xcode jobs also completed successfully (logs retained separately), without broadening the semantic claims beyond their assertions. JVM run46122244298/job140909100272 subsequently completed successfully; raw /tmp/pr229-758-jvm-ci.log confirms gradlew check completed in 19m36s, with coverage generation and threshold checks successful. This does not establish full feedback-cycle recovery. The matched base/head benchmark job140909371344 has now completed: FAIL only at the known reviewed-semantics gate (details below). No product changes since the previous review, no new defect found, and no performance acceptance inferred from these correctness checks.

Final hosted baseline result at 7588730 — run46122244274

Downloaded and inspected /tmp/pr229-758-ci-report/summary.md, report JSON and raw /tmp/pr229-758-ci-evidence/. Both fresh real64 and whole Tika/Hive/Kotlin build/save/readback correctness completed, with 7 G1 JVM receipts per arm under 4 GiB; Linux OOM counters, complete repeated responses, pressure stability and concurrent error recovery passed. This run actually executed, unlike 2f5's earlier dependency-preparation failure.

The only failed gate is base-head-reviewed-semantics: 71 exact / 2 unapproved (shape-id-lookup, shape-traverse-filtered). Independently comparing all 73 observation objects against retained 2a8 raw observations found zero changes. Current head product identity is 6f85545f52178f35a17b3c91ba71f11502924ea3c2c1ff4abcb9096e496a944e. #230 is still 48f67ac with the old binding; its existing unresolved review already covers this blocker, so no duplicate inline comment was added. Raw transition file: /tmp/pr229-758-ci-evidence/results/native/semantic-transitions.json; failed log /tmp/pr229-758-benchmark-failed.log.

Hosted timing remains report-only and does not close query p50/p95/CPU/RSS acceptance. Overall scope/model/storage/memory/feedback gaps remain open. Current local verification is finished; no active local measurement or test needs restarting.

#230 final-head binding independently verified — 3ab49a0

Superseding the stale-binding status above: #230 now binds both rules to #229 7588730 product identity 6f85545f52178f35a17b3c91ba71f11502924ea3c2c1ff4abcb9096e496a944e. Independently recomputed both identities; #230 remains equal to base identity 981eeea3494460f75577260a8beb9296aceafa3c64e37ba96f3e055ff1c0ca75. Its committed 73 observations match the latest raw run46122244274 field-for-field.

Compiled actual evaluate on that raw input returns 71 exact + 2 approved. Old48 policy control rejects both; removing each current rule rejects precisely that rule's case. Full benchmark suite 75 passed/1 existing ignored, restored targeted approval tests 5/5, clippy/fmt passed; isolated source clean. Evidence /tmp/pr230-3ab-{identities,fixture-check,actual-evaluate,control-results}.json and corresponding logs. Resolved the stale-identity thread after posting verification reply4726156696; #230 has no remaining concrete review finding from this review.

This is approval-policy correctness for the exact pair only. #230 CI is still running; after the policy lands in the trusted target base, #229's actual gate must run with it. No merge was performed. Original checklist model/storage/memory/feedback/performance gaps are not waived or closed by this policy change.

#230 hosted CI complete — 3ab49a0

All applicable checks, including benchmark-regression-gate, succeeded. Inspected run46124691836 raw/report (/tmp/pr230-3ab-ci-{evidence,report}/): base70f/head3ab both have product identity981eeea3…, all73 complete query observations exact; real64/whole-JAR correctness/readback and 7 G1 JVM receipts per arm ≤4GiB passed, no OOM and recovery checks passed. This tests the policy-only branch against the same product, not #229 with the new policy in the trusted base. The latter still needs its actual post-merge run. JVM raw /tmp/pr230-3ab-jvm-ci.log; Rust raw /tmp/pr230-3ab-rust-ci.log has1039/1039 engine parity with20 known internal graphId rows excluded. Hosted timings remain report-only. Both PRs remain open; no merge performed.

Current incremental review — e430f25

Latest head is e430f25. The preceding ad68 recovery-test fix independently passed committed1/1, replacement7/7, clippy/fmt; real inherited-lock control old(false,false) fails, new(true,false) passes all archive assertions. Evidence /tmp/pr229-ad68-{original,inherited,old-race-control,restored-module,clippy,fmt}.log. Production recovery was unchanged. ad68 hosted raw/report /tmp/pr229-ad68-ci-{evidence,report}/: real64/wholeJAR/readback,7G1 per arm≤4GiB,OOM/recovery pass; only approval semantics fail,73 observations identical758.

e430 removes the auxiliary historical replay tool and its12 infrastructure tests, not the surviving product regressions. Verified remaining mappings: GraphDirectorySafetyTest.kt same-directory/stale-transpose/truncation; NodeIdAllocationTest.kt repeated-build drift; Rust manifest.rs/container.rs corruption; routes.rs pagination/hierarchy/capabilities; rust.yml still runs parity-cli.py on normal/importer graphs and completeness-e2e.py. No new specific product coverage defect established. Historical raw files and replay are explicitly retrievable at ad68; latest checkout no longer provides that one-command replay. This does not close overall scope/performance gaps.

#230 b6be2ac was independently verified for ad68: latest raw evaluate71exact+2approved, each-rule-removal controls reject its case, committed/restored5/5 plus clippy/fmt pass, policy identity981e. Evidence /tmp/pr230-b6-{identity,controls,evaluate}.json and logs. However e430 changes committed-tree identity again to 0f4a0e614e6f9629a7840d78d5cf6389fe9b68b09e7a8d0d3bdeb796ff575e44. Actual compiled b6 policy on retained73 with this identity yields71exact/2rejected (/tmp/pr230-e430-evaluate.json); existing thread reopened with reply4726421983. This proves binding mismatch, not new response divergence. Both PRs remain open. #230 b6 CI run46130377919 now passed all benchmark gates: independently downloaded /tmp/pr230-b6-ci-{evidence,report}/ shows both identities981e,73/73exact,no execution errors,real64/wholeJAR/readback,7G1 JVMs per arm≤4GiB,OOM/recovery pass. This policy-only branch result does not validate latest #229 with a new trusted policy. #229 e430 CI is still running. Final identity/actual observations must be reviewed and rebound, then policy must land before #229's real trusted-base gate. Overall original checklist is not accepted.

…n it was derived from

The transpose was stamped with whatever manifest occupied the directory when it was
written, so a graph loaded before its directory was replaced published its own
transpose under the new graph's identity, and the new graph then read it. Each load now
captures its manifest digest; a persisted transpose is read only while the directory
still holds that generation and the transpose names it, and one is published only into
that generation, stamped with the identity it was derived from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
A LIMIT computed without a row (LIMIT 2+6, LIMIT $n) is folded to its value before the
window is injected, so the window binds and the probe looks past it as for a literal;
it read as the query's own limit, ended the pages after the first and reported an exact
total. The window was applied to each UNION branch and never to their union, so a page
held up to one window per branch; the combined rows are now capped at the window and a
cut there names the next page. A deduplicating UNION whose branch repeats rows within
the window re-runs that branch with a doubled window (at most 8x) until it yields the
distinct rows the page needs, so pages concatenate to the whole result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt

@johnsonlee johnsonlee left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prior UNION ALL and arithmetic-LIMIT regressions pass, but the documented 8x deduplication cutoff still returns successful pages with missing and duplicated results. This is an unresolved correctness issue, not an accepted resource tradeoff.

Comment thread backend/cypher/src/engine/pipeline.rs Resolved
…ests it was missing

docs/pr-229-acceptance.md traces each original subproblem from a reproducer to the
committed tests, the baseline (70f908c) result and the candidate result, with the raw
outputs in docs/pr-229-evidence/ and what is not solved stated as such. Tests added for
rows that had no committed acceptance check:

- completeness facts end to end: the acme graph CI builds from bytecode, asked through
  both CLIs (backend/bench/completeness-e2e.py, a CI step in rust.yml);
- a wide hierarchy through the HTTP service: 3,000 types paged to completion, a visit
  budget and an expired deadline (test-only hooks on AppState for the budget and the
  cancellation token, as the Cypher route has);
- the node-id contract: sparse ids read back exactly from the JVM writer with the offset
  index sized by the largest id, and the JSON importer's refusal of sparse ids.

The README states the corruption detection contract precisely: same-size damage is
detected only by verification (`graphite verify`, GRAPHITE_VERIFY_GRAPHS=1, pack).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt

Copy link
Copy Markdown
Owner Author

Re: acceptance evidence gaps. The matrix is in docs/pr-229-acceptance.md, with raw outputs in docs/pr-229-evidence/. The baseline column ran binaries built from a clean 70f908c worktree on the same inputs as the candidate. Per row:

  1. Model fidelity.
    • Baseline: analysisStatus → Unknown function.
    • Candidate: on the acme graph CI builds from bytecode (--include com.acme), both engines answer 18 calls ANALYZED (every com.acme. call), 28 EXTERNAL (JDK and the indy bootstrap), and 9 DISPATCH_UNRESOLVED.
    • Committed as backend/bench/completeness-e2e.py plus a rust.yml step: frontend → saved graph → both query engines, against an expected file.
    • The matrix enumerates recorded vs omitted fact classes. It says plainly that the JavaScript and Apple frontends record none, and that Add universal schema contract and indexed mmap reader #169 is not evidence.
  2. Storage evolvability: partially addressed.
    • Addressed: one inventory, producer and format refusal, no deletion list.
    • New-fact exercise through the production path: supertypes (interchange → graph.metadata → reader → /hierarchy).
    • Not solved: the hand-written node codec in both engines; no schema-driven codec; no migration.
  3. Data safety.
    • Baseline: save(loadMapped(dir), dir) kept 204 nodes and 0 of 188 edges; a persisted transpose of the previous graph answered 181 incoming edges instead of 188; a 1-byte-short graph.labels silently typed a call edge as dataflow; 62 of 180 bit flips aborted the process.
    • Candidate: all of those are preserved or refused. 0 aborts; all 180 flips refused under GRAPHITE_VERIFY_GRAPHS=1.
    • The backward-cache regression is committed (c5393c0).
    • The README now states the contract exactly: default = seal + sizes; same-size damage only under verification; no-manifest directories unchecked.
  4. Drift.
    • Baseline: 60 of 228 CLI-differential cases diverged, enumerated by class with both outputs.
    • Candidate: 228 of 228 identical.
    • Regressions are listed per class. By-design and unsupported differences are recorded separately, with the explicit note that equivalence is not proven.
  5. Query service.
    • Baseline: 404 for capabilities and hierarchy; offset ignored (the same first page at 5 and at 10,000,000).
    • The UNION and expression-LIMIT failures are fixed with committed tests (28e761b).
    • New a_wide_hierarchy_pages_to_completion_and_stops_at_its_budget_or_deadline runs through the HTTP service: 3,000 types in 3 pages, budget exhaustion → 400, expired deadline → 504.
    • Limits are listed.
  6. Memory/scale.
    • Four builds in one JVM: baseline ids climb to 123,828 and the offset index grows 247,672 → 990,640 B; candidate stays at 1–30,957 / 247,672 B.
    • The max-id sizing contract is pinned (SparseNodeIdTest, sparse_node_ids.rs).
    • Matched multi-graph CPU/RSS/heap evidence is marked unavailable; hosted timings are report-only.
  7. Engineering.
    • Each de-flaked test is listed with its failing scheduling condition and its replacement.
    • The matrix states that the complete verification path is not faster, and that no comparable before/after records exist.
  8. Extension boundary: classified as a design boundary, with the supported contract listed.

Generated by Claude Code

@johnsonlee johnsonlee left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new acceptance matrix and committed end-to-end/wide-hierarchy tests improve the evidence. The targeted wide-hierarchy test passes independently. Some purported raw evidence still cannot be replayed, and documenting the remaining architectural/performance gaps does not close the original all-issues scope.

Comment thread docs/pr-229-acceptance.md Resolved
…efix

A deduplicating UNION branch cut at its window may hold fewer distinct rows than the
page needs. Past the former 8x re-run cap the page was answered anyway, so a branch that
repeated one row 17 times before its second lost that row and repeated the next
branch's on the following page. The branch is now read until it yields the rows the
page needs, up to 8 windows or 50,000 rows, whichever is more, and a branch that still
cannot establish them fails the query. A branch that filled its window counts as cut
also when the executor does not probe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt

@johnsonlee johnsonlee left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The committed UNION paging tests pass, including explicit budget failure, but a focused distinct-continuation test still fails.

Comment thread backend/cypher/src/engine/pipeline.rs Resolved
… page; replayable evidence

A deduplicating UNION branch cut by the page window set `more` and `window_cut` from its
probe row, which can be one more duplicate: UNWIND [1,1,1] ... UNION RETURN 1 with a page
of 1 claimed a second page and a lower bound of 2 where the result has one row. Such a
UNION now asks each branch for one distinct row past the page (re-reading a branch that
repeats rows, up to its row cap, as before), and only the combined, deduplicated result
decides whether a next page exists. UNION ALL and a row past the query's own LIMIT are
reported as before.

The acceptance evidence is now one replay: docs/pr-229-evidence/replay/replay.sh builds
both revisions' graphs and reruns every reproducer, with the full input identities in
identities.txt and each bit flip listed with its offset, bit and per-query outcome.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt

@johnsonlee johnsonlee left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prior distinct-continuation reproducer now passes, and the added replay scripts close the missing-recipe gap. Independent checks still find a UNION lookahead regression and reliability gaps in the evidence harness. These harness findings do not assert that the already committed observations are false.

Comment thread backend/cypher/src/engine/pipeline.rs Resolved
Comment thread docs/pr-229-evidence/replay/fuzz.py Resolved
Comment thread docs/pr-229-evidence/replay/replay.sh Resolved
Comment thread docs/pr-229-evidence/replay/replay.sh Resolved
…evidence replay

A windowed deduplicating UNION branch already reads one distinct row past the page, so the
executor's raw probe on top evaluated a row nothing needed: with a page of 6 over v0..v7,
`1.0/(7-…)` divided by zero at v7 and failed a page that ends at v5. Such a branch no
longer takes the raw probe; it was cut only if it filled its window.

The replay harness fails rather than reporting completion: replay.sh runs under
`set -euo pipefail`, keeps each setup step's log in <out>/replay-logs and exits 1 when a
graph build, an unpack, the fixture compile, a server start, the candidate differential,
the candidate completeness check or a candidate bit flip fails. fuzz.py classifies a
signal (negative return code) as CRASH and any code other than 0, 1 and 101 as
UNEXPECTED, and `--expect-clean` fails on either or on a panic. The HTTP step uses a port
it verified free, checks that its own server is alive and ready, and keeps the server log.
test_replay.py covers the classifier, a crashing binary and a failing build, and runs in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
…y a block handler

A `{ ...; } || handler` block turns errexit off for every command inside it, so a failing
candidate bit-flip run followed by a passing verification run, or a failing completeness
check followed by a passing query, left the block and the replay successful and deleted
the step logs. Each section of replay.sh is now a function whose required commands go
through `required` (fail on their own status, message on the replay's stderr) while the
baseline's outcomes go through `evidence`. Sourced with REPLAY_SOURCE_ONLY=1, the script
defines its sections without running them; test_replay.py drives the real bit-flip,
completeness and differential sections with stubs that fail a required candidate command
and pass the next one, and each fails the section (and fails under the old block form).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
The JVM encodes System.out and System.err in the locale's charset, so under LC_ALL=POSIX or
C (or a C.UTF-8 the platform lacks, as in the reviewer's independent replay on macOS) the jar
printed `?` for every non-ASCII character: 11 of 228 differential cases differed from the
Rust CLI, which writes UTF-8 in every locale, on the em dash of "DELETE is not supported —
graph is immutable". Result rows with non-ASCII strings were mangled the same way.

main now installs UTF-8 PrintStreams on both standard streams (Utf8Console.kt), flushing on
each line as the JDK's own do. Utf8ConsoleTest runs the real entry point under LC_ALL=POSIX
and checks the bytes of a result row and of the error; it fails without the call in main.
The differential is 228/228 under POSIX, C and C.UTF-8; :query coverage stays at 100%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
Where #229 and #230 stand at db80380, how to rebind #230 once #229 is final, and the plan
and first findings for each open item of the reviewer's matrix: the construction peak-RSS
pair measured here (base 2.63 GiB, head 2.18 GiB, one order, anonymous memory), the
legacy-layout pressure tail and its candidate cause, completeness for JS and Apple graphs,
the verification path, framework semantics and the node schema.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
A JavaScript graph answered null to analysisStatus(x) and dispatchGap(c): the frontend
recorded nothing, so an artifact that did not parse left no trace and a call to a module
outside the artifacts looked like a call that runs nothing (review of #229, model fidelity).

The frontend now lists what it did in a `completeness` section of its JSON interchange:
every module, class and object literal whose bodies it read (ANALYZED), every artifact that
did not parse (RESOLUTION_FAILED), and every call whose callee resolves to no body in the
artifacts and to no library binding (DISPATCH_UNRESOLVED; exactly the isDynamic calls). The
Rust importer validates the section and writes the JVM's own graph.completeness from it
(completeness::encode, Java modified UTF-8), bound to the SHA-256 of that save's node data
and to its own trailer in forward.properties, before the manifest seals the directory, so
the one reader answers for both frontends and facts.completeness is true. An interchange
without the section writes no file and still answers null.

Tests: the reproducer through the real CLI in cli-integration.mjs (run by typescript.yml);
analyzer tests for the gap set and an unparsable artifact; importer tests for persistence,
binding, determinism and ten invalid sections; and the file the importer wrote for the
reproducer, read byte for byte by both the Rust reader and the Kotlin reader. The Apple
frontend still records none. Removes the handoff note, which is no longer needed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
…ings

The review measured, on macOS, a slower shape-group-count and shape-count-traversal tail on
legacy-layout graphs and a construction-fork peak RSS 27% above the base. Repeated here on a
4-vCPU Linux container against base 70f908c, on 64 graphs the base built from the pinned
JARs: the 73-case pressure protocol in both orders (no case past the latency tolerance in
both; the flagged cases' direction follows the order; loading and query-lifetime CPU and
peak RSS within 3.5%), shape-group-count at concurrency 1 with requests interleaved across
live servers (head not slower over 700 paired rounds), and two construction forks per
revision (head peaks lower; runs of one revision differ by 14-16%). Neither finding
reproduces on this host; both stay open against the review's measurements, and the
acceptance matrix says performance is measured, not accepted.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
Hypothesis: the offset check #229 added reads the mapping's length per node and slows
shape-group-count. Measured with interleaved requests across live servers, the candidate is
not faster than its parent and the parent is not slower than the base, so the change is not
kept; the record notes that two starts of one binary differ by up to 10% on this query.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
The README told a GraphiteExtension to call context.addMemberAnnotation(...) and the SPI's
KDoc named GraphiteContext.writer; neither existed. A context offered toMethodDescriptor,
log and resources, so an extension could read a class and write nothing into the graph.

GraphiteContext.addMemberAnnotation(className, memberName, annotationFqn, values) now
records the fact through the one path a bytecode annotation takes (NodeMetadata
.recordAnnotation, which extractAnnotations uses too): member metadata plus an Annotation
node, values normalized, persisted with the graph and visible to memberAnnotations, Cypher
and the annotation-derived views. GraphiteContext.CLASS_MEMBER names the class itself. A
fact without a class, a member or a name is refused.

Tests: the writer receives the fact and an incomplete one writes nothing
(GraphiteContextTest); an extension's annotations on a class and a member are in the built
graph as metadata and as nodes (AdapterResolutionHelpersTest). The README sections and the
acceptance matrix say what this is (the write half of the documented contract) and what
stays a design boundary (no node kinds or edges from an extension, no framework layer).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt

Copy link
Copy Markdown
Owner Author

Three updates since db80380. Head is now fac3dfc.

1. The two performance findings: repeated on Linux, not reproduced

Everything is in docs/pr-229-evidence/performance-linux.txt (f42145a). Setup: base 70f908c; 64 graphs the base built from the four pinned JARs (legacy layout); a 4-vCPU, 15 GiB Linux container. These are author-run observations, not the fixture64 gates and not acceptance.

Measurement Result
Your pressure protocol (local-query --workload regression --mode measure, AB and BA) No case is past the 100 ms / 5% tolerance in both orders. shape-group-count p50 is 245→236 ms (AB) and 212→222 ms (BA); p95 is 279→307 and 321→295. The direction follows the order. shape-count-traversal flips the same way.
Loading and query-lifetime CPU and peak RSS Candidate within 3.5% of base in all four pairs.
shape-group-count at concurrency 1, three servers live, requests interleaved, three runs of fresh processes (700 paired rounds) Head minus base is −1.4 ± 1.5, −3.7 ± 1.7 and −4.8 ± 1.2 ms on about 145 ms. Head is not slower.
Construction fork, your JMH flags, two runs per revision Peak RSS: base 2.63 and 3.06 GiB, head 2.18 and 2.48 GiB. The peak is anonymous memory (the G1 heap under -Xmx4g), not mapped files.

Two things I think explain the difference between our hosts:

  • Process-instance variance. Before I interleaved, single servers measured in turn made head look 8% slower on shape-group-count. Then one binary measured 144.6 and 127.4 ms p50 across two starts. So two starts of the same binary differ by up to 10% on this query. An AB/BA with one server per arm per order has two instances per arm, and "repeats in both orders" is within what that variance produces. Interleaving requests across live servers removes it.
  • Construction run-to-run spread. Two runs of one revision differ by 14–16% here. That is more than the 5% and 10% limits, so one pair cannot place a revision either way: neither yours nor mine. The second pair here (head2, base2) overlapped other work on the host and is marked as such.

I am not claiming the findings are closed. The host is saturated at concurrency 4 and is not your machine. If you rerun, several server instances per arm (or the interleaved form) for the query, and several forks per revision for construction, would settle it. The acceptance matrix now says "measured, not accepted".

One optimization came out of the search and was not kept: reading the node-data length from a field in Graph::node_offset. It showed no benefit (Attempt326, 7e410ec).

2. Completeness evidence for JavaScript graphs (6925e90)

  • The frontend records what it did in a completeness section of its interchange.
  • The Rust importer writes the JVM's own graph.completeness from it, bound and sealed.
  • Reproducer through the real CLI (cli-integration.mjs, run by typescript.yml):
    • known is ANALYZED;
    • JSON.stringify is EXTERNAL;
    • an unresolved import and a callback are EXTERNAL with DISPATCH_UNRESOLVED;
    • an artifact that does not parse is on record as RESOLUTION_FAILED.
  • The file the importer wrote for that reproducer is read byte for byte by both the Rust reader and the Kotlin reader.

Apple is still open. Its emitter needs the Swift toolchain and protoc to regenerate graphite_ir.pb.swift, and I did not have either.

3. The extension write API (fac3dfc)

  • Before: the README and the SPI's KDoc told extensions to call context.addMemberAnnotation / GraphiteContext.writer. Neither existed, so an extension could write nothing.
  • Now: addMemberAnnotation exists and records through the same path as a bytecode annotation.
  • A framework layer is still a design boundary; the matrix says so.

#230

It stays stale on purpose until #229's last product commit. I will rebind it once, with the fixture regenerated from that head's own run.


Generated by Claude Code

@johnsonlee johnsonlee left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new extension write path works end to end, but duplicate annotation writes produce inconsistent persisted representations.

Measured on 6925e90's CI run: ./gradlew check is 18.7 of the unit job's 20.2 minutes, and
:webgraph:test is 8.75 of those: 84 classes, one JVM each, one after another, with the
Android SDK gate alone taking 274 s of the 413 s of test time. The Rust job's CLI
differential (added by this PR) starts 456 JVMs one at a time for 3.2 minutes.

- :webgraph:test runs two classes at a time (maxParallelForks = 2). Each class still gets
  its own fresh 4 GiB JVM, so the Android gate proves the same thing; locally 9 min 24 s
  becomes 7 min 10 s, 481 tests pass and coverage stays 8403/8403 lines.
- parity-cli.py runs four cases at a time, each worker on a private copy of the graph
  directory so no two JVMs write derived files into one directory; locally 2 min 07 s
  becomes 1 min 05 s, still 228 of 228, and still 168 of 228 on the baseline's CLIs.

:webgraph:largeCorpusTest stays serial: its gates time whole-JAR builds. The acceptance
matrix records the per-job and per-task timings and says the hosted numbers are pending.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt

@johnsonlee johnsonlee left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incremental review of the parallel CLI differential: controlled harness preserves the 228 cases, private-directory isolation and mismatch/exception propagation; one relative-path regression remains.

Comment thread backend/bench/parity-cli.py Resolved
The graph.nodedata record was defined independently by each of its codecs (the JVM writer
and reader, the JVM build spill, the Rust reader, the Rust importer's writer, the Rust
readers at fixed offsets), and nothing compared them below a whole-graph round trip; the
required-file list existed twice in Rust and once in Kotlin (review of #229, storage
evolvability).

backend/storage/schema/node-records.txt states the layout once (tag, kind, fields in order,
each field's encoding) with a golden record per kind against a fixed string table, and
graph-files.txt lists the required files. NodeRecordSchemaTest (Kotlin) holds the JVM
writer, reader and spill to them; node_schema_tests.rs holds Node::read, RAW_STRING_FIELDS
and the importer's writer to them and walks every golden record by the declared encodings.
manifest.rs now uses the container's list. Mutations confirm the tests bite: a reordered
schema field fails three Rust tests, and two fields swapped in the importer fail its test.

The codecs stay hand-written; they are checked against one definition, not generated from
it, and the acceptance matrix and the storage guide say so.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt

@johnsonlee johnsonlee left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shared schema adds useful golden-byte checks, but independent mutation tests expose a semantic coverage gap in the new acceptance contract.

A deduplicating UNION under a row window re-reads a branch with a doubled window until it
holds the distinct rows the page needs, up to a cap of 8 windows or 50,000 rows, and failed
the query past it ("A UNION branch repeats its rows too often to page"): 100,000 copies of
one row before a second distinct row could not be paged at all.

The union removes duplicates anyway, in first-occurrence order, so a branch that ends in a
plain RETURN can remove its own first without changing the union; every row a window then
reads from it is a distinct one, and a branch that fills a window of n rows has established
n distinct rows. The branch is read that way once the bounded re-read is spent. It is the
last resort, not the first read: DISTINCT evaluates every row of a branch where the plain
read over a MATCH stops at its window, and reading distinct first failed the route test
that holds a page to its one lookahead row (a division by zero past it). A branch with its
own ORDER BY, SKIP or LIMIT cannot be read as distinct rows and still fails explicitly.

union_paging.rs: the 100,000-copy query pages correctly; the own-LIMIT branch still fails
past the cap; and the paging contract is checked as a property rather than by hand-picked
cases: for 120 generated UNIONs every window is a prefix of the unwindowed result and
reports a next page exactly when rows remain, with and without the probe (it fails when the
distinct lookahead is removed). Over HTTP on the acme graph, pages of 1, 3, 7 and 50 of
three UNION queries concatenate to the unpaged result.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
Clippy (-D warnings, all targets) rejects it; the previous commit was pushed with the lint
failing because the check's exit status was read from a pipe.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt

@johnsonlee johnsonlee left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent mixed-UNION correctness regression found in the new DISTINCT fallback.

Comment thread backend/cypher/src/engine/pipeline.rs Resolved
… occurrence

f77f233 read a plain branch as DISTINCT rows only after the bounded re-read was spent,
because DISTINCT evaluated every row of a branch. It does so only across graphs, to collect
the graphs of later duplicates into each row; the union's own deduplication keeps the first
occurrence as it is. So that fallback also answered rows with other provenance than the
same query unwindowed: with two graphs sharing values, a row first seen in one graph named
both once the read had to go on into the second.

A branch that ends in a plain RETURN, has no DISTINCT of its own and does not aggregate is
now deduplicated as it is read, in a first-occurrence reading of DISTINCT
(GraphContext::first_occurrence_distinct) that is on only while such a branch runs: the
streaming and the generic projections keep each first row as it is and stop at the window,
and the dictionary fast path, which orders by value and merges provenance, is not taken.
That is exactly what the union does to the branch's rows, so one read establishes the page
however often the branch repeats a row, and it is the first read, not a last resort: over
a MATCH it stops at the row that completes the window. A DISTINCT the query wrote keeps its
provenance, and a branch with its own ORDER BY, SKIP, LIMIT or WITH DISTINCT keeps the
bounded re-read and its explicit failure.

Tests: across two graphs with overlapping values, every window of seven UNION shapes equals
the unwindowed prefix row for row including provenance (failing before); the generated
prefix property and the 100,000-copy branch still hold; the route test that holds a page to
its one lookahead row passes with this as the first read.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
…ph path

A UNION removes duplicates from everything before it and from its own branch; a
UNION ALL appends its branch as it is. The page loop treated a query with any
UNION as deduplicating throughout, so a UNION ALL branch after the last UNION
was read as distinct rows: `0 UNION 1 UNION ALL <100,000 x 2>` paged as 0,1,2
with no next page. Each branch now knows whether the union deduplicates it.

The generated prefix property, with operators now chosen per branch, also found
a defect main has: a UNION after `UNION ... UNION ALL` seeded its keys on top of
the first UNION's and dropped every row that UNION had kept
(`1 UNION 2 UNION ALL 1 UNION 3` answered `3`; the Kotlin engine answers 1,2,3).
The keys are rebuilt whenever the accumulated rows are not known to be distinct.

parity-cli.py copied a relative graph path relative to the caller's directory
while both CLIs ran from the repository root; it now resolves the graph against
the root. test_parity_cli.py runs the script with stub CLIs from outside the
repository and beside a decoy graph of the same relative name.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
…ritten

An extension's addMemberAnnotation wrote the member metadata, keyed by (class,
member, name), and appended an Annotation node. A second write of one key
replaced the metadata entry and added a second node, so after a save and a
load Graph.memberAnnotations said /second while MATCH (a:Annotation) returned
/first and /second.

A member holds one annotation of a name. A name the member already has, from
the bytecode or from an earlier extension write, is refused before either
representation is written: at the call (IllegalArgumentException), and again
when the build commits the extensions' annotations after every class is read
(IllegalStateException, none of them written), because the class an extension
names may be read later. Extension writes are held until then, so the outcome
does not depend on class order. A context kept past the build is refused.

FullGraphBuilder gains hasMemberAnnotation. The sootup module exposes
sootup.core as API: the SPI's signatures use its types, and a module that
implements an extension did not compile against :sootup alone (the new
persistence test in :webgraph is such a module).

Not changed, and present on main: the metadata key is the member name, so two
overloads carrying the same bytecode annotation share one entry.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
The schema tests walked each golden record by the declared encodings and
compared only how many bytes that consumed, and the importer's records were
compared to golden records read through the same schema. A schema that typed
LongConstant's value f64, exchanged CallSite's line and receiver, or changed
the tagged Float line stayed green, and no record held a tagged Float or
Double, so zeroing the JVM's payloads for them passed too.

Both suites now read every golden record by the kind and value lines alone,
render each field by name and by the type its encoding gives it, and compare
that to the node the test spells out, rendered from the node's own properties.
Ten variant records join the one per kind, so that together they hold every
tagged value and an absent and a present case of every optional field, and
both suites assert that coverage. Sixteen schema mutations are committed
regressions in each suite. The importer's records are compared to the typed
expectation, through the schema and through Node::read.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
GraphParityRegressionTest failed on JDK 21 with 41 baseline facts missing,
every one of them about sample.controlflow.SwitchExample$1. The sample
switched on an enum nested in the switching class. javac up to 20 lowers that
through a synthetic $SwitchMap$ class; javac 21 and later switch on ordinal()
directly for an enum of the same outermost class and emit no such class, with
any --release. The baseline records what the bytecode holds, so it held only
under the JDK that wrote it (CI's 17).

The enum is now a compilation unit of its own (SwitchStatus), which every
javac lowers through the $SwitchMap$ class: javap of the three classes is
identical under 17.0.21 and 21.0.13. The 105 baseline facts that name the enum
are renamed accordingly, nothing is added or removed, and the file stays
sorted. The test passes under both JDKs.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
graphite.jar query failed on every JavaScript graph with
"graph.comparisons (No such file or directory)". The file is outside the
required list both languages share (graph-files.txt), the Rust importer has
never written it and the Rust reader reads its absence as no comparisons, but
both JVM loaders opened it unconditionally.

Both loaders now read an absent file as no branch comparisons. A sealed
directory that lists the file and lost it is still refused by the manifest's
size check before anything is decoded; that is pinned too.

backend/storage/fixtures/importer-graph is the directory the importer writes
for importer-graph.json: a Rust test fails when the importer's bytes move away
from it, and ImporterGraphInteropTest loads it eagerly and mapped and compares
nodes, edges and both completeness functions (three of its five tests fail
before this change with the missing-file error). CI runs the CLI differential
over it as well: 238 of 238 cases identical between the jar and the Rust CLI.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
An Apple graph answered null for analysisStatus and dispatchGap: a protocol
requirement, a method a header only declares and a body that runs looked the
same, and so did a call the graph closes and one it does not.

The Graph IR trailer gains an optional Completeness (classes, methods whose
status is not ANALYZED, dispatch gaps by call-site id). It rides the trailer,
not a chunk of its own, because a reader that predates it ignores an unknown
field and refuses a chunk it cannot name. The importer turns it into the
graph's AnalysisCompleteness, which the writer already persists as
graph.completeness, and refuses evidence it cannot take at its word: an
unnamed class, an unknown status or gap, a status that is not a class's or a
method's, a key named twice, a gap on anything but a call site of the stream.

The frontend records what the compiler index can tell: every type and every
module that owns free functions as ANALYZED; a protocol requirement without a
default as ABSTRACT; a declared-only Objective-C method or C function, and a
callee the compiler synthesized on a class of the build, as NO_BODY; and a gap
on a dynamically dispatched call when the build holds another body the
receiver could select (DISPATCH_PARTIAL when the named method has a body,
DISPATCH_UNRESOLVED when it has none). A requirement and its default
implementation share one descriptor and are one method. The index's dynamic
role and override relations, both read before and unused, decide the gap.

Checked on Linux with Swift 6.1.2: the Swift suite (90 tests, CompletenessTests
on a package SwiftPM builds, ObjectiveCTests on a Clang-indexed class), two
mutations of the gap rule that the test rejects, IrCompletenessTest, and
apple-completeness-e2e.py in apple.yml, where the Rust CLI and the jar answer
the same table for frontend/apple/Fixtures/Dispatch. The Swift bindings are
regenerated with protoc 4.28.3 and swift-protobuf 1.38.1, which reproduce the
previous file byte for byte from the previous proto.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
…stages

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
johnsonlee pushed a commit that referenced this pull request Nov 28, 2026
#229 took further commits after this approval was bound to 2d1a62b, and
every commit moves its product identity. Run 46122244274 on its head 7588730
computed base 981eeea3 and head 6f85545f and the same 73 observations, row for
row, as run 46094928338: two cases differ, shape-id-lookup and
shape-traverse-filtered, with the response digests already reviewed.

Both rules and the fixture's head identity move to 6f85545f. The earlier head
identities (c428401, db80380, 2d1a62b) stay in the test that nothing but the
reviewed pair is approved.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt

Copy link
Copy Markdown
Owner Author

Status at 7588730. This is intended as the last commit on this branch.

Review findings

All 25 review threads are resolved. The four from the last round:

Finding Commit What changed
Mixed UNION / UNION ALL paging 2a8c865 Deduplication is decided per branch. The generated prefix property now picks each operator independently, and it found a second defect that main has: 1 UNION 2 UNION ALL 1 UNION 3 answered 3.
Duplicate extension annotation writes d355779 One policy: a name the member already has is refused before either representation is written. Persisted regression with a ServiceLoader extension.
Schema tests compared only length 74eaf11 Fields are compared by name, type and value against the typed node. 16 schema mutations are committed regressions in both suites.
parity-cli.py relative graph path 2a8c865 Resolved against the repository root, with a stub-CLI regression.

Three more items, at the owner's request

Item Commit Evidence
Parity baseline under JDK 21 b5bbecb javac 21 lowers a switch over a nested enum without the $SwitchMap$ class the baseline recorded. The sample's enum is now its own compilation unit; javap is identical under 17.0.21 and 21.0.13, and the test passes under both.
The jar could not open a graph the Rust importer wrote 2f5f317 Both JVM loaders treat graph.comparisons as the optional file it is. A committed importer-written graph is loaded by a JVM test (3 of its 5 tests fail before the change), and CI runs the 238-case CLI differential over it.
Completeness evidence for the Apple frontend 4eaf29d Recorded in the Graph IR trailer and persisted by the importer. Verified on Linux with Swift 6.1.2 (90 Swift tests, an importer test, and an end-to-end where both engines answer the same table). The mapping and its limits are in docs/analysis-completeness.md.

CI on 7588730

Workflow Result
Run unit tests (100% line coverage, seven modules) pass
Rust pass
Apple frontend (Linux, macOS, Xcode) pass
JavaScript artifact frontend pass
Cypher TCK pass
Benchmark correctness and OOM fails on base-head-reviewed-semantics only

The benchmark failure is the expected one. Run 46122244274 passes the other seven checks of results/native/suite.json, and its 73 observations are the same, row for row, as on 2d1a62b: shape-id-lookup and shape-traverse-filtered differ, the two per-build node-numbering cases. #230 is rebound to this head's identity (6f85545f…) in 3ab49a0.

What is left, and who does it

  1. Merge Bind PR #229's node-numbering transitions #230 (policy only; it does not change main's product identity).
  2. Rerun this PR's benchmark. No new commit here, or the identity moves again.

What this PR still does not do

  • The node codecs are hand-written and checked against the schema, not generated from it.
  • Member metadata is keyed by member name, so two overloads carrying the same bytecode annotation share one metadata entry and have a node each. This is main's behaviour, unchanged.
  • An Apple graph has no call site for a call on a closure value, so no gap can point at one.
  • The performance numbers in docs/pr-229-evidence/performance-linux.txt are author-run observations on one container, not the fixture64 gates.
  • only_one_recoverer_repairs_a_killed_publishers_exact_files failed once in CI on b57577d and passed on every run since; 336 local runs did not reproduce it and I did not find the cause. This PR does not touch that code.

Generated by Claude Code

…hold

only_one_recoverer_repairs_a_killed_publishers_exact_files failed once in CI
with both racing recoverers declining. flock belongs to the open file
description, and a process that another test of the same binary forks holds a
copy of every descriptor until it execs, the descriptor a recover call just
returned from included. The test assumed the claim's lock free the instant its
holder was dropped.

Run alone it never fails (0 of 336). With 16 threads spawning processes beside
it, it failed 48 of 60 runs, at the race and at the test's own try_lock. The
test now waits for the lock with a deadline and asserts what recover promises:
never two winners, and one once nothing else holds the lock. 0 of 60 under the
same pressure. recover is unchanged; declining while the lock is held is its
contract.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt
johnsonlee pushed a commit that referenced this pull request Nov 28, 2026
#229 took one more commit after 7588730: its recovery race test now waits for
a lock a forked child may still hold. Run 46127991835 on ad68bda computed base
981eeea3 and head 9a1798d1 and the same 73 observations, row for row, as runs
46094928338 and 46122244274.

Both rules and the fixture's head identity move to 9a1798d1; 7588730's identity
joins the earlier heads that approve nothing.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt

Copy link
Copy Markdown
Owner Author

One more commit after the status above: ad68bda. It supersedes two lines of that comment.

The recovery test that failed once has a cause and a fix. only_one_recoverer_repairs_a_killed_publishers_exact_files assumed the claim's flock free the instant its holder was dropped. flock belongs to the open file description, and a process that another test of the same binary forks holds a copy of every descriptor until it execs. So both racing recoverers could find the lock held, which is what CI saw on b57577d.

Condition Runs failed
The test alone, before the fix 0 of 336
16 threads spawning processes beside it, before the fix 48 of 60, with CI's exact message among them
The same pressure, after the fix 0 of 60

The test now waits for the lock with a deadline and asserts what recover promises: never two winners, and one once nothing else holds the lock. recover is unchanged; declining while the lock is held is its contract. The pressure threads were a local reproduction and are not committed.

Head and approval.

What is left is unchanged: merge #230, then rerun this PR's benchmark, with no new commit here.


Generated by Claude Code

docs/pr-229-evidence held the raw output of one replay and the harness that
produced it. They are records of this PR, not product, and do not need to land
with it. The acceptance document keeps its account and points at the directory
as PR #229's history holds it (commit ad68bda); the CI step that ran the
harness's own tests goes with the harness.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7fuhe1cFdhcfmSWfq7cpt

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants