Repository navigation
fix(cli): doctor treats fresh install as a note, not SQLITE_CANTOPEN failure (#186, #187) - #192
Merged
Merged
Conversation
Right after init, before the first relay start, the read-only diagnostic open fails with SQLITE_CANTOPEN and doctor showed storage ok:false on a perfectly healthy install. Option (b) from the issue: doctor now reports ok:true with an explicit note when the home is writable, the database file simply does not exist yet, and the error is CANTOPEN. Real failures (blocked or unwritable home, existing but unreadable database) still fail closed with the error. Chosen over creating the database in init: fewer side effects, init stays free of schema ownership. docs: multi-project init flags (--plugin-source/--synloq-home) and the wizard piped-stdin limitation in installation.md (#187)
Merged
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.
Что
Closes #186, closes #187.
#186 — doctor после свежего init
Сразу после
synloq init(до первого старта relay) doctor показывалstorage ok: false, SQLITE_CANTOPEN— read-only диагностический open падает на несуществующем файле БД. Новый пользователь видел красное на здоровой установке.Выбор: вариант (b) — doctor трактует «ещё не запускался» как actionable-заметку, а не отказ. Обоснование (совпадает со склонностью CTO): создание БД на init (вариант a) даёт init побочный эффект владения схемой — миграции и user_version начинают принадлежать двум командам, а init и так идемпотентно запускается повторно; note в doctor — ноль side effects и точнее отражает реальность.
Условие «свежей установки» нарочито жёсткое, чтобы не замаскировать реальные отказы:
writable: true), иSQLITE_CANTOPEN.Реальные сбои (заблокированный/незаписываемый home, существующий но нечитаемый файл) по-прежнему
ok: false+ error — оба существующих fail-closed теста зелёные без правок.Отчёт:
storage: { ok: true, path, note: "database not created yet — it is created automatically on the first relay start" }.#187 — installation.md
Две новые секции: «Multiple projects on one machine» (второй проект требует явных
--plugin-source/--synloq-home, гард «belongs to another project» работает корректно) и «Wizard and piped stdin» (wizard — только интерактивный TTY; для автоматизации--non-interactive --role).Проверки
ok: true+ note; после создания БД note исчезаетpnpm verifyexit 0: 139 файлов / 1266 тестов зелёные (в полном прогоне дважды ловились несвязанные load-flaky — relay-lifecycle test: relay-lifecycle e2e times out (20 s) on GitHub runners — retry/timeout gate needed #182-класса и json-rpc timeout; фокусные перепрогоны и итоговый verify зелёные)