Skip to content

fix: preserve wrapped CLI help in API docs#1826

Open
notgitika wants to merge 2 commits into
aws:mainfrom
notgitika:codex/cr-290947859-cli
Open

fix: preserve wrapped CLI help in API docs#1826
notgitika wants to merge 2 commits into
aws:mainfrom
notgitika:codex/cr-290947859-cli

Conversation

@notgitika

Copy link
Copy Markdown
Contributor

Summary

  • join wrapped Commander argument and option descriptions during extraction
  • normalize generated AsciiDoc for AWS style and China rebranding checks
  • add a regression test for wrapped help output

Addresses generated documentation feedback from Amazon CR-290947859.

Testing

  • node --test scripts/extract-cli-model.test.mjs
  • regenerated the v0.24.2 CLI reference

@notgitika
notgitika requested a review from a team July 23, 2026 23:39
@github-actions github-actions Bot added the size/m PR size: M label Jul 23, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Jul 23, 2026
@github-actions github-actions Bot added agentcore-harness-reviewing AgentCore Harness review in progress and removed agentcore-harness-reviewing AgentCore Harness review in progress labels Jul 23, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Jul 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.24.2.tgz

How to install

gh release download pr-1826-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.24.2.tgz

@notgitika

Copy link
Copy Markdown
Contributor Author

@strandly-the-agent review

@strandly-the-agent strandly-the-agent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TL;DR — changes requested: the wrapped-help fix works, but the shared renderer can corrupt Optional … prose and the new regression test is not part of any automated test target.

✅ Reviewed 642f2f5; direct Node test 1/1, Python compile, build, and end-to-end generation (6 groups / 30 entries / 139 params) passed.
🔴 format:check still fails on the new test file; CI already identifies the formatting fix.
⚠️ The separate ai-review failure occurred during runner setup before review execution; the remaining build/test/security checks pass.

Review breakdown
  • Correctness/docs: one deterministic cross-source wording regression.
  • Test quality: the parser regression test passes directly but is absent from package/CI test targets.
  • Suppressed: the memory-strategy wording concern did not reproduce against real inputs; no other escaping or parser defect was found.

No API or model-context pass was needed: these are internal documentation-generation scripts.

Comment thread scripts/render_adoc.py
"""Normalize recurring parameter-description style issues."""
text = normalize_style(text).strip()
substitutions = (
(r"^Optional\b", "An optional"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 This global rewrite breaks valid plural and mass-noun descriptions from the renderer's other supported sources. I reproduced Optional tags.An optional tags. and Optional additional task metadataAn optional additional task metadata; every parameter reaches this rule via render_params(). Could we preserve Optional, or make the rewrite noun-aware, and add an exact renderer test for those cases plus the intended {aws} output?


import { parseHelp } from "./extract-cli-model.mjs";

test("parseHelp preserves wrapped argument and option descriptions", () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 The regression test passes with node --test, but no repository test target runs it: the unit project only discovers src/**/*.test.ts(x), and the package test scripts invoke Vitest. I confirmed Vitest reports this file as “No test files found.” Please wire it into a CI-invoked script/workflow or convert/move it into the discovered suite so this regression remains enforced.

@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels Jul 24, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Jul 24, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants