[PR #2239] [MERGED] fix(browser): report mismatched event family selection as unknown in capture comparison #5107

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2239
Author: @chqcjq
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @morluto

Base: main ← Head: fix/browser-event-coverage-comparison


📝 Commits (3)

  • e3bfcce fix(browser): report mismatched event family selection as unknown in capture comparison
  • 9223780 Merge remote-tracking branch 'origin/main' into codex/fold-pr-2239
  • c0de4cc fix(browser): retain selected event families and unknown coverage

📊 Changes

13 files changed (+206 additions, -15 deletions)

View changed files

📝 docs/browser-scenario-contract.md (+6 -0)
📝 src/browser/BrowserScenarioPartialObservation.ts (+1 -0)
📝 src/browser/PlaywrightBrowserScenarioProvider.test.ts (+53 -0)
📝 src/contracts/browserToolContracts.ts (+1 -0)
📝 src/domain/browserScenarioCapture.ts (+2 -0)
📝 src/domain/browserScenarioCaptureValues.ts (+15 -0)
📝 src/domain/browserScenarioDiff.test.ts (+90 -0)
📝 src/domain/browserScenarioDiff.ts (+13 -1)
📝 src/domain/browserScenarioDiffEvidence.ts (+20 -0)
📝 src/domain/browserScenarioValues.ts (+2 -14)
📝 tests/boundary/cli/browserCli.test.ts (+1 -0)
📝 tests/boundary/mcp/browserScenarioMcp.test.ts (+1 -0)
📝 tests/fixtures/webScriptCapture.ts (+1 -0)

📄 Description

Fixes #2169.

Behavior

A complete capture that selected no event families can no longer compare as unchanged against one that selected console events but observed none. Retain the selected families in optional scenario.event_families, using the shared event-family contract and normalized unique ordering. Selection mismatches make coverage unknown. Historical records that omit the selection remain readable and unknown rather than being interpreted as an empty selection; matching recorded selections retain normal equality behavior.

Contributor preservation

Keep chqcjq's earlier PR and commit as canonical. Folded itsF4LCON's #2253 implementation and tests with coauthor credit, including the missing-selection behavior and removal of the superseded selection representation.

Validation

29 focused tests passed across the live browser scenario provider, domain comparison, public CLI and MCP workflows. npm run check and npm run docs:check passed. Standards and issue-spec reviews found no remaining actionable findings. No external browser service is required by these locally launched browser tests.


🔄 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/2239 **Author:** [@chqcjq](https://github.com/chqcjq) **Created:** 10/12/2026 **Status:** ✅ Merged **Merged:** 10/12/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/browser-event-coverage-comparison` --- ### 📝 Commits (3) - [`e3bfcce`](https://github.com/morluto/rea/commit/e3bfcce05a443034bbbe1dd5a0549d5ae76d287a) fix(browser): report mismatched event family selection as unknown in capture comparison - [`9223780`](https://github.com/morluto/rea/commit/9223780098e64ee2efca583ba9738258165423b0) Merge remote-tracking branch 'origin/main' into codex/fold-pr-2239 - [`c0de4cc`](https://github.com/morluto/rea/commit/c0de4cccf3e00e383ef01b7891aa9c2b3ae8ae66) fix(browser): retain selected event families and unknown coverage ### 📊 Changes **13 files changed** (+206 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `docs/browser-scenario-contract.md` (+6 -0) 📝 `src/browser/BrowserScenarioPartialObservation.ts` (+1 -0) 📝 `src/browser/PlaywrightBrowserScenarioProvider.test.ts` (+53 -0) 📝 `src/contracts/browserToolContracts.ts` (+1 -0) 📝 `src/domain/browserScenarioCapture.ts` (+2 -0) 📝 `src/domain/browserScenarioCaptureValues.ts` (+15 -0) 📝 `src/domain/browserScenarioDiff.test.ts` (+90 -0) 📝 `src/domain/browserScenarioDiff.ts` (+13 -1) 📝 `src/domain/browserScenarioDiffEvidence.ts` (+20 -0) 📝 `src/domain/browserScenarioValues.ts` (+2 -14) 📝 `tests/boundary/cli/browserCli.test.ts` (+1 -0) 📝 `tests/boundary/mcp/browserScenarioMcp.test.ts` (+1 -0) 📝 `tests/fixtures/webScriptCapture.ts` (+1 -0) </details> ### 📄 Description Fixes #2169. ## Behavior A complete capture that selected no event families can no longer compare as unchanged against one that selected console events but observed none. Retain the selected families in optional `scenario.event_families`, using the shared event-family contract and normalized unique ordering. Selection mismatches make coverage unknown. Historical records that omit the selection remain readable and unknown rather than being interpreted as an empty selection; matching recorded selections retain normal equality behavior. ## Contributor preservation Keep chqcjq's earlier PR and commit as canonical. Folded itsF4LCON's #2253 implementation and tests with coauthor credit, including the missing-selection behavior and removal of the superseded selection representation. ## Validation 29 focused tests passed across the live browser scenario provider, domain comparison, public CLI and MCP workflows. `npm run check` and `npm run docs:check` passed. Standards and issue-spec reviews found no remaining actionable findings. No external browser service is required by these locally launched browser tests. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:04:01 +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#5107
No description provided.