Skip to content

fix: load native ESM configuration and verify fresh package entry points - #733

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

Jamie-BitFlight merged 4 commits into
mainfrom
fix/review-followup-package-20261011

Conversation

@Jamie-BitFlight

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

Copy link
Copy Markdown
Contributor

Why

A fresh build of main cannot load through the public native ESM entry. Node fails during linking because nconf 0.13.0 does not provide the named Provider export. The existing bundle test could use stale output and did not establish the library contract.

Changes

  • Access the constructor through the default nconf import, preserving supplied providers and configuration precedence.
  • Build current artifacts in bounded test setup, then exercise five native subprocess cases: standalone CLI generation, missing-README failure, native SVG write failure, completed public-library import, and library rejection retaining filesystem code/path.
  • Capture every README byte synchronously immediately after native import resolves. Require that observation to match the complete validated final output.
  • Scope build cleanup to dist. Deleting out during a test-owned build demonstrably removed active coverage records and caused ENOENT.
  • Run the fresh-building package suite at the integration workflow's existing build step.

CLI fixtures contain only the binary, without adjacent dependencies. Library fixtures use the public package export and declared dependencies under native Node. Success checks metadata and exact preservation outside README markers.

Dependency and scope

Depends on #732; targets main to run the existing integration trigger. Own commit 5f92784 changes four additional files: src/inputs.ts, the package integration test, package.json and the integration workflow. Other changes are inherited from #732. Merge before #734.

Verification

Fresh main passes the isolated CLI cases but fails both native library cases at linking. The corrected build passes all five. Existing configuration tests and scoped checks pass; the old coverage cleanup reproduces ENOENT and the correction completes coverage.

The fresh review found a P3 completion-test weakness: an empty file could satisfy the original immediate assertion while a pending write finished before subprocess exit. A separate independent checker marked the corrected full-byte observation satisfied. With a controlled delay, the real writer's return→void mutation fails specifically at the new equality; the old test passes that same mutation. Correct production passes both the delayed-write control and the complete package suite. Inline correction.

At head 5f92784434cf65edc441ebf885ada07a134ffbc3, unit/coverage CI passed 706 tests in 24 files in each named lane, plus format/lint/type checks, build and docs. Both external integrations passed the fresh package suite, exact contract and convergence checks. Lint and both CodeQL analyses passed.

Actual runtime in both lanes was Node 24.19.0. The Node 26.x label is misleading because the existing setup action ignores its explicit version input. CI correction #735 now verifies the complete inherited stack on actual Node 24.19.0 and Node 26.11.1, with 722 passing tests per lane in run 38102235836. This PR's own runs remain Node 24 evidence. No registry publication/install, Windows or macOS verification is claimed.

No generated bundles or lockfile changes are committed. Follow-up to #725 and the contracts in #670/#654.

@coderabbitai

coderabbitai Bot commented Oct 11, 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 13 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: 22d94c8d-88ea-4b20-a26f-76b699f7e6ea

📥 Commits

Reviewing files that changed from the base of the PR and between 6fd3540 and 5f92784.


📒 Files selected for processing (10)
  • .github/workflows/integration-test.yml
  • __tests__/action.test.ts
  • __tests__/integration-bundled-binary.test.ts
  • __tests__/integration-readme-contract.test.ts
  • __tests__/save.test.ts
  • package.json
  • scripts/verify-readme-contract.mjs
  • src/Action.ts
  • src/inputs.ts
  • src/sections/update-usage.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.

@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/inputs.ts 93.71% 92.24% 100% 93.49% 371-376, 405-406, 727, 841, 971, 1016-1021
src/sections/update-usage.ts 100% 83.33% 100% 100%
Generated in workflow #1110 for commit 5f92784 by the Vitest Coverage Report Action

@Jamie-BitFlight
Jamie-BitFlight marked this pull request as ready for review October 11, 2026 00:34
@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:23:27.471795Z 5f92784 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.

@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 review found one confirmed, low-severity regression-coverage gap in the native-library completion test. The current production return/await chain is correct; the inline finding concerns a test that passes when that contract is deliberately broken. No additional runtime defect was established in the package/configuration change.

Comment thread __tests__/integration-bundled-binary.test.ts Outdated
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.
Access nconf through its native default export and preserve configuration precedence. Build before native CLI and library contract tests, retain active coverage output, and run the fresh package suite before external integrations.

Capture the complete README when native import resolves so a pending write cannot pass the completion assertion by finishing during process shutdown.
@Jamie-BitFlight
Jamie-BitFlight force-pushed the fix/review-followup-package-20261011 branch from ae78e43 to 5f92784 Compare October 11, 2026 01:20
@Jamie-BitFlight
Jamie-BitFlight merged commit 55746ed into main Oct 11, 2026
11 checks passed
@Jamie-BitFlight
Jamie-BitFlight deleted the fix/review-followup-package-20261011 branch October 11, 2026 02:52
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