Valid HTML containing inline <script> bodies is reported through an explicit
parse-html-inline-scriptsunavailable scope, so an application whose
endpoints, storage, or imports live in inline scripts is surfaced as
not-analyzed rather than silently empty. That contract was asserted only at the
filesystem boundary; the public CLI acceptance surface had no scenario proving
it survives transport. This adds the missing acceptance coverage. Tests-only; no
source change.
Problem and expected behavior
Trigger: analyze-javascript-application on an app whose index.html has inline
scripts (inline fetch/localStorage, a module import) alongside an external
<script src>. Expected contract on the public JSON result: an unknown node
with operation: "parse-html-inline-scripts" (evidence.state: "unavailable",
confidence: "unknown", the HTML byte sha256, partial coverage); the top-level
limitations names the unanalyzed inline bodies; the external script still yields
its loads edge and recovered endpoint; and the inline-only endpoint/storage
facts are absent. Before this change, a regression weakening that scope on the
public surface was caught by no acceptance/MCP test.
Change and scope
Adds one acceptance case to
tests/acceptance/applications/javascriptUnavailableHtmlCli.test.ts, reusing the
file's existing cliTest + schema-parse helpers. It mirrors the existing
filesystem-boundary oracle (tests/boundary/filesystem/javascriptHtmlEntrypoints.test.ts)
at the public CLI surface. No production/source change and no new capability.
Contribution scope: not applicable — tests-only, within existing boundaries, no
target execution, injection, mutation, or protection recovery.
Contract and boundary impact
Semantic owner and earliest changed stage: none changed; exercises the
src/application/javascript graph projection through the public CLI.
Contribution scope fit and linked maintainer decision: tests-only within
existing boundaries; not applicable.
CLI and MCP/tool-catalog contract: unchanged (asserts the existing
analyze-javascript-application --format json output).
Provider, bridge, target-format, or platform compatibility: unchanged.
Evidence, artifact, provenance, or reconstruction contract: asserts the
existing unavailable-scope provenance (state/confidence/sha256/coverage);
no change.
Target selection, authority, upstream behavior, and cleanup: not applicable
(synthetic local fixtures in a temp directory).
Generated metadata, package, or installation impact: none.
Expected effects:
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.
Documentation or usability only; no target interaction.
Not sure yet; investigation or maintainer guidance needed.
Evidence and regression coverage
Tests added or updated: tests/acceptance/applications/javascriptUnavailableHtmlCli.test.ts
— one new acceptance case.
Base reproduction or other evidence: the contract is covered only at the
filesystem boundary (javascriptHtmlEntrypoints.test.ts); no acceptance/MCP
test hits parse-html-inline-scripts. The new case fails if production stops
emitting the scope, mislabels its evidence state/confidence, drops the
limitations string, or leaks the inline-only endpoint/storage facts.
User-visible CLI/MCP output: unchanged.
Remaining proof gaps: MCP-adapter parity not added (CLI only), matching this
file's existing surface.
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
npm run test:focused -- tests/acceptance/applications/javascriptUnavailableHtmlCli.test.ts
— Test Files 1 passed (1); Tests 5 passed (5) (4 pre-existing + the new case),
against unmodified source.
Run on Windows x64 after restoring the published prebuilt native addon per
native/windows/README.md; Windows native controls are bring-your-own, so CI
(Linux) remains the authoritative lane.
Compatibility, safety, and release
Breaking changes or migration steps: none.
Real Hopper/Ghidra, browser, or OS coverage: not applicable (synthetic static
fixtures; no real browser execution).
Package or release metadata impact: none.
Security, privacy, process, or containment review: none — tests-only, reserved
example.test URLs, no network.
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.
Before merge
This PR addresses a concrete problem or an agreed enhancement.
Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
The PR has one focused outcome and the title follows type(scope): outcome.
Related issue is linked, or the reason for not linking one is stated above.
Tests cover changed observable behavior and meaningful failure paths.
Owning docs, contracts, and generated metadata are updated where needed.
User-visible CLI/MCP changes include representative output.
I checked the final diff for secrets, unrelated cleanup, and unsupported claims.
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".
CassieFox2317d ago
TL;DR: The PR's test file passes, 5 of 5 on Node 22.23.4, 24.22.1 and 26.12.1. I also checked that its storage check looks at the right field. A probe put a localStorage call in main.js, and REA reported it under name, with no node for the inline key.
Check
Node 22.23.4
Node 24.22.1
Node 26.12.1
Head 57c848f794, javascriptUnavailableHtmlCli.test.ts
pass: 5 of 5 tests
pass: 5 of 5 tests
pass: 5 of 5 tests
Head 57c848f794, my probe file
pass: 1 of 1 test
pass: 1 of 1 test
pass: 1 of 1 test
The storage probe
The new test checks that no storage node has properties.name equal to inlineKey (lines 200 to 206). But its main.js makes no storage call (line 113). So if storage facts used some other field, that check would still pass.
My probe copies the new test's setup and adds one line to main.js: localStorage.setItem("probe-key", "v");. The inline script still writes inline-only-key. On all three Node versions, the probe logged one storage node:
Box: Fedora 44 VM (4 vCPUs, 8 GB) on my Nobara 44 PC, Linux 7.2.11
Node: 22.23.4, 24.22.1, 26.12.1
Head / base: 57c848f794 / 149b43ee61 (merge base with main)
Install: npm ci --offline and npm run test:prepare on Node 24.22.1
Commands
npm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- tests/acceptance/applications/javascriptUnavailableHtmlCli.test.ts
xvfb-run -a npm run test:focused -- tests/acceptance/applications/javascriptUnavailableHtmlCliProbe.test.ts
🤖 Written and tested with Claude Code (Opus 5.5), posted with my OK 🦊
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
We couldn’t complete this review. Comment
@codex reviewto try again.57c848fℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.