Skip to content

feat(browser): inspect historical web network captures - #992

Merged
N0zoM1z0 merged 37 commits into
mainfrom
feat/web-network-history
Oct 7, 2026
Merged

N0zoM1z0 merged 37 commits into
mainfrom
feat/web-network-history

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add offline historical web-network inspection through equivalent CLI and MCP operations. Refs #882 and #774; live binary WebSocket/SSE retention remains separate work, so this does not close #882.

Problem and expected behavior

Inspect a caller-selected producer capture without fetching recorded URLs. Return original fields, record identities and locations, exposed exact bytes and numeric literals, artifact identity and inline Evidence. Historical records do not establish browser execution or deployment authenticity.

Change and scope

  • Pure domain schemas and shared application workflow; replaceable HAR/native adapters under src/browser/history/.
  • HAR 1.2 uses unchanged locked JSON/schema packages. A strict jsonc-parser visitor rejects all duplicate members before materialization, including equal values and escaped names, while retaining original numeric lexemes and exact nesting-error locations. Native captures use a thin bridge over unchanged mitmproxy 12.2.3 tnetstring decoding, without FlowReader migrations or HAR conversion.
  • Owned snapshots and process supervision bound decoding, retained diagnostics, deadlines/cancellation and independent cleanup. No listener, target requests, provider installation or host-default changes.
  • Preserve opaque producer extensions and ordinary URLs/query data. Exclude known transport authentication and caller-marked literals structurally, including sensitive property identities/coordinates, backups, leading header whitespace and non-UTF-8 credential-bearing byte sidecars.
  • Retain malformed-input constraints, native/provider failures, host read-denial errno and structured failures preceding cleanup. Sensitive coordinates become explicit unknowns rather than invented identities. Extracted HAR records inherit whole-subtree exclusions from log/entries names: null payloads and empty sidecars, retaining original ordinals/count. Literal unknown argument names are distinguished from producer pointers.
  • Add provider/provenance docs, source and production-boundary regressions, packaged bridge, generated contracts/catalog and conditional real-producer CI.

Contract and boundary impact

  • Semantic owner/earliest stage: historical domain schema; adapters validate original producer representations before projection and application Evidence.
  • CLI/MCP: inspect-web-network-capture / inspect_web_network_capture; explicit local path/format, optional original ordinal selection and sensitive literal values. Named contracts and SDK-converted input/output schemas remain valid.
  • Provider profile: HAR 1.2; bring-your-own mitmdump 12.2.3 native decoding on Linux only. Complete selected provider id/name/version is carried into Evidence and verified at the decoder boundary. Exact upstream provenance/digest documented; mismatched profiles are unsupported.
  • Evidence: original stable SHA-256/size (explicitly declared digest matches set artifact.sha256 and Evidence.subject to null with an explanation), record sequence, JSON pointers or byte ranges, missing/empty/redacted distinctions, exact producer-byte and numeric sidecars; matching sensitive numeric lexemes, native byte-range coordinates and reported values are excluded with a real-location redaction. Runtime attribution remains unknown. Explicitly sensitive coordinates are omitted; affected record location is { "kind": "unknown", "reason": "explicit-sensitive-value" }.
  • Error contract: additive access_denied code with unavailable category, selected path, errno, operation and read boundary; retryable artifact_changed / integrity_mismatch for concurrent stable-read changes. IO/provider failures keep their original category. Explicit-sensitive failure projection also covers application-generated errors. Cleanup retains the prior structured projected error, including streams, status and truncation.
  • Limits/effects: 32 MiB input, 96 MiB complete reply, 64-level nesting and 30-second owned-command deadline. HAR uses a 192 MiB Node old-generation heap; native decoding a 768 MiB Linux address-space limit. These are not aggregate RSS claims. Limits fail without successful partial evidence; cleanup independently completes before return.
  • Packaging: canonical inventory and generated schema/catalog/skill/conformance metadata updated; native bridge packaged, dependencies locked. No release publishing in this PR.

Evidence and regression coverage

Real fixtures are generated by unchanged mitmproxy FlowWriter/SaveHar. Coverage includes selection/order, exact binary bodies/WebSocket messages/trailers/extensions, large numeric values, string/byte transport URLs and backups, sensitive key/path/coordinate exclusions, malformed native records and omitted subtrees, noncanonical HAR base64, input/depth/reply bounds, access denial, unavailable/version-mismatched engines, cancellation and cleanup.

Before-fix proofs are retained locally: source property/path/diagnostic regressions (9 failures), hidden HAR validation (2), input acquisition/classification (2), decoder failure categories (4), leading whitespace (3), the coordinate/permission/structured-cleanup batch (6), and authored-limitations collisions (4). Real prior installed bridges also demonstrated invalid omitted credential acceptance, wrong native-key classification, and non-UTF-8 credential retention. Follow-ups fix these before merge.

{
  "name": "inspect_web_network_capture",
  "arguments": {
    "capture_path": "/absolute/session.har",
    "format": "har",
    "record_ordinals": [2, 0]
  }
}
rea inspect-web-network-capture /absolute/session.har har --record 2 --record 0 --json

The result includes normalized_result with artifact identity, selected producer records/locations, reported fields, exact byte/numeric sidecars, redactions, limitations and runtime_attribution: "unknown".

  • Observed, derived, inferred and unknown claims remain distinguishable.
  • Artifact identity, producer provenance and meaningful failures remain preserved.
  • Unsupported, unavailable, excluded or incomplete facets remain visible.

Validation performed

Current head 0224870, including upstream main 6e4535c:

  • Final focused regression/contract batch: 130 tests / 11 files passed, including numeric sensitive literals, complete provider identity validation, actual SDK calls and advertised schema dialect validity. Before-fix failures also cover canonicalized byte representations and the ownership preparation deadline. Main integration also passed 191 tests / 8 files across stable readers, artifact inventory and module boundaries. These are separate runs, not additive unique coverage.
  • Cached build, npm run check:fast, pre-push checks, generated documents and npm run docs:check passed. Five additional targeted repetitions passed all10 Linux PID-normalization cases. A single CI capture failure could not be reproduced; its test now reports the tagged failure instead of masking it with a boolean assertion. Earlier ownership/prelaunch cancellation coverage passed22 tests; initial Node 24.18 uncaught-AbortError CI failure was reproduced and fixed rather than retried blindly.
  • Final-head installed package passed 144 real CLI/MCP cases, plus seven native failure classifications, using unchanged mitmproxy 12.2.3. Coverage includes numeric declarations, full provider provenance and generated base64/digest declarations. Original artifacts unchanged and owned descendants [] in completed runs.
  • Deterministic actual-filesystem probes cover unlink-before-open, unlink-after-read, symlink replacement, permission denial and closure after prelaunch cancellation. Initial missing input remains distinct; Windows symlink creation is explicitly skipped.
  • Tarball includes the native bridge; reference, private-game, cache, planning and nested dependency paths are excluded. No host defaults changed.
  • Final-head CI and automated review are required merge gates. Previous Apple E2E hit hdiutil Resource temporarily unavailable; the next normal CI run passed that lane. No product timeout or check was weakened.

Compatibility, safety, and release

Additive operation/error/location metadata. Native capture verification is Linux only; this offline increment makes no new real Hopper/Ghidra or live-browser support claim. HAR decoded text does not establish wire bytes, and assembled mitmproxy messages do not establish original wire fragments. Both formats explicitly reject proto members because the current shared JSON schema cannot preserve them; follow-up #1036 records the traced boundary and acceptance. Live binary WS/SSE, workers/WASM and proxy capture are outside this increment. Source-owned fixtures only; no private game data. REA 5.0.0 was published separately from its frozen checkpoint.

Review checklist

  • Focused outcome and Conventional Commit title.
  • Related issues linked; remaining work explicitly preserved.
  • Meaningful observable behavior and failure paths tested.
  • Owning docs, contracts, package and generated metadata updated.
  • Representative CLI/MCP request and result fields documented.
  • Final diff checked for credentials, unrelated changes and unsupported claims.

@N0zoM1z0 N0zoM1z0 added enhancement New feature or request area: mcp MCP server, transport, and tool registration area: domain Domain logic, errors, and pure functions labels Oct 7, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T23:44:45.532671Z 0224870 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2726c68746

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bridge/mitmproxy/capture.py Resolved
Comment thread src/browser/history/CaptureRedaction.ts Resolved
Add independent offline format adapters, inline CLI/MCP evidence, bounded
owned decoder processes, and real producer verification.

Refs #882

Assisted-by: Yukari (gensokyo-skills:yukari-boundary-analysis)
Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
…oding

Honor cancellation during owned-command cleanup, retain opaque HAR
extension content, and clean verifier resources on every failure path.

Refs #882

Assisted-by: Yukari (gensokyo-skills:yukari-boundary-analysis)
Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Normalize known native transport URLs for both bytes and strings, including backups. Exclude explicitly sensitive text fields with null so redaction markers cannot reintroduce declared literals. Cover both provider identities in catalog conformance.

Refs #882

Assisted-by: Yukari (gensokyo-skills:yukari-boundary-analysis)
Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
@N0zoM1z0
N0zoM1z0 force-pushed the feat/web-network-history branch from 2726c68 to 4626a48 Compare October 7, 2026 15:41

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4626a48467

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/history/HarCapture.ts Resolved
# Conflicts:
#	README_ja.md
#	docs/product-catalog.json
#	docs/verification/managed-conformance-manifest.json
#	skills/reverse-engineer-anything/SKILL.md
#	src/generatedMcpToolCatalog.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2b248814a2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/domain/explicitSensitiveValues.ts Resolved
Comment thread src/process/OwnedCommand.ts Resolved
# Conflicts:
#	docs/product-catalog.json
#	docs/verification/managed-conformance-manifest.json
#	package-lock.json
#	package.json
#	skills/reverse-engineer-anything/SKILL.md
@N0zoM1z0

N0zoM1z0 commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the four correctness followups on 0a4827f. Local verification: 103 focused tests, static/generated-doc checks, and 34 real CLI/MCP cases in both the working build and isolated installed package passed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0a4827f324

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/history/HarCapture.ts Resolved
@N0zoM1z0

N0zoM1z0 commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Followup head 5cc681e validates omitted HAR subtrees before discarding their projection/sidecars. The corrected regression fails twice on the prior decoder and all 21 HAR cases pass after the fix. Focused adapter/CLI/MCP tests (30), static checks and generated docs passed; updated installed-package real verification is running. Latest main #1014 is included.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5cc681edca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@N0zoM1z0

N0zoM1z0 commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Head f526d5c fixes oversized selected captures as typed input-limit failures, with capture_path, maximum_capture_bytes and actionable guidance. Acquisition and decoder filesystem failures are separated so an owned runtime/command ENOENT cannot be misreported as missing caller input. Two new regressions failed before the fix; 10 focused boundary/CLI/MCP tests, static and docs checks now pass. Latest main #1016 is included; final installed real lane with 40 cases is running.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f526d5c287

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bridge/mitmproxy/capture.py Resolved
@N0zoM1z0

N0zoM1z0 commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d0f387f34c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/process/OwnedCommand.ts Resolved
@N0zoM1z0

N0zoM1z0 commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a2d045235a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@N0zoM1z0

N0zoM1z0 commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 388713d7cb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/browser/history/HarCapture.ts Resolved
@N0zoM1z0

N0zoM1z0 commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

