Repository navigation
feat(codegraph): improve call tracing and unresolved call evidence - #4863
Conversation
ScriptedAlchemy
left a comment
There was a problem hiding this comment.
Current-head CI blocker (exact head f7f99115bbcd243da816ac1b2c2b01d2b3995279): Dashboard job 130214053904 executed its Bazel frontend/SDK targets, then the embedded-artifact verification failed with Error: embedded/server.mjs is stale; run pnpm run build and commit the result (job log near its final check). The PR changes the context operation schema and generated TypeScript SDK but its current diff contains no corresponding refreshed embedded/server.mjs. Please regenerate through the documented pnpm/build/codegen authority, commit generated outputs together with the canonical source changes, run the actual dashboard bundle/determinism + SDK contract checks, and get a new complete exact-head matrix. No hand-edits to generated output or bypassing the artifact check. This is a real current-head artifact drift failure, not a TypeScript unit-test failure or full Rust acceptance. I made no branch changes.
Regenerate the ChatGPT extension server bundle after the SDK added context call-path request/result, source and edge-authority schemas. Preserve the canonical pnpm package layout used by the embedded artifact check. Run the existing producer through Bazel's pinned Node target. Its --check reproduces the stale server failure before regeneration and passes after it. Only server.mjs changes; app.html, source, manifests and workflows are unchanged.
|
# Conflicts: # crates/tracedecay-code-index/src/production/sealed_codec.rs
Resolve the generated plugin/chatgpt-extension/embedded bundle conflict by rebuilding it from the merged sources (`pnpm run build`; `pnpm run check:embedded` reports the artifacts are current). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Read schema assertions directly from the fixture store and avoid reopening an already completed cancelled upgrade. Preserve cancellation recovery and actual reopen checks.
Cache declarations, var blockers, and writes by exact syntax scope and name during one owner call walk. Preserve per-site declaration-order checks and discard every borrowed fact when the walk ends. Cover repeated receiver work with a deterministic AST-visit scaling regression and retain use-before-declaration, inner shadow, and later-write refusals.
Build complete declaration and write indexes on the first scope lookup so distinct receiver names cannot each rescan the same AST. Preserve binding-side destructuring, scope boundaries, and per-site ordering checks. Add a deterministic distinct-name scaling regression with a single written receiver and retain every unresolved call site.
Carry graph admission and live cancellation through path-source reads. Recheck them and request deadlines before ordinary source hydration, and exclude path nodes before attempting another source read. Exercise the composed graph-tool owner with a blocked real source, live cancellation, and an ordinary non-path match. Require owner settlement before releasing the source while preserving typed metadata.
Replace the redundant closure reported by exact-head strict Clippy. Behavior and cancellation semantics are unchanged; hosted verification will run on the new head.
Seed the same 10,001 overlap rows through the canonical batch transaction before staging composer rows. Preserve every paging and publication assertion. The unmodified branch passes 501 tests locally in 130 seconds; its overlap fixture alone takes 10.271 seconds. This removes unnecessary durable setup work without claiming to identify the Linux fleet timeout.
Master added inline graph-tool owner problem-mapping tests while this branch added the unix-only source-cancellation suite as `mod tests;`. The merge declared `tests` twice and the crate's unit tests stopped compiling. Name the unix suite for its capability and keep both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use a new sealed format revision for required TypeScript receiver facts so revision 22 takes the typed rebuild path before decoding rows. Cover that published format boundary with the existing decoder regression. Integrate master and regenerate the embedded ChatGPT server from canonical sources. The byte-exact generation check, SDK build, plugin typecheck, and 15 symbol-detail tests pass.
The sealed format revision is authenticated in the manifest payload. Pin the new revision and its fingerprint while keeping every file and evidence segment fingerprint and the round-trip checks unchanged.
Reuse the canonical pre-attach schema for each cancellation sample and run the sweep on an owned native runtime. Preserve all cancellation points, schema identity checks, completion joins, and existing time budgets.
A provenance restamp can retain the graph while replacing its settlement frontend. Require both owner identities before reusing a replay consumer, so an in-flight old frontend cannot strand the replacement consumer. Exercise the real owner handoff while retaining the old frontend through registration.
Capture the restarted daemon's existing settlement and fsync spans when its bounded backlog drain fails. Preserve the receipt count, deadlines, and drained-state assertions while investigating the observed tail.
Resolve the shared schema cancellation fixture to the reviewed canonical runtime version, preserving master's baseline reuse and all cancellation, retirement, reopen, and SQL identity assertions.
Use the exact argument layout requested by the canonical rustfmt gate. The manifest revision assertion and authenticated digest are unchanged.
Keep the logged daemon and failure output for the receipt backlog journey while restoring its ordinary logging configuration. Preserve the 65-receipt batch boundary, ten-second waits, and drained assertions.
Why
Common TypeScript receiver patterns can break an otherwise useful call trace. Agents also need to connect two known symbols and understand where the recorded graph stops.
This adopts those capabilities from the comparison with
@colbymchenry/codegraph, using TraceDecay's existing extraction, sealed graph, admitted query, source, and generated contract authorities.Changes
Resolve supported TypeScript receivers
const alias = receiverchains using the initializer's declaration scope. Generic constraints/defaults, parameter initializers, and computed property keys no longer create false receiver bindings.Return a connecting call path with context
call_pathtotracedecay_context, with exact endpoint IDs and a bounded depth. Reuse the admitted shortest-path query over indexed call edges.found,no_path,truncated, andunavailableoutcomes, ordered symbols, edge authority/evidence, and graph generation/freshness.Explain recorded unresolved calls
NodeDetailsV1.unresolved_callsreport to the existing node operation, carrying its graph generation, caller/file identities, recorded reference name/span, optional argument count, and supported limitation reasons.complete,truncated, orunavailable. Non-call limitations consume the same read budget.Scope and compatibility
The sealed format and affected extractor/chunker revisions are bumped. Older generations use the existing typed rebuild path; no compatibility shim is added.
Receiver inference remains bounded to parser-attested named types and supported declarations. The unresolved-call report describes retained extraction evidence: even a complete empty report does not prove that every possible runtime call resolves, and a recorded span may cover the enclosing declaration when extraction lacks an exact call token.
Framework-specific route discovery, event/job dispatch, and state-store/observer callback modeling remain outside this PR.
Earlier local validation
Passed locally on the updated source:
git diff --check.The plugin's initial combined run passed 92 tests and failed the existing IPv6 loopback case because the local proxy exclusions lacked bracketed
[::1]. With that entry added only to the test process's existing exclusions, all 13 adapter tests passed. No source, global proxy settings, test assertions, skips, or timeouts were changed for this environment issue.Canonical SDK generation succeeded using command-local allocator settings and
panic=abortonly for the contracts crate and exporter binary. No tracked build policy or production/test configuration was changed, and no Rust tests were run under those exporter settings.Backend verification remains incomplete locally. A final production metadata build with normal panic settings stopped in
tracedecay-contractswithprocess_wrapperexit 1 and no Rust diagnostic. The host was under memory pressure, and its kernel OOM-kill counter increased from 95 to 98 over the verification period. This is not counted as a passing typecheck. Earlier full integration builds also stopped in the pinned runtime dependency/build environment.The code-index/MCP integration suites and the new context-source lifetime unit tests have not run locally. Full Clippy and the combined dashboard contract freshness check also remain unverified. Source inspection found that the dashboard exporter uses separate schema roots, so there is no identified additional dashboard artifact change; the fresh canonical SDK export includes
application.tsand the affectedoperations.ts.Added backend regressions cover receiver resolution and sealed restores, exact caller/file evidence isolation, actual import/ambiguity limitations, bounded truncation/read cost, catalog rewarming, path source bounds, cancellation/deadline races, and disconnected/missing/zero-edge paths. Final-head repository CI is still required to verify these runtime behaviors.
Hosted validation and current integration status
Prior head
e5ca1f31completed the Linux fleet at 179/180 targets, with 126 fresh executions, in CI run 43559893652. Fresh owning passes included the code-index suite (20.2s) and unit target (30.3s), MCP suite (292.8s), store-runtime unit target (90.3s), and SQLite-runtime unit target (15.8s). The code-extraction unit result was cached (0.2s). The sole failing target was the global-database suite, which timed out at 300.3 seconds with 436/533 cases reported complete; that run did not qualify the global-database gate.The ordinary Windows build/typecheck gate, job 132350644276, passed all 467 workspace targets with 26,394 actions in 6,843.592 seconds. This is ordinary build/typecheck evidence, without a native runtime-test pass claim.
Prior integrated head
7103e3b0merges the current master changes with the independently reviewed TypeScript receiver/module union. It removes the completed hydration and settlement test captures while retaining the permanent publication and ledger spans. The combined ChatGPT app was canonically regenerated from the integrated source and dependency lockfile; the existing server bundle remained byte-identical.Focused local verification on the integrated tree passed with Node 26.13.1 and the declared pnpm 12.18.0: frozen installation without lockfile changes; SDK typecheck, package build, and 111 tests across 6 files; ChatGPT extension typecheck; and byte-exact ChatGPT and Cursor embedded regeneration checks. Actual commitlint 21.2.4 and
git diff --checkalso passed. The integration preserves every nonoverlapping parent path, with the reviewed module union and canonically generated app resolving the two overlapping paths.The earlier hosted results above apply to
e5ca1f31. No local Rust execution is claimed for the integrated tree. Final-head CI is required before merge, including a passing global-database gate.Current follow-up and validation
Current head
393b0e3854c74e63ae8b314db93cb04b89585abbapplies the independently reviewed global-database fixture correction to the integrated tree. In 27 initialization-only test setups, canonical schema admission now completes without starting and immediately dropping an unused raw reader/writer actor set before the fixture opens the connection it actually uses. The real raw connection, test data, assertions, cancellation samples, and deadlines remain unchanged. All five preimages and postimages match the separately reviewed correction prepared for #4890.Prior integrated head
7103e3b0completed Linux CI run 43579749971 at 179/180 targets, with 113 fresh executions. The sole failed target was the global-database suite: 302.1 seconds, with 475/533 cases completed. Its Windows build/typecheck gate passed 467 targets, 26,371 actions, and 272 remote executions in 6,650.473 seconds. These are preserved prior-head results; the Windows gate does not establish native runtime execution.The five-file follow-up passed the pinned Rust 1.100 formatter check, actual commitlint 21.2.4, and
git diff --check. Source review and the exact current-master merge preview are clear. Removing the unused actor startup is a concrete fixture correction; it does not establish the cause of the earlier timeout or a measured speedup. No local Rust execution is claimed.Final-head Linux CI run 43593622024 passed 180/180 targets, with 33 fresh executions. The global-database target passed freshly in 223.5 seconds; MCP (288.9s), runtime acceptance (115.4s), and transcript ingestion (96.6s) also passed freshly. The code-index, extraction, and SQLite targets used cached results on this fixture-only follow-up; their prior fresh owning evidence is recorded above. This passing run does not by itself establish the cause of the earlier timeouts or a measured speedup.
Repository, Clippy, Dashboard, and Feature gates passed on the current head. The current Windows build/typecheck job 132448320293 passed 467 targets and 26,371 actions, with 18 remote executions, in 527.354 seconds. This is build/typecheck qualification, without a native runtime execution claim. All applicable current-head CI and Plugin Validation checks passed; Release PR integrity was legitimately skipped, and Devin Review reports success.