Repository navigation
feat(analysis-view): project an environment manifest from web network captures - #4954
Conversation
… captures Add the environment-manifest view kind to inspect_analysis_view for retained HAR Evidence: the primary origin's recorded request lines become a deterministic tool surface (names, path templates, parameters with their rule and basis, observed query names, value-free body shapes, record pointers), with excluded groups, three fixed unknowns and the shared projection budget. The four format rules always apply; after-uid-literal, opaque-token and sibling-variance are opt-in and labelled, and literal fold-in never touches a format-rule parameter. The api-surface accumulator moves onto shared route, media-type and budget helpers without behaviour change. Refs morluto#4933 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ce refusal The real-capture verifier stringified the whole MCP result for the environment-manifest refusal, so a declared "[" literal matched the result envelope itself; compare the parsed refusal as the api-surface branch does. Refs morluto#4933 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…view Refs morluto#4933 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… the hosted run Refs morluto#4933 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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. |
|
Requesting maintainer review. The upstream |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6d18d2392
ℹ️ 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".
[Medium impact] The PR appears safe to merge; no blocking issue remains in the reviewed code. SummaryAdds
No new actionable issues were found. All supplied previous threads are unnumbered, so none require a
The merge-base checks differed, so this review used the full PR diff. No superseding implementation was found in local target history; hosted PR status could not be checked because GitHub authentication was unavailable. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Retained or inline Evidence] --> B[Check Evidence and HAR parent]
B --> C[Admit records within shared budget]
C --> D[Group recorded request lines]
D --> E[Select primary origin]
E --> F[Apply selected template rules]
F --> G[Name tools and attach record pointers]
G --> H[Seal linked analysis-view Evidence]
Reviews (11) · Last reviewed commit: "chore: merge main (d1adc607) into the en..." · Reviewed by Greptile |
…t manifest Addresses the automated review findings on the PR: read request bodies at the top level only instead of walking nested values; admit every literal route part before materializing it; compare at most 32 segments in sibling-variance and say so; keep stop words literal after a uid literal; keep the next collision suffix per tool-name base; preserve a templated exclusion when two groups print the same row. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44203ecd73
ℹ️ 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".
…s linear Addresses the second automated review round: fold literal siblings through set membership, key collision suffixes by the truncated name they share, and charge a request media type before it is scanned. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfe5a36422
ℹ️ 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".
Addresses the third automated review round: the composite key copies the method, origin, template and rules, so that copy is reserved before the key is stringified. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 71d7513c47
ℹ️ 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".
…ypes Addresses the fourth automated review round: `image/example+json` or `text/example+json` no longer counts as JSON for origin selection, exclusion or body shapes, matching the documented `application/json` and `application/*+json` contract. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2679323e78
ℹ️ 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".
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
…manifest Addresses the fifth automated review round: the manifest cites the report path and digest, so a parent whose subject is absent or names another path or SHA-256 is refused at admission, as the capture view already does; the api-surface view keeps its existing admission. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Track suffix progress by the actual truncated prefix and suffix width. Distinct full names can collide only after suffix truncation; sharing that progress prevents quadratic rescanning while preserving shorter free names and existing allocation order. Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 99be275e28
ℹ️ 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".
…-variance Addresses the sixth automated review finding: a bucket merged whenever one literal carried a digit, folding plain words such as `mine` into the parameter. The rule now partitions the bucket, merges the identifier-like siblings and leaves the other literals as their own tools. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd87f54e37
ℹ️ 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".
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
Keep coded identifiers and a qualifying plural hyphenated cohort in one eligibility Set before checking the minimum merge size. Read each literal once and reuse the same membership at the consumer, preserving non-identifier routes and the three-hyphen minimum. Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
State the additional sibling-variance selection in the guide, acceptance specification and MCP parameter description. Preserve the existing single-rule behavior and caller-selected inference rules. Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
|
For anyone reading the red check: the only failing shard on adbbbe5 is |
|
The red check is main's (native UI finalization and plist tests, failing on main itself since 36d156f). The branch only needs the next green main merged in. If you prefer, I can do that merge as an append-only commit the moment main goes green and leave the branch to you otherwise; say the word, or just do it yourself and I will stay out of the way. |
|
@gensokyo-dev thanks for driving this. From my side the view PR is complete: all findings fixed, your follow-ups verified, declarations signed. Two asks: could you re-merge main once it is green (or I'll push the merge commit), and could you approve and merge, recording in #4933 or here that item 1 is in scope? |
Picks up the upstream fixes for the plist and native test failures that this branch inherited from main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 494e0151a6
ℹ️ 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".
|
LGTM |
…ansition-view Resolve conflicts with main's environment-manifest view (morluto#4954) by keeping both view kinds: the inspect_analysis_view description, the MCP contract docs and the analysis-view CLI boundary tests now cover the environment-manifest view and the capture_browser_scenario views. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Adds the
environment-manifestview kind toinspect_analysis_viewfor retained HAR Evidence: the primary origin's recorded request lines become a deterministic, replayable tool surface (names, path templates, parameters, observed query names, value-free body shapes, record pointers), with excluded groups, three fixed unknowns and the shared projection budget. Literal fold-in under the opt-in rules never touches format-rule parameters.Refs #4933 (design discussion; scope decision requested there).
Opened as a draft until the scope decision in the design discussion lands and the human owner has reviewed the final diff; the body is complete so the review can start now.
Problem and expected behavior
An agent environment needs a manifest of what a captured application exposes, without serving or replaying anything yet. Existing api-surface groups are not named tools and cannot carry opt-in identifier rules. Expected:
view: {kind: "environment-manifest", template_rules?, include_query_parameter_names?}oninspect_web_network_captureHAR Evidence returns tools whose templates equal the api-surface grouping without rules and applyafter-uid-literal,opaque-token,sibling-varianceonly when listed; a parameter produced by one of the four format rules must keep its exact-format meaning (a literal sibling such as/api/teams/searchor/api/teams/minestays its own tool instead of becoming an observed value of/api/teams/{numeric}).Change and scope
New: environmentManifestRules.ts (opt-in rules, re-bucketing, sibling merge with fold-in restricted to opt-in parameters, naming), EnvironmentManifestAccumulator.ts, environmentManifestView.ts, WebNetworkProjectionAccumulator.ts and webNetworkRouteTemplates.ts (helpers lifted from the api-surface accumulator), a generated contract example, domain tests, and docs/specs/agent-environments/manifest-view/. Pre-existing files, one line each: WebNetworkApiSurfaceAccumulator.ts - behaviour-preserving refactor onto the shared route/media-type/budget helpers so both views share one interpretation and stay under jscpd; webNetworkApiSurfaceView.ts - parent guards replaced by shared admitHarCaptureParent, rule enum from ROUTE_RULES; analysisView.ts - registers request/result schemas, UnsignedAnalysisView member and projector dispatch for the new kind; AnalysisViewService.ts - builds the manifest accumulator for the kind and extends the inferred-confidence rule to it; binaryLayoutView.ts / javascriptApplicationView.ts - type-level Exclude widened so the kind never reaches those projectors; webNetworkCaptureView.ts - unsupported-view message names the kind; analysisViewToolContracts.ts - tool description and example; analysisDetail.test.ts - asserts the kind appears only in inspect_analysis_view's output schema; AnalysisViewService.test.ts, analysisViewCli.test.ts, analysisViewMcp.test.ts, qlogCapture.test.ts - mirror api-surface coverage for the kind (qlog parent refused by both); tests/fixtures/historicalHar.ts + analysisView.ts - Grafana-shaped 28-entry HAR as a TS builder and its capture fixture; scripts/verify-web-network-captures.mjs - real-capture verifier also projects the manifest and asserts refusal/pointer-only records; docs/web-network-captures.md - new 'Environment manifest' section; docs/mcp-contracts.md and the skill evidence-workflows.md - pointer paragraphs. No file outside the slice is modified; CHANGELOG.md, server.json, README.md, docs/readme/* and package.json dependencies are untouched.
Follow the contribution scope.
Contract and boundary impact
src/domain/analysisView/); the earliest changed stage is the view request schema inanalysisView.ts, dispatched kind-first like api-surface.AnalysisViewService.tsonly extends the inferred-confidence rule to the new kind.inspect_analysis_viewacceptsview.kind = "environment-manifest"withtemplate_rules?(each rule at most once) andinclude_query_parameter_names?; its description and examples grow by one example, so the catalog digest changes at build and running servers report the usual restart-required status after upgrade.rea.analysis-viewEvidence linked to the parent; confidenceinferredwhenever any tool or excluded group is templated,derivedotherwise; authority stays the parent'shistorical-reference;view_digestpresent. Records are pointers only and no header, cookie, query or body value is copied into the result.docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): No tracked generated file changes (npm run docs:checkpasses with an empty diff);docs/public/product-catalog.jsonandskills/regenerate in CI..agents/skills/reverse-engineer-anything/references/evidence-workflows.mdgains a pointer paragraph. No package or installation change.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
For evidence-bearing changes:
Representative output
Validation performed
+jsonsuffix only on application media types; f73af11 requires the capture parent's exact subject at admission; dd87f54 merges only identifier-like siblings under sibling-variance. Each has a regression test and a reply in its thread.Compatibility, safety, and release
analysisViewRequestSchema/analysisViewResultSchema; existing view kinds and their outputs are unchanged.environment-manifest(message text only; codes unchanged).Author readiness
Human owner: @earakely-scale
Before merge
type(scope): outcome.🤖 Generated with Claude Code