Skip to content

fix(browser): report non-absolute export paths at their input field - #7097

Merged
morluto merged 1 commit into
morluto:mainfrom
saiyam-jain-dev:fix/web-script-export-path-issues
Oct 27, 2026
Merged

morluto merged 1 commit into
morluto:mainfrom
saiyam-jain-dev:fix/web-script-export-path-issues

Conversation

@saiyam-jain-dev

@saiyam-jain-dev saiyam-jain-dev commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

When caller-supplied paths to export_web_scripts (capture_path or output_directory) are relative, WebScriptExportService previously emitted a single generic issue with an empty issue path (path: []) and a combined message "capture_path and output_directory must be absolute filesystem paths on this host." even if only one of them was relative. This PR reports non-absolute paths at their respective field (["capture_path"] and/or ["output_directory"]), matching the established boundary issue reporting pattern across REA.

Problem and expected behavior

Previously, passing a relative capture_path or output_directory returned:

{
  "path": [],
  "reason": "invalid_format",
  "message": "capture_path and output_directory must be absolute filesystem paths on this host."
}

Consumers could not determine from the structured issue which argument violated the absolute path requirement. The expected behavior is that each invalid field is reported with its own issue targeting ["capture_path"] or ["output_directory"].

Change and scope

  • Updated exportWebScriptsValidated in src/application/WebScriptExportService.ts to inspect capture_path and output_directory individually and return targeted AnalysisInputIssue records for each invalid field.
  • Added boundary assertions to tests/boundary/filesystem/webScriptExport.test.ts verifying issue paths and reasons when capture_path is relative, output_directory is relative, or both are relative.

Contribution scope fit: ordinary boundary fix within existing boundaries (not applicable).

Contract and boundary impact

  • Semantic owner and earliest changed stage: src/application/WebScriptExportService.ts input validation.
  • Contribution scope fit and linked maintainer decision: not applicable.
  • CLI and MCP/tool-catalog contract: structured AnalysisInputError now identifies capture_path and/or output_directory in issues[].path.
  • Provider, bridge, target-format, or platform compatibility: platform-independent.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): none.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none.

Expected effects:

  • 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: tests/boundary/filesystem/webScriptExport.test.ts
  • Base reproduction or other evidence: previously returned { path: [], reason: "invalid_format" }.
  • User-visible CLI/MCP output: structured validation errors cite capture_path or output_directory.
  • Remaining proof gaps: none.

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

  • npx vitest run tests/boundary/filesystem/webScriptExport.test.ts -t "identifies a missing capture file and rejected host path syntax" — passed (1 passed in 34ms)
  • npm run check:fast (turbo run typecheck lint) — passed cleanly (2/2 tasks successful in 1m21s)

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none.

Author readiness

Human owner: @saiyam-jain-dev

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

@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; field-specific errors preserve the existing path restrictions.

Summary

Reports each relative export path at its own input field instead of returning one combined error.

  • Web-script export points to each relative path that needs fixing.

Reviews (1) · Last reviewed commit: "fix(browser): report non-absolute export..." · Reviewed by Greptile

@saiyam-jain-dev
saiyam-jain-dev marked this pull request as ready for review October 25, 2026 09:05
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-25T09:05:53.901065Z 2436891 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@morluto
morluto merged commit 097cd2c into morluto:main Oct 27, 2026
45 of 50 checks passed
SanHsien added a commit to SanHsien/rea that referenced this pull request Oct 27, 2026
…ee sync)

Bring the fork from upstream 988494a to the rea-agents-6.8.0 release
(160d821, 1914 upstream commits) as one net-tree commit. The squashed fork
shares no ancestor with upstream, so a never-pushed synthetic commit
(parent 988494a, fork tree) restored a three-way merge base; only the
resulting tree is committed here. Recorded as the PLAYBOOK §5 exception in
docs/DECISIONS.md and docs/records/upstream-sync-evaluation-2026-10-27.md.

Kept fork changes:
- zh-TW default README, README.en.md mirror, en + zh-TW locales only;
  upstream README additions translated into Traditional Chinese
- Windows hardening where upstream has no equivalent fix
  (GhidraInstallation drive-letter JAVA_HOME, MacHopperPaths Windows
  home joins, Electron symlink tests skipped on win32)
- zod 4.6.7 and fast-uri 3.1.9 security pins; generated schema and
  license inventories regenerated, runtime notices updated

Adopted early: upstream 4557791 (morluto#7152), a v-mode portable Windows
absolute-path pattern, so MCP clients that compile advertised patterns
with the v flag accept the tool list on Windows.

Workflow review: fork guards (github.repository == 'morluto/rea') on the
publication roots of release.yml (merged-release, release-please),
release-recovery.yml (verify) and website-pages.yml (prepare).

Upstream check now tracks releases: tools/check_upstream_updates.py is
the repo-fleet-ops canonical checker (84bc069, byte-identical);
tools/upstream_baseline.json uses track=release, release_tag_prefix
rea-agents- and ticket_cutoff=release; the workflow runs it with
--ticket-cap 3000.

Watermarks: release rea-agents-6.8.0, PR morluto#7097, issue morluto#7095.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants