[PR #5020] [CLOSED] fix(jeb): preserve artifact path in project-open refusals #6738

Closed
opened 2026-11-01 21:42:41 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5020
Author: @pardeep1916P
Created: 10/18/2026
Status: ❌ Closed

Base: main ← Head: fix/jeb-project-open-target-refusal


📝 Commits (6)

  • 7533f07 fix(jeb): preserve artifact path in project-open refusals
  • 8ccbf1a test(jeb): split describe blocks to comply with max-lines-per-function limit
  • 0a697fa Merge branch 'morluto:main' into fix/jeb-project-open-target-refusal
  • 0654333 Merge remote-tracking branch 'upstream/main' into fix/jeb-project-open-target-refusal
  • bbac0a4 test(jeb): add endpoint control and cli refusal path assertion
  • e1fef13 Merge remote-tracking branch 'origin/fix/jeb-project-open-target-refusal' into fix/jeb-project-open-target-refusal

📊 Changes

2 files changed (+93 additions, -0 deletions)

View changed files

📝 src/jeb/JebProvider.test.ts (+90 -0)
📝 tests/boundary/cli/jebCli.test.ts (+3 -0)

📄 Description

Summary

Fixes #3908. When open_jeb_project is refused by the upstream engine, the returned unsupported_target error now preserves the requested artifact path instead of replacing it with the provider's HTTP endpoint URL.

Problem and expected behavior

#requireSuccess in src/jeb/JebProvider.ts hardcoded this.#endpoint.toString() as the path argument for AnalysisUnsupportedTargetError. For open_jeb_project, this caused producer refusals (e.g. success: false because an input file is unsupported or corrupt) to be reported as:

Unsupported target for open_jeb_project at http://127.0.0.1:8425/mcp: <reason>

Expected:
The error must report the caller-selected artifact path instead of the provider's endpoint URL:

Unsupported target for open_jeb_project at /path/to/target.apk: <reason>

Change and scope

  • In src/jeb/JebProvider.ts, #requireSuccess accepts an optional targetPath?: string and falls back to this.#endpoint.toString() when omitted.
  • #openProject passes request.input.path to #requireSuccess.
  • Unit tests in src/jeb/JebProvider.test.ts verify that the artifact path is preserved on refusal across different artifact paths and across different endpoint URLs (endpoint control), and confirm that the endpoint URL is not present in the error message.
  • CLI boundary tests in tests/boundary/cli/jebCli.test.ts verify that open_jeb_project refusal reports the selected artifact path in details.path.
  • Not included: list_jeb_units and decompile_jeb_item refusals currently remain with endpoint attribution; these are outside the scope of issue #3908 which specifically addresses project-open refusals.

Contract and boundary impact

  • Semantic owner: src/jeb/JebProvider.ts, JEB provider refusal handling.
  • Contribution scope: ordinary bug fix within existing JEB provider boundaries.
  • CLI and MCP contracts: unchanged.
  • Platform compatibility: platform-neutral.
  • Evidence and provenance: preserves caller artifact identity in refusal errors.
  • Target interaction: none (purely mock/boundary testing).
  • Generated metadata: 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:
    • src/jeb/JebProvider.test.ts: verifies artifact path preservation on refusal across multiple paths and confirms the endpoint control (varying endpoint while holding path).
    • tests/boundary/cli/jebCli.test.ts: verifies open_jeb_project refusal reports the input artifact path in details.path.
  • Base reproduction: on unmodified main, open_jeb_project refusal yields Unsupported target for open_jeb_project at http://127.0.0.1:8425/mcp.
  • User-visible CLI/MCP output: Unsupported target for open_jeb_project at /path/to/target.apk: <reason> with exit code 1.
  • Remaining proof gaps: real JEB instance was not executed; verified against mock provider and boundary CLI tests.

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 run test:local -- src/jeb/JebProvider.test.ts — 23 passed
  • npm run test:focused -- tests/boundary/cli/jebCli.test.ts — passed
  • npm run check:fast — 2 tasks successful (typecheck and lint clean)

Compatibility, safety, and release

  • Breaking changes: none.
  • Security and safety: error reporting path alignment; no execution or mutation.

Author readiness

Human owner: @pardeep1916P

  • 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/5020 **Author:** [@pardeep1916P](https://github.com/pardeep1916P) **Created:** 10/18/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/jeb-project-open-target-refusal` --- ### 📝 Commits (6) - [`7533f07`](https://github.com/morluto/rea/commit/7533f07c4716b6b416139fe0e0951fe351aea821) fix(jeb): preserve artifact path in project-open refusals - [`8ccbf1a`](https://github.com/morluto/rea/commit/8ccbf1ad1745bdb686b2ce7d12c588e17dcbd77a) test(jeb): split describe blocks to comply with max-lines-per-function limit - [`0a697fa`](https://github.com/morluto/rea/commit/0a697fa35d3fdd36cc0202fabcb8193b13a73a93) Merge branch 'morluto:main' into fix/jeb-project-open-target-refusal - [`0654333`](https://github.com/morluto/rea/commit/065433396a0c82f56929f2a7a6521737d5affec8) Merge remote-tracking branch 'upstream/main' into fix/jeb-project-open-target-refusal - [`bbac0a4`](https://github.com/morluto/rea/commit/bbac0a4030f61fb1a9456284354dcbaee62df3c8) test(jeb): add endpoint control and cli refusal path assertion - [`e1fef13`](https://github.com/morluto/rea/commit/e1fef1343e31d91c0463ddea4cee580f40126fc5) Merge remote-tracking branch 'origin/fix/jeb-project-open-target-refusal' into fix/jeb-project-open-target-refusal ### 📊 Changes **2 files changed** (+93 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/jeb/JebProvider.test.ts` (+90 -0) 📝 `tests/boundary/cli/jebCli.test.ts` (+3 -0) </details> ### 📄 Description ## Summary Fixes #3908. When `open_jeb_project` is refused by the upstream engine, the returned `unsupported_target` error now preserves the requested artifact path instead of replacing it with the provider's HTTP endpoint URL. ## Problem and expected behavior `#requireSuccess` in `src/jeb/JebProvider.ts` hardcoded `this.#endpoint.toString()` as the path argument for `AnalysisUnsupportedTargetError`. For `open_jeb_project`, this caused producer refusals (e.g. `success: false` because an input file is unsupported or corrupt) to be reported as: ```text Unsupported target for open_jeb_project at http://127.0.0.1:8425/mcp: <reason> ``` Expected: The error must report the caller-selected artifact path instead of the provider's endpoint URL: ```text Unsupported target for open_jeb_project at /path/to/target.apk: <reason> ``` ## Change and scope - In `src/jeb/JebProvider.ts`, `#requireSuccess` accepts an optional `targetPath?: string` and falls back to `this.#endpoint.toString()` when omitted. - `#openProject` passes `request.input.path` to `#requireSuccess`. - Unit tests in `src/jeb/JebProvider.test.ts` verify that the artifact path is preserved on refusal across different artifact paths and across different endpoint URLs (endpoint control), and confirm that the endpoint URL is not present in the error message. - CLI boundary tests in `tests/boundary/cli/jebCli.test.ts` verify that `open_jeb_project` refusal reports the selected artifact path in `details.path`. - Not included: `list_jeb_units` and `decompile_jeb_item` refusals currently remain with endpoint attribution; these are outside the scope of issue #3908 which specifically addresses project-open refusals. ## Contract and boundary impact - Semantic owner: `src/jeb/JebProvider.ts`, JEB provider refusal handling. - Contribution scope: ordinary bug fix within existing JEB provider boundaries. - CLI and MCP contracts: unchanged. - Platform compatibility: platform-neutral. - Evidence and provenance: preserves caller artifact identity in refusal errors. - Target interaction: none (purely mock/boundary testing). - Generated metadata: none. Expected effects: - [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: - `src/jeb/JebProvider.test.ts`: verifies artifact path preservation on refusal across multiple paths and confirms the endpoint control (varying endpoint while holding path). - `tests/boundary/cli/jebCli.test.ts`: verifies `open_jeb_project` refusal reports the input artifact path in `details.path`. - Base reproduction: on unmodified main, `open_jeb_project` refusal yields `Unsupported target for open_jeb_project at http://127.0.0.1:8425/mcp`. - User-visible CLI/MCP output: `Unsupported target for open_jeb_project at /path/to/target.apk: <reason>` with exit code 1. - Remaining proof gaps: real JEB instance was not executed; verified against mock provider and boundary CLI tests. 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 run test:local -- src/jeb/JebProvider.test.ts` — 23 passed - `npm run test:focused -- tests/boundary/cli/jebCli.test.ts` — passed - `npm run check:fast` — 2 tasks successful (typecheck and lint clean) ## Compatibility, safety, and release - Breaking changes: none. - Security and safety: error reporting path alignment; no execution or mutation. ## Author readiness Human owner: @pardeep1916P - [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. - [x] 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-01 21:42:41 +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#6738
No description provided.