Repository navigation
feat(javascript): compare static endpoints with HAR captures - #9090
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour 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. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
3 tasks
3 tasks done
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3591.
compare_static_and_observed_endpointscompares existing JavaScript Application Graph and HAR Evidence, reporting matched, not observed in this capture, observed without a confirmed static match, and unknown facts. Static observations, observed groups and matching relationships have stable identities and source links; each match names an exact or template-compatible basis and a concrete HAR ordinal.MCP defaults to a retained summary. Optional
viewreturns filtered/field-selected pages in this call, using the same projector as laterinspect_analysis_viewqueries. CLI addscompare-static-and-observed-endpoints; standard summary/--viewdelivery saves the complete source closure with--evidence_output.Ownership and scope
The shared application service authenticates immutable source records. The existing HAR accumulator owns URL parsing, grouping, template rules, exclusions and the 96 MiB representation allowance; comparison-only whole-path witnesses are budgeted there. Indexed method/route lookup avoids a static × observed join. Source uncertainty, candidate/partial values, missing origin and ambiguous methods remain explicit. Not-observed requires every capture record retained, no exclusions and an exercised origin. It does not mean hidden, unused or inaccessible. Queries, fragments, headers and bodies are not projected; complete source Evidence remains accessible.
Read-only composition within existing authority; no new provider, target execution or endpoint requests. CLI file reads and optional bundle publication use the existing resource owners. Existing API-surface output is unchanged. No dependency, configuration, persisted-format migration or generated output is committed. New capability scope approval for execution/injection/protection recovery is not applicable.
Executed validation
Linux x64, Node 24.22.1 / npm 11.16.0; runtime head
a7af4a150plus fixture-only follow-up903a939c7includes latest mainfc4c381dd:--view.git diff --checkpassed.npm run docs:checkpassed, including 9 README tests. Focused lint retains six warnings in existing large modules; no checks were waived or tests removed.A fresh compact-profile SDK run over the same recorded inputs independently verified 7 static observations: 3 matched / 1 not observed / 3 unknown, 5 observed groups, exact ordinal witnesses, complete page reconstruction, CLI/MCP equality and three-record source-closure export. A listener at the recorded origin received zero requests. The HAR digest and source bytes stayed unchanged; fixture provenance and digest are in its README.
Efficiency and limits
With parents imported, the first selected-answer SDK call took 198 ms and returned 9,967 JSON bytes with a 1,106-byte input schema; repeated complete comparisons took 16.5–29 ms. The older two input projections returned 51,940 reply JSON bytes and still required analyst joining. Their generic 640,961-byte output schema incurred about 4.1 s of first-client preparation, motivating the optional inline selector; this tool's output schema is 21,179 bytes. Fetching all pages costs more than complete delivery. Model tokens and analyst reasoning time were not measured; these observations do not establish a general speedup or token saving.
The entire verification process (setup, alternating/repeated projections and four CLI controls; recording created earlier, warm OS caches) took 13.227 s, 13.887/1.589 s task user/system CPU delta, and 1.21 GiB sampled process-family RSS. Samples every 200 ms sum each process's RSS, including shared pages, and can miss short peaks; profiler overhead is excluded. Local checks used two-CPU affinity and a 4-GiB family guard; no check hit it or OOMed. Full local lint was not rerun after earlier repository-wide guard stops; focused checks and final-head CI are separate. Local hooks were disabled for this explicitly checked commit/push. The initial CI format check found that the original HAR fixture was treated as reformattable JSON. The fixture now uses a
.har.txtsuffix and is copied to.harby the test, preserving its original digest. Public CLI/MCP acceptance and full-repository formatting passed again after this fixture-only change; Final-head CI passed, including all eight portable shards, full static/build/docs checks, the source suite (24,161 passed / 16 skipped), and triggered real browser/HAR checks. All three CodeQL checks passed. Automated Codex code review was unavailable because the repository review quota was exhausted; no review was requested or human-review attestation made. This small owned app does not qualify complex applications, other capture formats or real Windows behavior.Author readiness
Human owner: @gensokyo-dev
The author is exempt from the declaration under CONTRIBUTING.md. Implementation, diff review and checks reported above were performed by the coding agent under the owner's explicit task authorization; no human-review attestation is made here.