Delete dead code and stale fixtures, fix config set reindent #134

Merged
clawbot merged 1 commits from issue-70-dead-code into next 2026-09-21 19:25:01 +02:00
Collaborator

Closes #70.

Removes four confirmed-dead pieces and fixes one formatting bug, each re-verified by grep against origin/next before deleting:

  • internal/models/ — the whole package plus its coverage-only test; grep found no production import.
  • internal/cli/vaultik_snapshot_types.go — a second SnapshotInfo type in package cli with no cli.SnapshotInfo references; the live one is in internal/vaultik.
  • test-config.yml (repo root) and test/integration-config.yml — both use source_dirs and other keys config.Config no longer has, so they would fail Validate(); no Go file or script references either. test/config.yaml stays (used by internal/config/config_test.go).
  • config set wrote back with bare yaml.Marshal, whose 4-space default reindented the whole file on the first set despite the README/help promise to preserve formatting. It now uses yaml.NewEncoder with 2-space indent, matching defaultConfigTemplate. A new test asserts a set round-trip keeps both comments and 2-space indent.

What a reviewer would trip over: the two same-named SnapshotInfo types made the cli one look live under a plain grep for the name; only the qualified cli.SnapshotInfo confirms it dead.

Disclosures:

  • Single commit, not one commit per deletion (issue DoD item 4), per task instruction.
  • test/integration-config.yml removed per the manager note on the issue; it carried a live-looking S3 endpoint and key that were unused.
  • No behavior change beyond item 4.

Model: opus-4-8

Closes https://git.eeqj.de/sneak/vaultik/issues/70. Removes four confirmed-dead pieces and fixes one formatting bug, each re-verified by grep against `origin/next` before deleting: - `internal/models/` — the whole package plus its coverage-only test; grep found no production import. - `internal/cli/vaultik_snapshot_types.go` — a second `SnapshotInfo` type in package `cli` with no `cli.SnapshotInfo` references; the live one is in `internal/vaultik`. - `test-config.yml` (repo root) and `test/integration-config.yml` — both use `source_dirs` and other keys `config.Config` no longer has, so they would fail `Validate()`; no Go file or script references either. `test/config.yaml` stays (used by `internal/config/config_test.go`). - `config set` wrote back with bare `yaml.Marshal`, whose 4-space default reindented the whole file on the first set despite the README/help promise to preserve formatting. It now uses `yaml.NewEncoder` with 2-space indent, matching `defaultConfigTemplate`. A new test asserts a set round-trip keeps both comments and 2-space indent. What a reviewer would trip over: the two same-named `SnapshotInfo` types made the `cli` one look live under a plain grep for the name; only the qualified `cli.SnapshotInfo` confirms it dead. Disclosures: - Single commit, not one commit per deletion (issue DoD item 4), per task instruction. - `test/integration-config.yml` removed per the manager note on the issue; it carried a live-looking S3 endpoint and key that were unused. - No behavior change beyond item 4. Model: opus-4-8
clawbot added the needs-review label 2026-09-21 15:06:04 +02:00
clawbot self-assigned this 2026-09-21 15:06:04 +02:00
clawbot added 1 commit 2026-09-21 15:06:04 +02:00
Remove the unused internal/models package (and its coverage-only test),
internal/cli/vaultik_snapshot_types.go (a second, dead SnapshotInfo that
shadowed the live type in internal/vaultik), and two fixtures
(test-config.yml, test/integration-config.yml) that use source_dirs and
other keys config.Config no longer has. All confirmed by grep against
origin/next; none has a production consumer.

config set now writes via yaml.NewEncoder with 2-space indent, matching
defaultConfigTemplate, so the first set no longer reindents the file it
promises to preserve. A test covers the round-trip.

Single commit rather than one commit per deletion, per task instruction.
test/integration-config.yml removed per the manager note on the issue.

Model: opus-4-8
Author
Collaborator

PASS

model: claude-opus-4-8

PASS model: claude-opus-4-8
clawbot merged commit bdce350041 into next 2026-09-21 19:25:01 +02:00
clawbot deleted branch issue-70-dead-code 2026-09-21 19:25:01 +02:00
Sign in to join this conversation.