Skip to content

[Handoff] Resume compiler-owned graph snapshot campaign from PR #164 #166

Description

@samchon

Purpose

The maintainer stopped mission #162 while its final integration pull request was still open. This issue is the sole continuation point for the work that was intentionally not started, not integrated, or still awaiting CI. It is written so a new agent can begin without reconstructing the campaign from long-lived branches and issue history.

At the stop point, related issues #63, #72-#84, #143, #159, #162, #163, and #165 were still open. Do not interpret producer merges as proof that their Graph integration issue is complete.

Exact stop state

  • Graph PR #164 is OPEN and Draft, not merged.
  • Branch: feat/complete-graph-snapshot-mission; exact head: 6d24b125a7488f052c109e8f155ebc757e302c63.
  • Merge state at stop: UNSTABLE because current-head CI was still running.
  • Current-head workflows: test 30833531058, experiment 30833534385, and index-time 30833526681. Rust on the current experiment was still in progress when work stopped.
  • The latest fix accepts Git %h's repository-dependent 7-40 digit exact prefix during Rust binary preflight while the snapshot adapter still verifies the full producer commit. Build plus test_rust_hir_client_restores_retries_and_fails_closed passed locally. Its exact commit early-warning review was CLEAN.
  • A full pnpm.cmd coverage passed on preceding head 887c3b2c4e33ae3554cce0033ddfe009e5eac8d3 in 822.4 seconds. A fresh full coverage run for 6d24b125 was deliberately terminated when the maintainer ordered all work stopped; do not claim it passed.
  • The only local status marker is packages/graph/src/lsp/LspClient.ts; git diff for it was empty and it was intentionally never staged. Verify it remains a line-ending/index marker before touching it.
  • No final PR body update, final Individual Self-Review comment, ready-for-review transition, Graph merge, campaign issue closure, default-branch checkout/pull, or temp cleanup was performed after the stop order.

Start here

  1. In samchon/compiler-graph, check out master and pull. Read AGENTS.md, then .agents/skills/project/SKILL.md, .agents/skills/development/SKILL.md, .agents/skills/language-support/SKILL.md, and the workflow skill matching the requested scope.
  2. Inspect Graph PR Complete compiler-owned graph snapshots and repository context #164 and the current-head workflow conclusions. First decide whether the maintainer wants that already-integrated PR finished and merged. If so, rerun pnpm.cmd coverage, repair only verified current-scope failures, complete the final Self-Review, and merge before starting another language.
  3. For Java, check out and pull samchon/scip-java main. The producer work is already merged; do not rebuild it from the closed issue or reintroduce its old clean/disabled-cache behavior.
  4. Open a new focused issue/PR cycle for one remaining route. Preserve the common protocol and truth boundaries; do not combine unrelated languages merely because they share this handoff.
  5. Start with the Java Graph consumer described below. It is the shortest path to turning already-merged producer work into a serving strict route.

Implemented baseline and merge status

