[GH-ISSUE #4190] [Feature] Query retained application metadata and native facts by exact path #1642

Closed
opened 2026-10-16 21:08:21 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/4190

Before submitting

  • I searched open and closed issues and PRs for related proposals.
  • I understand contribution scope must be reviewed before integration.
  • This request contains no credentials, private samples or sensitive target data.

Area

Evidence, artifacts, or reconstruction

Current limitation

A narrow question about retained application metadata should not require a whole reachable feature graph: which selected package/HTML/source-map/native files are present, which processing phases remain unavailable, and what supports those facts?

Executed on main c7f6b8bad1a34d5efb30ff2a017672dea1fcdabb, Linux x64, Node 24.18.0/npm 11.16.0, official Joplin v3.7.21 ASAR. After summary-first analysis of the paths below, an exact package.json outgoing trace completed but its response exceeded the stdio budget: at least 10,587,373 bytes, against a 10,484,736-byte result budget. The trace remains retained as ev_64903e99c2a09d15abd0955b8ddcab0dd4fb01b5a6721c64d2308b3a105df5ac. A second run reproduced the same parent/trace IDs and limits. This is a failed delivery, not a successful equivalent task or performance improvement.

{"name":"analyze_javascript_application","arguments":{"input_path":"/absolute/path/to/app.asar","detail":"summary","source_paths":["ElectronAppWrapper.js","ElectronAppWrapper.js.map","index.html","package.json","node_modules/keytar/build/Release/keytar.node"]}}
{"name":"trace_application_feature","arguments":{"application":{"kind":"retained-evidence","evidence_id":"<returned parent_evidence_id>"},"native_observations":[],"seed":{"kind":"string","value":"package.json","match":"exact","case_sensitive":true},"direction":"outgoing"}}

The published application was not executed. Acquisition/extraction and input digests are in the Joplin verification record. The buffer limit is useful; the missing piece is a suitable bounded fact query.

Use cases

Resume retained Electron analysis and inspect several known metadata/native paths, including after a source timeout. #3948 owns incorrect processing applicability; this request owns delivery of the resulting facts. No new code-mode executor is proposed (#4091).

Desired outcome and success criteria

  • Reuse inspect_analysis_view and the same CLI/MCP projection owner. Read existing parsed facts without rerunning or reinterpreting source.
  • Select exact paths/kinds and needed fact fields; support the homogeneous multi-path question above and bounded paging with stable ordering.
  • Return canonical node identity, precise retained locations, selected metadata and applicable processing gaps inline, with parent Evidence, source basis, coverage and partial/unknown states. Preserve multiple locations rather than choosing an arbitrary display path.
  • Keep complete Evidence accessible. Zero selected rows must not imply absence outside examined coverage.
  • Verify equivalent completed real-app workflows before/after, including schemas, requests, replies, extra calls/retries, elapsed/CPU time and peak process-family memory; distinguish first/repeated queries, uncontrolled caches and unmeasured host/model costs. Overflow is not an efficiency baseline.

Expected interaction with targets

Read existing retained local Evidence. Existing acquisition effects stay with their current tools; this view adds no target execution, injection or mutation.

Verification available so far

I have observed results. Proposed view correctness, cost and runtime behavior: NOT_ENOUGH_INFO — not implemented. Keep reproducible scripts and compact measurements; do not archive downloadable applications or large Evidence.

Alternatives considered / possible direction

#4092/#4097 provide useful typed module references, but their owning contract covers javascript-asset, javascript-module and source-module. Generic module item selectors share that scope. Full feature tracing answers a broader relationship question. Exporting complete retained Evidence and selecting facts locally remains a recovery path and a candidate completed baseline.

Extend the existing retained-view contracts with a focused application-node/fact projection after checking current owners and clients. #1050 is the original selected-view work; #3134 measures retained-history paging and does not own this representation change. Part of #4027 and #1065. No implementation or integration approval is implied by this proposal.

Originally created by @N0zoM1z0 on GitHub (Oct 15, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/4190 ### Before submitting - [x] I searched open and closed issues and PRs for related proposals. - [x] I understand contribution scope must be reviewed before integration. - [x] This request contains no credentials, private samples or sensitive target data. ### Area Evidence, artifacts, or reconstruction ### Current limitation A narrow question about retained application metadata should not require a whole reachable feature graph: which selected package/HTML/source-map/native files are present, which processing phases remain unavailable, and what supports those facts? Executed on main `c7f6b8bad1a34d5efb30ff2a017672dea1fcdabb`, Linux x64, Node 24.18.0/npm 11.16.0, official Joplin v3.7.21 ASAR. After summary-first analysis of the paths below, an exact `package.json` outgoing trace completed but its response exceeded the stdio budget: at least **10,587,373 bytes**, against a **10,484,736-byte result budget**. The trace remains retained as `ev_64903e99c2a09d15abd0955b8ddcab0dd4fb01b5a6721c64d2308b3a105df5ac`. A second run reproduced the same parent/trace IDs and limits. This is a failed delivery, not a successful equivalent task or performance improvement. ```json {"name":"analyze_javascript_application","arguments":{"input_path":"/absolute/path/to/app.asar","detail":"summary","source_paths":["ElectronAppWrapper.js","ElectronAppWrapper.js.map","index.html","package.json","node_modules/keytar/build/Release/keytar.node"]}} {"name":"trace_application_feature","arguments":{"application":{"kind":"retained-evidence","evidence_id":"<returned parent_evidence_id>"},"native_observations":[],"seed":{"kind":"string","value":"package.json","match":"exact","case_sensitive":true},"direction":"outgoing"}} ``` The published application was not executed. Acquisition/extraction and input digests are in the [Joplin verification record](https://github.com/morluto/rea/blob/c7f6b8bad1a34d5efb30ff2a017672dea1fcdabb/docs/verification/javascript-native-handoff-identity-2026-10-15.md). The buffer limit is useful; the missing piece is a suitable bounded fact query. ### Use cases Resume retained Electron analysis and inspect several known metadata/native paths, including after a source timeout. #3948 owns incorrect processing applicability; this request owns delivery of the resulting facts. No new code-mode executor is proposed (#4091). ### Desired outcome and success criteria - Reuse `inspect_analysis_view` and the same CLI/MCP projection owner. Read existing parsed facts without rerunning or reinterpreting source. - Select exact paths/kinds and needed fact fields; support the homogeneous multi-path question above and bounded paging with stable ordering. - Return canonical node identity, precise retained locations, selected metadata and applicable processing gaps inline, with parent Evidence, source basis, coverage and partial/unknown states. Preserve multiple locations rather than choosing an arbitrary display path. - Keep complete Evidence accessible. Zero selected rows must not imply absence outside examined coverage. - Verify equivalent completed real-app workflows before/after, including schemas, requests, replies, extra calls/retries, elapsed/CPU time and peak process-family memory; distinguish first/repeated queries, uncontrolled caches and unmeasured host/model costs. Overflow is not an efficiency baseline. ### Expected interaction with targets Read existing retained local Evidence. Existing acquisition effects stay with their current tools; this view adds no target execution, injection or mutation. ### Verification available so far I have observed results. Proposed view correctness, cost and runtime behavior: **NOT_ENOUGH_INFO — not implemented**. Keep reproducible scripts and compact measurements; do not archive downloadable applications or large Evidence. ### Alternatives considered / possible direction #4092/#4097 provide useful typed module references, but their owning contract covers `javascript-asset`, `javascript-module` and `source-module`. Generic module item selectors share that scope. Full feature tracing answers a broader relationship question. Exporting complete retained Evidence and selecting facts locally remains a recovery path and a candidate completed baseline. Extend the existing retained-view contracts with a focused application-node/fact projection after checking current owners and clients. #1050 is the original selected-view work; #3134 measures retained-history paging and does not own this representation change. Part of #4027 and #1065. No implementation or integration approval is implied by this proposal.
bsakaguchi 2026-10-16 21:08:21 +00:00
Author
Owner

@N0zoM1z0 commented on GitHub (Oct 15, 2026):

Implementation in progress on feat/javascript-retained-facts, based on latest main 85eac7b92bac39bf2da6c00ebf6ba1b11b4c8d1f after #4207 merged. No PR yet.

The prototype extends inspect_analysis_view with javascript-facts: exact retained location/kind filters, caller-selected property keys, and observation-level paging with canonical identities, original Evidence and source coverage. Shared module/fact coverage has one owner; CLI/MCP use the existing application service. No target execution or new executor.

Real Joplin completed export+local-filter and view answers agree for normal and 1 ms interrupted analysis (12/11 observations), with exact view CLI/MCP parity. View retrieval is much faster in these runs, but selected-catalog static task BPE is higher (normal 17,289 vs 8,887): the generic view schema and Evidence envelope outweigh the saved caller program. This is not a token-efficiency win. Actual fixed-model agent pilots are underway before deciding the final integration; preserve failed harness attempts and all resource/token receipts. Scripts and compact records will be retained, not downloadable applications or large exports.

<!-- gh-comment-id:6201663955 --> @N0zoM1z0 commented on GitHub (Oct 15, 2026): Implementation in progress on `feat/javascript-retained-facts`, based on latest main `85eac7b92bac39bf2da6c00ebf6ba1b11b4c8d1f` after #4207 merged. No PR yet. The prototype extends `inspect_analysis_view` with `javascript-facts`: exact retained location/kind filters, caller-selected property keys, and observation-level paging with canonical identities, original Evidence and source coverage. Shared module/fact coverage has one owner; CLI/MCP use the existing application service. No target execution or new executor. Real Joplin completed export+local-filter and view answers agree for normal and 1 ms interrupted analysis (12/11 observations), with exact view CLI/MCP parity. View retrieval is much faster in these runs, but selected-catalog static task BPE is higher (normal 17,289 vs 8,887): the generic view schema and Evidence envelope outweigh the saved caller program. This is not a token-efficiency win. Actual fixed-model agent pilots are underway before deciding the final integration; preserve failed harness attempts and all resource/token receipts. Scripts and compact records will be retained, not downloadable applications or large exports.
Author
Owner

@N0zoM1z0 commented on GitHub (Oct 15, 2026):

Implemented in #4265 (ready for review), final local head 7238fd0802c399d9349d8f235b2526c57e5682a5, after integrating pinned main 2202e3f0ba556d40cc6e598df1ecbdf1eda56c13.

Existing CLI/MCP views now select exact retained application observations by batched paths/kinds and requested property keys, with optional property-name discovery. Original identity/provenance, missing versus null, page coverage and global partial/unknown states remain separate. Semantic relationships and unknown records remain accessible through complete Evidence/trace; no executor or persistent cache is added.

Executed: 101 focused cases across six files, full static/docs checks, five consistency cases, discovery, and fourteen version-labelled real Joplin export/view workflows. All oracle checks passed; all seven view cases had exact complete CLI/MCP Evidence parity. Final source hashes match; one CPU/8 GiB, no OOM and verified cleanup.

The cost result is mixed: integrated normal retrieval was 3.232 s export/projection versus 0.149 s view, but selected-contract structured BPE was 8,936 versus 17,393. Seven valid Terra/high Codex CLI trials plus one excluded host-configuration failure remain recorded. The partial-task candidate avoided export/shell and used less input, but more CPU/wall time; normal field discovery was not a stable win. No universal token/latency benefit or production code-mode recommendation is claimed.

Reproduction, exact versions, compact measurements/answers, failed attempts and limitations. Downloadable apps and large Evidence/transcripts are not archived. CI and final-head automated reviews are pending.

<!-- gh-comment-id:6202943600 --> @N0zoM1z0 commented on GitHub (Oct 15, 2026): Implemented in #4265 (ready for review), final local head `7238fd0802c399d9349d8f235b2526c57e5682a5`, after integrating pinned main `2202e3f0ba556d40cc6e598df1ecbdf1eda56c13`. Existing CLI/MCP views now select exact retained application observations by batched paths/kinds and requested property keys, with optional property-name discovery. Original identity/provenance, missing versus null, page coverage and global partial/unknown states remain separate. Semantic relationships and unknown records remain accessible through complete Evidence/trace; no executor or persistent cache is added. Executed: 101 focused cases across six files, full static/docs checks, five consistency cases, discovery, and fourteen version-labelled real Joplin export/view workflows. All oracle checks passed; all seven view cases had exact complete CLI/MCP Evidence parity. Final source hashes match; one CPU/8 GiB, no OOM and verified cleanup. The cost result is mixed: integrated normal retrieval was 3.232 s export/projection versus 0.149 s view, but selected-contract structured BPE was 8,936 versus 17,393. Seven valid Terra/high Codex CLI trials plus one excluded host-configuration failure remain recorded. The partial-task candidate avoided export/shell and used less input, but more CPU/wall time; normal field discovery was not a stable win. No universal token/latency benefit or production code-mode recommendation is claimed. [Reproduction, exact versions, compact measurements/answers, failed attempts and limitations](https://github.com/morluto/rea/blob/7238fd0802c399d9349d8f235b2526c57e5682a5/docs/verification/javascript-retained-facts-2026-10-15.md). Downloadable apps and large Evidence/transcripts are not archived. CI and final-head automated reviews are pending.
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#1642
No description provided.