Skip to content

Audit SDK against official Nequi specs: crash fixes, spec alignment, gift codes module - #8

Merged
pulgueta merged 12 commits into
mainfrom
pulgueta/update
Jul 8, 2026
Merged

Audit SDK against official Nequi specs: crash fixes, spec alignment, gift codes module#8
pulgueta merged 12 commits into
mainfrom
pulgueta/update

Conversation

@pulgueta

@pulgueta pulgueta commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

Full audit of the SDK against the official Nequi API documentation and Swagger specs, fixing crash bugs, contract violations, and spec drift, plus a new Códigos Plata module.

Crash & contract fixes

  • qr.createQR() crashed on every call (ReferenceError: URLS is not defined)
  • Auth failures threw instead of returning the [error, data] tuple, rejecting the promise in consumer apps
  • HTTP 200 responses with a failed body (ResponseHeader.Status.StatusCode !== "0") were returned as success — failed payments looked successful; now surfaced as api_error with apiStatusCode and the raw body
  • OAuth token is now cached and refreshed 60s before expiry with a shared in-flight request (previously every SDK call hit the OAuth endpoint; concurrent calls stampeded it)
  • Per-request timeouts via AbortSignal.timeout (configurable timeoutMs, default 30s)
  • MessageID now matches the per-API spec format (10-char alphanumeric / 16-digit numeric) instead of a 36-char UUID
  • Constructor validates credentials and env; an invalid env now throws instead of silently routing to production
  • Real HTTP statuses preserved on errors (429 stays 429), 401 → authentication_error, 429 → rate_limit_exceeded
  • token_type no longer over-strict "Bearer" literal; expires_in NaN guard; caller headers normalized so SDK auth headers can't be overridden; NequiError.toJSON() and cross-realm-safe isNequiError

Spec alignment

  • Dispersions: added optional documentType/documentNumber; reference1-3 required (max 45) per spec
  • Subscriptions: added missing cancelSubscription(); removed orphan STATUS_PAYMENT endpoint (not in the spec)
  • Push payments: reversal type narrowed to documented literal "payment"; exported PAYMENT_STATUS constants
  • Reports: format accepts any casing and normalizes
  • Response schemas tolerate documented "reversionRS": "" shape; all methods return typed responses instead of unknown

New

  • nequi.giftCodes (Códigos Plata): generateCode() and reverseRedemption(). Note: the official doc's Destination examples are placeholders (ExampleService/test); values are derived from the endpoint path convention and should be confirmed against the sandbox.

Tooling

  • Repaired the dead typecheck gate (TS6 baseUrl deprecation + missing types: ["node"]) and gated build on tsc --noEmit — this is why the URLS crash shipped
  • tsup now emits ESM + CJS with bundled type declarations; exports map updated; engines: node >=20; explicit node:crypto imports

Breaking changes (semver note)

  • Dispersion reference1-3 now required
  • Push reversal type must be "payment"
  • validation_error reports status 422 (was 403)

Test plan

  • pnpm typecheck and pnpm build pass (ESM, CJS, DTS)
  • Runtime smoke: all failure paths resolve to [NequiError, null] tuples (validation, bad credentials against live sandbox, timeouts) — nothing throws
  • 8 concurrent requests trigger exactly 1 OAuth call; token reused afterwards
  • HTTP-200-with-error body surfaces api_error with domain code
  • CJS require() smoke test
  • Sandbox smoke test with real credentials (esp. gift codes Destination values and getSubscription operation casing)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added subscription cancellation and gift code support to the server SDK.
    • Expanded Turborepo monorepo guidance with new skills and reference docs (setup, caching, CI, filtering, watch, environment, and boundaries).
  • Bug Fixes
    • Improved authentication and error handling (including timeout detection and richer diagnostics).
    • Tightened/clarified request/response validation for real-world API payloads.
  • Documentation
    • Added comprehensive Turborepo best-practices and gotchas/reference pages.
  • Chores
    • Updated tooling and CI to use pnpm/Node 24; refreshed build/lint configuration.

