[GH-ISSUE #5234] [Bug] JEB CLI schema drift loses field-specific correction guidance #3203

Closed
opened 2026-10-31 00:37:48 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @morluto on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/5234

Before submitting

  • I searched open and closed issues for a related report.
  • I removed credentials and sensitive target data.

Area

CLI

Observed behavior

list-jeb-units --parent-unit-path "" --json passes the CLI schema, then fails canonical admission with generic invalid_request and no field correction details. The provider is not dispatched. The emitted schema also accepts the empty parent path; open-jeb-project advertises an empty/NUL-containing project path that canonical validation refuses.

These were reproduced with production JEB command registration, real Incur serving and shared application admission, using an injected provider. No JEB engine or remote connection ran.

Reproduction

At main 64abd4aef (affected JEB/shared helper source identical to published 69aa5465c), added focused regressions in tests/boundary/cli/jebInputDiagnostics.test.ts and src/application/ProviderOperationExecution.test.ts, then ran:

npm run test:run -- --project services --project cli-boundary src/application/ProviderOperationExecution.test.ts tests/boundary/cli/jebInputDiagnostics.test.ts

The CLI fixture registers registerJebCommands on a real Incur instance with an injected JEB port; it serves the exact empty-parent argument array above, captures JSON output, and records provider calls. It also serves list-jeb-units --schema --json and open-jeb-project --schema --json and validates those returned schemas with Ajv2020. Before repair: all4 regression tests failed. The companion service regression receives an AnalysisInputError whose issues array is empty.

Expected behavior

The CLI should use the canonical constraints and identify the invalid field before provider dispatch. Shared canonical admission must retain safe correction issues when it rejects input. Canonical JEB contracts require a nonempty parent-unit path and nonempty NUL-free project path. Preserve the caller's populated path and ordinary request defaults.

Impact and scope

Observed: misleading discovery metadata and lost correction guidance for invalid input. The refusal itself prevents dispatch. No engine side effect, wrong analysis, or data loss was observed; real-engine frequency and impact are NOT_ENOUGH_INFO. Four deterministic boundary assertions failed in one baseline run, not four independent native reproductions.

REA version

Source package6.7.0, local main64abd4aef; affected baseline source identical to published69aa5465c.

Runtime and platform

Pinned Node24.18.0; macOS26.3 arm64.

Target and artifact context

Synthetic JEB port; no opened artifact or project and no JEB engine.

Interface

CLI

Earliest failure stage

Request parsing or validation

Relevant output or evidence

JEB CLI empty-parent correction: expected VALIDATION_ERROR, received invalid_request without field details
list-unit advertised schema: empty parent accepted
open-project advertised schema: empty path accepted
shared admission: expected nonempty issue array, received []
Test Files 2 failed (2)
Tests 4 failed (4)

Source-derived root: JEB CLI declarations independently widen the canonical fields; executeProviderOperation keeps the schema cause but omits the standard safe issue projection.

Typed outcome or recovery expected

Field-specific CLI validation for parent-unit-path/path, and caller-relative issue paths from shared canonical refusal. Keep valid request forwarding and ordinary provider failures unchanged.

Additional context

Found by following #5217's Flutter schema/admission pattern into another consumer. #2180 was browser/Inspector-specific and is closed; no JEB-specific duplicate was found. The baseline does not exercise the full standalone launcher or a real JEB engine; those are distinct verification scopes.

Originally created by @morluto on GitHub (Oct 19, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/5234 ### Before submitting - [x] I searched open and closed issues for a related report. - [x] I removed credentials and sensitive target data. ### Area CLI ### Observed behavior `list-jeb-units --parent-unit-path "" --json` passes the CLI schema, then fails canonical admission with generic `invalid_request` and no field correction details. The provider is not dispatched. The emitted schema also accepts the empty parent path; `open-jeb-project` advertises an empty/NUL-containing project path that canonical validation refuses. These were reproduced with production JEB command registration, real Incur serving and shared application admission, using an injected provider. No JEB engine or remote connection ran. ### Reproduction At main `64abd4aef` (affected JEB/shared helper source identical to published `69aa5465c`), added focused regressions in `tests/boundary/cli/jebInputDiagnostics.test.ts` and `src/application/ProviderOperationExecution.test.ts`, then ran: ```sh npm run test:run -- --project services --project cli-boundary src/application/ProviderOperationExecution.test.ts tests/boundary/cli/jebInputDiagnostics.test.ts ``` The CLI fixture registers `registerJebCommands` on a real Incur instance with an injected JEB port; it serves the exact empty-parent argument array above, captures JSON output, and records provider calls. It also serves `list-jeb-units --schema --json` and `open-jeb-project --schema --json` and validates those returned schemas with Ajv2020. Before repair: all4 regression tests failed. The companion service regression receives an AnalysisInputError whose `issues` array is empty. ### Expected behavior The CLI should use the canonical constraints and identify the invalid field before provider dispatch. Shared canonical admission must retain safe correction issues when it rejects input. [Canonical JEB contracts](https://github.com/morluto/rea/blob/69aa5465cd77c5cf9ff435e7a5a322d90c1db12c/src/domain/jeb/jebAnalysis.ts) require a nonempty parent-unit path and nonempty NUL-free project path. Preserve the caller's populated path and ordinary request defaults. ### Impact and scope Observed: misleading discovery metadata and lost correction guidance for invalid input. The refusal itself prevents dispatch. No engine side effect, wrong analysis, or data loss was observed; real-engine frequency and impact are NOT_ENOUGH_INFO. Four deterministic boundary assertions failed in one baseline run, not four independent native reproductions. ### REA version Source package6.7.0, local main64abd4aef; affected baseline source identical to published69aa5465c. ### Runtime and platform Pinned Node24.18.0; macOS26.3 arm64. ### Target and artifact context Synthetic JEB port; no opened artifact or project and no JEB engine. ### Interface CLI ### Earliest failure stage Request parsing or validation ### Relevant output or evidence ```text JEB CLI empty-parent correction: expected VALIDATION_ERROR, received invalid_request without field details list-unit advertised schema: empty parent accepted open-project advertised schema: empty path accepted shared admission: expected nonempty issue array, received [] Test Files 2 failed (2) Tests 4 failed (4) ``` Source-derived root: [JEB CLI declarations](https://github.com/morluto/rea/blob/69aa5465cd77c5cf9ff435e7a5a322d90c1db12c/src/cli/jebCommands.ts) independently widen the canonical fields; [executeProviderOperation](https://github.com/morluto/rea/blob/69aa5465cd77c5cf9ff435e7a5a322d90c1db12c/src/application/ProviderOperationExecution.ts) keeps the schema cause but omits the standard safe issue projection. ### Typed outcome or recovery expected Field-specific CLI validation for `parent-unit-path`/`path`, and caller-relative issue paths from shared canonical refusal. Keep valid request forwarding and ordinary provider failures unchanged. ### Additional context Found by following #5217's Flutter schema/admission pattern into another consumer. #2180 was browser/Inspector-specific and is closed; no JEB-specific duplicate was found. The baseline does not exercise the full standalone launcher or a real JEB engine; those are distinct verification scopes.
bsakaguchi 2026-10-31 00:37:48 +00:00
  • closed this issue
  • added the
    triage
    bug
    labels
Author
Owner

@morluto commented on GitHub (Oct 19, 2026):

Fixed on main in a0edd145d3.

JEB CLI fields now come from the canonical owner, retaining constraints, defaults and descriptions. The shared provider-operation boundary projects schema failures through the existing safe issue projector and removes only its own input-envelope prefix. It preserves nested caller paths, an actual caller field named input, operation-level corrections, and the original schema cause. Provider dispatch remains blocked on invalid input.

Parent baseline reproduced4 failing assertions across the CLI/schema and shared-admission tests. After repair:63 tests/8 files passed across JEB CLI/MCP/service, Flutter consumers and issue projection;24 additional shared-consumer tests passed for ADB, Apktool and Flutter. The final real JEB request-schema service check passed4/4. Existing compiled subprocess controls exercise primary refusal/success through a loopback engine fixture. A standalone compiled CLI call with the empty parent option exited1 with VALIDATION_ERROR naming parent-unit-path. Check, check:fast, docs:check and discovery (1643 files) passed; independent review found no blocker.

The JEB engine was simulated at its protocol boundary; no real engine, project or artifact was opened. No performance improvement or real-provider qualification is claimed.

<!-- gh-comment-id:6265444656 --> @morluto commented on GitHub (Oct 19, 2026): Fixed on main in a0edd145d31ffeb9f022c25ec9e9131083f563d5. JEB CLI fields now come from the canonical owner, retaining constraints, defaults and descriptions. The shared provider-operation boundary projects schema failures through the existing safe issue projector and removes only its own input-envelope prefix. It preserves nested caller paths, an actual caller field named input, operation-level corrections, and the original schema cause. Provider dispatch remains blocked on invalid input. Parent baseline reproduced4 failing assertions across the CLI/schema and shared-admission tests. After repair:63 tests/8 files passed across JEB CLI/MCP/service, Flutter consumers and issue projection;24 additional shared-consumer tests passed for ADB, Apktool and Flutter. The final real JEB request-schema service check passed4/4. Existing compiled subprocess controls exercise primary refusal/success through a loopback engine fixture. A standalone compiled CLI call with the empty parent option exited1 with VALIDATION_ERROR naming parent-unit-path. Check, check:fast, docs:check and discovery (1643 files) passed; independent review found no blocker. The JEB engine was simulated at its protocol boundary; no real engine, project or artifact was opened. No performance improvement or real-provider qualification is claimed.
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#3203
No description provided.