Q-W1 pt2: core/shell/app relocation + sub-namespaces; one concrete ui::Rect (LTRB fork retired); slot_map split from bank_book; BankIndex→BankModel; 59/59 green

This commit is contained in:
2026-07-28 20:48:56 -04:00
parent 67a41728f3
commit 847936f813
222 changed files with 2247 additions and 2079 deletions
+6 -5
View File
@@ -15,15 +15,16 @@
// The Sample-JSON round-trip of the fingerprint (leveraging M1's existing provenance
// round-trip) is exercised in test_bank_model.cpp — see the fingerprint case there.
#include "../src/provenance.h"
#include "../src/core/model/provenance.h"
#include "../src/bank_model.h" // recipe-through-Sample-JSON round-trip (M1 seam)
#include "../src/core/model/bank_model.h" // recipe-through-Sample-JSON round-trip (M1 seam)
#include <cstdio>
#include <string>
#include <vector>
using namespace reasampler;
using namespace reasampler::model;
static int g_fail = 0;
#define CHECK(cond) do { if(!(cond)) { \
@@ -246,7 +247,7 @@ static void testHugeGuidCountRejectedBeforeReserve() {
// --- recorded-recipe model round-trips through the Sample JSON ----------------
// The fingerprint rides in Provenance.fxChainSnapshot (one string), which M1's
// BankIndex JSON already round-trips. Prove a real recipe survives that path intact.
// BankModel JSON already round-trips. Prove a real recipe survives that path intact.
static void testRecipeThroughSampleJson() {
const CaptureRecipe r = baseRecipe();
@@ -260,10 +261,10 @@ static void testRecipeThroughSampleJson() {
prov.fxChainSnapshot = buildFingerprint(r);
s.provenance = prov;
BankIndex idx;
BankModel idx;
CHECK(idx.add(s) == AddResult::Added);
auto back = BankIndex::deserialize(idx.serialize());
auto back = BankModel::deserialize(idx.serialize());
CHECK(back.has_value());
const Sample* child = back ? back->query("child-1") : nullptr;
CHECK(child != nullptr);