Skip to content

docs: harden CLI reference generator (root-cause fix for #50 review) - #51

Merged
mesilov merged 1 commit into
devfrom
docs/46-harden-cli-reference-generator
Sep 3, 2026
Merged

mesilov merged 1 commit into
devfrom
docs/46-harden-cli-reference-generator

Conversation

@mesilov

@mesilov mesilov commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

Root-cause fix for the recurring update-cli-reference.sh maintenance pitfalls that successive Codex reviews kept surfacing. Instead of documenting more manual caveats, this hardens the generator so the fragile steps go away.

  • Single-source the command list — the node generator now receives the shell PROJECT_COMMANDS array as arguments instead of keeping a duplicate hardcoded projectCommands. The two lists can no longer drift apart (this was the docs: address Codex review on CLI reference (follow-up to #47) #49 finding).
  • Clear error instead of a crash — a command in PROJECT_COMMANDS without an optionAllowlist entry now fails with an actionable message (Command X has no optionAllowlist entry ... add one (at least ["json"])) instead of aborting on undefined is not iterable (this was the docs: qualify --silent by Symfony version + document all three CLI lists (follow-up to #49) #50 finding).
  • Simplified maintainer note — the "Изменения CLI" section now lists the two remaining lists (PROJECT_COMMANDS + optionAllowlist) and states every command needs an allowlist entry.

Regenerated cli.md is byte-identical to the committed file; the drift check stays green.

Verification

All green in the Docker dev environment:

  • Regenerated cli.md via the modified script → diff identical to committed reference
  • make lint-openspec — 17 passed, 0 failed
  • git diff --check — clean
  • make test-unit — 220 tests, 570 assertions OK
  • make lint-all — lint-agent-plugins (CLI drift check) passed, CS Fixer (0 fixable), PHPStan level 8 (no errors), Rector (done)

Relates to #46. Review thread on #50 replied to and resolved.

Please let the Codex review finish before merging so any last finding can be folded in.

🤖 Generated with Claude Code

…issing allowlist

Root-cause fix for the recurring CLI-reference maintenance pitfalls surfaced by
Codex review:

- update-cli-reference.sh now single-sources the command list: the node
  generator receives the shell PROJECT_COMMANDS array as arguments instead of
  keeping a duplicate hardcoded projectCommands list, so the two can no longer
  drift apart.
- A command present in PROJECT_COMMANDS but missing an optionAllowlist entry now
  fails with a clear, actionable message instead of crashing on
  "undefined is not iterable".
- Maintainer skill: simplify the "Изменения CLI" note to the two remaining
  lists (PROJECT_COMMANDS + optionAllowlist) and state that every command needs
  an allowlist entry (at least ["json"]).

Regenerated cli.md is byte-identical; the drift check stays green.

Follow-up to Codex review on #50.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EanqRNh4A3XoojYr7MNFvd
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-03T06:09:42.791160Z d9a12ee PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mesilov
mesilov merged commit a9bc4fe into dev Sep 3, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9a12ee098

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .agents/skills/rarus-echo-maintainer/SKILL.md
mesilov added a commit that referenced this pull request Sep 3, 2026
docs: align OpenSpec + changelog with CLI-reference work (fixes #51 P1 review)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant