Skip to content

feat!: deterministic bindings via @juspay/rescript-bindgen + 1:1 versioning#74

Merged
jagguji merged 3 commits into
mainfrom
feat/bindgen-deterministic-sync
Jun 16, 2026
Merged

feat!: deterministic bindings via @juspay/rescript-bindgen + 1:1 versioning#74
jagguji merged 3 commits into
mainfrom
feat/bindgen-deterministic-sync

Conversation

@jagguji

@jagguji jagguji commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Replaces the LLM-based binding generator (@juspay/neurolink + LiteLLM, kimi-latest) with a direct, deterministic call to the @juspay/rescript-bindgen CLI. Same blend version → byte-identical bindings, no secrets, no network model calls. Also switches to 1:1 versioning with @juspay/blend-design-system.

This is the one-time migration PR (regenerated src/ against blend 0.0.36). New blend releases are picked up automatically afterwards.

What changed

  • scripts/generate.mjs — thin wrapper that runs the bindgen CLI directly (--pkg/--out/--project/--webapi/--report/--clean), formats output, writes src/_REPORT.md, and fails if any component is broken. Removes generate-bindings.mjs, bindings-instructions.md, known-errors.md.
  • package.json — drops @juspay/neurolink, dotenv, undici, semantic-release + @semantic-release/* and the release block; adds @juspay/rescript-bindgen; moves @juspay/blend-design-system to a peer dependency; version → 0.0.36 (1:1).
  • src/ — regenerated wholesale: 153 .res files, 94/94 usable, 0 broken (1 loose: DataTable's 3 generic props (ColumnDefinition<T>[], keyof T, (keyof T)[]) widened to string with inline // ⚪ loose markers).
  • Workflowssync-bindings.yml: daily npm poll for new stable blend + manual dispatch, deterministic regen, 1:1 version, no LLM secrets. release.yml: publishes the package.json version (skip-if-already-published), no semantic-release. ci.yml: drops the dead .failed.res gate. Deletes release-mirror.yml.
  • Docs — README / CONTRIBUTING / PROJECT_UNDERSTANDING / GITHUB_WORKFLOWS / CHANGELOG + PR/issue templates updated.

Verified locally

  • npm run build ✅ (280 modules) · npm run format:check
  • Determinism ✅ — two npm run generate runs produce byte-identical src/
  • All 3 workflows parse as valid YAML · npm pack clean (158 files, .res + config only)

⚠️ Versioning note

Version goes 1.0.2 → 0.0.36 (1:1 with blend). On publish, npm moves the latest dist-tag down to 0.0.36; existing consumers on a ^1.0.0 range stay on 1.0.2 and won't auto-upgrade. Consider npm deprecate-ing the 1.x line after the first publish.

⚠️ Breaking — consumer migration

Binding surface changes (record-props + shared *Types/CommonTypes/HtmlAttrs modules). A separate juspay-portal branch must update call sites; coordinate after merge.

🤖 Generated with Claude Code

…ioning

Replace the LLM-based binding generator (@juspay/neurolink + LiteLLM) with a
direct, deterministic call to the @juspay/rescript-bindgen CLI. Same blend
version now produces byte-identical bindings, with no secrets or network model
calls.

- scripts/generate.mjs: thin wrapper around the rescript-bindgen CLI
  (--pkg/--out/--project/--webapi/--report/--clean); formats output, writes
  src/_REPORT.md, fails if any component is broken. Removes generate-bindings.mjs,
  bindings-instructions.md, known-errors.md.
- package.json: drop @juspay/neurolink, dotenv, undici, semantic-release +
  @semantic-release/* and the release block; add @juspay/rescript-bindgen; move
  @juspay/blend-design-system to a peer dependency; version -> 0.0.36 (1:1).
- src/: regenerated wholesale against blend 0.0.36 (94/94 usable, 0 broken).
- workflows: sync-bindings polls npm daily for new stable blend + manual dispatch,
  deterministic regen, 1:1 version, no LLM secrets; release publishes the
  package.json version (skip-if-published), no semantic-release; ci drops the dead
  .failed.res gate; delete release-mirror.
- docs: README/CONTRIBUTING/PROJECT_UNDERSTANDING/GITHUB_WORKFLOWS/CHANGELOG and
  PR/issue templates updated for the deterministic flow + 1:1 versioning.

BREAKING CHANGE: binding surface changes (record-props + shared *Types modules);
version scheme switches to 1:1 with @juspay/blend-design-system.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jagguji and others added 2 commits June 16, 2026 16:24
Convenience/transparency escape hatch that shells the @juspay/rescript-bindgen
CLI directly (binds the locally-pinned blend via --node-modules/--no-install, no
network). Unlike `npm run generate` it skips formatting and the broken gate.
Documented in CONTRIBUTING.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Addresses review of #74:
- release.yml: gate each registry against its OWN published state (npm and
  GitHub Packages independently) so a failure on one no longer permanently
  skips the other on later runs.
- release.yml: tag AFTER a successful npm publish and tolerate an existing tag,
  removing the idempotency trap where a pushed tag broke all re-runs.
- release.yml: standardize actions to checkout@v6 / setup-node@v6 (match ci.yml).
- generate.mjs: when the target version equals the installed blend, bind offline
  via --node-modules/--no-install (parity with generate:raw; no needless network).
- sync-bindings.yml: drop redundant src/_REPORT.md from add-paths (covered by src/**).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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