Area Result Exact source
Common graph protocol (#63) Atomic content-addressed generations, target/source shards, complete coverage and unresolved data, source/universe evidence, resident refresh/rollback, MCP trust propagation Implemented in open Graph PR #164; not merged at stop
TypeScript Native incremental ttscgraph transactions, dependency-scoped deltas, explicit deletes, retry/rollback, legacy release fallback samchon/ttsc#1056, source 5829a3d5a0bae1d846b8c9c4d3cd15210182d577, merge d344dfa0f58608474b189052351ac510ed63f544
Rust (#72) Resident rust-analyzer HIR producer and Graph consumer with immutable generations, raw checkpoint validation, compiler/source identities, full lifecycle samchon/rust-analyzer#1, source 2850ecba80311bebd4cdaa9fedc5321533b5b1e7, merge 30881937b3a49ec389037f62ec41956ae8d57af3
C/C++ (#73) Native clangd producer and Graph consumer for one compilation universe, atomic paging, macros/includes/modules/diagnostics and incremental shards samchon/llvm-project#1, consumer-pinned source dcc73b6579ebb8b71f6080302a9444f237b7abb8, PR head 8fa52df5ed312f06b175ac11aeed10ff7a4d0853, merge 554a496eaa227fe3fcd60f6403b3bb2fdd34631c
Repository context (#159) Separate atomic topology plane with pnpm, Cargo, Gradle and CMake adapters Implemented in open Graph PR #164; not merged at stop
Provider documentation (#143) Generated fail-closed support manifest and synchronized README matrix Implemented in open Graph PR #164; not merged at stop
Integrity repairs (#163, #165) Package-complete shipped-sidecar checks and completed-marker request-log synchronization Implemented in open Graph PR #164; not merged at stop
Java producer half (#74) Atomic javac graph shards, Gradle/Maven lifecycle integration, target aggregation and exact reactor/repository selection samchon/scip-java#1, source d7b1d226ae629d2f6efbf4df32d1c5e108e987a6, merge 32eca214a413d1b8a375c481f666ff8a4ec96773

Graph PR #164's stop head is 6d24b125a7488f052c109e8f155ebc757e302c63. The preceding full gate on 887c3b2c4 passed in 822.4 seconds with 239 compiled test modules and enforced coverage of lines 48,794/48,794, functions 1,624/1,624, and branches 12,493/12,493. The stop head adds only the Rust variable-length Git-abbreviation repair and its regression fixture, but it still requires a fresh full gate and final GitHub conclusions before merge.

Non-negotiable protocol and truth boundaries

The merged implementation is the schema oracle. Begin with:

  • packages/graph/src/provider/GraphSnapshotProtocol.ts
  • packages/graph/src/provider/IGraphProvider.ts
  • packages/graph/src/provider/GRAPH_PROVIDERS.ts
  • packages/graph/src/provider/selectGraphProviders.ts
  • packages/graph/src/provider/coverageRows.ts
  • packages/graph/src/provider/rust/ and packages/graph/src/provider/cpp/ as complete adapter/client examples
  • tests/test-graph/src/features/test_graph_snapshot_protocol_commits_atomic_shard_generations.ts
  • the Rust/C++ adapter, client, provider-selection, support-manifest, and resident lifecycle tests

Every new strict route must:

  • handshake an exact producer/version/schema and decline unknown builds;
  • name its target/build universe, input generation, source/checker and disk identities;
  • emit target-scoped stable IDs, explicit shard upserts/deletes, and immutable content-addressed generations;
  • validate the complete candidate generation in isolation before publication and retain the prior good generation after malformed, stale, incomplete, cancelled, or crashed output;
  • provide all 15 coverage rows and machine-readable unresolved facts; unsupported is a truthful value, not an omitted key;
  • distinguish compiler/analyzer authority from semantic-index, generic LSP, static, annotation, and observed-runtime authority;
  • refuse server, maxFiles, or lspReferenceLimit when a whole-workspace producer cannot honor them rather than silently weakening the index; and
  • keep fallback provider names/provenance visible through CLI, API, resident refreshes, MCP results, experiments, docs, and generated support metadata.

“Strict off” does not mean the same graph with a relaxed flag. It means no compiler/analyzer-owned strict route served the language. The system falls through to ordinary LSP and, if that fails, @samchon/graph-sitter. Declarations may remain useful, but calls, accesses, types, overrides, diagnostics, stable semantic identity, and whole-generation consistency can be missing or approximate. Coverage/provenance must reveal that lower authority. Never compare strict-off counts as though they were equally complete semantic facts.

First implementation: finish Java #74 in Graph

The producer is already on samchon/scip-java main. Relevant files include:

  • scip-javac/src/main/java/org/scip_code/scip_java/javac/JavaGraphShard.java
  • JavaGraphDocumentBuilder.java, ScipTaskListener.java, and ScipVisitor.java
  • scip-gradle-plugin/.../GraphGenerationStore.java and GraphGenerationCoordinator.java
  • scip-maven-plugin/.../ReactorWriterMojo.java
  • scip-java/.../commands/GraphAggregateRunner.kt and SnapshotCommand.kt
  • the GradleGraphLifecycleTest, MavenGraphLifecycleTest, GraphAggregateRunnerTest, and repository-selection tests

The merged CLI contract is:

scip-java index --output index.scip --graph-output snapshot.json

The graph output is schema 1 and groups shards by exact build target. It includes all 15 coverage families, checker/disk SHA-256 identities, nodes, edges, unresolved records, explicit target generations, and atomic Gradle/Maven publication. The graph-enabled path preserves Gradle daemon/configuration cache/incremental behavior and does not prepend clean. Maven reactor selection and local repository arguments are preserved.

Implement the consumer in this order:

  1. Split the current standard SCIP registration so Java and Kotlin can evolve independently. Keep the Java SCIP fallback Java-only and expose a separate Kotlin fallback entry using the same launcher if necessary. Do not let a Java native provider change Kotlin ownership or its current fallback behavior.
  2. Add a preferred strict provider named clearly for its authority, such as javac-graph, ahead of standard SCIP for Java only. Resolve scip-java, the JDK, and the schema-1 graph capability independently. Probe scip-java index --help for --graph-output; released upstream builds without that option must decline to the existing fallback honestly.
  3. Derive provider configuration/build universe from exact scip-java version/commit, Java/JDK version, schema, Gradle/Maven target selection, compiler flags, classpath/module path, processors/generated inputs, and repository/build configuration.
  4. Implement a batch session that requests index.scip and snapshot.json, reads the latter as the strict artifact, never adds clean, and never forces non-incremental/no-daemon modes on the graph path.
  5. Validate schema, producer/capabilities, target generation/universe SHA, every coverage row, shard metadata, source/checker/disk digests, evidence/vocabulary, target-local IDs, and every edge endpoint. External nodes remain target-scoped. Deduplicate exact facts only; preserve ambiguous/unresolved provider gaps.
  6. Commit through the common protocol store atomically. A stale/malformed target must not mix with valid targets or replace the previous good generation.
  7. Add focused fixtures for distinct identical symbols in two Maven/Gradle targets, main/test source sets, JPMS, records/sealed types, overload/constructor reorder, generics, lambdas, anonymous/local classes, processors/generated sources, no-op/edit/create/rename/delete, classpath/config change, diagnostic/failure/cancel/retry, and last-good retention.
  8. Synchronize GRAPH_PROVIDERS, standard SCIP registrations, docs/provider-support.json generation, README tables, experiment catalog/setup, exact fixture pin, and tests. Add a real Java lifecycle experiment only after the fake protocol and target-fencing tests pass.
  9. The JDT resident workspace lane from closed [Bulk index][Java] Export compiler and JDT workspace snapshots without query fanout #74 remains separate work. It must expose the same normalized schema/identity from one frozen workspace generation. Do not run JDT as a second enrichment pass after javac.

Producer regression gate known green at handoff:

gradle.bat spotlessCheck :scip-javac:test :scip-gradle-plugin:test :scip-java:test --tests tests.MavenBuildToolTest --tests tests.GradleGraphLifecycleTest --tests tests.MavenGraphLifecycleTest --tests tests.GraphAggregateRunnerTest --tests tests.MavenGraphGenerationStoreTest --no-daemon --no-configuration-cache '-Pkotlin.compiler.execution.strategy=in-process' '-Pkotlin.incremental=false'

Remaining language routes

The following open issues were not completed. Their bodies remain useful detailed research, but this issue records the cross-repository stop state and immediate continuation order.

Former issue Required producer/fork work Graph integration boundary
#75 C# Build a pinned Roslyn service around one MSBuildWorkspace and immutable Solution; walk syntax, symbols, semantic models and IOperation once; include source generators and diagnostics Prefer Roslyn only after solution/TFM selection and exact handshake; keep scip-dotnet as limited navigation fallback; never open/resolve the solution twice
#76 Kotlin Add a K2 compiler exporter to ordinary Kotlin Gradle compilations, retaining incremental compilation, classpath snapshots, daemon, build cache and configuration cache; use Analysis API only for a separate resident edit lane Target/source-set universes; Java and Kotlin ownership must be independent; current scip-java Kotlin route remains fallback until the K2 route passes
#77 Scala Separate Scala 2 and Scala 3 compiler plugins; ingest SemanticDB directly and collect calls/accesses/construction in the same typed pass; drive targets through BSP/Zinc Normalize target-scoped schema across Scala 2/3; record SemanticDB/compiler/BSP/Zinc universe; decline to Metals/static on incompatible pairs
#78 Swift Pin a matching SourceKit-LSP/IndexStoreDB toolchain; freeze explicit output-unit sets and add one source enrichment pass; likely maintain a narrow SourceKit-LSP hook plus standalone oracle sidecar Every generation names exact units/build settings; no mutable store-wide scan or per-symbol SourceKit fan-out; unsupported platforms decline
#79 Zig Phase A: pinned ZLS bulk analyzer exporter with partial authority. Phase B: a real Zig compiler Sema/Zcu/InternPool exporter connected to incremental build/watch state ZLS and compiler routes have different provider names/authority. ZLS cannot close strict compiler truth; never reconstruct Sema facts from autodoc/ZIR
#80 Python Fork/current-pin Pyright and add a bulk command/service sharing one resident Program and type evaluator; walk files once; report Any and Unknown separately Prefer Pyright after execution-environment/config parity; keep scip-python/static as fallback; no find-references-per-symbol
#81 Ruby Structural Rubydex/RubyIndexer plane plus a pinned resident Sorbet typed overlay; export sigil histogram and untyped/metaprogramming gaps Merge planes only for exact file/generation with distinct authority; calls require Sorbet typed proof; no Ruby LSP reference fan-out
#82 PHP Implement PHPStan Collectors that receive each AST node with resolved Scope, emit scalar per-file facts through workers/result cache, and honor Composer exactly Composer/PHPStan configuration gate must fail closed; no scip-php plus second PHPStan pass; scip-php stays a limited skeleton
#83 Lua Replace the existing declaration-by-declaration vm.getRefs exporter with a pinned LuaLS-resident occurrence-oriented traversal and versioned command Reuse one workspace generation, classify only analyzer-proven facts, expose metatable/dynamic gaps, retain current references-only exporter as fallback
#84 Dart Add a pinned Analysis Server samchon/graphSnapshot request over AnalysisDriver/AnalysisSession; use a public analyzer sidecar only as oracle/batch fallback Fence every context/session and cross-context manifest, never persist process-local element IDs, and eliminate per-declaration reference requests

For each route, recover its full acceptance matrix from the closed issue before implementation, then carry the result into this issue or a new linked focused issue. All require no-op/body/API/config/create/delete/rename/error/cancel/crash/retry atomicity, stable identities, all 15 coverage rows, exact toolchain/build universe, cross-platform decline behavior, phase-separated real-corpus evidence, focused tests, build/test/coverage, and truthful docs.

Validation and publication discipline

Canonical Graph commands:

pnpm.cmd install --frozen-lockfile
pnpm.cmd build
pnpm.cmd test
pnpm.cmd coverage

Use focused node tests/test-graph/lib/index.mjs --include=<test_name> runs during development, but finish with the full gate. Real-server experiment changes also require .agents/skills/benchmark/SKILL.md; do not publish new timing claims from mixed hosts, warm caches, mutable fixtures, cancelled runs, or results without exact toolchain/source pins. Paid agent A/B runs and global tool installation still require explicit maintainer authorization.

Keep experiments, provider registry, CLI/MCP language names, fallback ownership, generated provider-support JSON, README claims, workflows, deterministic fixtures, and real-server setup synchronized. A provider is not “supported” because its producer builds; it is supported only after the consumer handshake, strict selection, complete lifecycle, provenance/coverage, platform behavior, docs, and CI all agree.

Historical timing context, not new acceptance evidence

The earlier published baseline used different providers and should only guide prioritization:

  • TypeScript Excalidraw: strict 5.340 s; strict-off/static 2.978 s.
  • Rust Tokio: SCIP 55.238 s; strict-off generic LSP 229.861 s.
  • C Redis: scip-clang 22.795 s; strict-off generic LSP 262.906 s.
  • Java Gson: scip-java 88.653 s; generic JDT LSP 231.398 s.
  • Kotlin Koin: scip-java 211.264 s; generic Kotlin LSP 967.712 s.
  • C# Serilog: scip-dotnet 20.498 s; generic csharp-ls 25.085 s.
  • Python Flask: scip-python 10.629 s; static 0.748 s, with different semantic authority.
  • PHP Slim: scip-php 3.772 s; generic fallback 9.611 s.
  • Lua Lualine: current references-only exporter 18.889 s; generic fallback 27.848 s.
  • Ruby Sinatra and Dart dart-http: both strict and strict-off end-to-end cells exceeded 30 minutes because generic reference fan-out dominated; no eventual completion time was established.

Do not use these values to claim the merged native Rust/C++ routes or future providers are faster until a fresh deterministic benchmark run satisfies the benchmark skill.

Definition of done for this handoff

This issue can close only when Graph PR #164 has been explicitly adjudicated and every remaining language route is either implemented with the full contract and merged, or separately adjudicated by the maintainer with an explicit durable reason not to implement it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions