Skip to content

fix(vscode): regenerate project-schema mirror for transfer_timeout_seconds#210

Merged
hugocorreia90 merged 1 commit intomainfrom
fix/codegen-vscode-state-config
Apr 21, 2026
Merged

fix(vscode): regenerate project-schema mirror for transfer_timeout_seconds#210
hugocorreia90 merged 1 commit intomainfrom
fix/codegen-vscode-state-config

Conversation

@hugocorreia90
Copy link
Copy Markdown
Contributor

Summary

Unblocks codegen-drift.yml on main after engine-v1.12.0 merged.

The engine release added StateConfig.transfer_timeout_seconds (wall-clock budget for state transfers), and schemas/rocky-project.schema.json was regenerated correctly — but the vscode mirror files (editors/vscode/schemas/rocky-project.schema.json + editors/vscode/src/types/generated/rocky_project.ts) stayed on the pre-1.12.0 shape.

Root cause: just codegen-vscode depends on npm + npx tools available in editors/vscode/node_modules. When the dir doesn't have deps installed, the step fails partway through — but because just doesn't abort the overall codegen recipe on that sub-failure in a way that leaves the repo clean, the engine-side outputs get written while the vscode ones silently don't update. Whoever ran codegen during the engine-release PR hit that, the change didn't get caught in review, and it landed on main with the drift baked in.

What's in this PR

  • editors/vscode/schemas/rocky-project.schema.json — regenerated; adds transfer_timeout_seconds: integer under StateConfig.properties + default 300 in the example block.
  • editors/vscode/src/types/generated/rocky_project.ts — regenerated; adds transfer_timeout_seconds?: number to the StateConfig interface.
  • editors/vscode/package-lock.json — synced to "version": "1.6.2" (PR chore(vscode): release 1.6.2 #209 bumped package.json but not the lockfile).

Test plan

  • npm install in editors/vscode/
  • cargo build --release --bin rocky from engine/ (1.12.0 binary)
  • just codegen from monorepo root → diff matches the drift CI reported
  • Post-edit git status shows only the three files above
  • CI codegen-drift passes on this PR (confirms idempotency)

Follow-up

Once this merges, cutting vscode-v1.6.3 is the clean way to get the corrected schema mirror onto the Marketplace. The vscode-v1.6.2 VSIX that published moments ago is functional but missing transfer_timeout_seconds IDE validation — no user-visible break.

See the avoid-codegen-drift discussion below for systemic fixes.

…conds

Engine release 1.12.0 landed a new `StateConfig.transfer_timeout_seconds`
field on main, but the vscode schema mirror + TypeScript interface
stayed on the pre-1.12.0 shape. Root cause: `just codegen-vscode` fails
silently when `editors/vscode/node_modules` is missing (it just errors
out of the npm-driven step), so whoever ran the engine-release PR's
codegen only got the engine-side schemas regenerated, not the vscode
copy.

Also syncs `editors/vscode/package-lock.json` to the 1.6.2 version
bumped in the package.json by PR #209 — npm install surfaced the drift.

No feature change. Unblocks `codegen-drift.yml` on main.
@hugocorreia90 hugocorreia90 merged commit 54f6c00 into main Apr 21, 2026
10 checks passed
@hugocorreia90 hugocorreia90 deleted the fix/codegen-vscode-state-config branch April 21, 2026 18:53
hugocorreia90 added a commit that referenced this pull request Apr 21, 2026
Patch release. Restores `StateConfig.transfer_timeout_seconds`
validation in `rocky-project.schema.json` + TS interface that was
missing from vscode-v1.6.2 due to stale codegen during the 1.6.2
release cut (#210).

No feature changes vs. 1.6.2.
hugocorreia90 added a commit that referenced this pull request Apr 21, 2026
)

Closes two silent-drift classes that hit three times in a single day
(2026-04-21) during the Arc 1 wave 2 cascade:

## Fix 1 — codegen-vscode auto-installs deps

Before: `just codegen-vscode` assumed `editors/vscode/node_modules`
was already populated. When it wasn't (fresh worktree, CI runner,
release PR checkout), the npx json2ts step failed with "could not
determine executable to run" — but `codegen-rust` + `codegen-dagster`
had already written their outputs, so half the pipeline had run. If
the dev didn't notice the error scroll and committed anyway, the
partial state landed on main and codegen-drift.yml fired on the next
PR. Happened to me on PR #204, and to whoever ran codegen for the
v1.12.0 release PR (#207#210 hotfix).

After: the recipe checks for node_modules and runs `npm install`
automatically. ~15s cost on a cold cache, skipped when deps are
present. Same self-heal pattern codegen-dagster already uses via
`uv run`.

## Fix 2 — new `codegen-all` recipe bundles regen-fixtures

Before: `just codegen` regenerated schemas + bindings but not
fixtures. Engine version bumps cascaded every fixture's `"version"`
field out of sync (hit on PR #207 release). The muscle memory was
"run codegen and you're done", which was wrong for anything
touching output shapes or version strings.

After: `just codegen-all` runs codegen + regen-fixtures together.
Kept `codegen` as the fast dev loop (~30s) and `codegen-all` as the
slower release loop (~1-2 min of extra fixture regen). Docstring on
`codegen` now points at `codegen-all` for the cases where it's the
right tool.

## Verification

- [x] Deleted `editors/vscode/node_modules`, ran `just codegen` — self-heal kicked in, npm install ran, codegen completed cleanly, `git status` shows only `justfile` modified (idempotent against main).
- [x] `just --list` shows both `codegen` and `codegen-all`.

## Not in scope (noted for follow-up if needed)

- Upfront preflight check (Fix B from the discussion) — decided against, because the self-heal in Fix 1 makes it redundant. Both dagster (uv-managed) and vscode (npm-managed) codegen steps now recover from missing deps on their own.
- Pre-commit hook additions — `.git-hooks/pre-commit` already runs codegen drift detection when schema files are staged; opt-in via `just install-hooks`. Making it default-on is a separate discussion about solo-project friction.
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