Skip to content

fix: preserve empty metadata descriptions and cover reviewed errors - #732

Merged
Jamie-BitFlight merged 3 commits into
mainfrom
fix/review-followup-metadata-20261011
Oct 11, 2026
Merged

Jamie-BitFlight merged 3 commits into
mainfrom
fix/review-followup-metadata-20261011

Conversation

@Jamie-BitFlight

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

Copy link
Copy Markdown
Contributor

Why

The accepted blank/null descriptions from #729 reach usage comments as literal JavaScript values. Main also fails its formatter gate before tests and builds execute. Reviewing the resulting exact-verifier path exposed mismatches for accepted descriptions and defaults.

Changes

  • Render missing and null input descriptions as empty while preserving scalar defaults and literal description text.
  • Exercise real YAML loading, generation, persistence, exact verifier acceptance, and preservation outside README markers; corrupted descriptions must still fail.
  • Correct existing verifier expectations for explicitly empty, null and multiline defaults. Preserve absence/empty distinctions, hanging continuation comments and exact table values. The renderer and metadata acceptance stay unchanged.
  • Cover scalar runs through the metadata constructor, including the contextual error and cause (fix: validate action metadata shape before inspecting runs (#670) #720).
  • Cover requested configuration persistence, original error identity, and disabled saving (fix: fail generation on formatting and requested save errors (#654) #718).
  • Apply the repository formatter to Action.ts and its test.

The latest two-file verifier correction is beb2180. This PR changes six files against main. #733 and #734 inherit it.

Verification

Fresh independent checkers marked both verifier findings satisfied. The new default cases fail against the prior verifier at positive verification; real generated output passes the correction under both formatting settings, and targeted stale/default/continuation mutations still fail. The focused contract run passed 174 tests. Historical scalar-runs and requested-save mutation controls fail the intended regressions.

At head beb2180abd2d9b225af0b8db0a37201c2616021a, unit/coverage CI passed 703 tests in 24 files in each named matrix lane, plus format/lint/type checks, build and docs. Both external integrations, lint, and both CodeQL analyses passed.

Runtime correction to earlier verification wording: both matrix lanes actually executed Node 24.19.0, including the lane labeled Node 26.x. The shared setup action ignores the explicit version when automatic detection succeeds. CI correction #735 now verifies the complete inherited application stack on actual Node 24.19.0 and Node 26.11.1, with 722 tests in each lane. Observed run. This PR's own earlier runs remain Node 24 evidence.

The description-verifier thread and default-verifier thread are resolved after independent checks. No generated bundles or dependency changes are committed.

Merge this foundation before #733 and #734. Follow-up to #670/#654 and reviews on #718, #720 and #729.

Summary by CodeRabbit

  • Bug Fixes
    • README usage tables now display blank description cells when input or output descriptions are omitted, empty, or null, while preserving input defaults and usage output.
  • Tests
    • Added coverage for invalid action metadata, including scalar values and nested metadata.
    • Added checks for README generation with missing descriptions and for save behavior when persistence succeeds, fails, or is disabled.

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: bitflight-devops/github-action-readme-generator/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 910d4574-fbfc-48eb-b8af-6e9b587f5c67







📥 Commits

Reviewing files that changed from the base of the PR and between 6fd3540 and 3c0a181.








📒 Files selected for processing (5)
  • __tests__/action.test.ts
  • __tests__/integration-readme-contract.test.ts
  • __tests__/save.test.ts
  • src/Action.ts
  • src/sections/update-usage.ts







Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.









Walkthrough

The changes add tests for action metadata errors and save behavior. The usage renderer now treats null or undefined input descriptions as empty strings, with integration coverage for omitted, empty, and null descriptions.

Changes

Metadata validation

Layer / File(s) Summary
Metadata validation checks
__tests__/action.test.ts, src/Action.ts
Tests check errors for scalar runs values and exact syntax error text. The valid YAML fixture and validation condition are reformatted without changing their behavior.

README descriptions

Layer / File(s) Summary
Missing description rendering
src/sections/update-usage.ts, __tests__/integration-readme-contract.test.ts
The usage renderer passes an empty string when an input description is null or undefined. The integration test checks table cells, defaults, usage comments, and surrounding README text.

Save behavior

Layer / File(s) Summary
Save behavior coverage
__tests__/save.test.ts
Tests check persisted owner and repository values, persistence error propagation and config path, and that persistence is skipped when saving is disabled.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: bitflight-devops

Merge Risk: ⚪ Minimal · up to 3c0a1

This change makes generated usage comments render a missing input description as empty text. The other changes add test coverage, and no merge-blocking risk remains.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main changes: preserving empty metadata descriptions and adding coverage for reviewed error cases.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 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.

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 93.52% 997 / 1066
🔵 Statements 93.67% 1022 / 1091
🔵 Functions 96.96% 160 / 165
🔵 Branches 87.53% 562 / 642
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/Action.ts 95.91% 93.61% 100% 95.91% 224, 251
src/sections/update-usage.ts 100% 83.33% 100% 100%
Generated in workflow #1109 for commit beb2180 by the Vitest Coverage Report Action

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 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-11T01:22:50.315119Z beb2180 New commits
ℹ️ 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: 3c0a181531

ℹ️ 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/sections/update-usage.ts

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

Fresh metadata review found no regression in the nullish-description correction, but its broader generation/verifier probes exposed two confirmed baseline mismatches for already accepted defaults. They reproduce on both main and this head. They belong to the exact-verifier boundary being corrected here; the implementation will preserve the generator and metadata policy and align only the verifier plus behavioral regression coverage.

Comment thread scripts/verify-readme-contract.mjs
Preserve absent, empty, null, and multiline default distinctions in the exact README verifier. Exercise real YAML generation under both formatting settings and require corrupted default projections to fail.
@Jamie-BitFlight
Jamie-BitFlight merged commit f8c0f4e into main Oct 11, 2026
11 checks passed
@Jamie-BitFlight
Jamie-BitFlight deleted the fix/review-followup-metadata-20261011 branch October 11, 2026 02:51
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 📦🚀

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