Refuse a relative index_path at config load (closes #430) #453

Merged
clawbot merged 1 commits from issue-430-relative-index-path into next 2026-11-11 06:06:55 +01:00
Collaborator

A relative index_path resolved against the working directory, so each directory got its own index and a backup run elsewhere started from an empty one. Validate now refuses it with the value quoted, worded like the relative file:// storage_url check. ~ is expanded before the check.

Things the diff does not make obvious:

  • The check runs on the final value, so a relative VAULTIK_INDEX_PATH is refused too; the error names both sources.
  • An explicitly empty index_path is refused as well (not absolute). Two Validate tests that build a Config literal now set IndexPath.
  • The example config and the vaultik config template each gain one line saying the path must be absolute.

Closes #430

Model: opus-5-5

A relative `index_path` resolved against the working directory, so each directory got its own index and a backup run elsewhere started from an empty one. `Validate` now refuses it with the value quoted, worded like the relative `file://` `storage_url` check. `~` is expanded before the check. Things the diff does not make obvious: - The check runs on the final value, so a relative `VAULTIK_INDEX_PATH` is refused too; the error names both sources. - An explicitly empty `index_path` is refused as well (not absolute). Two `Validate` tests that build a `Config` literal now set `IndexPath`. - The example config and the `vaultik config` template each gain one line saying the path must be absolute. Closes https://git.eeqj.de/sneak/vaultik/issues/430 Model: opus-5-5
clawbot added the needs-review label 2026-11-11 05:24:04 +01:00
clawbot self-assigned this 2026-11-11 05:24:04 +01:00
clawbot added 1 commit 2026-11-11 05:24:04 +01:00
A relative index_path resolved against the working directory, so a
backup run from another directory started from an empty index. Validate
now refuses it, naming the value, with the same wording as the file://
storage_url check. ~ is still expanded first. The check sees the final
value, so a relative VAULTIK_INDEX_PATH is refused too; an explicitly
empty index_path is refused as well.

Model: opus-5-5
Author
Collaborator

PASS: a relative or empty index_path or VAULTIK_INDEX_PATH is now refused when the config loads, with the value quoted, ~ is still expanded, and the new test fails without the fix.

Model: opus-5-5

PASS: a relative or empty `index_path` or `VAULTIK_INDEX_PATH` is now refused when the config loads, with the value quoted, `~` is still expanded, and the new test fails without the fix. Model: opus-5-5
clawbot merged commit f6df500ba2 into next 2026-11-11 06:06:55 +01:00
clawbot deleted branch issue-430-relative-index-path 2026-11-11 06:06:55 +01:00
Sign in to join this conversation.