mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[PR #3622] [CLOSED] feat(analysis-view): report value-free request header facets in API surfaces #5858
Closed
opened 2026-10-31 01:09:58 +00:00 by bsakaguchi
·
0 comments
No Branch/Tag specified
main
codex/procedure-reference-stacked
release-please--branches--main--components--rea-agents
release-please--branches--main--components--rea-agents--release-notes
codex/kuna-independent-retry
codex/byte-search-overlay-coverage
codex/open-failure-target-receipt
codex/kuna-xref-evidence
codex/ghidra-ambiguous-procedure-recovery
codex/function-source-bundle
codex/trace-function-integration-prototype
codex/snapshot-source-closure
codex/recorded-evidence-array-pages
codex/evidence-recovery-redesign
codex/trace-feature-address-scope
codex/call-discovery-scope
codex/ghidra-literal-candidate-evidence
codex/decompile-directory-independent-retry
codex/retry-provenance-base
codex/value-flow-capability-experiment
codex/ghidra-containing-instruction
cursor/readme-discord-button-ef9f
dependabot/github_actions/actions/setup-node-7.1.0
dependabot/github_actions/actions/upload-artifact-7.0.2
dependabot/npm_and_yarn/npm-minor-and-patch-d8d97ce6df
codex/kuna-1989
fix/8559-native-ui-fixture-ownership
fix/8555-go-verifier-mcp-ownership
codex/provider-capability-recovery
fix/8642-rizin-target-stdin
codex/ghidra-memory-effect-scope
codex/ghidra-annotation-entry-selector
codex/ghidra-readonly-recovery
codex/ghidra-regex-verifier-recovery
codex/evidence-discovery-view-guidance
fix/8545-bulk-append-overflow
fix/8428-navigation-refusal-alternatives
codex/address-context-recovery
codex/matching-member-limitations
codex/unknown-scope-contract
codex/evidence-view-guidance
feat/8373-native-trace-views
codex/ghidra-snapshot-verifier-binding
codex/elf-export-visibility
codex/evidence-view-recovery
codex/native-reference-cli-help
codex/provider-candidate-observation-scope
codex/kuna-session-verification
codex/ghidra-switch-lifetime-guidance
codex/pseudocode-paging-discovery
codex/clarify-evidence-view-support
codex/kuna-xrefs-selector-recovery
codex/context-capacity-recovery
codex/evidence-closure-large-links
codex/same-function-evidence-identity
codex/ghidra-verifier-inspected-jdk
codex/audit-guided-workflows
codex/crash-prompt-retained-dossiers
codex/analysis-view-error-recovery
codex/kuna-verifier-target-selection
codex/ghidra-selected-project-call-coverage
codex/docs-native-analysis-scope
codex/ghidra-java-socket-boundary
codex/ghidra-retained-snapshot-verifier
codex/ghidra-search-inventory-facts
fix/8284-zero-argument-parameter-bindings
fix/8198-ui-action-handler-offset
fix/8257-elf-entry-label-identity
fix/8304-deferred-output-schema-projection
fix/8277-call-path-computed-target-uncertainty
fix/pr-8089-conflicts
fix/ci-static-duplicate-export
dependabot/npm_and_yarn/lint-staged-17.6.0
dependabot/github_actions/actions/download-artifact-8.0.2
dependabot/npm_and_yarn/write-file-atomic-8.0.0
dependabot/npm_and_yarn/canonicalize-5.1.0
dependabot/github_actions/actions/cache/restore-6.1.0
dependabot/npm_and_yarn/toon-format/toon-4.4.0
dependabot/github_actions/actions/deploy-pages-5.0.1
codex/review-fixes-pr-2403
codex/review-fixes-pr-2400
codex/process-terminal-width
codex/test-brittleness-cleanup
verify/7167-browser-connect-macos
fix/7167-browser-connect
feat/native-matching-allowance-setting
feat/browser-scenario-dry-run
test/managed-caller-parameters-20261024
codex/parser-fortythird-boundaries
fix/6926-pinvoke-platform-decorations-20261023
fix/6889-har-body-encoding-20261023
fix/6888-sqlite-schema-budget-20261023
fix/dependency-security-gates-6708
cursor/evidence-overwrite-rebase-b4ac
feat/4057-verify-native-exports
fix/windows-acl-observer-overhead-20261022
cursor/erlang-beam-restack-4476
cursor/pe-certificate-review-bf32
fix/6116-javascript-application-fs-errors
fix/6061-unmapped-runtime-script-unknown
feat/browser-scenario-summary
fix/pe-certificates
codex/verify-3407
cursor/rebase-5699
cursor/rebase-5352
cursor/rebase-5600
cursor/fix-cli-schema-omission-10a8
codex/audit-hopper-shutdown-reasons-20261021
fix/demangle-swift-omitted-record
fix/nib-boolean-value-types
cursor/cancellation-partial-observation-a5ac
fix/ib-object-limit-reasons
fix/electron-fuse-limit-advice
fix/kuna-doctor-dangling-cache
fix/fixed-budget-refusal-advice
fix/js-ipc-listener-dedup
fix/js-return-member-provenance
fix/dmg-integrity-retry-advice
fix/ida-doctor-readiness
fix/kuna-version-probe-output-drain
fix/legacy-swift-runtime-name-matching
fix/dylib-lazy-load-commands
fix/browser-scenario-startup-cancel
fix/swift-nested-punycode-classification
fix/compare-unselected-scopes
fix/objc-method-budget-coverage
fix/dmg-mounted-root-observations
audit/ci-tests-20261019-round2
release/6.7.0
fix/wabt-cleanup-retry-resolution
fix/electron-fuse-elf-pe-architecture
fix/native-plist-descriptor-ownership
fix/kuna-caller-cleanup-ownership
experiment/atomic-codemode-20261016
review/first-contributor-3776
fix/call-resolution-full-read-cycles
fix/member-mutation-selection-repeat
experiment/atomic-re-tools-20261015
perf/member-mutation-lazy-origins
perf/static-network-mutation-index
fix/hopper-startup-lifecycle
audit/3050-windows-proof-20261015
feat/windows-window-capture-2183
audit/3049-windows-proof-20261015
audit/3735-macos-fixtures-20261015
fix/batch-decompile-null-pseudocode
fix/kuna-inventory-honors-jobs
experiment/browser-codemode-tool-design-20261015
fix/hopper-clean-runtime-argv
codex/review-2049-27f1b367
review-fixes/pr-2787-routing
fix/3360-scoped-this-emitters
fix/3367-replaced-global-effects
fix/3838-compact-any-value-items
test/hopper-download-probe-20261015
codex/windows-runtime-creation-red-green-20261015
codex/windows-readonly-root-red-green-20261015
codex/windows-root-share-red-green-20261015
codex/exp-1685-win-mcp-startup
codex/bug-sweep-20261015
investigate/2190-windows-package-phases
investigate/3543-macos-cli-deadline
perf/3281-reverse-tools-feedback-quality
fix/3406-hopper-doctor-fixture
fix/3341-wrapper-require-test-context
fix/3301-owned-uninstall-fixtures
fix/3164-compiler-input-ownership
fix/pcap-cleanup-stdout-newline-20261014
perf/interface-builder-summary
codex/review-fixes-pr-1977
fix/ghidra-effective-jvm-platform
fix/docs-turkish-rust-link-20261013
fix/main-maintenance-ci-20261010
fix/recover-binary-session-process-effects
codex/review-fixes-pr-2457
codex/ci-required-cancellation-gate
fix/main-format-baseline-20261013
fix/setup-preserve-entry-fields
cursor/restore-main-checks-1ffc
fix/ghidra-bridge-hashmap-import
codex/shared-ci-jadx-json-default-20261013
codex/shared-ci-ghidra-test-groups-20261013
codex/shared-ci-java-fixture-format-20261013
codex/fix-intrinsic-invocation-boundaries
test/release-preflight-reusable-jobs
test/js-parameter-provenance-expectation
fix/linux-hopper-verification-current
test/2419-ghidra-elf-probe-size
followup/pr-1544-native-ida
codex/fold-pr-2230-contribution
docs/readme-responsible-use
fix/issue-2064
fix/issue-2050
fix/issue-2053
fix/issue-1968
fix/issue-1945
experiment/codemode-bridge-20261011
fix/tool-effects-negative-wording-1904-20261012
fix/1842-electron-interop-provenance
feat/recover-javascript-multi-input
refactor/website-i18n-prep
fix/nativeaot-pe-virtual-extent
fix/browser-verifier-ci-hang
fix/pe-resources-input-selection
docs/beginner-friendly-guides
docs/beginner-setup-guide
fix/javascript-analysis-worker-1563
fix/1649-ghidra-duplicate-names
fix/javascript-export-keys-integration-1369
test/maintenance-boundary-contracts-20261011
review/javascript-export-keys-1369
review/process-live-progress-1483
test/javascript-1495-growth-ratio
fix/ci-escape-timing
docs/normalized-terminal-geometry-1450
release/6.3.0
archive/release-6.3.0-pr1381
release/6.2.0
fix/electron-preload-dynamic-override
fix/javascript-self-referential-bundler-edges
release/6.1.0
cursor/grok-client-cherry-pick-0b56
feat/signature-posture
feat/dyld-shared-cache
feat/artifact-integrity-policy
feat/pkg-inventory
release/6.0.0
chore/sync-release-5.0.0
release/5.0.0
cursor/cloud-agent-node-787e
fix/javascript-xhr-open-endpoints
review/pr-711-realpath-fallback-wording
cleanup/replay-confinement
codex/test-suite-performance
codex/issue-foundations
codex/address-open-issues-2026-07-20
agent/javascript-vite-rollup-esbuild-adapters
agent/process-cleanup
agent/triage-integration
agent/unknown-commands-registry
feat/mcp-identity-metadata
morlvps/issue_cleanup
codex/installer-redesign
morl/roadmap-investigation-core
morl/roadmap-investigation-docs
release-please--branches--main--components--rea
rea-agents-6.8.0
rea-agents-6.7.0
rea-agents-6.6.0
experiment/atomic-codemode-wait-runtime-20261016
rea-agents-6.5.0
rea-agents-6.4.0
rea-agents-6.3.0
rea-agents-6.2.0
rea-agents-6.1.0
rea-agents-6.0.0
rea-agents-5.0.0
rea-agents-4.1.0
rea-agents-4.0.1
rea-agents-4.0.0
rea-agents-3.2.1
rea-agents-3.2.0
rea-agents-3.1.0
rea-agents-3.0.0
rea-agents-2.7.0
rea-agents-2.6.0
rea-agents-2.5.1
rea-agents-2.5.0
rea-agents-2.4.0
rea-agents-2.3.0
rea-agents-2.2.0
rea-agents-2.1.0
rea-agents-2.0.0
rea-agents-1.7.0
rea-agents-1.6.0
rea-agents-1.5.0
rea-agents-1.4.0
rea-agents-1.3.0
rea-agents-1.2.0
rea-agents-1.1.0
rea-agents-1.0.0
rea-agents-0.5.0
rea-agents-0.4.0
rea-agents-0.3.0
rea-0.2.1
rea-0.2.0
Labels
Clear labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
Mirrored from GitHub Pull Request
question
roadmap
triage
No labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
question
roadmap
triage
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
morluto/rea#5858
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/morluto/rea/pull/3622
Author: @Y0UW1SH
Created: 10/14/2026
Status: ❌ Closed
Base:
main← Head:feat/3592-api-surface-header-facets📝 Commits (9)
600fdb2feat(analysis-view): report value-free request header facets in API surfaces8a62a70test(mcp): inherit the suite timeout for the target-free session workflowbacaee4chore(analysis-view): sync header facets with maind973785test(verify): retain host tools for Ghidra prerequisite rejection7e36ba2chore(ci): sync main and format plist regression45b8c3btest(plist): align archive regression with canonical NaN labelse7a3952chore(ci): integrate upstream kernel descriptor cleanup fixdf5b396fix(clients): avoid quadratic trailing newline scans in TOMLb87da3dchore: reconcile upstream fixes and restore PR mergeability📊 Changes
19 files changed (+1879 additions, -36 deletions)
View changed files
📝
.agents/skills/reverse-engineer-anything/references/evidence-workflows.md(+5 -0)📝
docs/mcp-contracts.md(+2 -2)📝
docs/web-network-captures.md(+57 -1)📝
scripts/ci/scopes.mjs(+6 -0)📝
scripts/verify-web-network-captures.mjs(+42 -0)📝
src/application/ClientConfigurationDocument.capacity.test.ts(+37 -0)📝
src/application/analysisView/AnalysisViewService.test.ts(+67 -0)📝
src/application/analysisView/AnalysisViewService.ts(+5 -6)📝
src/contracts/analysisViewToolContracts.ts(+1 -1)📝
src/domain/analysisView/WebNetworkApiSurfaceAccumulator.test.ts(+228 -12)📝
src/domain/analysisView/WebNetworkApiSurfaceAccumulator.ts(+94 -5)📝
src/domain/analysisView/webNetworkApiSurfaceView.test.ts(+428 -0)📝
src/domain/analysisView/webNetworkApiSurfaceView.ts(+32 -4)➕
src/domain/analysisView/webNetworkRequestHeaderFacets.ts(+524 -0)➕
src/domain/asciiLowercase.ts(+3 -0)📝
src/domain/javascript/htmlArtifactReferences.ts(+1 -3)📝
tests/boundary/cli/analysisViewCli.test.ts(+148 -1)📝
tests/boundary/mcp/analysisViewMcp.test.ts(+138 -1)📝
tests/fixtures/historicalHar.ts(+61 -0)📄 Description
Summary
This PR adds an opt-in facet to the
api-surfaceview over retained HAR Evidence. For each endpoint group it reports the recorded request header names, cookie names and set-cookie names, with value-free signals: how many records carry a header, how many distinct values it had, their length range and character alphabet, and fixed-rule inferences labelledinferred. An agent can see which endpoints carry per-request signature, nonce or timestamp headers and trace the producing code, without header or cookie values entering its context.This is Part A of #3592 only. Part B (keeping the auth scheme token from redacted
Authorizationvalues) is deferred pending the maintainer decision on #3592;CaptureRedactionand the HAR producer are unchanged, soauthorizationis reported only as present and redacted.It follows the merged opt-in facet
include_query_parameter_names(#2982, #2913) and builds on #1891. Open #3425 changes the same view and accumulator; see "Overlap with #3425" below. Related: #2914, #2884, #2915.Refs #3592
Problem and expected behavior
Analyst question: "Which endpoints in this capture are authenticated or signed, under which header and cookie names? Which headers change on every request, like a signature, nonce or timestamp, so I know what code to look for?"
Before this change (source-derived):
api-surfacecopies no headers ("Query strings, fragments, credentials, headers and bodies are not copied into groups",docs/web-network-captures.md). The workaround is pagingcaptureviews withdetail: "complete"and comparing header values by eye, which copies values into context.After this change,
view: {kind: "api-surface", request_header_facets: {}}(or{scope: "all"}) returns per-group header and cookie name facets. No value, prefix, substring or digest is emitted. Omitting the option leaves the output byte-identical.Change and scope
request_header_facets?: {scope?: "script-settable" | "all"}. Its presence selects the facets andscopedefaults toscript-settable, so the advertised JSON Schema expresses every accepted request structurally (no refinement the schema cannot carry). The echoedviewrecords the effective scope. Omitting it leaves groups unchanged.script-settable(default) counts but does not list WHATWG Fetch forbidden request-header names (21 names plusProxy-/Sec-prefixes) and HTTP/2 pseudo-headers (:-prefixed);excluded_namesgives the distinct count. The value-dependent method-override rule is not applied.alllists every name.request_header_facets:request_headers[]sorted by code point:name(ASCII-lowercased),present_records,redacted_records,distinct_values(nullwhen any present value was redacted or not text),value_length {min,max}(UTF-16,nullwhen none retained),alphabets(first matching rule per value:decimal,hex,base64url,base64,other),variation(unknown,single-sample,constant,per-record-unique,varying) andinferences[]. Repeated field lines in one record form one ordered per-record value.cookie_names[]fromrequest.cookies[].nameandset_cookie_names[]fromresponse.cookies[].name, each{name, record_ordinals}with exact spelling, listed in both scopes.unavailable_header_name_ordinals,unavailable_cookie_name_ordinals,unavailable_set_cookie_name_ordinals: records whose names are unknown, including an emptycookiesarray next to a recordedcookie/set-cookieheader.redactionssidecar (/request/headers/N/value), not inferred from names.inferences(fixed vocabulary,basis: "inferred", never derived from names), both requiring at least 3 present records:per-request-token-candidate(all distinct, length ≥16, noother, not alldecimal) andepoch-timestamp-candidate(alldecimal, one length of 10 or 13, more than one distinct value).header_inference_groups, present only with the selection, counts groups with any header inference across the full grouping, liketemplated_groups. Confidence isinferredon every page whentemplated_groups > 0 || header_inference_groups > 0; the application reads these domain counts instead of walking page groups.sensitive_values_unretainedrefusal is unchanged.src/domain/analysisView/webNetworkRequestHeaderFacets.ts(scope rule, alphabets, per-record reading, per-group collector, output schema); newsrc/domain/asciiLowercase.ts, shared withsrc/domain/javascript/htmlArtifactReferences.ts(which drops its private copy);WebNetworkApiSurfaceAccumulator.ts(options-object constructor, scratch/admission,forView,header_inference_groups);webNetworkApiSurfaceView.ts(request fields, group and count fields, limitation);AnalysisViewService.ts(forView, confidence); tool description inanalysisViewToolContracts.ts;docs/web-network-captures.md,docs/mcp-contracts.md, the skill'sevidence-workflows.md.Differences from the pre-implementation draft: one optional
request_header_facets: {scope?}object instead of a bare enum; addedredacted_records,header_inference_groupsand the threeunavailable_*_ordinalslists so unknown stays distinct from absent; the epoch rule also needs 3 records;inferencesis always present; no second advertised contract example (the #2982 precedent added none, and examples are forwarded in every input schema); Part B not implemented.Overlap with #3425. Both PRs add a
WebNetworkApiSurfaceAccumulator.forView(view)with the same signature, which conflicts in that hunk and in the constructor (resolution: keep both selections). To compose with #3425 and the sibling endpoint-comparison PR (#3591 work, which adds anownerkey), the constructor now takes one options object,{maximumBytes?, includeQueryParameterNames?, requestHeaderScope?}, exposed as readonly properties; whichever lands second adds one key instead of reordering positional parameters. TheAnalysisViewServiceand view-defaultforViewcall sites are identical to #3425's. The other hunks (schema fields, group schema, group state, admission, page projection, docs, skill text, tests appended at file ends) were placed to merge without conflict.CI follow-up (separate commit
8a62a7065).tests/boundary/mcp/sessionMcp.test.ts> "target-free MCP workflow" kept a test-specific 10 s limit. On the macOS runner it took 11.6 s and failed the Real Apple artifact lane in the CI re-run of600fdb2b0; that lane is not touched by this change. The test now inherits the shared suite deadline (30 s, 60 s under coverage), with assertions and cleanup unchanged. The other three 10 s limits in that file took 0.05 to 2 s on the same runner and are left as they are.Non-goals: no values, prefixes or hashes emitted; no secrecy or role guesses from names; no live CDP headers; no SAZ or mitmproxy until #2884/#2915; no replay, signature verification or key recovery; no claim that a name absent from the HAR was absent on the wire.
Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
WebNetworkApiSurfaceAccumulatorplus the new header-facet module). No producer change.cl100k_basetokens: +141 for theinspect_analysis_viewname/description/input-schema projection (6,806 → 6,947) and +141 for the complete catalog (195,649 → 195,790, +0.07%); +995 with output schemas. See Completed-task cost.api-surfaceonly; offline and provider-neutral.inferredwhen any group in the full grouping carries an inference; parent ID and record ordinals are cited; original spellings stay in the parent.docs/public/product-catalog.json), package, or installation impact: generated catalogs change through the source contract (not committed); authored skill reference updated; no dependencies.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
src/domain/analysisView/webNetworkApiSurfaceView.test.ts: default output over header-rich records pinned to the SHA-256 of the serialized projection computed by unmodifiedupstream/mainfffb07419code (re-baselined because that main includes nullrelationship_coveragein Evidence IDs); full facets for both scopes (redactedauthorization/cookie, duplicate and case-variantaccept, cookie names with an emptycookiesarray next to aCookieheader, set-cookie names); a known-value no-leak check; inference thresholds (2 samples for either inference, 15 characters, all-decimal, constant, mixed 10/13 widths, padded base64,other, a credential-like name with no special handling) andheader_inference_groupspresence; unreadable header/cookie names stay unknown; sensitive-parent refusal with facets selected.src/domain/analysisView/WebNetworkApiSurfaceAccumulator.test.ts: per-record scratch refused before reading with the group unchanged; each new digest admitted before a row grows (page unchanged at refusal); repeated names, values and cookie names charged once over 1,000 records; 4 Mi-code-unit values (an 8 MiB whole-value encoding) are admitted under a 256 KiB budget, per-record scratch does not grow with value length, no hash update receives more than 1,024 code units (this assertion fails with whole-value hashing), and values differing only in the last slice count as distinct.src/application/analysisView/AnalysisViewService.test.ts: an inference in one group makes every pageinferred; selected facets without inferences stayderivedwithheader_inference_groups: 0; the default scope is echoed; an unknown scope is an input error atview.request_header_facets.scope.tests/boundary/cli/analysisViewCli.test.ts: real HAR decoder and capture service in process, then the compiled CLI for omitted,script-settableandall; asserts no known value in stdout andderivedvsinferred.scripts/verify-web-network-captures.mjs(real mitmproxy lane): for each producer HAR without sensitive declarations, it also projectsapi-surfacewithrequest_header_facets: {}. It asserts that every group carries the default scope, that record and group counts match the plain projection, and that no recorded request header or cookie value absent from the plain projection appears in the facet output.scripts/ci/scopes.mjsadds the accumulator, view, facet module, data admission andasciiLowercaseto theweb_networklane, so CI runs that lane for this PR. The sibling endpoint-comparison branch for #3591 adds three of the same lines; whichever lands second keeps the union.tests/boundary/mcp/analysisViewMcp.test.ts: decoded parent through MCP, inline vs retained parity, advertised input/output schema validation (combined withinclude_query_parameter_names), no-leak check, the advertised schema accepting{}and rejectingtrue, an unknown scope, an extra key and the former scope-only shape, the server applying the default scope, and the server'sinvalid_requestfor an unknown scope.rea inspect-analysis-view --jsonon Evidence decoded from the test HAR (/v1/ordersgroup, abridged to the facet):For this 4-record, 2-group fixture the CLI JSON grew from 3,589 bytes (omitted,
derived) to 5,832 bytes. Bytes do not establish token cost.For evidence-bearing changes:
inferences[]carrybasis: "inferred"and, throughheader_inference_groups, make the view inferred.distinct_values: null,variation: "unknown"and theunavailable_*_ordinalslists.Completed-task cost
Requested in review, per AGENTS.md "Performance". Question: "Which request headers and cookies does each endpoint group in this recording use?"
Recording. A real HAR recorded with Playwright 1.58.2 driving headless Microsoft Edge 155. The profile was fresh and logged out, across six public GitHub pages of this repository: repository, issues, #3622 conversation and files, commits, and Actions.
content: "omit"). This favours the existing workflow, whose complete record pages would otherwise carry bodies.7191c83689e913669fd7b301684211d612c6856ef89f9051ea225654abecb1ff. Unmodifiedmainrefuses the full recording; see Capacity below.Preparation (shared, not counted).
decodeHarCaptureandWebNetworkCaptureServicedecode the HAR in process. The compiled decoder subprocess needs the Windows native addon, which this host lacks.node scripts/rea.mjs mcp) withimport_evidence_bundle.mainand the branch decode identical parent Evidence (ev_120136b7…, 4,650,158 serialized bytes).Workflows. All three run over MCP against the retained parent:
api-surface(default limit 50) for groups and record ordinals. Then pagecapturewithdetail: "complete"(limit 64) for every record's headers.api-surfacewithrequest_header_facets: {}.api-surfacewithout the option, on the branch and onmain. This is what callers who don't opt in pay.The answers agree. All 411 groups were compared:
excluded_namesequal the distinct names recorded, with 0 mismatches.mainand the branch.Medians of 5 rounds. Each round starts a fresh server per workflow and runs the task 3 times, and the workflow order rotates each round.
maininspect_analysis_view)cl100k_base(tiktoken 0.13.0) over serialized values: requests (tool name plus arguments) and structured replies, each counted once.inputSchema. Including output schemas adds 995 tokens on the branch (807,491 → 808,486).node.exeand itsconhost.exe), read throughWin32_Process. It includes the ~410 MiB present after preparation, which is the server plus the retained parent.inspect_analysis_view(6,806 → 6,947) and for the complete catalog (195,649 → 195,790, +0.07%). Plain output is byte-identical, and wall and CPU differences are within run-to-run noise.Capacity. Tested on chronological prefixes of this recording:
api-surfaceon unmodifiedmainadmits up to 1,050 entries. It refuses 1,100 and above with "API-surface retained state and temporary work exceed the projection representation budget", including the full 1,730-entry recording (7.7 MB parent). That refusal predates this PR.Reproduction. The harness is a Node MCP client, a PowerShell
Win32_Processsampler and a tiktoken counter. It is Windows-specific and is not included in this PR. It can be added underscripts/verify/if maintainers want it in-tree.Validation performed
Latest integration and hardening, 2026-10-18 UTC
Current head:
b87da3d0e4db719bcff6625629ff6c4a3ed70207. All 39 current checks pass, including Portable tests and CI required. GitHub reports mergeable/clean. The large-TOML acceptance cases pass in 4,739 ms (Codex) and 4,804 ms (Grok Build) under the unchanged deadline; all seven descriptor-cleanup cases and all four Int64 TOML acceptance cases pass. Greptile reviewed this head with no new blocking finding. Maintainer approval remains pending.Merged upstream
847472acf5cf4a28379e828dcd0fe55ac99d7c07. Upstream #4930 adopted the earlier TOML linear-scan and archive/verifier corrections, causing three conflicts. The resolution keeps those upstream implementations and #4937's signed 64-bit TOML support. All 19 remaining PR-diff files are unchanged by this merge, including the header facets and LF/CRLF capacity regressions.npm run checkandgit diff --checkpassed.Earlier CI follow-up, 2026-10-18 UTC
Previous head:
df5b3963ffd384f1840e1a923305dc41736a7d47. All 40 checks passed, including Portable tests and CI required. The formerly failing large-TOML CLI file passes both cases: Codex 6,961 ms and Grok Build 6,934 ms, within the unchanged 30-second deadline. Its shard passes 1,635 tests (31 skipped). The descriptor-cleanup file also passes all 7 cases on this head. Greptile reviewed this exact commit without a new blocking finding. Maintainer approval remains pending.df5b396replaces both suffix trims with a backward LF-only scan. CRLF handling, foreign text, trailing spaces, configuration values and idempotence are preserved. The existing acceptance-test deadline is unchanged.npm run checkpassed with pinned Node 24.18.0 / npm 11.16.0;git diff --checkpassed.psfails withfatal library error, lookup self, producingprocess-ownershipunavailable. Both scenarios stop at the dry-run prerequisite locally. CI owns the complete CLI verification.e7a3952includes upstream2183c95for #4926, which retains the exact kernel-limit descriptor cleanup owner and retry lease. One7a3952, CI Test shard (3/5) passed 1,863 tests (71 skipped), including all 7 recording-descriptor cleanup tests and all 9 verifier-file-resource tests. A local independent pass had 112 tests pass, 3 permission skips and one host-limited capture case; both originally failing kernel cases pass.d973785preserves host PATH in the absent-Ghidra fixture;7e36ba2integrates upstream and fixes plist-test formatting;45b8c3baligns the archive test with upstream's documented observed"nan"representation. The corrected verifier file (9 tests) and archive file (21 tests) subsequently passed CI.e7a3952; its sole test failure was the TOML timeout above. Those successes are historical evidence, not a substitute for current-head CI.Integration refresh, 2026-10-17
Integration merge:
bacaee4d433b75fa4e906dd5127baf6747123151, mergingupstream/mainf0b9ef34c404c1c65f8167502db972b0bd708403without rewriting the existing commits. GitHub reports the conflicts resolved.src/contracts/analysisViewToolContracts.ts. The resolution preserves both upstream's JavaScript-facts guidance and this PR's opt-in header-facet guidance. This refresh does not change facet behavior.main, sosessionMcp.test.tsis no longer part of the PR diff.mainatf0b9ef34c: the existing compiled HAR test reportsprocess-ownershipunavailable becausepsreturnsfatal library error, lookup self; the two existing target-free MCP lifecycle cases return noresult. The baseline run of those two files gave 19 passed, 3 failed. These are disclosed baseline/local verification gaps, not a claim of a fully passing local suite.npm run checkpassed: typecheck, lint, formatting, knip, metadata, module boundaries and architecture guards.npm run docs:checkpassed, including its 5 consistency tests. Focused preparation compiled the runtime and generated the MCP catalog successfully.8a62a7065had 39 successful check runs, includingweb_network / real-web-network-captures. The refreshed head requires its own CI result; prior CI is not being presented as validation of the new merge.Focused validation command
For the baseline, the CLI and session MCP files above were run against unmodified
f0b9ef34cwith the same pinned toolchain.Earlier validation
Windows 11 x64, Node 24.21.0. The branch is rebased onto
upstream/maina40ee741c(2026-10-15).npm run test:local -- src/domain/analysisView/webNetworkApiSurfaceView.test.ts src/domain/analysisView/WebNetworkApiSurfaceAccumulator.test.ts src/application/analysisView/AnalysisViewService.test.ts src/domain/javascript/htmlArtifactReferences.test.ts: 128 passed. The first view and accumulator tests failed before the implementation. The long-value test failed with whole-value hashing restored.npm run test:focused -- tests/boundary/mcp/analysisViewMcp.test.ts tests/boundary/cli/analysisViewCli.test.ts: 30 passed, 1 failed.native/windows/buildis built only on the Linux/MinGW lane.upstream/main. The new CLI test avoids that decoder path.npm run test:focused -- tests/boundary/filesystem/ciChangeScope.test.ts tests/boundary/filesystem/ciRequiredLanes.test.ts: 228 passed, 2 skipped.npm run test:focused -- tests/boundary/cli/cliInputSchemaRequired.test.ts(alone): 5 passed.npm run test:focused -- tests/boundary/mcp/toolSchemaValidity.test.ts(alone): 14 passed.npm run check:fast,npm run format:check,npm run knip,npm run docs:check,npm run mcp-catalog:checkandnpm run verify:test-discovery: all passed.npm run test:focused -- tests/boundary/mcp/serverIdentity.test.ts: 3 failed, 8 passed.registration_path_mismatchassertion and two 10 s timeouts.upstream/maina40ee741con this host.New verifier assertion: run locally against the recorded GitHub HAR above through the branch's MCP server, it passed. With a recorded header value injected into a facet row, it failed as intended.
Completed-task cost: the five-round MCP measurement above, plus capacity probes on
mainand the branch.After
8a62a7065:npm run test:focused -- tests/boundary/mcp/sessionMcp.test.tsgave 9 passed. The workflow test took 20.6 s on this host, so it would fail under the old 10 s limit.CI on
600fdb2b0: all 38 checks passed. They includeweb_network / real-web-network-captures, which now runs for this change and exercises the new facet check on real mitmproxy-produced HARs.Not run:
npm run verify:web:network-captures, because the real mitmproxy lane needs Linux andREA_MITMDUMP_COMMANDlocally; it runs in CI. Also not run: the full suite,check:pr, and any Linux or macOS execution.Review history:
header_inference_groupscount.asciiLowercaseis shared.RequestHeaderFacetCollector.admissionByteswas deferred.request_header_facets: {scope?}replaces the two-field form, so the advertised schema cannot express a request the server rejects.web_networklane; its scope now includes the api-surface files, and its verifier checks facets.a40ee741c. The conflicts were the tool description sentence (upstream added typed module references) and test imports.Compatibility, safety, and release
600fdb2b0; it was not run locally.Author readiness
Human owner: @Y0UW1SH
Before merge
type(scope): outcome.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.