Auth config regeneration in dev can reuse a cached config
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- node.js, typescript
- 領域
- build-system, devtools
調査の方向性
Read packages/void/src/auth/config.ts and the watcher and generation path in packages/void/src/plugin-routing.ts; reproduce the cached-module behavior with loadVoidAuthConfig() after editing a config. Trace how local helper imports and syntax errors affect reloading. Done means regeneration uses current settings after direct config edits and helper edits, and recovers after a syntax error; an open linked pull request is already addressing this issue.
索引モデルが issue の本文から書いたものです。
説明
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 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.
Documentation and intended behavior
The auth guide documents auth.ts customization and automatic auth-table creation during local development, but does not explicitly promise that auth-config edits hot-reload.
This 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.
Confirmed reproduction
A direct reproduction using the production loadVoidAuthConfig() function:
- Write a temporary module exporting
{ marker: 'auth-before' }. - Load it with
loadVoidAuthConfig(path). - Overwrite the same file with
{ marker: 'auth-after' }. - Call
loadVoidAuthConfig(path)again in the same process.
Both calls returned { marker: 'auth-before' }, and the returned objects were identical, although the file contained auth-after.
The 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.
Expected behavior and scope
When regeneration runs in response to an auth-config edit, it should evaluate the current configuration. Restarting the dev process is the current workaround.
This behavior already exists on main and is independent of the incremental source-analysis changes in #543.
A 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.
Relevant code: auth config loader, routing watcher and auth-file generation.
- 主要言語
- TypeScript
- スター
- 402
- フォーク
- 32
- 平均マージ
- 10時間 18分
- マージ済み PR(30日)
- 113
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
voidzero-dev/void のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
voidzero-dev/void#529 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
voidzero-dev/void#428 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 46/100
voidzero-dev/void#547 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
voidzero-dev/void#546 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
voidzero-dev/void#527 ·
メンテナーはふだん 1 日以内に返信
voidzero-dev/void の issue をすべて見る
似ている issue
-
area:agent-view area:tui bug platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
anthropics/claude-code#104558 ·
メンテナーはふだん 1 日以内に返信
-
updater
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
UniversityOfHelsinkiCS/oodikone#5141 ·
-
maintanance
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
inmanta/web-console#7606 ·
メンテナーはふだん 1 日以内に返信
-
bug skills
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
equinor/fusion-framework#5846 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 74/100