← 1.0.0 scope SAPE-17

The on-disk format tag and the key labels say sapedb

Status
Done
Version
1.0.0
Component
server — pager, dbkey, naming
Commits
580bfa5, baaa754, 6cb845a
Opened
ISS-6, ISS-14

Description

Two things spelled the product's former name, and both of them decide whether a file opens at all: the eight-byte tag at the head of every database file, and the labels every encryption key is derived under. Both now spell sapedb.

internal/naming is the patrol that keeps the old name from coming back. Its Exceptions table held four rows — the format tag and the three labels. It is now the empty slice, and that empty state is what this ticket was written to reach.

Why it was in 1.0.0

Changing either one makes every database written by an earlier build unreadable, with no migration. An unencrypted file and an encrypted one fail the same way, at the same place, before any key is tried. That is a change you make before there is a first tag or never.

The argument for keeping the old spelling was that it breaks every database that already exists. That argument was spent the moment somebody checked it against the repository: there are no tags, so no released build has ever written such a file, so there is no such database.

How it was verified

  1. internal/naming.Walk reads every regular file under the tree, not a sample, and reports every line carrying the old name case-insensitively. Exceptions is empty, so every hit it finds is unexcused.
  2. allowedIn was split out from Allowed for one reason: against an empty live table the tests that measure what the table excuses would all pass without executing a single comparison. They run against fixtureTable instead, so widening Allowed still fails them.
  3. Measured at 88178cc: the old name survives in exactly three non-test constants, each assembled from single-character literals, each deliberate — naming.target and two oldFileExt guards. See ISS-14; that issue is the measurement, not a leftover.
  4. The CHANGELOG's Breaking entry names both surfaces and prints the refusal a stale file gets: sapedb/pager: not a sapedb file.

What it did not do