Skip to content

fix(analysis-view): unify inert inline Evidence admission - #3613

Merged
N0zoM1z0 merged 14 commits into
mainfrom
fix/inline-evidence-admission-followup-3065
Oct 14, 2026
Merged

N0zoM1z0 merged 14 commits into
mainfrom
fix/inline-evidence-admission-followup-3065

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Inline analysis views could execute a Proxy reflection trap before returning a typed error, and could reject harmless array metadata that JSON cloning omits. This follow-up integrates the shared admission fix from closed, unmerged #3065 on current main and strengthens its regression oracles. Related: #2589.

Original work by @Zhong-fan is preserved in Git ancestry and credited with a GitHub anonymous co-author trailer. The author-closed original PR remains closed.

Change and scope

One admission owner checks borrowed inline Evidence before authentication/schema parsing. Summary, capture and API-surface reuse it; their duplicate traversals are removed. It rejects Proxies/functions before reflection and array traversal overrides before iteration/cloning. A single depth-bounded mutable path stack preserves exact error locations and is copied only on rejection. Arrays are inspected incrementally through descriptors; ignored named/symbol metadata stays inert. Ordinary inputs are neither frozen nor mutated.

API-surface keeps its existing representation reservations live through parsing and grouping. Summary/capture use structural admission. No tool/schema, provider, installation, process authority or release contract changes. This is an ordinary validation correction within existing contribution scope; an additional capability decision is not applicable.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.

The browser/network activity described below belongs to the validation driver; it is not added REA authority.

Executed evidence

Linux, Node 24.18.0 / npm 11.16.0. Base: e79e014f23cf5b5d59aa5e5681897dbcad73b44e; integration head: 94b006cdbd7220aa9c72d3f92e2426e59d5c1941. Before publication, synchronized current main 75104040dffa9aa827e16f8f22a68307e48ff58d; synchronized head d89a8b94a9a2e82724460c8b8dd61b2ac94be5a2 retained the identical five changed files. Final head 7329562d2e8bfcddb4a6eebd9f777c36db42d4c8 also addresses review feedback about precise error locations. Final synchronized check:fast and both compiled CLI/MCP analysis-view suites passed (27 tests).

  • Unchanged main: exact original regression suites produced 2 failures / 46 passes. A throwing Proxy trap executed and escaped the application boundary. An authenticated array with 10,000 ignored named getters was wrongly rejected.
  • Fixed: 48 source tests passed, including getter/cycle/alias/prototype/hook checks, valid-Evidence authentication, retained parent links and live representation budgets. Proxy variants now run through all three views. The capacity oracle observes Object.getOwnPropertyNames, the actual reflection entry point, rather than the unrelated Reflect.ownKeys, and bounds descriptor reads.
  • Compiled public boundaries: 71 passed / 1 skipped across CLI analysis views, SDK analysis views, historical network capture, browser comparison and SAZ decoding. npm run check passed all six tasks and architecture guards; final test-strengthening also passed 48 tests and npm run check:fast.
  • Actual Chromium 153.0.8010.12 HAR: recorded four real requests from an owned local HTTP app, including a redirect and JSON API calls. Eleven compiled CLI / real stdio SDK calls passed. Summary, one-record capture and one-group API-surface projections agreed across inline and same-session retained inputs and CLI/MCP. Output schemas validated with Ajv2020; pagination remained incomplete when more records/groups existed. Parent Evidence IDs and original HAR bytes were preserved. Browser and SDK closed normally.

HAR SHA-256: 1348786c7c575b06b1c6594b4ffd8f3142c3b4b89b33fdef79ceee43af04d888.

Representative CLI output: summary 3,785 bytes; one-record capture 4,760 bytes; one-group API surface 4,198 bytes. Each links the same authenticated parent; pages report remaining coverage.

Review follow-up: precise root/nested/hidden/indexed/prototype/cycle locations are now asserted across all three views. Those strengthened assertions produced 6 failures / 28 passes on the previous PR head; the final source suites passed all 48 tests. Final check:fast, 27 compiled CLI/MCP tests, service/capacity probes and all eleven public calls against the unchanged original HAR passed. This repeat reused the genuine recording; it did not launch another browser.

Performance and limitations

The shared depth-first admission avoids per-array key lists and per-node path copies. It re-examines aliases where the schema would clone them, preserving capacity accounting. No cache is added to caller-mutable input; selected output and retained-evidence reuse are unchanged. Agent tokens were not measured.

