Repository navigation
feat: fail loud on Node < 24 before any write; doctor reports the check (#111) - #130
Merged
Merged
Conversation
…ck (#111) node:sqlite is experimental in Node 22 and stable from 24 (engines floor is >=24). On an old runtime the first DB open crashed opaquely. - diagnostics/versions.ts: isSupportedNode + assertSupportedNode with an actionable message ("requires Node.js 24 or newer … nothing was written"); VersionsBlock gains nodeSupported so doctor/status report the check; collectVersions takes a nodeVersion override for tests. - serveCommand and runGenericInit call assertSupportedNode before any filesystem write. - Tests: floor evaluation (22 fails / 24+ pass / malformed fails), doctor reports the flag for an injected old runtime, serve and init refuse with INVALID_INPUT and leave no files behind.
OBenner
commented
Nov 17, 2026
OBenner
left a comment
Owner
Author
There was a problem hiding this comment.
Code review (dev → #111): APPROVE (COMMENT-форой, как ранее — вердикт положительный, к финалу CTO).
Проверено по диффу (3348c52):
- Fail-closed парсинг: malformed version → false (не true!) — правильная сторона осторожности; floor-матрица (22 fail / 24+ pass / garbage fail) запинена.
- Гейты до записей: serveCommand — первой строкой (раньше lock и БД); runGenericInit — после wizard-early-return, до любой записи; сообщение явно говорит «nothing was written» — и тесты это доказывают (нет database/credentials файлов на диске после отказа).
- Отчётность: VersionsBlock.nodeSupported в обеих ветках doctor (normal + degraded) и status — консистентно с #115.
- Честное ограничение в PR: программный вызов initializeTeam мимо CLI не покрыт — задокументировано, приемлемо для CLI-facing гейта.
- Пересечений с #128/#129 по файлам нет (подтверждаю по диффам — commands.ts касаются разных участков, merge пройдёт чисто).
verify 117/1030 принимаю. Готово к финалу CTO.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Проблема (issue #111)
node:sqliteэкспериментален в Node 22 и стабилен с 24 (engines: >=24). Пользователь на Node 22 получал непонятный крах на первом открытии БД вместо внятного сообщения.Решение
src/diagnostics/versions.ts:isSupportedNode+assertSupportedNode(сообщение: «requires Node.js 24 or newer (node:sqlite is required); this process runs vX — nothing was written»).VersionsBlock.nodeSupported— doctor/status теперь отчитываются о проверке.collectVersionsпринимаетnodeVersionдля тестов.serveCommandиrunGenericInitзовутassertSupportedNodeпервым шагом.Тесты (test/diagnostics/versions.test.ts)
versions.nodeSupported: false; по умолчанию → true.Полный
pnpm verifyзелёный: 117 файлов / 1030 тестов.Ограничения
initializeTeamнапрямую из чужого кода гейт не покрывает — задокументировано; hooks (codex/claude) вне скоупа issue.Closes #111.