Skip to content

fix: validate consumed nested metadata descriptions (#670) - #729

Merged
Jamie-BitFlight merged 4 commits into
mainfrom
fix/670-nested-validation-main
Oct 10, 2026
Merged

Jamie-BitFlight merged 4 commits into
mainfrom
fix/670-nested-validation-main

Conversation

@Jamie-BitFlight

@Jamie-BitFlight Jamie-BitFlight commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #727 with a clean branch based on current main after #720 merged. Reject non-object input/output entries and non-string descriptions consumed by README rendering; preserve scalar input defaults and other optional fields. Draft pending focused YAML fixtures and full CI. Related #670 and #727.

Summary by CodeRabbit

  • Bug Fixes
    • Invalid action metadata is now rejected when inputs or outputs have malformed structures, or when descriptions use unsupported values. Scalar defaults and null descriptions remain accepted.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: bitflight-devops/github-action-readme-generator/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 05b94ca2-3eb8-489e-9daf-430f2b846b44

📥 Commits

Reviewing files that changed from the base of the PR and between 40c9efd and 7a66374.


📒 Files selected for processing (2)
  • __tests__/action.test.ts
  • src/Action.ts

 ____________________________________________________________________________________________
< It is easier to change the specification to fit the program than vice versa. - Alan Perlis >
 --------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR


🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • 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 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.

Re-review of b54da897e5e233afc25f2a7ae93942ad5fd95be2 against current main 40c9efd1eec677f6bf024402459661741330233a.

Summary

The replacement for #727 is substantially narrower. Scalar defaults, absent descriptions and optional branding are preserved; the original scalar-default finding does not apply to this head. The newly added tests exercise YAML parsing and the Action constructor, so they establish boundary behaviour rather than checking implementation keywords.

Warnings

Two confirmed P2 findings are attached inline: null descriptions accepted by the existing renderer are now rejected, and the added test block fails the repository formatter. The separate src/inputs.ts formatting failure is inherited from merged #726; it is not introduced by this validator.

Verification

I compared the current Action source and its real Inputs → ReadmeGenerator → README-write consumers. Focused generation probes reproduce the null-description regression and confirm that false/0/null defaults, this repository's metadata and pinned actions/checkout metadata load and render with this head. Numeric descriptions and a null input entry reproduce real downstream failures on main and are rejected at the loader by this change. These were current-source probes with explicitly recorded dependency substitutions, not a canonical Vite+ build or a full local test-suite pass.

Both current-head Node check runs concluded failure. The inspected Node 24 log and job show vp check failing before tests, coverage, build and docs generation. Separate third-party integration checks succeeded, but do not cover the null-description case.

Overall assessment

Keep the small loader-level guard and the YAML-boundary tests, preserve the renderer's nullish-description behaviour, fix formatting, then verify the corrected current head. No additional schema framework or restrictions on unused metadata are warranted.

Comment thread src/Action.ts Outdated
Comment thread __tests__/action.test.ts
@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-10T23:55:59.224391Z b54da89 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.

@Jamie-BitFlight
Jamie-BitFlight merged commit 330ab9a into main Oct 10, 2026
8 of 11 checks passed
@Jamie-BitFlight
Jamie-BitFlight deleted the fix/670-nested-validation-main branch October 10, 2026 23:57
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