[PR #3425] [CLOSED] feat(analysis-view): locate unavailable response facts by record #5738

Closed
opened 2026-10-31 01:09:03 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3425
Author: @wunianze666-netizen
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: codex/api-surface-response-coverage


📝 Commits (5)

  • 4d96e92 feat(analysis-view): locate unavailable response facts by record
  • 65e3bdc Merge branch 'main' into codex/api-surface-response-coverage
  • 266e059 test(analysis-view): verify response coverage schema profiles
  • aabe9eb fix(analysis-view): reconcile response coverage tests with upstream
  • e7ed4cb fix(analysis-view): preserve coverage through prepared projection

📊 Changes

9 files changed (+362 additions, -3 deletions)

View changed files

📝 .agents/skills/reverse-engineer-anything/references/evidence-workflows.md (+4 -0)
📝 docs/web-network-captures.md (+11 -0)
📝 src/domain/analysisView/WebNetworkApiSurfaceAccumulator.test.ts (+36 -0)
📝 src/domain/analysisView/WebNetworkApiSurfaceAccumulator.ts (+34 -0)
📝 src/domain/analysisView/webNetworkApiSurfaceView.test.ts (+100 -0)
📝 src/domain/analysisView/webNetworkApiSurfaceView.ts (+16 -1)
📝 tests/boundary/cli/analysisViewCli.test.ts (+44 -0)
📝 tests/boundary/mcp/analysisViewMcp.test.ts (+76 -2)
📝 tests/fixtures/analysisView.ts (+41 -0)

📄 Description

Parked by the author on 2026-10-29 to prioritize focused, reproduced bug fixes after an extended wait for maintainer review. The branch and verification below are retained for reference.

Summary

Add opt-in include_response_coverage to API-surface views, locating original record ordinals with unavailable status or MIME facts in each selected group. No linked issue: this enhancement arose from TraceDelta needing actionable unknown-record provenance in grouped observations.

Problem and expected behavior

Aggregate status/MIME sets cannot locate the records with unavailable facts. Selecting the option adds response_coverage.unavailable_status_ordinals and unavailable_content_type_ordinals. Empty arrays cover selected retained records only; they do not establish capture completeness or service health.

Change and scope

The existing shared accumulator reserves coverage bytes before retaining ordinals; the upstream createApiSurfaceAccumulator factory selects options for prepared admission and direct-domain projection. Existing historical projection scope; no separate provider/execution authority decision is applicable. Upstream shared projection/environment work remains intact and attributed to its authors.

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

  • Semantic owner and earliest changed stage: API-surface accumulator over parsed producer facts, with byte reservations in the inherited retain owner.
  • Contribution scope fit and linked maintainer decision: existing Evidence projection; no new acquisition or execution capability.
  • CLI and MCP/tool-catalog contract: additive optional boolean on view.kind=api-surface; defaults and explicit false keep previous groups. Example: {kind:"api-surface",include_response_coverage:true}.
  • Provider, bridge, target-format, or platform compatibility: existing retained HAR grouping rules; full and compact advertised SDK schemas exercised. No deep provider.
  • Evidence, artifact, provenance, or reconstruction contract: original ordinals, source SHA, parent Evidence and record/group coverage survive. No renumbering, query values, headers or bodies are added.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): existing view selection only; no target requests, mutation or replay.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs and skills/; edit authored instructions in .agents/skills/reverse-engineer-anything/ and never commit build outputs): canonical schema and authored guides updated; ignored catalogs/skills regenerated by checks. No dependency/install change.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • 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: absent/malformed facts, nonconsecutive ordinals through pages, default/false equivalence, reservations before growth and unchanged page after failure, retained/inline/compiled CLI parity, converted full and compact input/output schemas.
  • Base reproduction or other evidence: without the option a grouped view did not expose this per-record coverage. It adds record location, not a new server-failure classification.
  • User-visible CLI/MCP output (if applicable): response_coverage:{unavailable_status_ordinals:[42],unavailable_content_type_ordinals:[3]} retains caller-selected original numbering.
  • Current head e7ed4cb386ae839adf2f3f974df533b3722510d9 normally merges frozen main 4b045e8f2fc00ec218b787ca95cadc1c5f378470 after REST and independent merge-tree reproduced production conflicts in the service and API-view entry. Upstream prepared projection/budget ownership is retained unchanged; the existing factory now passes the opt-in response-coverage flag. The superseded local forView entry is removed, so the feature remains nine files relative to that main. Upstream refactoring is not attributed to this PR.
  • Local verification at that merged tree: 158 distinct checks passed, 0 skipped across eight files (25 API-view, 15 accumulator, 50 application service, 5 environment coverage, 1 shared projection accumulator, 26 compiled CLI, 27 SDK MCP and 9 documentation). Full static/type/lint/module/architecture and generated-document checks passed. The repeated 9 documentation checks are not additional distinct cases.
  • Actual production stdio MCP: full and compact profiles each passed the same six unique offline inputs / 287 records (two generated controls plus four pinned public HARs). Selected input copies were deleted after inspection; retained views still preserved source SHA, parent Evidence and original unknown ordinals. Default/false group parity and actual SDK-converted input/output schemas passed in both profiles. Repeating a source under two profiles does not make it a new capture or release comparison.
  • New-head code CI 40133994346 passed. Raw primary and all eight shard checkout logs bind execution to merge fcd8db7813424495cbd4252932fde9782151d789 / base d24ad4f55d68cd5e4d2373e7befa51e603817120. Its tree 52b51c760d52dae49cc8f57070aeb1290fe683cc includes newer upstream work than the locally frozen tree; they are not claimed identical. Source/static/docs/build, eight built shards, bundled Windows native build, the Linux package baseline and required gates passed (17 jobs); 20 optional deep/provider/Windows capability jobs were skipped. Logs separately confirm API-view25, accumulator15, compiled CLI28 and SDK MCP27. Remote CLI28 differs from the local CLI26 snapshot. Skipped capabilities are not full platform qualification; CI40098488329 remains historical.
  • Remaining proof gaps: no complete local repository suite, live provider or full Windows capability qualification. Optional remote lanes are not assumed passed. The human owner's completed initial declaration is preserved; subsequent maintenance does not require another initial sign-off. CI and external review do not establish approval or merge permission.

