[GH-ISSUE #8296] fix(javascript): expose retained views for oversized feature traces #6533

Closed
opened 2026-11-01 21:12:00 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @gensokyo-dev on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/8296

Originally assigned to: @kaoru0822-kitauji on GitHub.

Area

JavaScript feature traces / retained result delivery

Observed behavior

A real Obsidian 1.14.4 ASAR investigation through local Codex CLI gpt-6.1-terra / high reused a retained application parent successfully. trace_javascript_semantics consumed that parent. trace_application_feature with an exact observed node ID and direction: "both" completed and retained its derived Evidence, but delivery failed because its response exceeded 10 MiB (reported at least 10,534,041 bytes / 10,533,421 code units). An inspect_analysis_view summary request for that derived result was then refused as an unsupported source kind.

The original application producer ran once and returned a retained partial parent after its existing 300,000 ms per-source timeout. These limitations were preserved; the trace did not rerun the producer. This is a partial real task, not a claim of complete application analysis.

Artifact: official obsidian-1.14.4.asar.gz, decompressed ASAR 27,477,966 bytes, SHA-256 146ef8470d8cbb4a6db209bdc19bf2bad13350444186c0fd93c31087b142b92f.

Invocation shape:

{
  "application": {
    "kind": "retained-evidence",
    "evidence_id": "ev_958b053d7f20ea8b66f2adeaf6dea7a64928c28ec48cf001325dcda2cb7b0655"
  },
  "seed": {
    "kind": "node-id",
    "value": "jag_node_00b893a693501caeee6511ed0dbd58cd21e9899cd87d9bf50a3cf9683d9450a9"
  },
  "direction": "both"
}

Retained feature result: ev_31795ae47747037b4f1700a3087c68fcdc79b641c5c9d93fa4ef13d0fe0c445a (IDs identify this local session's records, not publicly retrievable objects).

Expected contract

Keep the full derived Evidence available while allowing a small useful answer, selected rows/fields, and paging through the retained trace. A delivery-size failure should offer a recovery path the result owner actually supports. Do not silently change traversal scope or discard coverage/provenance to fit delivery.

Existing alternatives and limits

The input semantic_page only pages semantic discovery when a string seed has no application match. It does not page a matched application trace. Changing direction may reduce reachability but changes the selected question; it is not recovery for the same bidirectional trace. The source graph remains inspectable, and the separate semantic trace completed.

Verification scope

Observed on candidate #8293, based on main 23de10bb2849cdce8ddbe70504aa7cc57de75a98, with the existing feature result/delivery contracts. Source inspection supports that the output limitation predates the Evidence-input refactor; a separate base-revision runtime reproduction has not run. The actual task took 347.242 s, 313.685188 s process-family CPU and 1,871,228,928 bytes peak under a one-CPU, 4 GiB hard / 3 GiB early-stop resource scope. Target digest unchanged, copied Codex auth profile removed, payload process cleanup verified. Those whole-task figures include the producer timeout, failed view attempts, and model work; they do not isolate trace cost or establish a before/after speedup.

Related: #8293. This report proposes an output/query follow-up without expanding the current Evidence-input change.

Originally created by @gensokyo-dev on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/8296 Originally assigned to: @kaoru0822-kitauji on GitHub. ### Area JavaScript feature traces / retained result delivery ### Observed behavior A real Obsidian 1.14.4 ASAR investigation through local Codex CLI `gpt-6.1-terra` / high reused a retained application parent successfully. `trace_javascript_semantics` consumed that parent. `trace_application_feature` with an exact observed node ID and `direction: "both"` completed and retained its derived Evidence, but delivery failed because its response exceeded 10 MiB (reported at least 10,534,041 bytes / 10,533,421 code units). An `inspect_analysis_view` summary request for that derived result was then refused as an unsupported source kind. The original application producer ran once and returned a retained partial parent after its existing 300,000 ms per-source timeout. These limitations were preserved; the trace did not rerun the producer. This is a partial real task, not a claim of complete application analysis. Artifact: official `obsidian-1.14.4.asar.gz`, decompressed ASAR 27,477,966 bytes, SHA-256 `146ef8470d8cbb4a6db209bdc19bf2bad13350444186c0fd93c31087b142b92f`. Invocation shape: ```json { "application": { "kind": "retained-evidence", "evidence_id": "ev_958b053d7f20ea8b66f2adeaf6dea7a64928c28ec48cf001325dcda2cb7b0655" }, "seed": { "kind": "node-id", "value": "jag_node_00b893a693501caeee6511ed0dbd58cd21e9899cd87d9bf50a3cf9683d9450a9" }, "direction": "both" } ``` Retained feature result: `ev_31795ae47747037b4f1700a3087c68fcdc79b641c5c9d93fa4ef13d0fe0c445a` (IDs identify this local session's records, not publicly retrievable objects). ### Expected contract Keep the full derived Evidence available while allowing a small useful answer, selected rows/fields, and paging through the retained trace. A delivery-size failure should offer a recovery path the result owner actually supports. Do not silently change traversal scope or discard coverage/provenance to fit delivery. ### Existing alternatives and limits The input `semantic_page` only pages semantic discovery when a string seed has no application match. It does not page a matched application trace. Changing direction may reduce reachability but changes the selected question; it is not recovery for the same bidirectional trace. The source graph remains inspectable, and the separate semantic trace completed. ### Verification scope Observed on candidate #8293, based on main `23de10bb2849cdce8ddbe70504aa7cc57de75a98`, with the existing feature result/delivery contracts. Source inspection supports that the output limitation predates the Evidence-input refactor; a separate base-revision runtime reproduction has not run. The actual task took 347.242 s, 313.685188 s process-family CPU and 1,871,228,928 bytes peak under a one-CPU, 4 GiB hard / 3 GiB early-stop resource scope. Target digest unchanged, copied Codex auth profile removed, payload process cleanup verified. Those whole-task figures include the producer timeout, failed view attempts, and model work; they do not isolate trace cost or establish a before/after speedup. Related: #8293. This report proposes an output/query follow-up without expanding the current Evidence-input change.
Author
Owner

@kaoru0822-kitauji commented on GitHub (Nov 1, 2026):

Proposal (source-derived on aa48d494e; I'll implement it unless someone objects):

trace_application_feature is not in retainedViewProjectors, so inspect_analysis_view returns unsupported_target for a retained trace. And retainedEvidenceContinuation only covers native operations, so an overflowing trace gets only the generic "export or use CLI JSON" step.

  1. Retained trace views (shared domain projector, so CLI inspect-analysis-view and MCP use the same code):
    • {kind:"summary"}: trace identity (trace_id, source_evidence_id, source_graph_id, seed, direction), the producer's summary/coverage, graph coverage, collection totals and evidence_links.
    • {kind:"feature-trace", collection:"paths"|"nodes"|"edges"|"seed_matches"|"native_handoffs", where?, offset, limit}: rows in retained order with exact filters. Nodes, edges and paths filter by node_ids; nodes by kinds; edges by relations; paths by end_kinds. Node rows are compact (identity, observation count, authority/state basis), and include_observations: true opts into full observations. Each page repeats the trace context and keeps the trace's own coverage separate from page coverage, so running out of pages never upgrades partial source coverage.
  2. Optional view on trace_application_feature, following the compare_source_to_bundle precedent: the session retains the complete trace before delivery and returns only the selected view. Omitting view keeps today's full result. The CLI keeps full JSON plus inspect-analysis-view.
  3. Overflow recovery: a retained trace that exceeds the MCP budget returns a schema-validated inspect_analysis_view continuation (a first paths page) instead of export-only advice.

Out of scope: native trace_feature (#8373) and any change to traversal scope or trace identity.

<!-- gh-comment-id:6558792838 --> @kaoru0822-kitauji commented on GitHub (Nov 1, 2026): Proposal (source-derived on `aa48d494e`; I'll implement it unless someone objects): `trace_application_feature` is not in `retainedViewProjectors`, so `inspect_analysis_view` returns `unsupported_target` for a retained trace. And `retainedEvidenceContinuation` only covers native operations, so an overflowing trace gets only the generic "export or use CLI JSON" step. 1. **Retained trace views** (shared domain projector, so CLI `inspect-analysis-view` and MCP use the same code): - `{kind:"summary"}`: trace identity (`trace_id`, `source_evidence_id`, `source_graph_id`, seed, direction), the producer's `summary`/`coverage`, graph coverage, collection totals and `evidence_links`. - `{kind:"feature-trace", collection:"paths"|"nodes"|"edges"|"seed_matches"|"native_handoffs", where?, offset, limit}`: rows in retained order with exact filters. Nodes, edges and paths filter by `node_ids`; nodes by `kinds`; edges by `relations`; paths by `end_kinds`. Node rows are compact (identity, observation count, authority/state basis), and `include_observations: true` opts into full observations. Each page repeats the trace context and keeps the trace's own coverage separate from page `coverage`, so running out of pages never upgrades partial source coverage. 2. **Optional `view` on `trace_application_feature`**, following the `compare_source_to_bundle` precedent: the session retains the complete trace before delivery and returns only the selected view. Omitting `view` keeps today's full result. The CLI keeps full JSON plus `inspect-analysis-view`. 3. **Overflow recovery**: a retained trace that exceeds the MCP budget returns a schema-validated `inspect_analysis_view` continuation (a first `paths` page) instead of export-only advice. Out of scope: native `trace_feature` (#8373) and any change to traversal scope or trace identity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6533
No description provided.