[GH-ISSUE #3571] [Feature] Inventory JIMAGE runtime containers without loading target classes #1325

Open
opened 2026-10-16 21:04:17 +00:00 by bsakaguchi · 1 comment
Owner

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

Type: Feature Domain: AI & Runtimes Status: Proposed Ecosystem: REA

REA 6.4.0, source checkout 183d21210acda588184dd9a0897047523aa644b2, macOS arm64. A caller-owned runtime image produced by the installed JDK is rejected by inspect-artifact as an unsupported binary format.

Minimal independent fixture, with no external application or credentials:

jlink --version
jlink --add-modules java.base --output fixture-image --no-header-files --no-man-pages
jimage info fixture-image/lib/modules
rea inspect-artifact fixture-image/lib/modules --format json --full-output

The observed host JDK is 27. jimage info completes successfully and reports major version 1, minor version 1 and 7,899 resources. The locally generated modules file is 29,529,294 bytes, SHA-256 ace57cbfc808b487973eac2828a1e51ee6535d7da111fb5a07ffd53df1255e5f. The precise digest is tied to that installed JDK; regeneration under another JDK must record its own digest/version.

REA exits 1 with:

{
  "code": "target_unavailable",
  "category": "unsupported_target",
  "retryable": false,
  "constraint": "file_format_rejected"
}

Requested read-only scope:

  • Recognize JIMAGE version/header metadata and preserve exact source identity.
  • Inventory module/resource paths, sizes, offsets and digests with explicit version/coverage limits.
  • Distinguish payload entries from /modules and /packages internal tree records; an inventory excluding internal entries must state that denominator.
  • Optionally extract immutable resource bytes through a caller-selected existing compatible JDK tool or a bounded reader, preserving names and duplicate/alias identity.
  • Record tool/image compatibility explicitly: a newer producer can change the image format. Do not automatically install a JDK or run classes from the inspected image.

This is a container/inventory proposal. Java source reconstruction and method semantics are a separate scope (#1558). A maintainer scope decision is requested before implementation.

Originally created by @matbrgz on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/3571 [![Type: Feature](https://img.shields.io/badge/type-feature-blue.svg?style=flat-square)](https://github.com/morluto/rea) [![Domain: AI & Runtimes](https://img.shields.io/badge/domain-AI_&_runtimes-blueviolet.svg?style=flat-square)](https://github.com/morluto/rea) [![Status: Proposed](https://img.shields.io/badge/status-proposed-blue.svg?style=flat-square)](https://github.com/morluto/rea) [![Ecosystem: REA](https://img.shields.io/badge/ecosystem-morluto%2Frea-8A2BE2.svg?style=flat-square)](https://github.com/morluto/rea) REA 6.4.0, source checkout `183d21210acda588184dd9a0897047523aa644b2`, macOS arm64. A caller-owned runtime image produced by the installed JDK is rejected by `inspect-artifact` as an unsupported binary format. Minimal independent fixture, with no external application or credentials: ```sh jlink --version jlink --add-modules java.base --output fixture-image --no-header-files --no-man-pages jimage info fixture-image/lib/modules rea inspect-artifact fixture-image/lib/modules --format json --full-output ``` The observed host JDK is 27. `jimage info` completes successfully and reports major version 1, minor version 1 and 7,899 resources. The locally generated modules file is 29,529,294 bytes, SHA-256 `ace57cbfc808b487973eac2828a1e51ee6535d7da111fb5a07ffd53df1255e5f`. The precise digest is tied to that installed JDK; regeneration under another JDK must record its own digest/version. REA exits 1 with: ```json { "code": "target_unavailable", "category": "unsupported_target", "retryable": false, "constraint": "file_format_rejected" } ``` Requested read-only scope: - Recognize JIMAGE version/header metadata and preserve exact source identity. - Inventory module/resource paths, sizes, offsets and digests with explicit version/coverage limits. - Distinguish payload entries from `/modules` and `/packages` internal tree records; an inventory excluding internal entries must state that denominator. - Optionally extract immutable resource bytes through a caller-selected existing compatible JDK tool or a bounded reader, preserving names and duplicate/alias identity. - Record tool/image compatibility explicitly: a newer producer can change the image format. Do not automatically install a JDK or run classes from the inspected image. This is a container/inventory proposal. Java source reconstruction and method semantics are a separate scope (#1558). A maintainer scope decision is requested before implementation.
Author
Owner

@matbrgz commented on GitHub (Oct 14, 2026):

Update checked on 2026-10-14 with the published rea-agents@6.5.0 in an isolated installation, Node 26.11.1, macOS arm64. The package launcher reports 6.5.0.

I reinspected the same caller-produced JIMAGE fixture, SHA-256 ace57cbfc808b487973eac2828a1e51ee6535d7da111fb5a07ffd53df1255e5f, with inspect-artifact <fixture> --format json --full-output. The CLI still exits 1, with code: target_unavailable, category: unsupported_target, constraint: file_format_rejected, and retryable: false. This is a confirmed format-scope gap for this fixture; it is not a claim that 6.5.0 regressed or that an unsupported format should be presented as a complete inventory. No target classes were loaded or executed.

This confirms the container proposal remains relevant on 6.5.0. Resource inventory and Java source/behavior reconstruction (#1558) should remain independently scoped.

<!-- gh-comment-id:6174322406 --> @matbrgz commented on GitHub (Oct 14, 2026): Update checked on 2026-10-14 with the published **rea-agents@6.5.0** in an isolated installation, Node 26.11.1, macOS arm64. The package launcher reports `6.5.0`. I reinspected the same caller-produced JIMAGE fixture, SHA-256 `ace57cbfc808b487973eac2828a1e51ee6535d7da111fb5a07ffd53df1255e5f`, with `inspect-artifact <fixture> --format json --full-output`. The CLI still exits **1**, with `code: target_unavailable`, `category: unsupported_target`, `constraint: file_format_rejected`, and `retryable: false`. This is a confirmed format-scope gap for this fixture; it is not a claim that 6.5.0 regressed or that an unsupported format should be presented as a complete inventory. No target classes were loaded or executed. This confirms the container proposal remains relevant on 6.5.0. Resource inventory and Java source/behavior reconstruction (#1558) should remain independently scoped.
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#1325
No description provided.