[PR #7185] [MERGED] fix(contracts): publish portable browser request patterns #7702

Closed
opened 2026-11-03 13:39:45 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/7185
Author: @wunianze666-netizen
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @gensokyo-dev

Base: main ← Head: codex/browser-scenario-portable-patterns


📝 Commits (1)

  • 4ec697c fix(contracts): publish portable browser request patterns

📊 Changes

3 files changed (+144 additions, -3 deletions)

View changed files

📝 src/domain/browserScenario.test.ts (+59 -0)
📝 src/domain/browserScenarioValues.ts (+4 -2)
📝 tests/boundary/mcp/browserScenarioMcp.test.ts (+81 -1)

📄 Description

Summary

Fixes #7168. Full-profile capture_browser_scenario input schemas publish two request-action patterns that throw when a client compiles them in Unicode-set (v) mode. Publish equivalent portable patterns at the canonical schema owner, including a request-path expression without look-around.

Problem and expected behavior

At frozen main 1173c0a9dc1b352a60943a491462294db8f353ae, production stdio tools/list exposes 18 patterns under browser actions. Two fail v compilation, and the request-path pattern contains a look-ahead. A client can reject the tool catalog before executing any scenario. Expected: those advertised patterns compile in Annex B, u and v, without changing accepted request paths or header tokens.

Change and scope

browserScenarioValues.ts remains the owner: spell reserved header characters with hex escapes and replace the path look-ahead with an equivalent consuming prefix. The SDK receives the canonical correction; no presentation-only rewrite or second grammar is added. The pattern spellings were proposed in #7168; this PR independently reproduces the public boundary and adds compatibility regressions.

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: the canonical browser request action schemas, before SDK conversion. Unsupported regex spellings are replaced rather than repaired downstream.
  • Contribution scope fit and linked maintainer decision: not applicable; ordinary compatibility correction within the existing tool. No provider or execution authority is added.
  • CLI and MCP/tool-catalog contract: two pattern strings change. Literal input values are preserved; canonical forbidden-header and same-origin policies remain in place. Regex diagnostic messages may display the new spelling.
  • Provider, bridge, target-format, or platform compatibility: all hosts can advertise the full profile. Both full and compact are exercised. This does not include the separate Windows local-path problem #7151 / PR #7152.
  • Evidence, artifact, provenance, or reconstruction contract: no result or persisted fields change. Existing controlled capture, retained-summary and cancellation tests remain intact; no live capture is claimed.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): unchanged. The metadata probe invokes no scenario; invalid CLI controls select an absent browser executable. Runtime origin and forbidden-header enforcement remain with their existing owners.
  • 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): generated outputs checked but uncommitted; no version, dependency or installer 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.

The effect above describes this schema-publication correction. Existing browser-scenario execution and network effects are unchanged; no real target scenario was run locally; selected CI browser fixture execution is reported separately below.

Evidence and regression coverage

  • Tests added or updated: canonical path spelling/root/network-prefix controls; ASCII HTTP token characters and unchanged forbidden-header policy; actual SDK-converted tools/list patterns in full and compact. The full case requires both affected fields to be present; compact is checked as advertised without freezing today's omissions.
  • Base reproduction or other evidence: production stdio at unmodified 1173c0a9 had 2 scoped compilation failures and 1 look-around. With the new tests and unchanged production code, 15 tests passed and the full-profile regression failed on exactly those two fields. This is one compatibility boundary, not four independent defects.
  • User-visible CLI/MCP output (if applicable): fixed production stdio has 0 compilation failures / 0 look-around under browser actions in both profiles. Three real compiled CLI invalid-input controls still return invalid_request at the selected path/header fields, before any browser launch. A bounded comparison of 16,518 generated header strings and 16,521 path strings retains the old u acceptance in all three new client modes; these are lexical controls, not additional Vitest tests or a formal proof over every string.
  • Remaining proof gaps: no actual DeepSeek, RE2 or Rust validator request; no local live browser capture or local Linux/macOS run. Whole-catalog Windows portability remains limited by #7151. Node regex checks do not claim complete provider/client qualification, performance or token savings.

For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.

Applicable coverage: public schema success/error delivery, unusual-but-valid token characters, root versus network-path prefixes, and preserved raw path/name spelling. Resource ownership is unchanged; existing controlled cancellation/retained-Evidence checks passed. Real browser/provider lifecycle qualification was not performed.

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 Node24.22.1/npm11.16.0, source package6.8.0. npm used the pinned Node and explicit npm-cli entry; shared checks ran serially.

  • node scripts/run-development-tests.mjs focused src/domain/browserScenario.test.ts tests/boundary/mcp/browserScenarioMcp.test.ts tests/boundary/mcp/browserScenarioInputDiagnosticsMcp.test.ts tests/boundary/cli/browserScenarioSummaryCli.test.ts tests/conformance/contracts/mcpInputSchemaProfile.test.ts — 28 passed, 0 skipped. This includes production stdio input-diagnostic workflows, alongside controlled adapter/provider tests.
  • node scripts/run-development-tests.mjs focused tests/boundary/mcp/browserScenarioMcp.test.ts — the same 5 MCP checks passed again after test-scope cleanup; not 5 additional distinct cases.
  • npm run check — final type/lint/module/format/knip/metadata, architecture, production reachability and typed lint passed. The first attempt found an overlong outer describe; the new cases now own their scope and cleanup. No lint limit, timeout or assertion was weakened.
  • npm run docs:check — generated/authored documentation and 9 consistency checks passed.
  • npm run verify:test-discovery — all 2,496 test files discovered exactly once.
  • Runtime/skill build — three tasks passed for the base and fixed source. Locked dependency and official6.8 native PE/hash/ABI checks passed; the native artifact came from successful CI40225553909 for the exact frozen main.
  • Local external production probe (not a shipped command): full/compact stdio tools/list, SDK schema validation, native client regex modes, bounded old/new lexical parity and 3 compiled CLI input refusals passed. It performed zero scenario-tool invocations during metadata discovery and made no recording, replay or model call.

Remote CI40253073919 passed. Raw primary, all eight shard and controlled-browser checkout logs bind execution to merge 27514611c5474dd5b63cd492a15994c2f7a765ce / base 1173c0a9; its tree 80150a0943f8d165408bce02cdd8e184d0ce6cf1 matches the locally verified tree. Source/static/docs/build, eight shards, Windows native build, Linux package baseline and required gates passed. The browser job121349326989 reports Chrome155.0.8059.39 and verified=true through existing localhost CLI/stdio fixtures. This is remote controlled-fixture coverage, not local/public-target recording or whole-platform qualification. Optional skipped capabilities are not qualified. The human owner has completed the initial Author readiness declaration; readiness requests maintainer review, not approval or merge permission.

Compatibility, safety, and release

  • Breaking changes or migration steps: none. Input grammar and field names remain; clients see portable pattern strings. There is no schema/version migration.
  • Real Hopper/Ghidra, browser, or OS coverage: local Windows source build and target-free CLI/MCP, plus the separately recorded Linux CI Chrome/localhost fixture. Controlled fixtures do not establish all providers/platforms or actual DeepSeek/RE2/Rust acceptance.
  • Package or release metadata impact: none in this PR; generated artifacts remain uncommitted.
  • Security, privacy, process, or containment review: no new capture, target, script, network or cleanup authority. Existing origin/header guards are preserved. No paid/model call, deployment, release or auto-merge.

Author readiness

Human owner: @wunianze666-netizen

The human owner has completed the initial Author readiness review and declares this PR ready for initial maintainer review.

  • 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/7185 **Author:** [@wunianze666-netizen](https://github.com/wunianze666-netizen) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `codex/browser-scenario-portable-patterns` --- ### 📝 Commits (1) - [`4ec697c`](https://github.com/morluto/rea/commit/4ec697c707d07bb0f399d21cb9b5a0fe7ef5fdad) fix(contracts): publish portable browser request patterns ### 📊 Changes **3 files changed** (+144 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/browserScenario.test.ts` (+59 -0) 📝 `src/domain/browserScenarioValues.ts` (+4 -2) 📝 `tests/boundary/mcp/browserScenarioMcp.test.ts` (+81 -1) </details> ### 📄 Description ## Summary Fixes #7168. Full-profile `capture_browser_scenario` input schemas publish two request-action patterns that throw when a client compiles them in Unicode-set (`v`) mode. Publish equivalent portable patterns at the canonical schema owner, including a request-path expression without look-around. ## Problem and expected behavior At frozen main `1173c0a9dc1b352a60943a491462294db8f353ae`, production stdio `tools/list` exposes 18 patterns under browser actions. Two fail `v` compilation, and the request-path pattern contains a look-ahead. A client can reject the tool catalog before executing any scenario. Expected: those advertised patterns compile in Annex B, `u` and `v`, without changing accepted request paths or header tokens. ## Change and scope `browserScenarioValues.ts` remains the owner: spell reserved header characters with hex escapes and replace the path look-ahead with an equivalent consuming prefix. The SDK receives the canonical correction; no presentation-only rewrite or second grammar is added. The pattern spellings were proposed in #7168; this PR independently reproduces the public boundary and adds compatibility regressions. 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: the canonical browser request action schemas, before SDK conversion. Unsupported regex spellings are replaced rather than repaired downstream. - Contribution scope fit and linked maintainer decision: not applicable; ordinary compatibility correction within the existing tool. No provider or execution authority is added. - CLI and MCP/tool-catalog contract: two `pattern` strings change. Literal input values are preserved; canonical forbidden-header and same-origin policies remain in place. Regex diagnostic messages may display the new spelling. - Provider, bridge, target-format, or platform compatibility: all hosts can advertise the full profile. Both full and compact are exercised. This does not include the separate Windows local-path problem #7151 / PR #7152. - Evidence, artifact, provenance, or reconstruction contract: no result or persisted fields change. Existing controlled capture, retained-summary and cancellation tests remain intact; no live capture is claimed. - Target selection, authority, upstream behavior, and cleanup details (if applicable): unchanged. The metadata probe invokes no scenario; invalid CLI controls select an absent browser executable. Runtime origin and forbidden-header enforcement remain with their existing owners. - 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): generated outputs checked but uncommitted; no version, dependency or installer 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. - [x] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. The effect above describes this schema-publication correction. Existing browser-scenario execution and network effects are unchanged; no real target scenario was run locally; selected CI browser fixture execution is reported separately below. ## Evidence and regression coverage - Tests added or updated: canonical path spelling/root/network-prefix controls; ASCII HTTP token characters and unchanged forbidden-header policy; actual SDK-converted `tools/list` patterns in full and compact. The full case requires both affected fields to be present; compact is checked as advertised without freezing today's omissions. - Base reproduction or other evidence: production stdio at unmodified `1173c0a9` had 2 scoped compilation failures and 1 look-around. With the new tests and unchanged production code, 15 tests passed and the full-profile regression failed on exactly those two fields. This is one compatibility boundary, not four independent defects. - User-visible CLI/MCP output (if applicable): fixed production stdio has 0 compilation failures / 0 look-around under browser actions in both profiles. Three real compiled CLI invalid-input controls still return `invalid_request` at the selected path/header fields, before any browser launch. A bounded comparison of 16,518 generated header strings and 16,521 path strings retains the old `u` acceptance in all three new client modes; these are lexical controls, not additional Vitest tests or a formal proof over every string. - Remaining proof gaps: no actual DeepSeek, RE2 or Rust validator request; no local live browser capture or local Linux/macOS run. Whole-catalog Windows portability remains limited by #7151. Node regex checks do not claim complete provider/client qualification, performance or token savings. For boundary fixes, identify the applicable [boundary regressions](https://github.com/morluto/rea/blob/main/docs/testing.md#boundary-regressions) and [lifecycle regressions](https://github.com/morluto/rea/blob/main/docs/testing.md#lifecycle-regressions) covered by the evidence above, and explain relevant gaps. Applicable coverage: public schema success/error delivery, unusual-but-valid token characters, root versus network-path prefixes, and preserved raw path/name spelling. Resource ownership is unchanged; existing controlled cancellation/retained-Evidence checks passed. Real browser/provider lifecycle qualification was not performed. 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 Node24.22.1/npm11.16.0, source package6.8.0. npm used the pinned Node and explicit npm-cli entry; shared checks ran serially. - `node scripts/run-development-tests.mjs focused src/domain/browserScenario.test.ts tests/boundary/mcp/browserScenarioMcp.test.ts tests/boundary/mcp/browserScenarioInputDiagnosticsMcp.test.ts tests/boundary/cli/browserScenarioSummaryCli.test.ts tests/conformance/contracts/mcpInputSchemaProfile.test.ts` — **28 passed, 0 skipped**. This includes production stdio input-diagnostic workflows, alongside controlled adapter/provider tests. - `node scripts/run-development-tests.mjs focused tests/boundary/mcp/browserScenarioMcp.test.ts` — the same 5 MCP checks passed again after test-scope cleanup; not 5 additional distinct cases. - `npm run check` — final type/lint/module/format/knip/metadata, architecture, production reachability and typed lint passed. The first attempt found an overlong outer `describe`; the new cases now own their scope and cleanup. No lint limit, timeout or assertion was weakened. - `npm run docs:check` — generated/authored documentation and **9** consistency checks passed. - `npm run verify:test-discovery` — all **2,496** test files discovered exactly once. - Runtime/skill build — three tasks passed for the base and fixed source. Locked dependency and official6.8 native PE/hash/ABI checks passed; the native artifact came from successful CI40225553909 for the exact frozen main. - Local external production probe (not a shipped command): full/compact stdio `tools/list`, SDK schema validation, native client regex modes, bounded old/new lexical parity and 3 compiled CLI input refusals passed. It performed zero scenario-tool invocations during metadata discovery and made no recording, replay or model call. Remote [CI40253073919](https://github.com/morluto/rea/actions/runs/40253073919) **passed**. Raw primary, all eight shard and controlled-browser checkout logs bind execution to merge `27514611c5474dd5b63cd492a15994c2f7a765ce` / base `1173c0a9`; its tree `80150a0943f8d165408bce02cdd8e184d0ce6cf1` matches the locally verified tree. Source/static/docs/build, eight shards, Windows native build, Linux package baseline and required gates passed. The browser job121349326989 reports Chrome155.0.8059.39 and `verified=true` through existing localhost CLI/stdio fixtures. This is remote controlled-fixture coverage, not local/public-target recording or whole-platform qualification. Optional skipped capabilities are not qualified. The human owner has completed the initial Author readiness declaration; readiness requests maintainer review, not approval or merge permission. ## Compatibility, safety, and release - Breaking changes or migration steps: none. Input grammar and field names remain; clients see portable pattern strings. There is no schema/version migration. - Real Hopper/Ghidra, browser, or OS coverage: local Windows source build and target-free CLI/MCP, plus the separately recorded Linux CI Chrome/localhost fixture. Controlled fixtures do not establish all providers/platforms or actual DeepSeek/RE2/Rust acceptance. - Package or release metadata impact: none in this PR; generated artifacts remain uncommitted. - Security, privacy, process, or containment review: no new capture, target, script, network or cleanup authority. Existing origin/header guards are preserved. No paid/model call, deployment, release or auto-merge. ## Author readiness Human owner: @wunianze666-netizen The human owner has completed the initial Author readiness review and declares this PR ready for initial maintainer review. - [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 - [ ] 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 13:39:45 +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#7702
No description provided.