Skip to content

fix: validate README section configuration at input boundary (#670) - #726

Merged
Jamie-BitFlight merged 2 commits into
mainfrom
fix/670-validate-config-sections
Oct 10, 2026
Merged

Jamie-BitFlight merged 2 commits into
mainfrom
fix/670-validate-config-sections

Conversation

@Jamie-BitFlight

Copy link
Copy Markdown
Contributor

Validate the runtime shape and supported names of configured README sections before iterating them, rather than trusting an unchecked ReadmeSection[] assertion. This is a deliberate tightening: previously unknown section names were ignored by the dispatcher. Draft pending compatibility review, malformed-config tests, and CI. Related #670.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: bitflight-devops/github-action-readme-generator/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5fc9c6b1-eeb1-4c76-a862-0fe27076a9f3

📥 Commits

Reviewing files that changed from the base of the PR and between edb05b4 and df9882e.


📒 Files selected for processing (1)
  • src/inputs.ts

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Jamie-BitFlight
Jamie-BitFlight marked this pull request as ready for review October 10, 2026 21:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 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-10-10T21:16:13.155313Z d4eeea2 Draft marked ready
ℹ️ 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.

@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: d4eeea2c83

ℹ️ 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 src/inputs.ts Outdated

@Jamie-BitFlight Jamie-BitFlight left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Holistic review of PRs #717–#728

Reviewed d4eeea2c839860720ef5281ad815af7812606df9 against main at edb05b4eeea35e03df75b066b8ddd1d708de9f1c.

Assessment: simplify before merge — confirmed compatibility regression (P2).

With a real config file containing sections: ['title', 'custom'], main updates the title and ignores the unknown name; this head aborts before generation and leaves the title stale. The dispatcher already has an explicit unknown-section no-op. Non-array object/string configurations do crash main, so the array-shape guard addresses a real problem; the added closed-domain rejection is not needed for that correction.

My recommendation is to retain the necessary sequence-shape check and preserve unknown-name tolerance. An intentional strict rejection would require an explicit compatibility decision, documentation and the required breaking-change release header, but there is no demonstrated generator requirement for it. Single and repeated CLI --sections options still override the file correctly; no precedence regression was found.

I am adding the reproduction to the existing inline thread. Separately, Node 24 CI stops at vp check because this file is unformatted, so tests/coverage/build/generation did not execute in that job. Format the corrected implementation and rerun those gates. The two integration checks are green.

@Jamie-BitFlight
Jamie-BitFlight merged commit 40c9efd into main Oct 10, 2026
9 of 11 checks passed
@Jamie-BitFlight
Jamie-BitFlight deleted the fix/670-validate-config-sections branch October 10, 2026 23:13

@Jamie-BitFlight Jamie-BitFlight left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Post-merge verification of df9882e17062e8805cc6072f7f78f4eacf5867b1 and main 40c9efd1eec677f6bf024402459661741330233a.

The original unknown-section compatibility finding is corrected: the guard now accepts unknown string names and the existing dispatcher still ignores them. This is separate from the remaining formatting failure attached inline. That failure persisted through merge and now affects both open follow-ups #729 and #730.

A focused formatting-only correction on main, followed by incorporating it into the open branches and rerunning their gates, is needed. Do not reintroduce the closed list of allowed section names while addressing this.

Comment thread src/inputs.ts
Jamie-BitFlight pushed a commit that referenced this pull request Oct 11, 2026
## [2.0.5](v2.0.4...v2.0.5) (2026-10-11)

### Bug Fixes

* add CLI-only generation error boundary ([#654](#654)) ([#725](#725)) ([6a27eaa](6a27eaa))
* **ci:** honor explicit Node versions before automatic detection ([95a9e68](95a9e68))
* **ci:** honor explicit Node versions in the test matrix ([#735](#735)) ([3f03f0d](3f03f0d))
* complete SVG writes before reporting success ([#717](#717)) ([170e499](170e499))
* consistently interpret GitHub Actions environment flag ([#670](#670)) ([#723](#723)) ([68756ad](68756ad))
* fail generation on formatting and requested save errors ([#654](#654)) ([#718](#718)) ([bb48434](bb48434))
* guard malformed runs metadata and preserve load error causes ([#720](#720)) ([c6caf7a](c6caf7a))
* load native ESM configuration and verify fresh package entry points ([5f92784](5f92784))
* load native ESM configuration and verify fresh package entry points ([#733](#733)) ([55746ed](55746ed))
* pair section log groups and honor Actions mode at output boundaries ([2d45100](2d45100))
* pair section log groups and honor Actions output mode ([#734](#734)) ([ceaa03a](ceaa03a))
* preserve empty metadata descriptions and cover reviewed errors ([3c0a181](3c0a181))
* preserve empty metadata descriptions and verify reviewed error paths ([#732](#732)) ([f8c0f4e](f8c0f4e))
* preserve original file read error as cause ([#722](#722)) ([05553e0](05553e0))
* validate consumed nested metadata descriptions ([#670](#670)) ([#729](#729)) ([330ab9a](330ab9a))
* validate README section configuration at input boundary ([#670](#670)) ([#726](#726)) ([40c9efd](40c9efd))
* verify declared defaults using their rendered projection ([beb2180](beb2180))
* verify empty metadata descriptions through the contract checker ([a5e2d31](a5e2d31))
@Jamie-BitFlight

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 2.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Jamie-BitFlight Jamie-BitFlight added the released This issue/pull request has been released. label Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released This issue/pull request has been released.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant