chore: upgrade Adamantite to 0.37.0 and update CI - #148
Conversation
There was a problem hiding this comment.
Important
Dropping the codegen pre-step from check is a reproducible regression, and the stated rationale does not hold. On a fresh checkout of this branch, bun run check exits 1 with 95 errors; after bun run codegen it reports 0. CI is unaffected, so this is local-workflow only — but it needs a decision before merge.
Reviewed changes — full diff of the single commit 76052a65, plus empirical verification of the CI action bumps, the check script change, and the env.generated.ts regeneration.
adamantite0.35.0→0.36.0— version bump inpackage.jsonandbun.lock.bun install --frozen-lockfilesucceeds; the incidentaleslint-scope/estraversere-hoisting in the lockfile keeps every consumer's range satisfied.- CI action majors —
actions/checkout@v5→v7,actions/setup-node@v6→v7,actions/cache@v5→v6in.github/workflows/adamantite.yml. All three tags exist, and none of the majors removes, renames, or redefaults an input this workflow uses. .nvmrc→.node-version— pure rename with no content change, andadamantite.ymlswitches fromnode-version: "24"tonode-version-file.setup-nodestrips the leadingv, so the file'sv24resolves correctly.checkscript —bun run codegen &&removed from thecheckcommand.apps/api/src/shared/env.generated.ts— five fields reordered insideCoercedEnvSchemaandPublicCoercedEnvSchema.
⚠️ tests.yml still hardcodes the Node version, so the two workflows can now drift
.github/workflows/tests.yml was not brought along: it keeps actions/checkout@v5, actions/setup-node@v6, and a literal node-version: "24" in both of its jobs. .node-version is therefore the source of truth for one of two workflows, and the next Node bump will silently desync tests from adamantite unless someone remembers to edit two places.
Technical details
# Extend the `.node-version` migration to `tests.yml`
## Affected sites
- `.github/workflows/tests.yml:22` — `node-version: "24"` in the `environment` job, not reading `.node-version`
- `.github/workflows/tests.yml:47` — `node-version: "24"` in the `unit` job, same problem
- `.github/workflows/tests.yml:17`, `:42` — still `actions/checkout@v5`
- `.github/workflows/tests.yml:20`, `:45` — still `actions/setup-node@v6`
## Required outcome
- A Node version bump requires editing exactly one file. Both workflows resolve Node from the same declaration.
- Action pins are consistent across workflows, or the divergence is deliberate and stated.
## Open questions for the human
- Was `tests.yml` left out deliberately (e.g. a follow-up PR), or is this an oversight? If deliberate, no change needed here.ℹ️ The env.generated.ts reorder is unstable varlock churn, not adamantite@0.36.0 output
The PR body attributes the field reordering to adamantite@0.36.0, but adamantite does not generate these files — varlock codegen does, and its key ordering is not stable across runs. Running bun run codegen on a clean runner produced a third ordering for this same file, matching neither main nor this branch, and additionally dirtied apps/app/src/shared/env.generated.ts and packages/observability/src/env.generated.ts.
There is no correctness impact: the key sets are identical in every ordering and PublicCoercedEnvSchema is a Pick<>, which is order-insensitive. The concern is that the commit message records a cause that isn't real, and this churn will resurface in the next unrelated PR.
Technical details
# `env.generated.ts` reorder is nondeterministic codegen churn
## Affected sites
- `apps/api/src/shared/env.generated.ts:143-266` — reordered fields committed as if they were a deterministic 0.36.0 output
- PR description — attributes the reorder to `adamantite@0.36.0`
## Evidence
On this branch, after `bun install --frozen-lockfile`, running `bun run codegen` leaves three tracked files modified:
```
M apps/api/src/shared/env.generated.ts
M apps/app/src/shared/env.generated.ts
M packages/observability/src/env.generated.ts
```
The `apps/api` re-run moves `EMAIL_FROM`, `MOCK_RESEND`, `RESEND_API_KEY`, `SENTRY_DSN`, and the `INNGEST_*` group into yet another arrangement, so the ordering committed here is not reproducible.
## Required outcome
- The PR description no longer claims `adamantite@0.36.0` produced this ordering.
- Either drop the file from this PR to keep the chore focused, or keep it and accept that it is unrelated churn.
## Open questions for the human
- Is the unstable `varlock` key ordering worth an upstream fix or a post-codegen sort? It repeatedly pollutes unrelated diffs and is the third time it has surfaced.Claude Opus | 𝕏
| "build": "turbo build", | ||
| "bump:deps": "bun update --interactive --recursive", | ||
| "check": "bun run codegen && adamantite check", | ||
| "check": "adamantite check", |
There was a problem hiding this comment.
Verified on a fresh checkout of this branch: bun run check exits 1 with Found 0 warnings and 95 errors; after bun run codegen it reports 0 errors. The generated src/shared/internationalization/ output is imported by 28 files and can never exist in a clean clone — paraglide writes a .gitignore containing * into each output dir. CI is safe because adamantite.yml:60 runs codegen separately, but AGENTS.md:42 tells contributors and agents to run bun run check with no stated prerequisite.
Technical details
# `bun run check` no longer generates the files it type-checks
## Affected sites
- `package.json:17` — `"check": "adamantite check"`, pre-step removed
- `AGENTS.md:42` — "Run `bun run check` to catch lint and type issues", states no codegen prerequisite
## Evidence
Fresh checkout of `76052a6`, after `bun install --frozen-lockfile`:
```
$ bun run check
Found 0 warnings and 95 errors. # exit 1
$ bun run codegen && bun run check
Found 0 warnings and 0 errors. # exit 0
```
All 95 errors are `TS2307 Cannot find module '#shared/internationalization/{messages,runtime}.js'` plus cascading `typescript(no-unsafe-call|no-unsafe-return|no-unsafe-argument)` on the resulting `error` type. `codegen:i18n` writes that directory via `paraglide-js compile --outdir ./src/shared/internationalization`, and `git check-ignore -v` confirms each output dir carries a self-ignoring `.gitignore` with `*`.
## Required outcome
- `bun run check` either produces what it needs, or fails with a message that names the missing prerequisite instead of 95 module-resolution errors.
- If the prerequisite stays out of band, `AGENTS.md` states it, so an agent or contributor is not left debugging phantom type errors.
## Open questions for the human
- Removing the pre-step is defensible on its own merits: a command named `check` mutating tracked `env.generated.ts` as a side effect is a real wart, and `docs/getting-started.md:68` already makes `bun run codegen` step 3 of onboarding. Is the intent "codegen is an onboarding step, document it" rather than "adamantite no longer needs it"? The PR description says the latter, which is not what the tool does.| uses: actions/setup-node@v7 | ||
| with: | ||
| node-version: "24" | ||
| node-version-file: ".node-version" |
There was a problem hiding this comment.
Worth a conscious call: nvm reads only .nvmrc and does not read .node-version, while fnm, nodenv, and setup-node read both. After this rename, contributors on nvm lose nvm use auto-resolution. adamantite@0.35.0 accepts .nvmrc through node-version-file too, so the rename was optional — if any contributor uses nvm, committing both files with identical contents keeps every version manager working, and nothing in the repo references either filename today.
76052a6 to
6c6271e
Compare
6c6271e to
24e303b
Compare
.nvmrc to .node-version|
Pullfrog stalled — likely cause: The agent stopped emitting events for 125s and was killed by the activity-timeout watchdog. 88 events were processed before the failure. Recent agent stderr
|
|
Pullfrog stalled — likely cause: The agent stopped emitting events for 125s and was killed by the activity-timeout watchdog. 88 events were processed before the failure. Recent agent stderr
|
Bumps oxfmt 0.63.0 -> 0.65.0 and applies its new formatting. Includes the Zed oxfmt settings migration. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Important
The new Files SDK result validation prevents successful uploads from creating Asset records and must be fixed before merge.
Reviewed changes — I reviewed the force-pushed changes since the prior Pullfrog review, including all four current commits and the latest web dependency fix.
- Completed the Adamantite 0.37 upgrade — Upgraded Adamantite and Oxlint, enabled the
antisloppreset, and updated Knip configuration. - Added runtime boundary validation — Replaced assertions across Files SDK hooks, Stripe parsing, JSON helpers, template commands, and Turbo template-command inputs.
- Updated native and auth implementations — Reworked native UI type handling and moved auth field validation to exported scalar schemas.
- Preserved CI generation order — Kept code generation before each Adamantite matrix command while updating action majors and
.node-versionuse. - Fixed follow-up integration gaps — Handled absent docs
gitoutput and declared the web application workspace's new@init/utilsdependency.
GPT Sol | 𝕏
| etag: z.string(), | ||
| lastModified: z.number(), | ||
| metadata: z.record(z.string(), z.string()).optional(), | ||
| name: z.string(), |
There was a problem hiding this comment.
This schema rejects every valid single-upload result from files-sdk@2.2.2: UploadResult has no name, and etag and lastModified are optional. Bun S3 completes the upload before this hook runs, so the parse exception prevents handleUpload from inserting the Asset ownership record while the object remains in storage.
Technical details
# Files SDK result schemas reject valid provider output
## Affected sites
- `apps/api/src/shared/files.ts:17-24` — the upload schema requires fields outside the installed `UploadResult` contract
- `apps/api/src/shared/files.ts:25-31` — the stored-file schema also requires optional `etag` and `lastModified` fields
- `apps/api/src/shared/files.ts:49-52` — parsing happens before either Asset write
## Required outcome
- Accept every valid result shape from the installed Files SDK, including provider results without optional metadata fields.
- Preserve the existing upload filename fallback from the object key when no file name is present.
## Suggested approach
- Model only the fields each handler consumes and keep the SDK's optional fields optional; add a hook-level test with the Bun S3 upload result shape.There was a problem hiding this comment.
ℹ️ No code issues in the concurrent delta; the PR metadata needs one version update.
Reviewed changes — I reviewed commit 92f5c007, which landed while the prior review was being submitted.
- Upgraded Adamantite again — Moved Adamantite from
0.37.0to0.38.0and updated its resolved dependencies. - Upgraded Oxfmt — Moved Oxfmt from
0.63.0to0.65.0;bun run format --checkpasses on the resulting tree. - Migrated Zed formatter settings — Replaced the old Oxfmt initialization keys with
fmt.configPathwhile preserving format-on-save behavior. - Applied the new formatter output — Reformatted intersections and multiline logical expressions without changing their semantics.
ℹ️ PR metadata still names 0.37.0
The current title and description say this PR upgrades Adamantite to 0.37.0, while package.json and bun.lock now install 0.38.0. This is mergeable, but the metadata should identify the version that will enter the repository history.
Technical details
# Update the PR metadata for Adamantite 0.38.0
## Affected sites
- PR title and description — still identify `0.37.0`
- `package.json:44` — installs `adamantite@0.38.0`
- `bun.lock:10` — resolves `adamantite@0.38.0`
## Required outcome
- The PR title and description identify Adamantite `0.38.0` as the final upgrade target.GPT Sol | 𝕏
There was a problem hiding this comment.
Important
Adamantite 0.38 removes a command that the repository still tells agents to run. Update the repository guidance before merge.
Reviewed changes since the prior Pullfrog review at e6f7f55d, I reviewed the latest tooling upgrade, configuration migration, lockfile changes, and formatter output.
- Upgraded Adamantite and Oxfmt: Moved Adamantite from
0.37.0to0.38.0and Oxfmt from0.63.0to0.65.0, with the related dependency graph updates. - Migrated Zed Oxfmt settings: Replaced the old experimental initialization options with the supported
fmt.configPathandrunsettings. - Applied the new formatting rules: Reformatted multiline operators and type intersections without changing their behavior.
ℹ️ PR metadata still names Adamantite 0.37.0
The latest commit installs 0.38.0, but the PR title and opening description still promise 0.37.0. Update both so the review and release history state the current scope.
Technical details
# PR metadata uses the previous Adamantite version
## Affected sites
- PR title — names Adamantite `0.37.0`
- PR description — opens with an upgrade to `0.37.0`
- `package.json:44` — installs Adamantite `0.38.0`
## Required outcome
- The PR title and description name the Adamantite version that the branch installs.GPT Sol | 𝕏
| "@turbo/gen": "2.10.7", | ||
| "@types/bun": "1.3.14", | ||
| "adamantite": "0.35.0", | ||
| "adamantite": "0.38.0", |
There was a problem hiding this comment.
Adamantite 0.38.0 removes doctor --fix, but AGENTS.md:47 still tells agents to use it for safe local fixes. That documented command now exits 1, so update the repository guidance for the supported doctor flow as part of this bump.
Technical details
# `doctor --fix` guidance is incompatible with Adamantite 0.38
## Affected sites
- `package.json:44` — upgrades the CLI to `0.38.0`, which removes `doctor --fix`
- `AGENTS.md:47` — directs agents to run the removed command
## Evidence
- `bunx adamantite doctor --fix` on this branch exits 1 with: ``doctor --fix` has been removed. Run `adamantite doctor` and follow the reported goal criteria.`
- The `v0.38.0` release notes document the new Doctor flow: https://github.com/adelrodriguez/adamantite/releases/tag/v0.38.0
## Required outcome
- Repository guidance uses only supported Adamantite 0.38 commands and explains how agents act on Doctor findings.

Upgrade Adamantite from 0.35.0 to 0.37.0. Update Oxlint to 1.79.0 and enable the Antislop preset.
Update the CI workflow to use actions/checkout@v7, actions/setup-node@v7, and actions/cache@v6. Rename .nvmrc to .node-version and use that file for Node.js version selection.
Keep bun run codegen before the Adamantite matrix commands. Adamantite 0.37 changes generated environment files, so the format check must run after code generation.
Update existing code to pass the stricter checks for assertions, external values, runtime type checks, dictionary types, and vague symbol names. Preserve the Citty template command changes from current main and validate JSON and prompt values at their boundaries.
Regenerate apps/api/src/shared/env.generated.ts with the current Varlock output.