pulgueta and others added 7 commits July 7, 2026 20:50
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 806578a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cursor

cursor Bot commented Jul 8, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nequi-node Ready Ready Preview, Comment Jul 8, 2026 4:50am

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds extensive Turborepo skill/reference documentation, migrates the toolchain from Bun to pnpm with updated package and CI settings, and expands the Nequi server SDK with gift codes, subscription cancellation, revised error handling, and updated schemas and typed service wiring.

Changes

Turborepo Skill Documentation

Layer / File(s) Summary
Skill entrypoints
.agents/skills/turborepo/SKILL.md, .agents/skills/turborepo/command/turborepo.md
Adds the main Turborepo skill guidance and the agent command workflow entrypoint.
Best-practices references
.agents/skills/turborepo/references/best-practices/*
Adds repository, package, dependency, and structure guidance for Turborepo monorepos.
CLI, caching, CI, and configuration references
.agents/skills/turborepo/references/{cli,caching,ci,configuration}/*
Adds Turborepo command, caching, CI, task, and configuration reference pages.
Environment, filtering, and watch references
.agents/skills/turborepo/references/{environment,filtering,watch}/*, .claude/skills/turborepo, skills-lock.json
Adds environment, filter, and watch references plus the Claude symlink and locked skill manifest.

Tooling Migration and Build Config

Layer / File(s) Summary
Root toolchain updates
package.json, biome.json, pnpm-workspace.yaml
Moves the repo to pnpm and Node 24, updates dependencies, and adjusts workspace and Biome configuration.
Server package build settings
packages/server/package.json, packages/server/tsconfig.json, packages/server/tsup.config.ts
Updates the server package exports, engines, TypeScript settings, and dual-format build output.
GitHub Actions migration
.github/setup/action.yaml, .github/workflows/biome.yaml, .github/workflows/release.yaml
Switches setup and workflows from Bun commands to pnpm and Node 24.

Server SDK Feature and Error Handling

Layer / File(s) Summary
Error types and NequiError
packages/server/src/error/{index,types}.ts
Adds new error codes and extends NequiError with raw payload and API status metadata.
Auth and client request flow
packages/server/src/auth/index.ts, packages/server/src/nequi.ts
Adds abort support, token caching, timeout handling, and richer request/error mapping.
Constants and message IDs
packages/server/src/constants/index.ts, packages/server/src/utils/builders.ts
Adds new endpoints, payment status constants, and configurable request message IDs.
Gift codes feature
packages/server/src/giftcodes/index.ts, packages/server/src/schemas/{giftcodes,index}.ts, packages/server/src/nequi.ts
Adds the GiftCodes service and its schemas, then wires it into the client and exports.
Subscription cancellation
packages/server/src/subscriptions/index.ts, packages/server/src/schemas/subscriptions.ts
Adds cancel-subscription schemas and the new cancellation method.
Schema validation updates
packages/server/src/schemas/{auth,common,dispersions,payments,qr,reports,subscriptions}.ts
Adjusts request/response validation and adds new exported response types.
Typed service wiring
packages/server/src/{dispersions,payments,qr,reports,subscriptions}/index.ts, packages/server/src/index.ts
Threads typed response generics through SDK methods and expands public exports.
Server README updates
packages/server/README.md
Documents the new timeout, gift code, subscription, dispersion, payment status, and error behaviors.

Estimated code review effort: 4 (Complex) | ~50 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant Nequi
  participant nequiAuth
  participant Nequi API

  Caller->>Nequi: post/get/auth call
  Nequi->>Nequi: check cached token
  alt token missing or expiring
    Nequi->>nequiAuth: fetch token with AbortSignal
    nequiAuth->>Nequi API: auth request
    Nequi API-->>nequiAuth: token or error
    nequiAuth-->>Nequi: token or NequiError
  end
  Nequi->>Nequi API: request with headers and timeout
  alt non-2xx or embedded API failure
    Nequi API-->>Nequi: error body / status payload
    Nequi-->>Caller: mapped NequiError
  else success
    Nequi API-->>Nequi: response body
    Nequi-->>Caller: typed response
  end
Loading

Poem

A rabbit hopped through docs all day,
Then pnpm led the build away 🥕
Gift codes twinkled, tokens stayed warm,
Errors got sharper, timeouts took form,
Cancel and cache now hop in tune,
Hooray for this tidy Turborepo moon 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the PR’s main work: spec audit, crash fixes, schema alignment, and the new gift codes module.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@pulgueta

pulgueta commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review for security regressions

@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: 60325b59dc

ℹ️ 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 package.json Outdated
"node": ">=24"
},
"packageManager": "bun@1.3.6"
"packageManager": "pnpm@11.10.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep release installs on the committed pnpm lockfile

This switches the repo to pnpm@11.10.0 and replaces bun.lock with pnpm-lock.yaml, but the release path I inspected still runs .github/setup/action.yamlbun install --frozen-lockfile and .github/workflows/release.yamlbun run build. bun install --help describes --frozen-lockfile as only “Disallow changes to lockfile”, and Bun does not consume the new pnpm lockfile, so the privileged npm release job would either fail without bun.lock or resolve dependency ranges outside the reviewed lockfile while NPM_TOKEN is present. Update the setup/release workflow to use pnpm with pnpm-lock.yaml, or keep a Bun lockfile if Bun remains the release installer.

Useful? React with 👍 / 👎.

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

Actionable comments posted: 18

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/turborepo/references/best-practices/dependencies.md:
- Around line 147-158: The pnpm Catalogs example in the dependencies guide is
inconsistent with the documented pnpm version requirement. Update the guidance
around the “Option 3: pnpm Catalogs” section so it matches the version implied
by the example: either raise the documented minimum pnpm version used by the
guide or remove this catalog example entirely. Make sure the references to
packageManager and the pnpm catalogs subsection are aligned.

In @.agents/skills/turborepo/references/best-practices/packages.md:
- Around line 56-58: The package export for the button entry is pointing `types`
at the source `./src/button.tsx` instead of the emitted declaration file. Update
the export map in the package metadata so the `button` entry uses the generated
`.d.ts` under `dist/`, matching the compiled runtime path and keeping the
`types` field aligned with the build output.

In @.agents/skills/turborepo/references/best-practices/RULE.md:
- Around line 95-97: The package export for the button entrypoint points types
to the source TSX file instead of the emitted declarations. Update the export
map in the relevant package config so the button entry uses the compiled
declaration file path, and make sure the `types` field for `./button` matches
the built output alongside `default` from `button.js`.

In @.agents/skills/turborepo/references/caching/remote-cache.md:
- Around line 39-47: Update the GitHub Actions CI example in the remote-cache
guide so the Build step uses the full turbo command form instead of the
shorthand. In the example under the Build step, replace the `npx turbo build`
usage with `npx turbo run build`, keeping the existing `env` variables
unchanged. Use the `Build` snippet in the markdown as the target location.

In @.agents/skills/turborepo/references/caching/RULE.md:
- Around line 148-153: The Key Points section in RULE.md is too broad about
caching behavior and should be tightened to refer only to restored file
artifacts. Update the wording in the outputs-related bullets so it clearly
states that outputs controls file artifacts restored on a cache hit, while logs
are still cached/replayed, and replace “cache nothing” with “do not restore file
artifacts” in the task wording.
- Around line 19-22: The caching rule is using the wrong configuration key for
file globs; `global.env` should only be used for environment variables, while
file-based inputs must go under `global.inputs` when
`futureFlags.globalConfiguration` is enabled. Update the guidance in RULE.md to
reference `global.inputs` for lockfiles and other file globs, and keep
`global.env` only for env-var keys, using the Turbo configuration symbols
`globalDependencies`, `globalEnv`, `global.inputs`, and `globalConfiguration` to
place the terminology correctly.

In @.agents/skills/turborepo/references/ci/github-actions.md:
- Around line 109-115: The cache key in the GitHub Actions example is
npm-specific because it only hashes package-lock.json, so update the turborepo
cache example to either clearly scope it to npm in the surrounding guidance or
include the appropriate lockfiles for other package managers such as
pnpm-lock.yaml and yarn.lock. Use the actions/cache@v4 example around the .turbo
cache and the turbo-${{ runner.os }}-${{ hashFiles(...) }} key to make the
lockfile coverage match the package manager being documented.

In @.agents/skills/turborepo/references/cli/commands.md:
- Around line 137-146: Update the `--output-logs` CLI reference to include the
missing `hash-only` option so it matches the task configuration docs. In the
`--output-logs` section of the command reference, add `hash-only` alongside the
existing values (`full`, `new-only`, `errors-only`, `none`) and keep the
description aligned with the behavior documented for this flag.
- Around line 116-125: The `--graph` CLI documentation still shows the
deprecated JSON output example, which conflicts with the current supported
formats. Update the `turbo build --graph` examples in this section to remove the
`graph.json` case and keep only the non-deprecated outputs referenced by the
docs, such as `.svg`, `.html`, `.mermaid`, and `.dot`, so the examples match the
behavior described for `--graph`.

In @.agents/skills/turborepo/references/cli/RULE.md:
- Around line 17-29: The CLI guidance is inconsistent: the top rule says
committed examples must use turbo run, but the quick-reference examples still
show turbo shorthand like turbo build and turbo test. Update the examples in the
RULE.md guidance to use turbo run for committed/static contexts, or adjust the
rule wording so it matches the examples; keep the references under the turbo run
and quick-reference sections aligned.

In @.agents/skills/turborepo/references/configuration/RULE.md:
- Around line 9-17: The tree example in the RULE.md guidance is using an
unlabeled fenced block, which triggers markdownlint MD040. Update the example
fence to include a language tag such as text so the snippet remains rendered
correctly while satisfying linting; this applies to the tree example under the
configuration section.

In @.agents/skills/turborepo/references/filtering/patterns.md:
- Around line 106-112: The “Complex Combinations” example in the filtering
patterns guide is too broad because `--filter=./apps/*` expands the run set to
every app instead of only changed apps plus dependents. Update the example under
that heading to use a change-based filter pattern that preserves the intended
behavior, and keep the guidance aligned with `turbo run build` and the
surrounding `--filter=...[HEAD^1]` example.
- Around line 142-146: The deploy example is using two filters, and the
`./apps/*` pattern makes it run against every app instead of only changed apps.
Update the example in the filtering patterns doc so the `turbo run deploy`
command uses only the changed-apps filter (`[main...HEAD]`) and remove the broad
`./apps/*` selector; keep the example aligned with the intent of deploying only
affected apps.

In `@package.json`:
- Around line 15-35: Update the CI setup and workflow commands to match the PNPM
migration: the current Bun-based steps in the setup action and Biome workflow
are still using bun install and bun run, which no longer align with the repo’s
packageManager setting. Replace the Bun installation/setup with PNPM setup, and
switch the affected commands to pnpm install and pnpm run in the relevant
workflow/action definitions so CI uses the same package manager as the project.

In `@packages/server/package.json`:
- Around line 43-45: The server package’s Node engine and type definitions are
out of sync: `engines.node` is pinned to `>=20` while the `@types/node`
dependency is on a Node 24 major. Update the server package’s type dependency to
match the declared runtime target, or otherwise ensure no Node 24-only APIs are
referenced from the server code; use the `@types/node` entry in the package
manifest to keep the types aligned with `engines.node`.

In `@packages/server/src/schemas/dispersions.ts`:
- Around line 6-17: Update DisperseFundsRQSchema in dispersions.ts to validate
the document fields together: add min(1) to documentNumber so empty strings are
rejected, and add a cross-field refine on the schema to ensure documentType and
documentNumber are either both present or both omitted. Keep the change anchored
in DisperseFundsRQSchema and DocumentTypeSchema so the pairing rule is enforced
consistently with the other required fields.

In `@packages/server/tsconfig.json`:
- Around line 19-20: The tsconfig entry with ignoreDeprecations is currently
silencing all TypeScript 6.0 deprecation warnings without context. Update the
packages/server tsconfig.json config near the existing types and
ignoreDeprecations settings to add a clear comment explaining which deprecated
compiler options are being temporarily ignored and that they should be removed
later. Keep the change scoped to the TypeScript config so future cleanup can
identify the reason quickly.

In `@pnpm-workspace.yaml`:
- Around line 1-6: The workspace patterns are duplicated between
pnpm-workspace.yaml and the root package.json workspaces field, which can drift
over time. Keep pnpm-workspace.yaml as the source of truth and remove the
redundant workspaces array from package.json so there is only one place to
maintain the workspace definition.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 20aba55e-423b-4c91-af60-0375893a496d

📥 Commits

Reviewing files that changed from the base of the PR and between 7288554 and 60325b5.

⛔ Files ignored due to path filters (2)
  • bun.lock is excluded by !**/*.lock
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (57)
  • .agents/skills/turborepo/SKILL.md
  • .agents/skills/turborepo/command/turborepo.md
  • .agents/skills/turborepo/references/best-practices/RULE.md
  • .agents/skills/turborepo/references/best-practices/dependencies.md
  • .agents/skills/turborepo/references/best-practices/packages.md
  • .agents/skills/turborepo/references/best-practices/structure.md
  • .agents/skills/turborepo/references/boundaries/RULE.md
  • .agents/skills/turborepo/references/caching/RULE.md
  • .agents/skills/turborepo/references/caching/gotchas.md
  • .agents/skills/turborepo/references/caching/remote-cache.md
  • .agents/skills/turborepo/references/ci/RULE.md
  • .agents/skills/turborepo/references/ci/github-actions.md
  • .agents/skills/turborepo/references/ci/patterns.md
  • .agents/skills/turborepo/references/ci/vercel.md
  • .agents/skills/turborepo/references/cli/RULE.md
  • .agents/skills/turborepo/references/cli/commands.md
  • .agents/skills/turborepo/references/configuration/RULE.md
  • .agents/skills/turborepo/references/configuration/global-options.md
  • .agents/skills/turborepo/references/configuration/gotchas.md
  • .agents/skills/turborepo/references/configuration/tasks.md
  • .agents/skills/turborepo/references/environment/RULE.md
  • .agents/skills/turborepo/references/environment/gotchas.md
  • .agents/skills/turborepo/references/environment/modes.md
  • .agents/skills/turborepo/references/filtering/RULE.md
  • .agents/skills/turborepo/references/filtering/patterns.md
  • .agents/skills/turborepo/references/watch/RULE.md
  • .claude/skills/turborepo
  • biome.json
  • package.json
  • packages/server/README.md
  • packages/server/package.json
  • packages/server/src/auth/index.ts
  • packages/server/src/constants/index.ts
  • packages/server/src/dispersions/index.ts
  • packages/server/src/error/index.ts
  • packages/server/src/error/types.ts
  • packages/server/src/giftcodes/index.ts
  • packages/server/src/index.ts
  • packages/server/src/nequi.ts
  • packages/server/src/payments/index.ts
  • packages/server/src/qr/index.ts
  • packages/server/src/reports/index.ts
  • packages/server/src/schemas/auth.ts
  • packages/server/src/schemas/common.ts
  • packages/server/src/schemas/dispersions.ts
  • packages/server/src/schemas/giftcodes.ts
  • packages/server/src/schemas/index.ts
  • packages/server/src/schemas/payments.ts
  • packages/server/src/schemas/qr.ts
  • packages/server/src/schemas/reports.ts
  • packages/server/src/schemas/subscriptions.ts
  • packages/server/src/subscriptions/index.ts
  • packages/server/src/utils/builders.ts
  • packages/server/tsconfig.json
  • packages/server/tsup.config.ts
  • pnpm-workspace.yaml
  • skills-lock.json