@GPT please review the current head 6a12666. This follow-up rejects every duplicate HAR member before materialization, including equal-valued duplicates and escaped names, using unchanged jsonc-parser SAX events and lossless numeric tokens. Both capture formats explicitly reject proto members rather than lose them at the current shared JSON schema boundary. Artifact-digest sensitive declarations are fixed in the preceding commit. Focused tests and fresh installed CLI/MCP verification are being completed against this exact head.

@N0zoM1z0

N0zoM1z0 commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 02f05853a0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@N0zoM1z0 N0zoM1z0 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final review of 0224870: all reported review findings reproduced and addressed, including equal duplicate HAR members, parser error coordinates, digest declarations and native byte-range exclusions. Focused tests: 130/11 files; cached type/lint/build/generated-doc checks pass. Fresh installed package: 144 real CLI/MCP cases plus seven upstream native failure classifications; source artifacts unchanged and owned descendants empty. Full provider tuple and SDK-converted schemas verified. Native capture claim remains Linux/mitmdump12.2.3; proto representation is explicitly unsupported and tracked in #1036. Code review finds no remaining merge blocker; merge after all final-head CI checks succeed.

@N0zoM1z0
N0zoM1z0 merged commit 2bf3663 into main Oct 7, 2026
29 checks passed
@N0zoM1z0
N0zoM1z0 deleted the feat/web-network-history branch October 7, 2026 23:53
N0zoM1z0 added a commit that referenced this pull request Oct 8, 2026
…oundaries (#1049)

* fix(domain): preserve prototype-named JSON members through Evidence boundaries

Zod's z.json() record projection drops own __proto__ members as a
prototype-pollution guard, so provider replies carrying them lost evidence
before hashing/serialization and CLI/MCP output. The shared schema now
validates with z.json() as before, then rebuilds the value keeping
prototype-named own members as ordinary data properties (__proto__ via
Object.defineProperty, so the prototype is never mutated).

parseHarJson no longer rejects __proto__ members; the explicit unsupported
case from #992 is replaced with a preservation regression, and the
inspect_web_network_capture contract text is updated to match.

Fixes #1036

* fix(domain): bound JSON depth and oversized payloads at parsing boundaries

jsonValueSchema re-walked hostile input through z.json()'s recursive core, so a deeply nested payload from an MCP tool argument, inline evidence, provider result, or keyed archive threw RangeError: Maximum call stack size exceeded instead of a validation issue. The schema now runs an iterative depth guard first and keeps z.json() for full JSON semantics behind it, which also turns cyclic values into validation errors. The 1000-edge limit stays far below the range where the recursive core overflows its stack (measured between 2000 and 3000 on Node 24) while leaving room for legitimately deep target-derived trees such as compiled NIB view hierarchies, and the guard narrows with a typed record check instead of any or unchecked casts. The non-recursive JSON Schema advertisement stays intact on both the public and standard projection paths. Two payload sizes get explicit budgets tied to their producer constraints: web text artifacts reject beyond the 16 MiB source budget the web tooling already advertises, and native UI screenshot base64 beyond the 64 MiB helper output budget. Regenerated product catalog, skill catalog digest, and completion-ledger manifest follow the schema-boundary change.

* fix(validation): preserve depth diagnostics across process inputs

---------

Co-authored-by: DeryFerd <[email protected]>
Co-authored-by: N0zoM1z0 <[email protected]>
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
* feat(browser): inspect retained HAR and mitmproxy capture evidence

Add independent offline format adapters, inline CLI/MCP evidence, bounded
owned decoder processes, and real producer verification.

Refs morluto#882

Assisted-by: Yukari (gensokyo-skills:yukari-boundary-analysis)
Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)

* fix(browser): preserve capture boundaries during cancellation and decoding

Honor cancellation during owned-command cleanup, retain opaque HAR
extension content, and clean verifier resources on every failure path.

Refs morluto#882

Assisted-by: Yukari (gensokyo-skills:yukari-boundary-analysis)
Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)

* fix(browser): exclude sensitive capture fields across representations