For evidence-bearing changes:

  • 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

Windows x64, pinned Node 24.22.1/npm 11.16.0; npm scripts below were invoked through the pinned Node and explicit npm-cli entry, preserving argv.

  • node scripts/check-dependency-install.mjs — locked direct dependencies accepted; no dependency graph change from the frozen main.
  • npm run build:cached — runtime and skill artifacts built, three tasks passed.
  • node scripts/run-development-tests.mjs focused src/domain/analysisView/webNetworkApiSurfaceView.test.ts src/domain/analysisView/WebNetworkApiSurfaceAccumulator.test.ts src/application/analysisView/AnalysisViewService.test.ts src/domain/analysisView/environmentCoverageView.test.ts src/domain/analysisView/WebNetworkProjectionAccumulator.test.ts tests/boundary/cli/analysisViewCli.test.ts tests/boundary/mcp/analysisViewMcp.test.ts tests/conformance/readmeConsistency.test.ts - 158 passed, 0 skipped.
  • npm run check - final type/lint/module/format/knip/metadata and architecture guards passed. No assertions were removed or checks weakened.
  • npm run docs:check — authored/generated-document checks and the same 9 consistency checks passed.
  • node ../rea-analysis-20261014/verify-response-coverage-corpus.mjs, with explicit full then compact probe profile — each production stdio workflow passed six inputs / 287 records, converted schemas, parent/source identity, unchanged default/false groups and original unknown ordinals after input deletion. This is an additional locally owned verification harness, not a packaged REA command; raw captures remain local.
  • node scripts/verify-windows-native-artifact.mjs — original official 6.7.0 hash/PE/NAPI/ABI accepted; native producer/build/checker source matches the frozen main. The broader Windows functional verifier was not run.

Compatibility, safety, and release

  • Breaking changes or migration steps: none; opt-in additive groups only.
  • Real Hopper/Ghidra, browser, or OS coverage: production stdio MCP on six offline inputs / 287 records; no new recording, traffic replay, Hopper/Ghidra or live browser.
  • Package or release metadata impact: no added dependency or release/installer change. Upstream repairs are not credited to this PR.
  • Security, privacy, process, or containment review: value-free coverage projection, source SHA/parent Evidence/unknown selection preserved. Zero unavailable ordinals does not establish unretained coverage. Original private API HARs remain unavailable; no reanalysis of them is claimed.
  • Resource claims: coverage uses the existing pre-retention byte budget; no measured speed, token or process-family memory benefit.

Author readiness

Human owner: @wunianze666-netizen

