Skip to content

fix: ignore virtual Octane config dependencies - #993

Merged
domgan-oai merged 1 commit into
octanejs:mainfrom
openai-oss-forks:fix/988-virtual-config-dependencies
Sep 8, 2026
Merged

domgan-oai merged 1 commit into
octanejs:mainfrom
openai-oss-forks:fix/988-virtual-config-dependencies

Conversation

@domgan-oai

@domgan-oai domgan-oai commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Why

  • When octane.config.ts imports decorator-using code, Vite's SSR module graph can contain a NUL-prefixed helper ID in module.file. Passing that ID to vite.watcher.add() crashes the dev server.

Changes

  • Keep traversing imported modules, but collect only filesystem-backed module paths for config watching.
  • Add an integration regression with a decorated TypeScript import. It checks watcher registration and restart on a real imported file change.
  • Add a patch changeset for @octanejs/vite-plugin.

Validation

  • pnpm format:check
  • pnpm typecheck
  • pnpm test
  • Targeted regression: failed before the fix with the reported NUL-byte watcher path; passed after the fix.
  • Prettier check for the changed source and test; git diff --check; node scripts/check-changesets.js.

Local pnpm sync reached the parity generator with no generated diff, but the dependency install could not finish: the configured package registry returned 403 for @tsrx/[email protected]. The current-head CI run completed successfully: 26 jobs, including lint, typecheck, test shards, React parity, and Chromium integration.

Risk / follow-ups

  • Config dependency traversal runs at startup, outside render and request hot paths. Current-head CI verified the full workspace.

Provenance

  • An agent produced this diff (agent-authored)

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Note

Low Risk
Startup-only change to which paths are watched; behavior for real files is unchanged and covered by a new regression test.

Overview
Fixes dev-server crashes when octane.config.ts imports code that uses TypeScript decorators (#988). Vite’s SSR module graph can put NUL-prefixed virtual helper IDs in module.file; those paths were collected for config dependency watching and passed to vite.watcher.add(), which expects real filesystem paths.

getDependencies in load-config.js still walks the full import graph, but only adds module.file values that do not contain \0. Real imported files (e.g. entity.ts) stay on the watch list and still trigger server restarts on change.

A new integration test covers a decorated import: watcher registration uses statSync on every added path, and a change to the imported file still calls restart once. @octanejs/vite-plugin gets a patch changeset.

Reviewed by Cursor Bugbot for commit 56ff910. Bugbot is set up for automated code reviews on this repo. Configure here.

@domgan-oai
domgan-oai marked this pull request as ready for review September 8, 2026 13:57
@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent fix PR: bug fix labels Sep 8, 2026
@domgan-oai
domgan-oai merged commit 7ddaf82 into octanejs:main Sep 8, 2026
34 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent fix PR: bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dev server crashes when octane.config.ts imports decorator-using code (virtual module ids reach the file watcher)

1 participant