Synchronize current ttsc-graph semantics#97
Conversation
The canonical ttsc graph advanced across fact ownership, resident recovery, handle ranking, trace completeness, viewer paths, and snapshot-owned detail facts. Reserve one dependency batch so semantic identity work does not preserve superseded reader behavior. Constraint: ttsc origin/master 2b724664e is the user-designated structural reference. Rejected: Fold the synchronization into #65 | it would mix canonical parity with new multi-language identity policy. Confidence: high Scope-risk: broad Directive: Port reference ownership and algorithms before reconciling PR #95. Tested: Branch starts exactly at samchon/graph origin/master 84f5b6f. Not-tested: Implementation and regression verification are pending.
Port the current ttsc-graph snapshot, request lifecycle, ranking, trace, reduction, and source-provenance semantics so the standalone graph cannot reinterpret compiler-owned facts or live disk state. Constraint: D:/github/samchon/ttsc ttsc-graph is the canonical contract and operation reference. Rejected: Continue reconstructing object members and literals from signatures or live source | diverges from the compiler snapshot and races edits. Confidence: high Scope-risk: broad Directive: Regenerate and verify the pinned ttsc contract before changing dump schema or operation semantics. Tested: graph build; test build; 19 focused regression tests; all 18 parity contracts at ttsc 2b724664e; go test ./cmd/ttscgraph/... Not-tested: Full paid agent benchmark requires a separate exact-scope authorization. Related: #96
Close the review gaps where live disk reads, synthesized generic relationships, incomplete native shutdown, and bounded traces could make a result claim more than its producing snapshot proved. Preserve explicit compatibility with the latest published schema while keeping schema 5 as the complete compiler-owned contract. Constraint: Published ttsc 0.19.3 still emits schema 3; complete schema 5 manifests require samchon/ttsc#781 until the next release. Rejected: Infer member relationships from generic source text | name equality cannot prove checker dispatch. Rejected: Re-read live files for missing snapshot text | it mixes different program generations. Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep schema 3 as an explicit incomplete compatibility lane and require producer-owned facts for schema 5 details. Tested: @samchon/graph build; @samchon/graph-test build; 16 focused feature tests including coverage edges; 18-contract parity preview; schema 5 self-index of graph and graph-sitter with zero warnings. Not-tested: Full local coverage and all-platform suite; GitHub Actions remains authoritative for those surfaces.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
Second implementation/review pass completed in The pass closes snapshot-generation mixing, generic fact synthesis, resident close/abort races, bounded-trace completeness, resolver recomputation, schema compatibility, path validation, and stale regression expectations. Local evidence:
Strict schema v5 exposed an upstream provenance defect: the producer omitted outside |
Snapshot-carrying build helpers are useful beyond their original wrappers, but their placement broke the one-export-per-source convention and several document tests accidentally depended on the old live-disk default. Give each helper its canonical module and make document-reading tests choose either the produced snapshot or an explicit live reader. Constraint: Detached dumps must remain fail-closed for source-derived facts Rejected: Restore live disk reads as SamchonGraphMemory.from default | would reintroduce time-of-check/time-of-use drift Confidence: high Scope-risk: narrow Directive: Keep build result helpers in matching source files and require explicit provenance at memory construction Tested: @samchon/graph build; @samchon/graph-test build; focused export and engine boundary regressions Not-tested: Full cross-platform suite remains delegated to CI
Public source reads now require exact consumed text or a checker digest, so an unproved live disk read cannot counterfeit an audited snapshot. First-build failures close every accumulated bulk and LSP session, while the native client retains ownership of retired child generations through forced exit. Constraint: strict compiler facts may outlive the disk bytes that produced them Rejected: Freeze the first unproved disk read | it proves only read-time consistency, not snapshot identity Confidence: high Scope-risk: moderate Directive: Every session or child created before publication remains owned until returned or observed exiting Tested: graph/test builds; source, lifecycle, native-stall, fake-provider, and coverage regressions; full suite except one independently passing warmup-timeout flake Not-tested: POSIX SIGKILL branch locally; Linux/macOS CI owns it Related: #103 #107 #96
A member cap now retracts whole-member audit language, omitted dispatch-hub candidates set truncation only when they remain in scope, and schema-v3 input cannot smuggle schema-v5 member relations. Remove the unused public name-matching override heuristic so checker-owned relations remain the sole semantic source. Constraint: ttscgraph schema 5 is canonical; schema 3 is compatibility-only Rejected: Infer member overrides by same-name containment | spelling and ownership do not prove checker identity Confidence: high Scope-risk: moderate Directive: Any bounded response must report its eligible omissions through audit or truncated Tested: focused audit, trace, adapter, contract-parity, source-export tests; full suite with one independently passing warmup-timeout flake Not-tested: published ttsc 0.19.4 integration pending its authorized release Related: #105 #106 #108 #96
|
Review round 3 follow-up is now pushed in Resolved in this update:
Canonical boundary decisions:
Verification:
|
Carry the canonical ttsc source manifest without reopening compiler-owned files, bind universe roots and diagnostics to their proven snapshot, and let shutdown cancellation reach native and generic LSP work before unpublished sessions can leak. Static Scala and Swift ownership fixes close the language-specific gaps found by the independent review, while reducer and source utility cleanup remove unreachable or duplicated behavior. Constraint: Canonical ttscgraph output is the authority for compiler-owned TypeScript facts and source identity. Rejected: Re-read strict manifest files during generic finalization | external and bundled identities are not generic source capabilities and a second disk read violates snapshot ownership. Confidence: high Scope-risk: broad Directive: Do not pass bulk-provider manifest identities into source-derived generic export analysis; strict slices already carry compiler-resolved exports. Tested: pnpm coverage (all tests; statements, branches, functions, and lines 100%); focused generic/native cancellation, resident refresh, source identity, Scala, Swift, and dump-adapter tests. Not-tested: npm publication of ttsc 0.19.4 and paid agent benchmark runs remain separately authorized release/cost gates.
|
Review Round 4 remediation is pushed as 2be0d31. Local proof is green: the complete regression suite passes under c8 with statements/branches/functions/lines all at 100%, focused cancellation/source-identity/Scala/Swift tests pass, benchmark integrity tests pass, and git diff --check is clean. The new head also prevents complete strict manifests (including external and bundled identities) from being reopened by generic export analysis. GitHub CI and an independent clean Review Round 5 are now in progress. |
Restore the previously shipped `@deprecated` `overrideEdges(nodes, edges)` root export and re-export it through the indexer barrel, so downstream code importing it from `@samchon/graph` keeps compiling. The core compiler-owned indexing path does not call it. Closes #114 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018G2eNarjGmcWmEjFTW2Qcz
Collect Swift `extension` declarations project-wide and emit conformance edges so members declared in a separate file rejoin their owning type; extend inheritance-edge evidence and accept `enum` conformances. Ambiguous receivers stay unassigned. Closes #112 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018G2eNarjGmcWmEjFTW2Qcz
Narrow `SUPPORTED_DUMP_SCHEMA_VERSIONS` to [5] and delete the schema-3 edge/objectMember compatibility gates: a schema-3 dump is refused before it can seed the graph, and the client falls back honestly to LSP while still returning project declarations. Also adds a canonical `C:/...` manifest fixture so Linux exercises the Windows-drive identity branch (#113). Closes #108 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018G2eNarjGmcWmEjFTW2Qcz
Reduce absolute paths outside the root to a normalized identity even when no shared root exists, and reroot only when every project file is absolute, so the same input yields the same identities regardless of node order. The package reducer and benchmark viewer reducer stay byte-aligned; structure docs adopt the shared relative / normalized-absolute / `bundled:///` identity vocabulary with matching parity substitutions. Closes #115 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018G2eNarjGmcWmEjFTW2Qcz
Settle each pending request exactly once on stdin/write/exit/malformed failure, cache the failure so later requests reject before the wire, and thread an abort signal so a resident `close()` cancels an in-flight readiness/symbol/reference refresh. Await each retired child's exit and terminate its exact process tree (SIGTERM before SIGKILL; `taskkill /T /F` on Windows), sparing unrelated processes. `refreshLanguageSession` keeps its three-argument form. Closes #100 Closes #107 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018G2eNarjGmcWmEjFTW2Qcz
…stems Publish the stdin-closed fence only after descriptor 0 is actually closed, so the client's next write deterministically reaches the closed-pipe path instead of racing the fake's teardown. Reorder the platform-specific transport probe after the independent closed-session assertions so a pipe failure cannot hide their coverage. Closes #113 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018G2eNarjGmcWmEjFTW2Qcz
Discover per-language benchmark tools under root/`bin`/`server/bin`/nested `bin` instead of a single `bin`, and skip Flutter-only Dart packages (`pubspecRequiresFlutter`) and their unit test so the sweep provisions only what it can honestly build. Benchmark infrastructure for the #96 parity sweep. Refs #96 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018G2eNarjGmcWmEjFTW2Qcz
The stubborn-tree regression spawns the fake LSP with --ignore-termination to prove the client escalates SIGTERM before SIGKILL. terminateOwnedProcess destroys the client's stdin write end before it signals, so without a ref'd handle the fake drained its event loop at stdin EOF and exited before its SIGTERM handler ran, leaving no SIGTERM evidence on POSIX (macOS/Ubuntu) while Windows takes the taskkill lane. Hold the loop open with a ref'd keep-alive timer (the same pattern the close-input fixture already uses) and swallow stdin errors, so SIGTERM is observed deterministically and only SIGKILL ends the child. Refs #107 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018G2eNarjGmcWmEjFTW2Qcz
Three per-OS gaps kept the coverage gate red: LspClient's stdin stream error listener was reached only through the Windows synthetic-destroy path, its terminate() forced-exit fail is Windows-only, and TtscGraphClient's superseded-child guard was exercised on no host. Cover the stdin error listener cross-platform by destroying the write stream with an error, ignore the Windows-only terminate branch that POSIX short-circuits, and drop a stale chunk into consume() while the client owns no child to prove the guard directly. Refs #100 Refs #107 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018G2eNarjGmcWmEjFTW2Qcz
Summary
Synchronize the standalone graph with the current canonical
ttsc-graphsnapshot schema and operation semantics (pinned atsamchon/ttsc@2b724664e), and land the review-round correctness fixes discovered during that sync (issues #98–#115) as one coherent, per-issue commit stack.Per-issue commit stack (newest first)
Closes #96, #100, #112, #113, #114, #115.
Partial / divergent (left open on purpose)
buildLspGraph({keepAlive:true})accumulate-then-close-on-throw cleanup) is a follow-up.ISamchonGraphDiagnostic.filenow documents the""global-finding identity (contract-accurate), but the adapter does not yet preserve fileless diagnostics; the adapter change is a follow-up.Verification
pnpm --filter @samchon/graph build(no errors; pre-existing lint warnings only)pnpm --filter @samchon/graph-test build🤖 Generated with Claude Code