[GH-ISSUE #5640] [Feature] Measure and optimize repeated runtime observation queries #3418

Closed
opened 2026-10-31 00:40:10 +00:00 by bsakaguchi · 0 comments
Owner

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

Before submitting

  • Searched open/closed issues and pull requests for related work.
  • Reviewed contribution scope; unresolved authority questions block integration.
  • No credentials, private samples or sensitive target data are included.

Area

Process capture or runtime observation.

Current limitation

The requested runtime-observation audit still lacks matched completed-task measurements on latest main. Source review already finds useful optimizations: Inspector writes raw_result: null, groups repeated script URLs and bounds location-authorization concurrency; Frida uses bounded message retention and exact JSON-byte accounting. Their existing behavior should be measured before proposing another interface or cache.

Inspector currently returns its complete retained script/context snapshot. Frida status returns bounded queued messages. Whether repeated queries or output shape impose material whole-task cost remains unmeasured.

Use cases

Observe a test-owned running REA process while it handles a real Go binary, then answer selected script/context and capture-coverage questions. Compare existing Frida discovery/batched-script/session workflows on test-owned targets where prerequisites allow. ADB's currently configured default executable is unavailable; device coverage remains unverified.

Desired outcome and success criteria

Measure equivalent completed CLI/MCP tasks: actual client schema/output/replay token proxies, elapsed/CPU time and peak process-family memory; distinguish fresh and repeated runs. Preserve complete Evidence, caller choices, stable identities, partial/unknown coverage and cleanup. Optimize only a demonstrated bottleneck using the shared application/query layer. Documenting that existing behavior is sufficient is a valid result.

Expected interaction with targets

Read existing files/captured data; launch or attach to test-owned processes; contact literal-loopback Inspector services; write local Evidence bundles. Frida may use its existing caller-authored-script capability on controlled targets if verified prerequisites permit.

Target and scope details

Inspector remains passive: Runtime.enable and Debugger.enable metadata only. Target IDs/locations do not become OS process identity, and loaded-script observations do not establish execution or import edges. Existing Frida authority and resource ownership remain unchanged. New execution, profiling, protection recovery or process-control capabilities are outside this audit.

Verification available so far

I can suggest a sample or manual check.

Verification details

Source-derived facts above and prior real Frida device enumeration are available. NOT_ENOUGH_INFO: no current matched Inspector/Frida workload results or savings yet. Establish real baselines and independent fact/byte oracles before implementation; bound one heavy job at a time and retain failed/aborted runs as failures.

Alternatives considered

Reuse existing caller-selected Frida scripts for batching, current Inspector capture windows, retained Evidence and runtime reconciliation. Both providers already avoid redundant raw-result mirrors. Live-state caching requires freshness/identity evidence and is not assumed safe.

Possible direction

First measure existing workflows. Reuse existing selection/summary/Evidence-query contracts only if whole-task evidence supports a change; preserve complete default delivery and the original capture owner.

References

Related roadmap #1065 and lifecycle audit #4227. Existing Frida budget work #5175 and Inspector malformed-event handling #4755. This continues the six-scope program after #5614; its command-tool measurements do not establish runtime-observation performance.

Originally created by @gensokyo-dev on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/5640 ### Before submitting - [x] Searched open/closed issues and pull requests for related work. - [x] Reviewed contribution scope; unresolved authority questions block integration. - [x] No credentials, private samples or sensitive target data are included. ### Area Process capture or runtime observation. ### Current limitation The requested runtime-observation audit still lacks matched completed-task measurements on latest main. Source review already finds useful optimizations: Inspector writes `raw_result: null`, groups repeated script URLs and bounds location-authorization concurrency; Frida uses bounded message retention and exact JSON-byte accounting. Their existing behavior should be measured before proposing another interface or cache. Inspector currently returns its complete retained script/context snapshot. Frida status returns bounded queued messages. Whether repeated queries or output shape impose material whole-task cost remains unmeasured. ### Use cases Observe a test-owned running REA process while it handles a real Go binary, then answer selected script/context and capture-coverage questions. Compare existing Frida discovery/batched-script/session workflows on test-owned targets where prerequisites allow. ADB's currently configured default executable is unavailable; device coverage remains unverified. ### Desired outcome and success criteria Measure equivalent completed CLI/MCP tasks: actual client schema/output/replay token proxies, elapsed/CPU time and peak process-family memory; distinguish fresh and repeated runs. Preserve complete Evidence, caller choices, stable identities, partial/unknown coverage and cleanup. Optimize only a demonstrated bottleneck using the shared application/query layer. Documenting that existing behavior is sufficient is a valid result. ### Expected interaction with targets Read existing files/captured data; launch or attach to test-owned processes; contact literal-loopback Inspector services; write local Evidence bundles. Frida may use its existing caller-authored-script capability on controlled targets if verified prerequisites permit. ### Target and scope details Inspector remains passive: Runtime.enable and Debugger.enable metadata only. Target IDs/locations do not become OS process identity, and loaded-script observations do not establish execution or import edges. Existing Frida authority and resource ownership remain unchanged. New execution, profiling, protection recovery or process-control capabilities are outside this audit. ### Verification available so far I can suggest a sample or manual check. ### Verification details Source-derived facts above and prior real Frida device enumeration are available. NOT_ENOUGH_INFO: no current matched Inspector/Frida workload results or savings yet. Establish real baselines and independent fact/byte oracles before implementation; bound one heavy job at a time and retain failed/aborted runs as failures. ### Alternatives considered Reuse existing caller-selected Frida scripts for batching, current Inspector capture windows, retained Evidence and runtime reconciliation. Both providers already avoid redundant raw-result mirrors. Live-state caching requires freshness/identity evidence and is not assumed safe. ### Possible direction First measure existing workflows. Reuse existing selection/summary/Evidence-query contracts only if whole-task evidence supports a change; preserve complete default delivery and the original capture owner. ### References Related roadmap #1065 and lifecycle audit #4227. Existing Frida budget work #5175 and Inspector malformed-event handling #4755. This continues the six-scope program after #5614; its command-tool measurements do not establish runtime-observation performance.
bsakaguchi 2026-10-31 00:40:10 +00:00
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#3418
No description provided.