* feat(browser): accept mitmproxy 12.3.1 for native capture decode
Bump the offline adapter profile, provider identity, Linux verification archive, and docs so callers can use mitmproxy 12.3.1 instead of the 12.2.3 pin that blocks patched Brotli/cryptography. Keep SaveHar null postData admission for both producer versions.
Fixes#8078
* test(web): regenerate published HAR example identities
The HAR limitation now names both admitted mitmproxy profiles, which
changes the decoded capture's Evidence ID and both views' parent and
view digests. Update the published API surface and environment manifest
examples to the identities reproduced from their fixture bytes.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
---------
Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(web): deduplicate bundle findings across scripts by value and mechanism
Per-script findings were deduplicated only within one script, so the same
endpoint or route observed in N scripts appeared N times in the merged
bundle, inflating the finding list and overstating the inventory.
Merge now deduplicates routes and endpoints across scripts by
(value, mechanism). The first occurrence keeps its location and order;
later occurrences fold into optional occurrences/script_keys on the
retained entry, so no script is silently dropped and single-script
findings keep their original shape. The key uses the existing compositeKey
helper (JSON) instead of a NUL join. bundleLimitations gains a line
describing the cross-script merge.
* fix(web): address Greptile review on cross-script bundle dedup
- Accept merged endpoint occurrences/script_keys in the web-bundle
view row schema so unfiltered pages no longer throw.
- Match endpoint script_keys filters against retained script_keys,
falling back to location.script_key for older records.
- Generate distinct finding keys in the wide-result capacity fixtures
so routes/endpoints still exercise a 130,000-entry merged result.
- Append later script keys in place instead of rebuilding the list.
- Compare the dedup limitation against its owning constant instead
of freezing the explanatory sentence in the test.
- Update the route-inventory guide for merged endpoints.
* test(web): expect the cross-script endpoint merge in the semantic budget case
Main added a regression where two budget-limited scripts both report
/health. With findings merged across scripts, it is one entry whose
occurrences and script_keys name both scripts, which keeps the case's
per-script attribution.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
---------
Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(javascript): inventory Expo Router require.context route keys
Problem: Expo Router (Metro) web exports register file routes through a
bundled require.context map whose keys are literal route filenames such as
"./(app)/<section>/[id]/edit.tsx", "./_layout.tsx" and "./+not-found.tsx".
The route scan did not recognise that map, so the javascript-routes view of
analyze_javascript_application returned an empty inventory for these apps.
Fix: the route scan owner recognises Metro's context template,
Object.defineProperties({}, {"./file.tsx": getter, ...}). When every key is a
./-relative .js/.jsx/.ts/.tsx file and the map holds at least one _layout or
"+" file, each other key becomes a candidate with the new
expo-router-context-key mechanism, located at the key literal, with low
confidence and inferred derivation. The route-path owner converts keys with
Expo Router file conventions: groups (including group arrays) contribute no
segment, [id] -> :id, [...rest] -> :rest+, a trailing index names its
directory, platform extensions select the same route, and +api files keep
their API path. Layouts and other "+" files are not URL patterns.
Classification stays unknown; a bundled key does not establish platform,
navigator, server or reachability. A file map without a layout or "+" file
retains an interpretation unknown instead of becoming routes. Other
defineProperties calls are not read. The route inventory guide documents this.
Validation: new scan, inventory and CLI acceptance cases with a synthetic
Metro-style module. On the base, the scan and inventory cases failed with
empty candidates and routes; they pass now. Ran test:local for the route
scan, inventory, view, delivery-contract, result-budget and advertised
schema tests (378 passed), test:focused for
tests/acceptance/javascriptRoutesCli.test.ts (13 passed), docs:check and
check:fast. The conventions were checked against the published metro 0.88.0
context template and expo-router 58.0.31 matchers, not a real Expo export.
Refs morluto/rea#7510
* fix(javascript): admit Expo Router context keys within the fact budget
Review follow-up for Expo Router route keys.
The context-map reader converted every key and kept each derived path
in a local array before emission. Only a location per property was
charged, so a map with many long filenames retained route text beyond
the fact budget, including text later discarded at capacity. The reader
now establishes applicability in a first pass without keeping derived
paths. A second pass converts and admits one key at a time through the
budgeted fact owner. Emitted facts and their order are unchanged.
The route inventory guide said Expo keys stay classified unknown, but
the existing path-name heuristic still applies: ./login.tsx becomes
/login, classified system by path-name-heuristic. The guide now says a
bundled key adds no classification of its own.
Tests: a budgeted case with 80 long keys admits a key-ordered prefix and
stays within the limit. The route scan and inventory tests (355) and the
routes CLI acceptance tests (13) pass. check:fast and docs:check pass.
* docs(specs): record the Expo Router route key feature
The documentation guide asks each feature for a spec.md, plan.md and
tasks.md under docs/specs/. Add the record for reading Expo Router
require.context keys in the JavaScript route inventory, and index it.
---------
Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* perf(process): wake OwnedCommand on output close, lazily materialize diagnostic snapshots, and bound tail copies
* fix(process): capture event-time bytes in diagnostic snapshots and make wrap test independent
* perf(analysis-view): retain frozen snapshots across parent readers and index view lookups
* perf(analysis-view): use bounded k-way merge for multi-bucket fact pages
A path neither source inventory observed proves a malformed selector
only when the comparison covered every member. With incomplete coverage
the selector may name a member the comparison never reached, so report
it as an unresolved branch instead of refusing the whole correlation.
Refs #13211
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Each mapping that selected an unreported artifact path reparsed and
reverified both complete source inventories, so M such mappings into one
comparison repeated O(N) graph work M times.
The artifact comparison owner now validates the source pair, checks its
manifest IDs, computes coverage and indexes observed paths once in
prepareUnreportedArtifactPaths, returning a per-path classifier.
Correlation memoizes that classifier, or the absence of resolvable
sources, per comparison Evidence ID for the duration of one call. A
validation failure still fails the whole call, and unobserved, ambiguous
and incompletely covered paths keep their existing outcomes.
Tests count source lookups across several mappings into one comparison
and cover the incomplete-coverage branch.
correlate_static_and_runtime searched only an artifact comparison's
`changes` rows, which by contract omit unchanged paths, and rejected any
selector without exactly one row. A unique member that compare_artifacts
counted unchanged could therefore never reach the advertised
`runtime_only` or `both_unchanged` patterns.
The artifact comparison owner now classifies a path without a change row
against the exact inventories it compared, after checking their manifests
match the retained result. Only a path observed once on each side of a
fully covered comparison is unchanged, matching `summary.unchanged`. A
path neither inventory observed is still invalid caller input, and a path
without full coverage or without resolvable source inventories stays an
unresolved branch with a limitation. Several rows for one path remain
rejected.
Fixes#13211
Boundary tests derive the jadx engine version from JADX_RELEASE,
matching the fixture convention this branch already established.
Domain view tests cannot import the provider layer without inverting
dependency flow, so their synthetic engine metadata uses a neutral
version instead of the stale pin.
Validation: check:fast, and the five touched test files (114 tests).
The bridge-owned catalog omitted method_name and reference_target from
get_class_summary and reference_target from get_xrefs_to_method, even
though the bridge reads both on its external-prototype path and REA
sends both for reference queries. Neither side validates against the
schema today, but the verified catalog contradicted the traffic it
describes, and any schema-validating client would reject REA's own
reference queries.
The REA call sites also stopped sending limit, resolve_line and
smali_fallback, which the bridge never reads.
Validation: check:fast, and the Android MCP boundary plus JadxAnalysis
tests (92 tests). The bridge source itself was not compiled here; the
local engine JAR is absent, so verify:android against the real 0.8.0
JAR remains the authoritative catalog check.
The catalog check compared property names and required fields only, so
advertising `overload_index` as a string would still have passed even
though the bridge rejects it. Each expected property now carries its type.
The transport piped the bridge's stderr and never read it, so a failing
startup or catalog reply surfaced as "Connection closed" with the Java
error hidden. Retain a bounded tail and append it to the failure.
Validation: bridge-catalog against the real 0.8.0 JAR passes; a wrong
expected type fails with "get_method_body.overload_index must stay
string", and a missing engine JAR now reports the javac diagnostics
instead of only the closed connection.
Listing the bridge tools closed the connection. The bridge copied each
property from the pinned engine's schema, and that schema has no
`overload_index` for `get_xrefs_to_method`, so the advertised map carried
a null that kotlinx serialization cannot write. Only `tools/list` was
affected: REA calls tools by name, which is why the real lanes never saw
it, and the same defect reproduces against the 0.7.1 engine.
The bridge now declares the properties and required fields it accepts, so
an engine bump can neither advertise a null nor drop the overload
selector REA relies on. The real Android lane lists the live catalog to
keep the shape under test. One tool list serves both the consumed set and
the reimplementation loop, unknown names fail fast instead of inheriting
a method-shaped schema, and the identity moves to 12 because main's JNI
split-qualification change already owns 11.
Validation: build:cached, check:fast, docs:check, test:focused over the
Android boundary files, and verify:android against the real 0.8.0 JAR and
ApiDemos 6.0.18. The new catalog step passes; the lane still stops at the
pre-existing `missing java` recovery expectation, which this change does
not touch.
Move the audited engine release and its submodule gitlink from v0.7.1 to
v0.8.0 (commit 2b2a560e, sha256 4b9a01c2...). Upstream only changed
source-window paging and metadata-only field reads, so the six tools REA
consumes and the bridge identity stay unchanged.
Hand-copied version numbers now derive from JADX_RELEASE: the fixture
download name, the metadata-bridge workflow path and the fake MCP
server's reported engine version. The composition fallback availability
text no longer names a release, because the Android boundary owns the
versioned remediation.
Validation: build:cached, check:fast, docs:check, test:focused over the
16 Android test files (296 tests), and verify:android against the real
0.8.0 JAR and ApiDemos 6.0.18.
* feat(web): report value-free header names in the api-surface view
The api-surface view could only say that a group had query names. Analysts
asking which endpoints are signed or session-bearing had to page complete
capture records and compare header values by eye, which copies the values
into the agent's context.
Add an opt-in include_request_header_names facet that lists the request
header, cookie and set-cookie names recorded for each group, with the
records that presented them. Values are never read: the reader walks only
name members, tolerates malformed members without dropping the rest, and
reserves its scratch before collecting anything.
Omitting the option leaves group output byte-identical, and the existing
sensitive-parent refusal still applies.
* style(web): format the route template view
The branch's own change to `webNetworkRouteTemplates.ts` did not match oxfmt, which is what failed `Static checks` on this PR independently of the main-side formatting break. Merged current main and formatted the file.
* fix(analysis): reserve header name lists before copying them
readRecordedHeaderNames derived the request, cookie and set-cookie names
with Array.map before the temporary-byte reservation, so a capture whose
arrays exceed the projection allowance still allocated three input-sized
arrays. Charge each array's names from the borrowed members first, then
materialize the lists only once the reservation succeeds.
Keep a recorded empty name: the pinned HAR schema accepts any string
name, so dropping it made a recorded empty spelling indistinguishable
from an omitted member. Report a member whose name is not a string as an
explicit unknown instead.
* fix(analysis): report a malformed header collection as an unreadable member
When a recorded request.headers, request.cookies or response.cookies member is
present but not an array, memberNames collapsed it to an empty list and only
the per-member scan could flag the record. A record whose collections are all
malformed therefore produced a complete-looking empty name list with no
unknown, while only an omitted collection is observed absence. Track a
non-array collection as unreadable so the name list is reported incomplete.
* test(web): compare unreadable header-name unknowns with their owner
Three regressions repeated the accumulator's unknown sentence, so a
wording change would fail them while the reported facts stay correct.
Export the sentence from the accumulator and assert against it.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
---------
Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(elf): inspect exports without section headers
Use the dynamic segment and hash tables to enumerate exports when an ELF image has no dynamic symbol section. Preserve symbol coverage, version qualifications, and typed failures through the existing native export path.
* test(elf): cover dynamic exports with retained sections
* test(setup): retain a valid lowercase Kimi schema profile
Use the supported compact profile in the Windows environment-spelling regression. Keep the exact environment assertion so a duplicate uppercase key still fails, and retain separate coverage rejecting the removed full profile.
---------
Signed-off-by: Afloat <ShuffleMonkey@163.com>
* feat(browser): count credential-named members in HAR capture inspection
inspect_web_network_capture now runs the credential-name scan that
environment-build already applies over the selected HAR records and
reports matches as limitations by pointer, never by value, together with
the bodies the scan could not read. Values the decoder already excluded
are not counted, and nothing is excluded on a name.
Refs #8207
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix(browser): bound the listed credential-name pointers
The limitation lists the pointers that fit within 1 KiB of text and says
how many counted names are not listed, so one long body member name
cannot inflate the limitation that summaries and record pages repeat.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix(environment): bound the credential scan's values before parsing a body
A body under the scan's 4 MiB text limit could still expand into millions
of JSON values or form fields when parsed in the application process, and
the inspection now runs the scan on every HAR capture. The scan counts the
characters that can start a value (`[`, `{`, `,` for JSON, `&` for forms)
before parsing and skips a body that could hold more than 524288, reporting
it like a body over the text limit. Both consumers' messages and docs name
the bound.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix(web): charge every body and name/value list to one credential-scan budget
The credential-name scan bounded each body's values on its own, so a
capture of many compact bodies still expanded millions of values in the
application process, and HAR header, query and form-parameter lists were
copied twice without any bound. One 524288-value budget now covers the
whole scan: a body's values are bounded from its text before it is parsed
and a list is charged by its length before it is read in place, so what
would pass the budget is reported as not scanned instead.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix(web): read credential names in place and charge nothing for empty text
The credential-name scan split each member, header and query name with
two regex replacements, a lowercase copy and a split into a segment
array before matching. A near-4 MiB alternating-case member name
(`x-aAaA…`) therefore expanded into about two million segments: more
than 192 MiB of heap in the application process after the decoder's
containment had ended. `credentialNamed` now reads the name once in
place with the same segmentation (case changes, digits, separators, and
`toLowerCase`'s KELVIN SIGN and dotted capital I), keeping at most two
segments no longer than the longest credential word, so a name of any
length allocates no copies.
`valueBound` started every text at one value, so an empty query, a bare
`?`, an empty form and whitespace-only JSON were each charged a value
they do not hold; once earlier content spent the budget, they were
reported as unscanned in `credential-scan-incomplete`. JSON now holds its
first value only after a non-whitespace character, and a form holds one
field per non-empty `&`-separated piece after an optional leading `?`,
as `URLSearchParams` and the query reader split it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(browser): point the environment build link at the physical guide
The guide lives at docs/agent-environments.md, so the relative link from
docs/guides/web must climb two levels. The Documentation job failed on the
dead link; vitepress build now completes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* test: drop the hard-coded timeout from the heap-bound name test
The test finishes in about half a second, so the shared test deadline is
enough, and a literal 60_000 bypasses the CI and coverage deadline scaling.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(web-network-capture): name an unavailable response source in the scan limitation
The credential-name scan counts a response body whose retained source is
unavailable as not scanned, and WebNetworkCaptureService reuses that scan. Its
limitation text still listed only a cut body, text over 4 MiB, or past the value
budget, so CLI and MCP reports gave none of those reasons for such a body.
Name the unavailable source in the text, matching the environment-build warning,
and cover it with a test that fails on the old wording.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* feat(evidence): paginate retained evidence discovery summaries
Let callers page summary metadata in canonical Evidence ID order without loading record payloads into the response. Keep filter and link totals global to all matches and preserve the unpaged response for existing clients.
* test(evidence): use the supported compact schema profile
* docs(evidence): explain the summary pagination request default
* test: align verification fixtures with current public contracts
Keep the production changes from upstream and update the verification consumers that still asserted their retired contracts:
- assert unknown workflow identity structurally and retain the bounded provider caveats;
- observe the process capture's partial-error delivery while preserving live cleanup ownership assertions;
- use the package's declared imports in the isolated release controller;
- refresh the replay card digest after the Evidence subject identity migration;
- use the supported compact Kimi profile while testing case-insensitive environment keys;
- assert each public interface's own capture issue path.
These are shared test and verifier compatibility repairs. The evidence summary pagination and config-printer feature changes remain separate.
* test: observe the session close result in Kuna retry coverage
* test: follow the persisted DOL snapshot target identity
* test: align CLI and progress fixtures with shared owners
Reuse the core registrar for decompile-all instead of registering it twice
after upstream #11680. Assert the outer MCP start/completion notifications
separately from provider cleanup progress introduced by #11637, retaining
cleanup, rate, timeout, cancellation, and evidence assertions.
* docs: link CLI paging guidance to its canonical contract
The CLI/MCP regression is skipped off darwin, and no macOS job listed it,
so CI never exercised the provenance it covers. Add it to the Apple
artifact lane and its owned paths.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>