Equivalent service-level tasks used immutable main service/accumulator sources and the same built dependency owners. Real HAR normalized outputs were identical (1,967 / 2,672 / 2,104 JSON bytes). First plus three warm calls were recorded; normal warm small-input timings varied around 1.4–10.6 ms; first calls around 4.6–19.7 ms. Explicit synthetic amplification of the real parent's raw array to 100,000 null members kept the summary identical: main 108.05 / 102.28 / 136.65 / 89.03 ms; fixed 49.68 / 51.04 / 46.85 / 44.52 ms. These single-process small samples are observations, not a statistical speedup guarantee.

A separate synthetic million-element array under a 4,096-byte accumulator budget stopped after 14 descriptors and zero array-key enumerations (0.96 ms). This verifies incremental rejection rather than acceptance of a million-element capture.

The initial actual-browser/public workflow took 14.24 s, sampled peak family RSS 1,124 MiB, user/system CPU 14.18/2.89 s. SDK subsequent calls took 8–18 ms; first summary initialization took 1.624 s. Fresh CLI calls took 1.65–2.16 s. Final unchanged-HAR public repeat took 14.35 s / 1,128 MiB; SDK subsequent calls were 8–15 ms and initial summary 1.472 s; fresh CLI calls 1.57–2.99 s, with identical output sizes. Tests/static checks ran serially on two CPUs with an 8 GiB guard; highest observed peak was 4,472 MiB, with no guard stop or OOM.

Executable objects cannot cross JSON CLI/MCP transports; their zero-trap guarantee is tested at the local production boundary. This is input admission, not arbitrary JavaScript containment or a whole-input hard heap limit. Ordinary-object key enumeration remains; summary/capture do not gain an API-surface byte budget. Own verification covers Linux; no new Windows/macOS or live Hopper/Ghidra/IDA acceptance claim.

  • Observed, derived and inferred claims remain distinguishable.
  • Artifact identity, provenance and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable or uncertain outcomes remain visible.

Author readiness

Human owner: @N0zoM1z0

Recorded from the owner's explicit standing declarations for the remaining approved bug-fix batch. Technical review and the executed evidence above were performed by the agent; responsibility remains with the named human.

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Zhong-fan and others added 13 commits October 14, 2026 08:42
Integrate the unmerged admission fix from #3065 on current main, remove
both duplicate walkers, and preserve API-surface representation budgets.
Reject proxies before reflection while ignoring inert array metadata.

Exercise proxy variants through all three views and observe the actual
array reflection boundary and bounded descriptor reads in capacity tests.

Co-authored-by: Zhong-fan <[email protected]>
Co-authored-by: Kaoru0822 <[email protected]>
Co-authored-by: gensokyo-dev <[email protected]>
Co-authored-by: Kaoru0822 <[email protected]>
Co-authored-by: gensokyo-dev <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with the earlier error-location issue fixed and no new blocking findings.

Summary

The PR gives all three analysis views one shared check for borrowed inline Evidence. It keeps API-surface memory reservations and avoids invoking executable input behavior.

  • Inline analysis views check Evidence before they parse it.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Inline Evidence] --> B{Selected view}
  B -->|Summary or capture| C[Shared data check]
  B -->|API surface| D[Shared data check with memory reservations]
  C --> E[Parse and authenticate Evidence]
  D --> E
  C -->|Rejected| F[Error with copied field path]
  D -->|Rejected| F
  E --> G[Project selected view]
Loading

Reviews (2) · Last reviewed commit: "fix(analysis-view): retain precise admis..." · Reviewed by Greptile

Track the owning traversal path in one depth-bounded mutable stack and
copy it only when constructing an input error. Preserve inline Evidence
field paths without allocating a new path for each visited member.

Strengthen existing regressions across summary, capture and API-surface:
root/nested/hidden accessors, array indexes, prototypes and cycles.

Co-authored-by: Kaoru0822 <[email protected]>
Co-authored-by: gensokyo-dev <[email protected]>
@N0zoM1z0
N0zoM1z0 merged commit 11b747f into main Oct 14, 2026
32 of 33 checks passed
@N0zoM1z0
N0zoM1z0 deleted the fix/inline-evidence-admission-followup-3065 branch October 14, 2026 19:13
@morluto morluto added area: evidence Evidence, artifacts, and reconstruction bug Something isn't working labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants