The Deep website study from #1838 sent `web_walkthrough_record` a step shape it doesn't accept, so no recording was ever written. The step is now the tool's own (a test reads it as the tool's params), request bodies are kept so two operations to one endpoint are told apart, a body cut at its cap is left out rather than replayed incomplete, headers are read from the shape the browser keeps them in, and the file is written with private permissions.
A Deep website study now records the start page's requests and answers to `capture/original.har` (bodies within their cap, credential headers and declared secrets left out as in every capture; a failure is noted in how-it-works.md, not fatal). When that recording is there, the brief tells the builder that `web_standin_build` and `web_standin_start` can serve those answers to its own front end. Clean room is unchanged. Starting a stand-in automatically stays open (R3.11).
An application graph resolved only the first 2,000 imports of a module and dropped which per-file fact lists were cut, so later dependencies lost their edge and role and nothing said a list was cut. Every retained import is now resolved, the cut lists are named in a facts_truncated limitation, and js_app_map reports partial coverage for such a graph.
app_graphs_compare and js_exports_compare cut added, removed, bundle-module and vendor rows at 2,000 without saying so, and the app comparison's summary reported the cut lengths as totals. Each list now carries its complete total beside the capped rows, the summary uses those totals, and a cut comparison is marked rows_capped with a limitation and partial coverage.
core_archives_compare counted every added, removed, changed and moved file but cut each list at max_rows without saying so. It now marks a cut comparison rows_capped, with a limitation that the counts are complete and partial coverage; a comparison that fits keeps its evidence as before.
An application graph dropped edges past 4 x max_nodes without saying so, and js_app_map reported complete coverage even for a graph cut by its node or edge cap. The builder now counts edges the cap turns away and records an edge_cap limitation beside node_cap, and js_app_map marks coverage partial when either cap cut the graph, on every module page.
A source-to-bundle comparison with more scripts than max_rows reported the examined window's counts as if they covered the whole tree, and its count of bundle units without a source was the capped row count. It now says how many scripts were examined beside the total, counts every unclaimed unit while still listing at most max_rows, and marks a capped result with a rows_capped limitation and partial coverage.
An index-map section that points at an external map, which is never fetched, adds no sources, so an application graph treated the map's list as complete. Such sections are now counted (through nested index maps), the graph names them in a limitation, and comparing a reference source tree with the bundle reports an otherwise unmatched source as uncertain with partial coverage instead of absent.
A map with malformed mappings or section offsets was reported unreadable, although its sources list is usually whole, and the list is all an application graph keeps. A new sourcemap::parse_sources reads the sources, content, names and ignore list without decoding mappings or checking section offsets; the application graph re-reads a map parse refuses for those reasons this way, lists its sources with a source_map_mappings_unreadable limitation, and compares them as usual. A map whose decodable mappings name a source past the end of its list, or with a malformed section, is still unreadable.
A source map that was malformed, had an undecodable data URL or was listed but not loaded left its sources looking absent, so a source comparison reported them as confirmed missing. Such a map is now marked unreadable with a limitation, and the comparison reports otherwise unmatched sources as uncertain with partial coverage. A stand-alone .map beside an analysed script is read like a referenced one; other .map files stay listed and unread, so they can't make a comparison uncertain or match code that doesn't ship.
Follow-up to #1703. A sections array of non-objects could cost several times the old parser's memory, skipped values weren't checked as a full read checks them so some broken maps read as valid, entries a repeated key replaces still used the budget, and the analyzer read a map refused at a limit as one with no sources. Index-map sections now count against the entry budget and non-map sections stay small, skipped values get the same string, number and nesting checks, a replaced list is freed and gives its entries back, the default limit is 4,000,000 so a million sources with content fit, and a map refused at any of the parser's limits leaves its sources uncertain with a limitation, while a malformed map is read as before.
When a source map's inventory was cut by its limits, the source-to-bundle comparison searched only the retained names and reported an omitted source as confirmed unmatched. Sources with no observed match now go in a separate uncertain_sources list with the reason source_map_inventory_truncated, the result says the inventory was truncated, and the evidence carries a limitation and partial coverage; positive matches are unchanged.
A small source map could expand to gigabytes when its sourceRoot was copied into every source name, and the full list was built before the application analyzer kept 5,000 of them. Source lists are now built within an entry and byte budget shared across sections and an application's maps, checking each expanded path's length before allocating it; when only a prefix fits, the result says it was truncated and the analysis notes it as a limitation. A pitfalls entry records the rule.
The application graph recognizes a worker entry point but then follows its spawn edge while assigning the parent's role. Worker modules, their ordinary dependencies and their endpoint evidence consequently appear as `main`, `page` or `package`. The later worker-role pass cannot correct a role that was already assigned. Use the existing worker/service-worker/utility-process edge classification to stop parent-role traversal at execution-context boundaries. Worker roots still receive their own role and propagate it through ordinary imports. Spawn edges remain in the graph, and a module also directly imported by the parent retains the existing role precedence.
A package with 52 reachable modules loses the final module's role when each hop repeats the same `require()` 2,000 times. The graph resolves those imports, but role propagation charges its 100,000-step limit for duplicate queue entries, eventually leaving reachable modules as `unknown`. Mark modules in the existing role map before enqueueing them. Repeated imports, cycles and shared dependencies then use one queue entry per newly discovered module. The limit remains 100,000 newly discovered modules per assignment, and the existing main/preload/renderer/page/worker precedence stays intact. Inline scripts continue to inherit their page's role.
A module keyed by `0x10` and a loader call written as `16` produced different identities. Numeric separators and exponent notation caused the same problem, including dangling `requires` targets in the application graph. Different spellings of one numeric dependency could also occupy separate list entries. Use the existing syntax library's JavaScript number conversion for numeric module keys, loader arguments, browserify mappings and chunk IDs. Explicitly enable its already-present `to_js_string` feature. String identifiers retain their literal spelling, including strings such as `"0x10"` that identify a different property from numeric `0x10`.
A native function can branch to a body block placed before its entry address. The control-flow graph already included that block, but reference and string scans only looked from the entry onward, and parameter inference took the lowest-address block as the entry, so a register set by the real entry could become a false parameter while the real input disappeared. Reference scans now cover the address range of all of the function's body blocks, and parameters are read from the block at the function's actual entry.
A webpack wrapper can have a loader parameter named `r` while a nested function uses its own unrelated parameter with the same spelling. The dependency visitor treated both calls as module loads, adding false `requires` edges to the application graph. Resolve loader calls against the wrapper parameter's semantic binding. This retains closures that capture the real loader, distinguishes function/arrow parameters, block and catch bindings, and avoids treating the placeholder for a destructured parameter as an actual loader name. First-seen ordering and dependency deduplication stay intact.
app_builds_line_up paired only 1,448 of about 36,000 functions across two Rust toolchains, because every v0 crate hash changed, so exact names rarely matched. A new name_without_hash stage, after exact names, pairs Rust names (legacy and v0) that are equal once demangled without the compiler's hashes, and keeps the instantiating crate so each crate's copy of a generic impl stays separate. Called names are compared the same way, so the structure fingerprint survives a toolchain change, and a pair whose names differ only by hash isn't counted as renamed. On the same two cargo builds this pairs 14,036 functions (13,356 by name), with masked-bytes pairs down from 888 to 233. The crate lookup reads only the end of a name, so a long crafted symbol can't make it slow.
A HAR summary added the larger of each response's received and decoded sizes into one total. It now reports the received bytes and the decoded content bytes separately, with how many responses didn't record each.
Pasted pictures get a counter in their name; atomic-write temp files are created exclusively and private from the start; stand-in replay samples keep differing response details.
A website stand-in charges its per-body and total byte limits on the text it actually keeps after redaction, and drops repeated samples before charging them, so polling no longer uses up the budget. A cached 304 whose body was left out stays unavailable (R3.11).
Older stand-in recordings keep their empty query pairs when current credential rules are reapplied, so replay matches the right page (follow-up to #648).
Replays #602–#605. HAR reports redact percent-encoded credential names and declared secrets in every kept field, count decoded body bytes, and template only real dates in API paths; the stand-in backend matches older recordings with the current query rules.
Co-authored-by: Afloat <132809511+Afloat16@users.noreply.github.com>
web_scripts_save copies only the scripts that fit its max_scripts and max_bytes; scripts past them are listed by URL only, so a large or hostile capture costs no more than the export's own limits.
A native call graph lists at most 50,000 call edges and says when it stopped there, so one function with a huge number of call sites can't blow up the report.
Fixes#519. core_archive_show counts nested archives that a depth or size limit left unopened, reports a nested_not_opened limitation and marks coverage partial.
A stand-in backend no longer replays a recorded 304 without its cached body: such samples are kept for diagnosis, skipped in replay, and a request with no usable answer gets cached_body_unavailable. Builds count them.
An inventory's content id hashes its (path, sha256) pairs sorted, so the same files listed in another archive order are the same content tree and compare as identical. Fixes#281.
`core_archives_compare` matched moves by content through a map from hash to one new path. Two identical old files missing on the new side both "moved" to that one path, so a removal went unreported. With two renamed copies, one copy was reused and the other was reported as added.
Each new-only file is now a move destination at most once. Old files are paired with distinct new copies of the same content, and the rest are removed or added. Every file on each side is accounted for once.
**Verified:** a new test with the reporter's fixtures. Two old copies and one new copy give 1 move and 1 removal; two and two give 2 moves to different paths, with no additions or removals. The existing comparison test still passes. `cargo test -p craft-anything-analysis` (86), the engine's artifact tests, clippy and fmt pass.
Fixes#283
Selecting a macOS app folder is recognised as an app bundle (its root-relative Contents/Info.plist), and nested XPC services appear as services and xpc-service graph nodes.
Fixes#282
An inline `<script>` becomes a module of its own (`index.html#inline-0`). Its summary took its hash from the input file with the same path, and there is no such file, so the hash was always empty. Comparing two maps then read "both empty" as "the same", and an edited inline script counted as unchanged.
- **Inline scripts now get the hash of their own code.**
- **Maps saved before this have no hash for them.** Where either side lacks a hash, the comparison now checks the module's structure fingerprint, size and strings instead.
**Verified:** a new test with a page whose inline script changes from `console.log("A")` to `("B")`:
- the inline module and the page are reported changed, and a map compared with itself has two unchanged modules;
- the same holds for maps with the inline hashes blanked, as saved before this fix.
`cargo test -p craft-anything-analysis` (80), the engine's app tests (31), clippy and fmt pass.
Fixes#236
The pseudo-Java for a method with one try/catch rendered the protected region, the handler and what follows, but never the statements before the `try`. So `v0 = 7; try { v1 = 2; } catch (RuntimeException e) {} return v0;` came out without `v0 = 7;`.
- Those statements are now rendered first. A branch from them into the try region falls back to a labelled `goto`, as elsewhere, so the method is no longer marked fully structured.
- The single-handler wrap is now refused when anything sits between the try's closing `goto` and the handler. That code would have been dropped the same way; such methods now get the plain rendering with the "exception handler(s) in the table" note.
**Verified:** a test with the reporter's 152-byte class (it fails without the fix); `cargo test -p craft-anything-analysis` (79), the engine's Java tool tests (9), clippy, fmt.
**Not checked:** `cargo xtask wasm`. The change is pure logic inside an existing function.
Fixes#232
A native, pure-Rust app that shows anyone how a piece of software works, with
evidence-backed answers, then helps them rebuild it. It ships a desktop app, a
CLI and an MCP server, all driven by one engine.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>