Q-W1 code-review follow-ups: restore 104 trailing newlines, relocate reasampler_uid.h to core/wire, drop ext_keys namespaces shim, add slot_map_tests, golden serialize literals for 4 modules, namespaces.h/pragma-once ordering sweep. 60/60 green.

This commit is contained in:
2026-07-28 21:33:51 -04:00
parent 847936f813
commit 2d59bbe35d
131 changed files with 460 additions and 263 deletions
+25
View File
@@ -104,6 +104,30 @@ static void testFullFieldRoundTrip() {
}
}
// Golden byte-literal (Q-W1 T?-05 follow-up): pins the EXACT serialized bytes for
// a small fixture, not just self-consistent re-serialization — a format drift
// that round-trips losslessly (e.g. a renamed key both writer and reader agree
// on) would slip past testFullFieldRoundTrip but not this. The format is frozen
// as-shipped; the literal below is the captured current output.
static void testSerializeGoldenLiteral() {
BankModel idx;
Sample s;
s.id = "g1";
s.relativePath = "bank/g1.wav";
s.contentHash = "hash-g1";
CHECK(idx.add(s) == AddResult::Added);
CHECK(idx.serialize() ==
"{\"version\":1,\"samples\":[{\"id\":\"g1\",\"displayName\":\"\","
"\"relativePath\":\"bank/g1.wav\",\"sourceMode\":0,\"sourceRange\":{"
"\"startSeconds\":0,\"endSeconds\":0,\"startPpq\":0,\"endPpq\":0},"
"\"trackGuids\":[],\"wetDry\":1,\"channelCount\":0,\"sampleRate\":0,"
"\"lengthSeconds\":0,\"lengthBeats\":0,\"captureTempo\":0,"
"\"captureTimeSigNum\":0,\"captureTimeSigDenom\":0,\"key\":null,"
"\"rootNote\":null,\"loop\":null,\"levels\":{\"peakDb\":0,\"rmsDb\":0,"
"\"lufs\":0},\"clipped\":false,\"tier\":0,\"contentHash\":\"hash-g1\","
"\"provenance\":null,\"createdTimestamp\":0}]}");
}
static void testDedupByHash() {
BankModel idx;
Sample a = fullSample("x");
@@ -551,6 +575,7 @@ static void testSeamFieldsAdditiveInvariant() {
int main() {
testFullFieldRoundTrip();
testSerializeGoldenLiteral();
testDedupByHash();
testTierFilterAndMove();
testRelativePathInvariant();