Repository navigation
fix: seal graph directories, align the two engines, page the query service - #229
johnsonlee wants to merge 37 commits into
Conversation
📊 Test Coverage
|
Benchmark reportBase: Workflow and raw evidence · Full report Benchmark correctness and OOM: FAILTiming differences are report-only; correctness, OOM and required coverage decide this gate. GitHub runner timings do not establish performance acceptance. Base: frontend-build-save
native-real64
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. |
✅ CI recoveredThe workflow passed for |
|
CI status on
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
1077a99 to
83197d1
Compare
johnsonlee
left a comment
There was a problem hiding this comment.
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.
johnsonlee
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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.
johnsonlee
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
The single-lookahead regression now passes, but independent route tests expose two remaining pagination cases not covered by the PR's current tests.
Acceptance evidence matrix for the original issue checklistCurrent review status at 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.
Latest hosted #229 run 46094928338 fails the existing Independent local validation: exact baseline Historical verification recordFollow-up verification at
|
| 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.graphiteusing 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-256c5c0271ea2c082519a382480d828907ca1d49630131f1c9097057243b90e15cf. - 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
left a comment
There was a problem hiding this comment.
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.
…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
|
Re: acceptance evidence gaps. The matrix is in
Generated by Claude Code |
johnsonlee
left a comment
There was a problem hiding this comment.
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.
…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
left a comment
There was a problem hiding this comment.
The committed UNION paging tests pass, including explicit budget failure, but a focused distinct-continuation test still fails.
… 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
left a comment
There was a problem hiding this comment.
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.
…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
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
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
|
Three updates since 1. The two performance findings: repeated on Linux, not reproducedEverything is in
Two things I think explain the difference between our hosts:
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 2. Completeness evidence for JavaScript graphs (
|
johnsonlee
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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.
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
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
Independent mixed-UNION correctness regression found in the new DISTINCT fallback.
… 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
#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
|
Status at Review findingsAll 25 review threads are resolved. The four from the last round:
Three more items, at the owner's request
CI on
|
| 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
- Merge Bind PR #229's node-numbering transitions #230 (policy only; it does not change
main's product identity). - 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.txtare author-run observations on one container, not the fixture64 gates. only_one_recoverer_repairs_a_killed_publishers_exact_filesfailed once in CI onb57577dand 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
#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
|
One more commit after the status above: The recovery test that failed once has a cause and a fix.
The test now waits for the lock with a deadline and asserts what 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
Change
Each item of the storage/query review was first reproduced, then fixed, then verified.
GraphStore.savewrote in place. As a result,save(loadMapped(dir), dir)reloaded as a graph with 0 nodes, and a stalebackward.*transpose from an earlier graph answered a new graph'sincoming(). 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 againstgraph.manifestbefore decoding. Before this, a truncatedgraph.labels/forward.graphsilently answered queries from the wrong bytes, and several other truncations panicked. The Rust reader no longer zero-pads a shortgraph.labels, and it reports a decoder panic during load ascorrupt graph.graphite verify <dir>andGRAPHITE_VERIFY_GRAPHS=1hash every byte, andpackrefuses a damaged sealed directory.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 intographite-storage(OPTIONAL_ENTRIES); it had been missinggraph.completeness. The writer no longer needs a list of stale files to delete.graph.completeness, andanalysisStatus(x)/dispatchGap(c)in both engines. The production query path can now tell a body that was never read from one that calls nothing.7/2 = 3.5) and fail overflow withlong overflow(Rust wrapped, Kotlin widened to a double). The Kotlin CLI writes non-finite floats as JSON strings (Gson crashed onsqrt(-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 onsubstring('abc', 2, -1).offset/nextOffsetpaging on the Cypher routes, a bounded and resumableGET /api/graphs/{id}/hierarchy(and/api/hierarchy), andGET /api/capabilities(server contract, plus per-graph producer, format and recorded facts), with matching MCP tools. The JSON interchange can carrysupertypes.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.JavaProjectLoadernow numbers each build from 1 (NodeId.numbered), and ids allocated afterwards stay above every built id..github/scripts/verify-affected.py, which runs only the checks a change can affect, with Rust and JVM in parallel; the full JVMchecktook 14m46s locally.Behaviour changes: integer overflow is an error in both dialects. The Kotlin engine's
7/2is now3and2^3is now8.0.Verification
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 (::1cannot be bound, os error 97), andGraphParityRegressionTest(41SwitchExample$1facts that depend on the local javac). End to end: a real graph was built through the CLI and verifies withproducer: graphite-jvm 1.0.0-SNAPSHOT. Every truncation is refused by default, and every same-size flip is refused underGRAPHITE_VERIFY_GRAPHS=1. After the fix, the engine probe shows 3 of 36 differences: two are row order of unorderedLIMIT 1(identical withORDER BY), anddate()is not implemented in the legacy Kotlin engine.statper listed file per load. Not yet measured on the fixture64 corpus.verifyorGRAPHITE_VERIFY_GRAPHS=1, because hashing on every load would exceed the loading CPU limits.Generated by Claude Code