Skip to content

feat(config): enable read-only mode by default for new installations#164

Open
aprimakina wants to merge 1 commit into
mainfrom
read-only-default-for-new-installs
Open

feat(config): enable read-only mode by default for new installations#164
aprimakina wants to merge 1 commit into
mainfrom
read-only-default-for-new-installs

Conversation

@aprimakina

Copy link
Copy Markdown
Contributor

Flip the read_only default to true so fresh installs refuse mutating operations (CLI service commands, MCP write tools) and open database sessions read-only until the user opts in with tiger config set read_only false.

Existing installations are grandfathered: older CLI versions only wrote read_only to the config file when set explicitly, so a config file without the key predates the default flip and MigrateReadOnly (same in-memory-shim pattern as MigrateVersionCheck) resolves it to false. To keep that detection sound, every config file written by Set/Unset/Reset now records read_only explicitly; unsetting or resetting restores the current default (true).

@aprimakina aprimakina self-assigned this Jun 12, 2026
Flip the read_only default to true so fresh installs refuse mutating
operations (CLI service commands, MCP write tools) and open database
sessions read-only until the user opts in with
`tiger config set read_only false`.

Existing installations are grandfathered: older CLI versions only wrote
read_only to the config file when set explicitly, so a config file
without the key predates the default flip and MigrateReadOnly (same
in-memory-shim pattern as MigrateVersionCheck) resolves it to false.
To keep that detection sound, every config file written by
Set/Unset/Reset now records read_only explicitly; unsetting or
resetting restores the current default (true).

The integration test suite sets TIGER_READ_ONLY=false since it
exercises real mutating commands, and ErrReadOnly now tells users how
to disable read-only mode.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aprimakina aprimakina force-pushed the read-only-default-for-new-installs branch from 96c09f0 to 7c04e4b Compare June 12, 2026 19:31
@aprimakina aprimakina requested a review from Askir June 12, 2026 19:41
@aprimakina aprimakina marked this pull request as ready for review June 12, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant