[PR #3482] [CLOSED] refactor: extract native UI observation timeout constant #5772

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3482
Author: @markantos69
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: markantos69-improve-code-quality


📝 Commits (1)

  • 7cc1a0a refactor: extract native UI observation timeout constant

📊 Changes

1 file changed (+7 additions, -2 deletions)

View changed files

📝 src/native/NativeUiObservation.ts (+7 -2)

📄 Description

Summary

This change removes a duplicated magic timeout value in native UI observation and replaces it with one named constant. The goal is to keep behavior unchanged while making future timeout tuning safer and less error-prone.

Problem and expected behavior

observeWithHelper used the same literal timeout (180_000) in two places when building the abort signal. The expected behavior is a single-source timeout definition so changes do not drift across call sites.

Change and scope

  • Added NATIVE_UI_OBSERVATION_TIMEOUT_MS in src/native/NativeUiObservation.ts.
  • Replaced both AbortSignal.timeout(180_000) uses with the constant.
  • No semantic, provider, or contract behavior changes.

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: Native UI provider adapter boundary (src/native/NativeUiObservation.ts) at signal construction.
  • Contribution scope fit and linked maintainer decision: Ordinary internal refactor within existing behavior; not applicable.
  • CLI and MCP/tool-catalog contract: No change.
  • Provider, bridge, target-format, or platform compatibility: No change.
  • Evidence, artifact, provenance, or reconstruction contract: No change.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): Not applicable.
  • 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): None.

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: None (refactor only).
  • Base reproduction or other evidence: Source-level evidence only; both timeout call sites now read the same named constant.
  • User-visible CLI/MCP output (if applicable): Not applicable.
  • Remaining proof gaps: No runtime smoke against a live native UI target in this change.

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

  • npm ci - passed
  • npm run build:cached - passed
  • npm run check:fast - passed

Compatibility, safety, and release

  • Breaking changes or migration steps:
    N/A
  • Real Hopper/Ghidra, browser, or OS coverage:
    Not exercised in this refactor.
  • Package or release metadata impact:
    None.
  • Security, privacy, process, or containment review:
    No new authority or side effects introduced.

Author readiness

Human owner:

  • 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/3482 **Author:** [@markantos69](https://github.com/markantos69) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `markantos69-improve-code-quality` --- ### 📝 Commits (1) - [`7cc1a0a`](https://github.com/morluto/rea/commit/7cc1a0ab672560d7400e16f2b2581dd4798a5c05) refactor: extract native UI observation timeout constant ### 📊 Changes **1 file changed** (+7 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/native/NativeUiObservation.ts` (+7 -2) </details> ### 📄 Description ## Summary This change removes a duplicated magic timeout value in native UI observation and replaces it with one named constant. The goal is to keep behavior unchanged while making future timeout tuning safer and less error-prone. ## Problem and expected behavior `observeWithHelper` used the same literal timeout (`180_000`) in two places when building the abort signal. The expected behavior is a single-source timeout definition so changes do not drift across call sites. ## Change and scope - Added `NATIVE_UI_OBSERVATION_TIMEOUT_MS` in `src/native/NativeUiObservation.ts`. - Replaced both `AbortSignal.timeout(180_000)` uses with the constant. - No semantic, provider, or contract behavior changes. 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: Native UI provider adapter boundary (`src/native/NativeUiObservation.ts`) at signal construction. - Contribution scope fit and linked maintainer decision: Ordinary internal refactor within existing behavior; not applicable. - CLI and MCP/tool-catalog contract: No change. - Provider, bridge, target-format, or platform compatibility: No change. - Evidence, artifact, provenance, or reconstruction contract: No change. - Target selection, authority, upstream behavior, and cleanup details (if applicable): Not applicable. - 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): None. 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. - [x] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage - Tests added or updated: None (refactor only). - Base reproduction or other evidence: Source-level evidence only; both timeout call sites now read the same named constant. - User-visible CLI/MCP output (if applicable): Not applicable. - Remaining proof gaps: No runtime smoke against a live native UI target in this change. 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 - `npm ci` - passed - `npm run build:cached` - passed - `npm run check:fast` - passed ## Compatibility, safety, and release - Breaking changes or migration steps: N/A - Real Hopper/Ghidra, browser, or OS coverage: Not exercised in this refactor. - Package or release metadata impact: None. - Security, privacy, process, or containment review: No new authority or side effects introduced. ## Author readiness Human owner: <!-- @GitHub-handle --> - [ ] 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. --- <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:19 +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#5772
No description provided.