AI-assisted preparation. The human owner has completed the author readiness declaration.

  • 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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/3425 **Author:** [@wunianze666-netizen](https://github.com/wunianze666-netizen) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/api-surface-response-coverage` --- ### 📝 Commits (5) - [`4d96e92`](https://github.com/morluto/rea/commit/4d96e92e41cef4fbc6363e7d82f0400eb82f6549) feat(analysis-view): locate unavailable response facts by record - [`65e3bdc`](https://github.com/morluto/rea/commit/65e3bdc8d2632b68397f68ee260de3ef043addca) Merge branch 'main' into codex/api-surface-response-coverage - [`266e059`](https://github.com/morluto/rea/commit/266e059ecda7842adbc9d5bf0c68512fdc9899cd) test(analysis-view): verify response coverage schema profiles - [`aabe9eb`](https://github.com/morluto/rea/commit/aabe9ebfda494d0a187d375d7b28a1710e2c0ee8) fix(analysis-view): reconcile response coverage tests with upstream - [`e7ed4cb`](https://github.com/morluto/rea/commit/e7ed4cb386ae839adf2f3f974df533b3722510d9) fix(analysis-view): preserve coverage through prepared projection ### 📊 Changes **9 files changed** (+362 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `.agents/skills/reverse-engineer-anything/references/evidence-workflows.md` (+4 -0) 📝 `docs/web-network-captures.md` (+11 -0) 📝 `src/domain/analysisView/WebNetworkApiSurfaceAccumulator.test.ts` (+36 -0) 📝 `src/domain/analysisView/WebNetworkApiSurfaceAccumulator.ts` (+34 -0) 📝 `src/domain/analysisView/webNetworkApiSurfaceView.test.ts` (+100 -0) 📝 `src/domain/analysisView/webNetworkApiSurfaceView.ts` (+16 -1) 📝 `tests/boundary/cli/analysisViewCli.test.ts` (+44 -0) 📝 `tests/boundary/mcp/analysisViewMcp.test.ts` (+76 -2) 📝 `tests/fixtures/analysisView.ts` (+41 -0) </details> ### 📄 Description > Parked by the author on 2026-10-29 to prioritize focused, reproduced bug fixes after an extended wait for maintainer review. The branch and verification below are retained for reference. ## Summary Add opt-in `include_response_coverage` to API-surface views, locating original record ordinals with unavailable status or MIME facts in each selected group. No linked issue: this enhancement arose from TraceDelta needing actionable unknown-record provenance in grouped observations. ## Problem and expected behavior Aggregate status/MIME sets cannot locate the records with unavailable facts. Selecting the option adds `response_coverage.unavailable_status_ordinals` and `unavailable_content_type_ordinals`. Empty arrays cover selected retained records only; they do not establish capture completeness or service health. ## Change and scope The existing shared accumulator reserves coverage bytes before retaining ordinals; the upstream `createApiSurfaceAccumulator` factory selects options for prepared admission and direct-domain projection. [Existing historical projection scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope); no separate provider/execution authority decision is applicable. Upstream shared projection/environment work remains intact and attributed to its authors. Follow the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#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 - Semantic owner and earliest changed stage: API-surface accumulator over parsed producer facts, with byte reservations in the inherited retain owner. - Contribution scope fit and linked maintainer decision: existing Evidence projection; no new acquisition or execution capability. - CLI and MCP/tool-catalog contract: additive optional boolean on `view.kind=api-surface`; defaults and explicit false keep previous groups. Example: `{kind:"api-surface",include_response_coverage:true}`. - Provider, bridge, target-format, or platform compatibility: existing retained HAR grouping rules; full and compact advertised SDK schemas exercised. No deep provider. - Evidence, artifact, provenance, or reconstruction contract: original ordinals, source SHA, parent Evidence and record/group coverage survive. No renumbering, query values, headers or bodies are added. - Target selection, authority, upstream behavior, and cleanup details (if applicable): existing view selection only; no target requests, mutation or replay. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact (CI generates and validates ignored catalogs and `skills/`; edit authored instructions in `.agents/skills/reverse-engineer-anything/` and never commit build outputs): canonical schema and authored guides updated; ignored catalogs/skills regenerated by checks. No dependency/install change. Expected effects (check known effects; use documentation-only on its own). Unchecked items do not establish absence; leave uncertainties visible. - [x] 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: absent/malformed facts, nonconsecutive ordinals through pages, default/false equivalence, reservations before growth and unchanged page after failure, retained/inline/compiled CLI parity, converted full and compact input/output schemas. - Base reproduction or other evidence: without the option a grouped view did not expose this per-record coverage. It adds record location, not a new server-failure classification. - User-visible CLI/MCP output (if applicable): `response_coverage:{unavailable_status_ordinals:[42],unavailable_content_type_ordinals:[3]}` retains caller-selected original numbering. - Current head `e7ed4cb386ae839adf2f3f974df533b3722510d9` normally merges frozen main `4b045e8f2fc00ec218b787ca95cadc1c5f378470` after REST and independent `merge-tree` reproduced production conflicts in the service and API-view entry. Upstream prepared projection/budget ownership is retained unchanged; the existing factory now passes the opt-in response-coverage flag. The superseded local `forView` entry is removed, so the feature remains nine files relative to that main. Upstream refactoring is not attributed to this PR. - Local verification at that merged tree: **158 distinct checks passed, 0 skipped** across eight files (25 API-view, 15 accumulator, 50 application service, 5 environment coverage, 1 shared projection accumulator, 26 compiled CLI, 27 SDK MCP and 9 documentation). Full static/type/lint/module/architecture and generated-document checks passed. The repeated 9 documentation checks are not additional distinct cases. - Actual production stdio MCP: full and compact profiles each passed the same six unique offline inputs / 287 records (two generated controls plus four pinned public HARs). Selected input copies were deleted after inspection; retained views still preserved source SHA, parent Evidence and original unknown ordinals. Default/false group parity and actual SDK-converted input/output schemas passed in both profiles. Repeating a source under two profiles does not make it a new capture or release comparison. - New-head [code CI 40133994346](https://github.com/morluto/rea/actions/runs/40133994346) **passed**. Raw primary and all eight shard checkout logs bind execution to merge `fcd8db7813424495cbd4252932fde9782151d789` / base `d24ad4f55d68cd5e4d2373e7befa51e603817120`. Its tree `52b51c760d52dae49cc8f57070aeb1290fe683cc` includes newer upstream work than the locally frozen tree; they are not claimed identical. Source/static/docs/build, eight built shards, bundled Windows native build, the Linux package baseline and required gates passed (17 jobs); 20 optional deep/provider/Windows capability jobs were skipped. Logs separately confirm API-view25, accumulator15, compiled CLI28 and SDK MCP27. Remote CLI28 differs from the local CLI26 snapshot. Skipped capabilities are not full platform qualification; CI40098488329 remains historical. - Remaining proof gaps: no complete local repository suite, live provider or full Windows capability qualification. Optional remote lanes are not assumed passed. The human owner's completed initial declaration is preserved; subsequent maintenance does not require another initial sign-off. CI and external review do not establish approval or merge permission. For evidence-bearing changes: - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed Windows x64, pinned Node 24.22.1/npm 11.16.0; npm scripts below were invoked through the pinned Node and explicit npm-cli entry, preserving argv. - `node scripts/check-dependency-install.mjs` — locked direct dependencies accepted; no dependency graph change from the frozen main. - `npm run build:cached` — runtime and skill artifacts built, three tasks passed. - `node scripts/run-development-tests.mjs focused src/domain/analysisView/webNetworkApiSurfaceView.test.ts src/domain/analysisView/WebNetworkApiSurfaceAccumulator.test.ts src/application/analysisView/AnalysisViewService.test.ts src/domain/analysisView/environmentCoverageView.test.ts src/domain/analysisView/WebNetworkProjectionAccumulator.test.ts tests/boundary/cli/analysisViewCli.test.ts tests/boundary/mcp/analysisViewMcp.test.ts tests/conformance/readmeConsistency.test.ts` - 158 passed, 0 skipped. - `npm run check` - final type/lint/module/format/knip/metadata and architecture guards passed. No assertions were removed or checks weakened. - `npm run docs:check` — authored/generated-document checks and the same 9 consistency checks passed. - `node ../rea-analysis-20261014/verify-response-coverage-corpus.mjs`, with explicit full then compact probe profile — each production stdio workflow passed six inputs / 287 records, converted schemas, parent/source identity, unchanged default/false groups and original unknown ordinals after input deletion. This is an additional locally owned verification harness, not a packaged REA command; raw captures remain local. - `node scripts/verify-windows-native-artifact.mjs` — original official 6.7.0 hash/PE/NAPI/ABI accepted; native producer/build/checker source matches the frozen main. The broader Windows functional verifier was not run. ## Compatibility, safety, and release - Breaking changes or migration steps: none; opt-in additive groups only. - Real Hopper/Ghidra, browser, or OS coverage: production stdio MCP on six offline inputs / 287 records; no new recording, traffic replay, Hopper/Ghidra or live browser. - Package or release metadata impact: no added dependency or release/installer change. Upstream repairs are not credited to this PR. - Security, privacy, process, or containment review: value-free coverage projection, source SHA/parent Evidence/unknown selection preserved. Zero unavailable ordinals does not establish unretained coverage. Original private API HARs remain unavailable; no reanalysis of them is claimed. - Resource claims: coverage uses the existing pre-retention byte budget; no measured speed, token or process-family memory benefit. ## Author readiness Human owner: @wunianze666-netizen AI-assisted preparation. The human owner has completed the author readiness declaration. - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [ ] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:09:03 +00:00
Sign in to join this conversation.
No milestone
No project
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#5738
No description provided.