Normalize known native transport URLs for both bytes and strings, including backups. Exclude explicitly sensitive text fields with null so redaction markers cannot reintroduce declared literals. Cover both provider identities in catalog conformance.

Refs morluto#882

Assisted-by: Yukari (gensokyo-skills:yukari-boundary-analysis)
Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)

* fix(browser): exclude sensitive capture identities and bound diagnostics

* fix(browser): validate excluded HAR subtrees before projection

* fix(browser): distinguish capture input limits from decoder failures

* fix(browser): preserve decoder failure categories

* fix(browser): validate excluded native credential values

* test(browser): report capture verifier assertions directly

* fix(browser): classify native representation failures precisely

* fix(browser): exclude URL userinfo after header whitespace

* fix(browser): preserve capture evidence and failure boundaries

* fix(browser): exclude sensitive literals from capture limitations

* test(browser): check limitation values without JSON syntax

* fix(browser): preserve acquisition integrity and exclude selection diagnostics

* fix(browser): preserve capture acquisition and declaration boundaries

* fix(mcp): project sensitive capture argument validation

* fix: preserve capture bytes and prelaunch cancellation

* fix(browser): exclude sensitive HAR record ancestry

* fix(browser): preserve transport URL and parameter exclusions

* fix(browser): preserve numeric redaction and canonical capture provenance

* fix(browser): cover derived capture values and ownership preparation deadlines

* fix(browser): exclude explicitly sensitive artifact digests

* chore: regenerate generated metadata

* fix(browser): reject lossy HAR member normalization

* test(browser): assert the advertised unsupported-profile outcome

* fix(browser): preserve JSON visitor nesting failure locations

* fix(browser): exclude explicitly sensitive native source ranges

---------

Co-authored-by: Kaoru0822 <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
…oundaries (morluto#1049)

* fix(domain): preserve prototype-named JSON members through Evidence boundaries

Zod's z.json() record projection drops own __proto__ members as a
prototype-pollution guard, so provider replies carrying them lost evidence
before hashing/serialization and CLI/MCP output. The shared schema now
validates with z.json() as before, then rebuilds the value keeping
prototype-named own members as ordinary data properties (__proto__ via
Object.defineProperty, so the prototype is never mutated).

parseHarJson no longer rejects __proto__ members; the explicit unsupported
case from morluto#992 is replaced with a preservation regression, and the
inspect_web_network_capture contract text is updated to match.

Fixes morluto#1036

* fix(domain): bound JSON depth and oversized payloads at parsing boundaries

jsonValueSchema re-walked hostile input through z.json()'s recursive core, so a deeply nested payload from an MCP tool argument, inline evidence, provider result, or keyed archive threw RangeError: Maximum call stack size exceeded instead of a validation issue. The schema now runs an iterative depth guard first and keeps z.json() for full JSON semantics behind it, which also turns cyclic values into validation errors. The 1000-edge limit stays far below the range where the recursive core overflows its stack (measured between 2000 and 3000 on Node 24) while leaving room for legitimately deep target-derived trees such as compiled NIB view hierarchies, and the guard narrows with a typed record check instead of any or unchecked casts. The non-recursive JSON Schema advertisement stays intact on both the public and standard projection paths. Two payload sizes get explicit budgets tied to their producer constraints: web text artifacts reject beyond the 16 MiB source budget the web tooling already advertises, and native UI screenshot base64 beyond the 64 MiB helper output budget. Regenerated product catalog, skill catalog digest, and completion-ledger manifest follow the schema-boundary change.

* fix(validation): preserve depth diagnostics across process inputs

---------

Co-authored-by: DeryFerd <[email protected]>
Co-authored-by: N0zoM1z0 <[email protected]>
@morluto morluto added the area: runtime Process capture and runtime observation label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: domain Domain logic, errors, and pure functions area: mcp MCP server, transport, and tool registration area: runtime Process capture and runtime observation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Import historical web network evidence and retain selected protocol payloads

3 participants