Skip to content

fix: address outstanding Codex review findings#14

Merged
BenKalsky merged 3 commits into
mainfrom
fix/codex-review-findings
Jul 2, 2026
Merged

fix: address outstanding Codex review findings#14
BenKalsky merged 3 commits into
mainfrom
fix/codex-review-findings

Conversation

@BenKalsky

Copy link
Copy Markdown
Member

Why

A sweep of all Codex review comments across the repo's PR history found five findings never addressed (the peer-range finding from #11 was already fixed when 0.2.0 bumped it).

Changes

Codex finding Fix
P2 (#12): SumitChargeMode advertised in the 0.2.0 changelog but never re-exported from the ./next barrel Added to the barrel's type exports; verified it lands in dist/next/index.d.ts.
P2 (#12): unknown mode (e.g. "oneoff" from a JS consumer) resolves DEFAULT_PATHS[mode] to undefined → requests go to https://api.sumit.co.ilundefined createSumitChargeRoute validates mode and throws a clear configuration error at creation time. Test added.
P1 (#4): publish workflow checks out sumit-api at an unpinned ref Sibling checkout removed entirely — the dependency installs from npm since #13.
P2 (#4): workflow_dispatch can publish from any branch Both publish jobs now run only on main.
P1 (#7): GitHub Packages workflow sets registry-url: npm.pkg.github.com before install, so public deps (react, vitest…) resolve against the wrong registry Install resolves from npmjs; the publish step configures the GitHub Packages registry and auth itself (as it already did).

Verification

pnpm typecheck clean, pnpm test 32/32 (new invalid-mode test), pnpm build green, SumitChargeMode present in the built d.ts.

🤖 Generated with Claude Code

BenKalsky and others added 2 commits July 3, 2026 01:49
Codex findings on #12: the 0.2.0 changelog advertised the
SumitChargeMode type export but the ./next barrel never re-exported
it, and an unknown mode from an untyped consumer resolved
DEFAULT_PATHS[mode] to undefined, sending requests to
https://api.sumit.co.ilundefined. Export the type and fail fast with
a clear configuration error.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codex findings on #4 and #7: workflow_dispatch could publish from any
ref (now main-only), the sumit-api sibling checkout was unpinned and
is now unnecessary (the dependency installs from npm), and the GitHub
Packages workflow pointed installs at npm.pkg.github.com where public
packages don't resolve — the publish step configures that registry
and its auth itself.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@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: 1cb5fc0248

ℹ️ 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/next/createChargeRoute.ts Outdated
Codex follow-up on the new mode guard: `in` walks the prototype chain,
so mode: "toString" passed validation and resolved DEFAULT_PATHS to an
inherited function. Compare against the two known modes explicitly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@BenKalsky BenKalsky merged commit de2dee0 into main Jul 2, 2026
5 checks passed
@BenKalsky BenKalsky deleted the fix/codex-review-findings branch July 2, 2026 22:55
@BenKalsky BenKalsky mentioned this pull request Jul 2, 2026
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