Title: Auth config regeneration in dev can reuse a cached config · Issue #550 · voidzero-dev/void · GitHub
Open Graph Title: Auth config regeneration in dev can reuse a cached config · Issue #550 · voidzero-dev/void
X Title: Auth config regeneration in dev can reuse a cached config · Issue #550 · voidzero-dev/void
Description: Problem loadVoidAuthConfig() uses a plain native import() of the config file URL. Loading the same path again in the same Node process can therefore return the original module after the file has been edited. The dev watcher explicitly ha...
Open Graph Description: Problem loadVoidAuthConfig() uses a plain native import() of the config file URL. Loading the same path again in the same Node process can therefore return the original module after the file has be...
X Description: Problem loadVoidAuthConfig() uses a plain native import() of the config file URL. Loading the same path again in the same Node process can therefore return the original module after the file has be...
Opengraph URL: https://github.com/voidzero-dev/void/issues/550
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Auth config regeneration in dev can reuse a cached config","articleBody":"## Problem\n\n`loadVoidAuthConfig()` uses a plain native `import()` of the config file URL. Loading the same path again in the same Node process can therefore return the original module after the file has been edited.\n\nThe dev watcher explicitly handles changes to auth-config files and calls `writeAuthDatabaseFiles()`, which loads the config through this function. Consequently, that regeneration can use stale settings even though it was triggered by a config edit.\n\n## Documentation and intended behavior\n\nThe [auth guide](https://github.com/voidzero-dev/void/blob/main/docs/guide/auth.md) documents `auth.ts` customization and automatic auth-table creation during local development, but **does not explicitly promise that auth-config edits hot-reload**.\n\nThis issue is based on the existing implementation: the watcher already responds to those edits and attempts regeneration, which suggests it intends to use the updated config. This is an inference about intended behavior, not a claim that the docs guarantee hot reload. If a restart is intentionally required, that requirement should be made explicit.\n\n## Confirmed reproduction\n\nA direct reproduction using the production `loadVoidAuthConfig()` function:\n\n1. Write a temporary module exporting `{ marker: 'auth-before' }`.\n2. Load it with `loadVoidAuthConfig(path)`.\n3. Overwrite the same file with `{ marker: 'auth-after' }`.\n4. Call `loadVoidAuthConfig(path)` again in the same process.\n\nBoth calls returned `{ marker: 'auth-before' }`, and the returned objects were identical, although the file contained `auth-after`.\n\nThe loader caching was reproduced directly. A complete auth application with a schema-changing edit has not been tested end to end; the consequence for generated auth files follows from inspection of the watcher and generation path.\n\n## Expected behavior and scope\n\nWhen regeneration runs in response to an auth-config edit, it should evaluate the current configuration. Restarting the dev process is the current workaround.\n\nThis behavior already exists on `main` and is independent of the incremental source-analysis changes in #543.\n\nA fix should preserve existing module compatibility and cover direct config edits, edits to imported local helpers, and recovery after correcting a syntax error. Reloading only the top-level file may leave its imported dependencies cached.\n\nRelevant code: [auth config loader](https://github.com/voidzero-dev/void/blob/main/packages/void/src/auth/config.ts), [routing watcher and auth-file generation](https://github.com/voidzero-dev/void/blob/main/packages/void/src/plugin-routing.ts).\n","author":{"url":"https://github.com/yangshun","@type":"Person","name":"yangshun"},"datePublished":"2026-10-22T10:18:59Z","url":"https://github.com/voidzero-dev/void/issues/550"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4121effd-8a82-f8f2-9880-689caeabbd72 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA7C:B93E6:63986:8785E:6AFBB657 |
| html-safe-nonce | bc5cfb856b7a16dfe9a9afd3cb2f341b1f3969266a954263f81c56aaf1c27c07 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTdDOkI5M0U2OjYzOTg2Ojg3ODVFOjZBRkJCNjU3IiwidmlzaXRvcl9pZCI6IjkwNDc0MjA5NTQyMjIwNzU3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e03e695aa64674df27234330f2785c9ffb2a1721eda13314dc67b6fa98f4e67c |
| hovercard-subject-tag | issue:5977442641 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/voidzero-dev/void/550/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0e6881bb82e2dfc0e9337889cafd65122c7691ee2dd3bc92e95c414d802d87be/voidzero-dev/void/issues/550 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0e6881bb82e2dfc0e9337889cafd65122c7691ee2dd3bc92e95c414d802d87be/voidzero-dev/void/issues/550 |
| og:image:alt | Problem loadVoidAuthConfig() uses a plain native import() of the config file URL. Loading the same path again in the same Node process can therefore return the original module after the file has be... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yangshun |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c |
| turbo-cache-control | no-preview |
| go-import | github.com/voidzero-dev/void git https://github.com/voidzero-dev/void.git |
| octolytics-dimension-user_id | 149750581 |
| octolytics-dimension-user_login | voidzero-dev |
| octolytics-dimension-repository_id | 1164437080 |
| octolytics-dimension-repository_nwo | voidzero-dev/void |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1164437080 |
| octolytics-dimension-repository_network_root_nwo | voidzero-dev/void |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e4cce0e99cf61481a318ff12c2e8580153a6c7c6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width