Comment thread .agents/skills/turborepo/references/best-practices/dependencies.md
Comment thread .agents/skills/turborepo/references/best-practices/packages.md
Comment thread .agents/skills/turborepo/references/best-practices/RULE.md
Comment thread .agents/skills/turborepo/references/caching/remote-cache.md
Comment thread .agents/skills/turborepo/references/caching/RULE.md
Comment thread package.json Outdated
Comment thread packages/server/package.json
Comment thread packages/server/src/schemas/dispersions.ts Outdated
Comment thread packages/server/tsconfig.json
Comment thread pnpm-workspace.yaml
pulgueta and others added 5 commits July 7, 2026 23:47
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ersions

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 8, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/biome.yaml:
- Around line 16-18: The workflow still references mutable GitHub Action tags,
so update the action references in the Biome workflow to full commit SHAs
instead of versions for actions/checkout, pnpm/action-setup, actions/setup-node,
and cycjimmy/semantic-release-action. Keep the current version as a comment next
to each pinned SHA so the workflow remains readable, and ensure the replacement
is done consistently wherever these action names appear in the repo.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4b066cfd-c82a-454f-b524-252356457cba

📥 Commits

Reviewing files that changed from the base of the PR and between 60325b5 and 806578a.

⛔ Files ignored due to path filters (1)
  • apps/docs/public/favicon.svg is excluded by !**/*.svg
📒 Files selected for processing (9)
  • .github/setup/action.yaml
  • .github/workflows/biome.yaml
  • .github/workflows/release.yaml
  • apps/docs/src/layouts/Layout.astro
  • package.json
  • packages/server/package.json
  • packages/server/src/error/index.ts
  • packages/server/src/schemas/dispersions.ts
  • packages/server/tsconfig.json

Comment on lines +16 to 18
uses: actions/checkout@v6
with:
fetch-depth: 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Pin GitHub Actions to commit SHAs for supply-chain security.

zizmor flagged actions/checkout@v6 as an unpinned action reference (error-level, required by blanket policy). This applies to all actions across the repo (pnpm/action-setup@v5, actions/setup-node@v6, cycjimmy/semantic-release-action@v4). Tag-pinned actions are mutable and vulnerable to tag reassignment attacks. Consider pinning to full commit SHAs with the version in a comment.

🔒 Example SHA-pinned action reference
-        uses: actions/checkout@v6
+        uses: actions/checkout@<full-sha> # v6
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 15-18: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 16-16: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/biome.yaml around lines 16 - 18, The workflow still
references mutable GitHub Action tags, so update the action references in the
Biome workflow to full commit SHAs instead of versions for actions/checkout,
pnpm/action-setup, actions/setup-node, and cycjimmy/semantic-release-action.
Keep the current version as a comment next to each pinned SHA so the workflow
remains readable, and ensure the replacement is done consistently wherever these
action names appear in the repo.

Source: Linters/SAST tools

@pulgueta
pulgueta merged commit eaae328 into main Jul 8, 2026
5 checks passed

@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: 806578a00e

ℹ️ 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".

this.clientId,
this.clientSecret,
this.authUri,
AbortSignal.timeout(this.timeoutMs),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate timeoutMs before constructing abort signals

When timeoutMs is supplied from JavaScript/config as a string, NaN, a fractional/negative number, or a value above Node's delay limit, AbortSignal.timeout throws synchronously here before nequiAuth runs and before request()'s try/catch can convert failures into the [NequiError, null] tuple. Validate/coerce this public option in the constructor or wrap this call so a timeout misconfiguration follows the SDK's tuple error contract instead of rejecting the first SDK method call.

Useful? React with 👍 / 👎.

"exports": {
".": {
"import": "./dist/index.js"
"types": "./dist/index.d.ts",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Route require consumers to CJS declarations

For TypeScript consumers using the new CJS entry point with .cts/import = require() under moduleResolution: node16 or nodenext, this top-level types condition is selected before require, so the package resolves to the ESM dist/index.d.ts while runtime resolves to dist/index.cjs; TypeScript then reports that the module only resolves to ESM and cannot be imported with require. Split the export into nested import/require branches with a CJS declaration such as dist/index.d.cts for the require branch.

Useful? React with 👍 / 👎.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.7.0 🎉

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant