[GH-ISSUE #2053] trace-web-module-imports --help omits the import-map option descriptions #680

Closed
opened 2026-10-15 18:27:20 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @kaoru0822-kitauji on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/2053

Observed behavior

rea trace-web-module-imports --help lists two options with no description:

Options:
  --importer-url <string>         Explicit HTTP(S) module URL; useful when captured inline/base context is unknown
  --import-map-path <string>
  --import-map-base-url <string>

tests/boundary/cli/cliOptionAliases.test.ts ("register only single-character short flags") fails on main for the same reason. It fails in main CI (run 38205050281, head 83a4445f4) and locally.

Cause

48c352b6b (fix(cli): reuse firmware and web module input constraints) builds both options as importMapInputSchema.shape.<field>.describe(...).optional(). In Zod 4, .describe() registers metadata on the schema it is called on, and .optional() returns a new wrapper without that description. CLI help reads the outer optional schema, so the text is lost. Both descriptions also say which option requires the other, so callers lose that pairing guidance.

Expected behavior

Both options show their descriptions in CLI help, and the CLI option alias test passes.

Originally created by @kaoru0822-kitauji on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/2053 ## Observed behavior `rea trace-web-module-imports --help` lists two options with no description: ``` Options: --importer-url <string> Explicit HTTP(S) module URL; useful when captured inline/base context is unknown --import-map-path <string> --import-map-base-url <string> ``` `tests/boundary/cli/cliOptionAliases.test.ts` ("register only single-character short flags") fails on main for the same reason. It fails in main CI (run 38205050281, head 83a4445f4) and locally. ## Cause 48c352b6b (`fix(cli): reuse firmware and web module input constraints`) builds both options as `importMapInputSchema.shape.<field>.describe(...).optional()`. In Zod 4, `.describe()` registers metadata on the schema it is called on, and `.optional()` returns a new wrapper without that description. CLI help reads the outer optional schema, so the text is lost. Both descriptions also say which option requires the other, so callers lose that pairing guidance. ## Expected behavior Both options show their descriptions in CLI help, and the CLI option alias test passes.
bsakaguchi 2026-10-15 18:27:20 +00:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@kaoru0822-kitauji commented on GitHub (Oct 12, 2026):

Fixed on main by 4573e8cf3. --import-map-path and --import-map-base-url show their descriptions in trace-web-module-imports --help again. Closing #2054 as superseded.

<!-- gh-comment-id:6119417240 --> @kaoru0822-kitauji commented on GitHub (Oct 12, 2026): Fixed on main by 4573e8cf3. `--import-map-path` and `--import-map-base-url` show their descriptions in `trace-web-module-imports --help` again. Closing #2054 as superseded.
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#680
No description provided.