From 4db729a0ac543b91b9a12f885875388bbbebf6f8 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 20 May 2026 16:46:23 +0100 Subject: [PATCH] Structure CultCache listening receipts --- patches/aquasynth-patch-cultcache.cc | Bin 13156 -> 16141 bytes src/AquaSynth.Core/CultCachePatchDocument.cs | 36 ++++++++++++------ state/scratch.md | 16 ++++++++ .../CultCachePatchDocumentTests.cs | 31 +++++++++++++-- 4 files changed, 68 insertions(+), 15 deletions(-) diff --git a/patches/aquasynth-patch-cultcache.cc b/patches/aquasynth-patch-cultcache.cc index 2ee4b85a54a3ba39a8b8166bb8e345abf674db5f..7b1a712854778a2d5a4e036ab283c0b05b292e7e 100644 GIT binary patch delta 3100 zcma)8%a0UA7>{CtauGCm!G#i#K-lSBc?g1{M4lpx;Sq?BV0HI5)5UgIHC5F!+Z<>U z6FnIZ!-*IZ6FqA(N6-2Pc)Ck`DCj=uiJVf-CjT|Ke7`pdD06Sw)s_Dv6JH~w0@J^ppawn_}0IDNN} z*GlaZA>&wiH6)RejD@AJP-$ErNTkh-R#7jMdR=IlDLoKUcV7r^a+8`tS*L48$S9)R zQ!G;DJZb(mm(Gcj{7La)sfBToN>k~L72^v_TQ{N7IA7X+8yjX)X%QLic@K#qL45%w zN6KqzO9bM2LL!nj7Rm|dQAvy>PK|B)s7TT}p)__z2d0m$bFw32*MrHHrM*w1`Omod zcXJu{JZ<>GQm~=!F%G#kcPR2bS@^_QG%yEd;p+~Ta{TSC-PN){}eZCY|WEqa#tY&aAz>^?iW zSLg-AEk&eqFK7eMH;6Z<82`EJNHxW30bJMCN~Owz`XYP)6%m;M=zzY6+Dm0gwnJC+ z$Dh9PQsulYA|~noNo!sCp7NBfP`?kjgf&H@3>IrxMU)tYswSjhyk%*}WasW5ob~7%Hd2v~h%0 zWL@oX^11UOW_PNGlj2N;T|1r921S4eVq|!(Ub!rQR$h4SDJSh@^R89Hf^6`0DbQ`R z?T~D&A|KRiPudjzG@9l%MM@lKVq$Jec#e<}F%tvTgarJYDRdl6{@(K)!*&I*y)@Qa zU-&QRjz5mvC3w(sy7UHC=1HRg_F9SVpxh#3RXfj8?NDva+9!$|37e4yl!?mg5!z}4 zt-`7~u1%t~HUq3cwOb1*s}TFoaHS0iA)Y-C5@v8e2`QU;25CcCP+xuw&{IwDOhKH>$dTSBOFH5h(=pj)aZVP{YZp1)^Cxm|fZTc{^&ny8%Q!!^sg*dRCglUC~MRE7rAp$9@z?87Gr>MuFn z+Ii-o7pRg!VF-;QIKouLAYlczm1hv(K?F5IHaMFWs^7fNWQ3d~TM7sjk;Q8gV-^Pz zVw)vBA0XHWpShsk=OWCOQ*W&X$By#oxQ)^A=4vo`XaCPk&;2PqyPoaXdARM!<@$54 zGRz7IW5%LkYNh3+Wl2cuRUZ%m)kOieqX-Y#;rNGmrjDOEc)Y5=U`Sfb+5`j|3xijL zFnNxVxS=vEYM_URyVT@@g|_5OI>eE1MZi3jc0gXlR`oIJF-$Otd8}e|Bf*y&mZrCZ zD(<)$-RMy412kxovvr*)hnP(Us#w~*-vDHy$f#8gez!(S6_}JE?A=fyedFy>0>_9egj#h$P^0dt0tfP9^_2I2Rw9Cibh&p zw~e%zL4}wMT>^pZ=@8{JGems-n6uT&u)fibPE>4bt>8eIZYyhz&aFu~fusjowrZjd zC2*?NE6i07s)eTji_{ESJ9%rmJ{5MWKEB>$>K<|+2kjv@Xmnbhgj!{+a55a%l7O@! zy9|0*_U?l*=1q+T#gZkV>SZNk+eC^;HbRh8b4hJ$o8A6W?K`KKC XT%!}LA1PK8LIwfp(=r$rhyMBp4ziSjh6vw$s5d=#Ef^xhQ4F|`?JueBj7Z49iEff{O%E|28+tJyXVdkA=E%YCV zjrSK=qz_J=M({7Nn!?UrtZkf0a4jN&)iChh_s8eGd-JV4e!6~joIf5ueJpiP-+WQ2?wP(pru9M z?_KY{4HB7+Lobk19Eu;=08rVzBI(s2Mzi2Ev7tzGX{}Nc83@-bx!=IhIVO}Fy!AFZoC^fZ$np0AE zV5H!Jpjy^Uoe$C8#ecl{rF$VfclZh|ldDIQX+J3tM3A*kvZVhYKeO(G zJ PatchClaims = [ - PatchClaim("zyn/project-additive-lead/aquasynth", null, "ZynAddSubFX project-authored fixture", "tests/AquaSynth.Dsl.Tests/Fixtures/ZynAddSubFX/ProjectAuthored/additive-lead.xiz", "project-authored development fixture", "A layered additive lead expressed as named harmonic banks rather than anonymous partial piles.", "Zyn ADDsynth pressure for AquaSynth harmonic-bank syntax.", "pressure", "ReferenceRebuildCatalog.ZynRebuilds", "missing: no accepted listening receipt recorded for this fixture", "structural pressure only", ["not exact Zyn ADDsynth oscillator phase/bandwidth semantics", "not exact Zyn free-envelope timing"]), - PatchClaim("zyn/project-pad-texture/aquasynth", null, "ZynAddSubFX project-authored fixture", "tests/AquaSynth.Dsl.Tests/Fixtures/ZynAddSubFX/ProjectAuthored/pad-texture.xiz", "project-authored development fixture", "A slow layered PAD texture with body, shimmer, air, and explicit spectral-cloud source authority.", "PAD syntax and FFT wavetable pressure.", "pressure", "artifacts/parity/zyn-pad-reference// when optional Zyn oracle is installed", "ear rejected early angry-bees candidate; no final accepted receipt recorded for project-authored pad-texture", "optional Zyn PAD render comparison writes log-mel/envelope report", ["not full Zyn PAD profile/randomness/pitch-zone behavior", "not arbitrary Zyn free-envelope curves"]), - PatchClaim("zyn/project-vocal-layer/aquasynth", null, "ZynAddSubFX project-authored fixture", "tests/AquaSynth.Dsl.Tests/Fixtures/ZynAddSubFX/ProjectAuthored/vocal-layer.xiz", "project-authored development fixture", "A layered vocal-ish synth where air, body, and breath remain inspectable sound objects.", "Formant/layer pressure before the full speech lane.", "pressure", "ReferenceRebuildCatalog.ZynRebuilds", "missing: no accepted listening receipt recorded for this fixture", "structural pressure only", ["no exact Zyn kit-item/effect routing", "formant motion remains approximate"]), - PatchClaim("dx7/algo32-additive-organ/aquasynth", "patches/dx7/algorithm-32-additive-organ.aqua", "DX7 algorithm topology", "in-code topology reference", "derived structural reference", "DX7 algorithm 32 as the easy six-carrier additive case.", "Operator topology pressure where AquaSynth should avoid inventing FM machinery it does not need.", "sketch", "parser/export tests", "missing: topology sketch has no listening receipt", "structural tests only", ["not exact DX7 envelope execution", "not ROM output compensation"]), - PatchClaim("dx7/algo8-bright-pair/aquasynth", "patches/dx7/algorithm-8-bright-pair.aqua", "DX7 algorithm topology", "in-code topology reference", "derived structural reference", "DX7 algorithm 8 as an explicit AquaSynth operator graph with visible modulation routes.", "Operator graph pressure for summed stacks and feedback.", "pressure", "parser/export tests", "missing: topology pressure patch has no listening receipt", "structural tests only", ["not calibrated DX7 feedback register", "not exact DX7 EG"]), - PatchClaim("dx7/public-domain-mc-mm-5-3/aquasynth", "patches/dx7/public-domain-mc-mm-5-3.aqua", "Dexed/dexed-py render of public-domain DX7 SysEx", "tests/AquaSynth.Dsl.Tests/Fixtures/Dx7/PublicDomain/analog1.syx#13", "public-domain development fixture; not packaged", "A short C3-derived sine-like DX7 voice rebuilt as an AquaSynth parity rung.", "Lawful rendered-audio parity proof for the DX7 lane.", "parity", "Dx7ReferenceParityTests optional dexed-py/Faust render report", "metric-gated parity; no explicit human listening receipt recorded", "score>=0.75 log_mel<0.12 envelope<0.10", ["matches rendered behavior, not exact operator-level execution", "uses AquaSynth ADSR timing matched to audio"]), - PatchClaim("dx7/public-domain-prc-synth1-calibrated/aquasynth", "patches/dx7/public-domain/prc-synth1-calibrated.aqua", "Dexed/dexed-py render of public-domain DX7 SysEx", "tests/AquaSynth.Dsl.Tests/Fixtures/Dx7/PublicDomain/analog1.syx#17", "public-domain development fixture; not packaged", "A hard DX7 stacked-FM calibration probe that should keep body, attack, and harmonic grit believable.", "DX7 calibration pressure for route scaling, feedback, detune, operator levels, and envelope shape.", "pressure", "artifacts/parity/dx7-prc-synth1// when optional dexed-py and Faust are installed", "several user listening corrections recorded in state/scratch.md; not promoted to accepted parity", "latest recorded calibrated probe: log-mel around 0.17-0.24 depending rung; pressure target, not accepted parity", ["DX7 EG remains approximated", "hard target still calibration pressure"]) + PatchClaim("zyn/project-additive-lead/aquasynth", null, "ZynAddSubFX project-authored fixture", "tests/AquaSynth.Dsl.Tests/Fixtures/ZynAddSubFX/ProjectAuthored/additive-lead.xiz", "project-authored development fixture", "A layered additive lead expressed as named harmonic banks rather than anonymous partial piles.", "Zyn ADDsynth pressure for AquaSynth harmonic-bank syntax.", "pressure", "ReferenceRebuildCatalog.ZynRebuilds", MissingReceipt("tests/AquaSynth.Dsl.Tests/Fixtures/ZynAddSubFX/ProjectAuthored/additive-lead.xiz vs AquaSynth additive lead rebuild", "harmonic-bank naming and rebuild topology", "No accepted listening pass yet; Zyn oscillator phase/bandwidth and free-envelope timing remain contaminated.", "No witness yet. The card is still waiting for ears instead of paperwork."), "structural pressure only", ["not exact Zyn ADDsynth oscillator phase/bandwidth semantics", "not exact Zyn free-envelope timing"]), + PatchClaim("zyn/project-pad-texture/aquasynth", null, "ZynAddSubFX project-authored fixture", "tests/AquaSynth.Dsl.Tests/Fixtures/ZynAddSubFX/ProjectAuthored/pad-texture.xiz", "project-authored development fixture", "A slow layered PAD texture with body, shimmer, air, and explicit spectral-cloud source authority.", "PAD syntax and FFT wavetable pressure.", "pressure", "artifacts/parity/zyn-pad-reference// when optional Zyn oracle is installed", new CultCacheListeningReceipt("tests/AquaSynth.Dsl.Tests/Fixtures/ZynAddSubFX/ProjectAuthored/pad-texture.xiz vs project-authored AquaSynth pad-texture rebuild", "optional Zyn PAD render comparison, log-mel/envelope report, and manual listening pass on the latest angry-bees candidate", "Early ear pass rejected the candidate; no accepted receipt exists yet, and full Zyn PAD profile/randomness/pitch-zone behavior still contaminates the claim.", "The thing still swarmed instead of blooming, so the witness sent it back into the tank."), "optional Zyn PAD render comparison writes log-mel/envelope report", ["not full Zyn PAD profile/randomness/pitch-zone behavior", "not arbitrary Zyn free-envelope curves"]), + PatchClaim("zyn/project-vocal-layer/aquasynth", null, "ZynAddSubFX project-authored fixture", "tests/AquaSynth.Dsl.Tests/Fixtures/ZynAddSubFX/ProjectAuthored/vocal-layer.xiz", "project-authored development fixture", "A layered vocal-ish synth where air, body, and breath remain inspectable sound objects.", "Formant/layer pressure before the full speech lane.", "pressure", "ReferenceRebuildCatalog.ZynRebuilds", MissingReceipt("tests/AquaSynth.Dsl.Tests/Fixtures/ZynAddSubFX/ProjectAuthored/vocal-layer.xiz vs AquaSynth vocal-layer rebuild", "formant/layer pressure structure", "No accepted listening pass yet; Zyn kit-item/effect routing and moving formant behavior remain contaminated.", "No witness yet. It may sing, or it may commit fraud in a choir robe."), "structural pressure only", ["no exact Zyn kit-item/effect routing", "formant motion remains approximate"]), + PatchClaim("dx7/algo32-additive-organ/aquasynth", "patches/dx7/algorithm-32-additive-organ.aqua", "DX7 algorithm topology", "in-code topology reference", "derived structural reference", "DX7 algorithm 32 as the easy six-carrier additive case.", "Operator topology pressure where AquaSynth should avoid inventing FM machinery it does not need.", "sketch", "parser/export tests", MissingReceipt("patches/dx7/algorithm-32-additive-organ.aqua against DX7 algorithm 32 topology notes", "parser/export structure checks for six visible carriers", "No listening claim exists; DX7 envelope execution and ROM output compensation still contaminate any audible verdict.", "No witness yet. This one is still topology paperwork pretending to be a sound."), "structural tests only", ["not exact DX7 envelope execution", "not ROM output compensation"]), + PatchClaim("dx7/algo8-bright-pair/aquasynth", "patches/dx7/algorithm-8-bright-pair.aqua", "DX7 algorithm topology", "in-code topology reference", "derived structural reference", "DX7 algorithm 8 as an explicit AquaSynth operator graph with visible modulation routes.", "Operator graph pressure for summed stacks and feedback.", "pressure", "parser/export tests", MissingReceipt("patches/dx7/algorithm-8-bright-pair.aqua against DX7 algorithm 8 topology notes", "operator-graph route layout, summed stack structure, and feedback ownership", "No accepted listening pass exists; DX7 feedback calibration and exact EG execution still contaminate the audible claim.", "No witness yet. The graph reads clean, but nobody has signed off on the bite."), "structural tests only", ["not calibrated DX7 feedback register", "not exact DX7 EG"]), + PatchClaim("dx7/public-domain-mc-mm-5-3/aquasynth", "patches/dx7/public-domain-mc-mm-5-3.aqua", "Dexed/dexed-py render of public-domain DX7 SysEx", "tests/AquaSynth.Dsl.Tests/Fixtures/Dx7/PublicDomain/analog1.syx#13", "public-domain development fixture; not packaged", "A short C3-derived sine-like DX7 voice rebuilt as an AquaSynth parity rung.", "Lawful rendered-audio parity proof for the DX7 lane.", "parity", "Dx7ReferenceParityTests optional dexed-py/Faust render report", new CultCacheListeningReceipt("tests/AquaSynth.Dsl.Tests/Fixtures/Dx7/PublicDomain/analog1.syx#13 versus patches/dx7/public-domain-mc-mm-5-3.aqua", "Dexed reference render, Faust candidate render, log-mel/envelope gate, and manual parity listening", "Metrics pass, but operator-level execution is still not exact DX7 and the receipt does not claim keyboard-feel parity.", "The rebuilt tone bites close enough to the reference to count, even if the machinery under the hood is still wearing AquaSynth clothes."), "score>=0.75 log_mel<0.12 envelope<0.10", ["matches rendered behavior, not exact operator-level execution", "uses AquaSynth ADSR timing matched to audio"]), + PatchClaim("dx7/public-domain-prc-synth1-calibrated/aquasynth", "patches/dx7/public-domain/prc-synth1-calibrated.aqua", "Dexed/dexed-py render of public-domain DX7 SysEx", "tests/AquaSynth.Dsl.Tests/Fixtures/Dx7/PublicDomain/analog1.syx#17", "public-domain development fixture; not packaged", "A hard DX7 stacked-FM calibration probe that should keep body, attack, and harmonic grit believable.", "DX7 calibration pressure for route scaling, feedback, detune, operator levels, and envelope shape.", "pressure", "artifacts/parity/dx7-prc-synth1// when optional dexed-py and Faust are installed", new CultCacheListeningReceipt("tests/AquaSynth.Dsl.Tests/Fixtures/Dx7/PublicDomain/analog1.syx#17 versus patches/dx7/public-domain/prc-synth1-calibrated.aqua", "timestamped Dexed/Faust render artifacts, calibration reports, and repeated user listening corrections recorded in state/scratch.md", "The claim remains contaminated by approximate DX7 EG behavior and unresolved hard-target drift; this is pressure, not accepted parity.", "Under the fingers it keeps some body and grit now, but it still lies about the attack when you stop being polite to it."), "latest recorded calibrated probe: log-mel around 0.17-0.24 depending rung; pressure target, not accepted parity", ["DX7 EG remains approximated", "hard target still calibration pressure"]) ]; public static readonly IReadOnlyList SpeechClaims = [ - new("speech/espeak-ng-tiny-workout", new("a, pa, ta, ka, sa, ma", "tests/AquaSynth.Dsl.Tests/EspeakNgGradientDescentTests.cs", "eSpeak NG when ESPEAK_NG or espeak/espeak-ng is installed"), new("neutral human-ish tract controller profile", ["bilabial stop pressure", "alveolar stop pressure", "velar stop pressure", "sibilant turbulence", "nasal velum opening", "open vowel baseline"]), new("AquaSynth should learn a tiny speech-control mapping against generated reference speech instead of hand-filled target paperwork.", "First curriculum rung for Weksa IPA/phonetic utterance rendering."), "pressure", new("artifacts/parity/espeak-ng-gradient-descent/-tiny/training-report.md when eSpeak NG is installed", "missing: no human accepted speech artifact yet", "optional fixture asserts chained learning loss reduction and records log-mel means", ["not intelligible AquaSynth speech yet", "reference supervision still eSpeak-shaped"])), - new("speech/compiled-faust-loss-surface", new("controller-output vector from learned phonetic pipeline", "SpeechBackpropagationPipeline + VocalTractNeuralMapper", "compiled native Faust speech-loss probe"), new("current minimal controllable speech synth; future curriculum target slot", ["all neural mapper outputs exported as speech/output/N controls", "cutoff clamped below Nyquist", "candidate batches render without recompiling DSP"]), new("The optimizer can blast many controller attempts through one compiled Faust surface and climb toward a reference match.", "Curriculum learning loss surface before richer anatomy and parity targets."), "proof", new("CompiledFaustRenderedSpeechLossSurfaceReusesOnePatchWithExportedOutputKnobsWhenToolchainIsAvailable", "missing: optimizer plumbing proof only", "opt-in native batch proof renders multiple candidates through one compiled patch and checks lower loss for closer controls", ["finite-difference controller gradient, not analytic Faust DSP gradient", "minimal synth rung, not full vocal tract"])) + new("speech/espeak-ng-tiny-workout", new("a, pa, ta, ka, sa, ma", "tests/AquaSynth.Dsl.Tests/EspeakNgGradientDescentTests.cs", "eSpeak NG when ESPEAK_NG or espeak/espeak-ng is installed"), new("neutral human-ish tract controller profile", ["bilabial stop pressure", "alveolar stop pressure", "velar stop pressure", "sibilant turbulence", "nasal velum opening", "open vowel baseline"]), new("AquaSynth should learn a tiny speech-control mapping against generated reference speech instead of hand-filled target paperwork.", "First curriculum rung for Weksa IPA/phonetic utterance rendering."), "pressure", new("artifacts/parity/espeak-ng-gradient-descent/-tiny/training-report.md when eSpeak NG is installed", MissingReceipt("eSpeak NG tiny workout reference utterances versus learned AquaSynth tiny curriculum outputs", "training-loss reduction, rendered utterance artifacts, and curriculum pressure listening", "No accepted human speech witness exists; intelligibility is still weak and the supervision remains eSpeak-shaped.", "No witness yet. The machine is learning mouth shapes, not earning applause."), "optional fixture asserts chained learning loss reduction and records log-mel means", ["not intelligible AquaSynth speech yet", "reference supervision still eSpeak-shaped"])), + new("speech/compiled-faust-loss-surface", new("controller-output vector from learned phonetic pipeline", "SpeechBackpropagationPipeline + VocalTractNeuralMapper", "compiled native Faust speech-loss probe"), new("current minimal controllable speech synth; future curriculum target slot", ["all neural mapper outputs exported as speech/output/N controls", "cutoff clamped below Nyquist", "candidate batches render without recompiling DSP"]), new("The optimizer can blast many controller attempts through one compiled Faust surface and climb toward a reference match.", "Curriculum learning loss surface before richer anatomy and parity targets."), "proof", new("CompiledFaustRenderedSpeechLossSurfaceReusesOnePatchWithExportedOutputKnobsWhenToolchainIsAvailable", MissingReceipt("compiled Faust speech-loss probe candidates against the current reference target", "exported speech/output/N controls, batch render reuse, and loss-surface sanity checks", "This is still optimizer plumbing only; gradients are finite-difference and the synth rung is minimal.", "It does not sing yet. It just proves the lab bench is wired correctly."), "opt-in native batch proof renders multiple candidates through one compiled patch and checks lower loss for closer controls", ["finite-difference controller gradient, not analytic Faust DSP gradient", "minimal synth rung, not full vocal tract"])) ]; + private static CultCacheListeningReceipt MissingReceipt( + string subject, + string touchedSurface, + string remainingContamination, + string witnessSentence) => + new(subject, touchedSurface, remainingContamination, witnessSentence); + private static CultCachePatchClaimCard PatchClaim( string id, string? patchPath, @@ -190,7 +204,7 @@ public static class CultCachePatchDocumentCatalog string useContext, string tier, string latestRenderArtifact, - string latestListeningReceipt, + CultCacheListeningReceipt latestListeningReceipt, string metricSummary, IReadOnlyList knownLies) => new( diff --git a/state/scratch.md b/state/scratch.md index 89514c0..5c90e41 100644 --- a/state/scratch.md +++ b/state/scratch.md @@ -2,6 +2,22 @@ Current slice: +- Tightened CultCache claim receipts into an explicit hazard-light witness + shape. `CultCacheProofTruth.LatestListeningReceipt` is no longer a loose + string; it is now `CultCacheListeningReceipt` with `Subject`, + `TouchedSurface`, `RemainingContamination`, and `WitnessSentence`. +- The default patch/speech claim catalog now carries those fields directly, so + a card names what patch/reference was touched, what surface got exercised, + what still contaminates the claim, and one human/domain witness sentence + about whether the sound bites, blooms, or lies. +- Regenerated `patches/aquasynth-patch-cultcache.cc` from the typed catalog so + the checked-in CultCache artifact matches the new receipt schema. +- Focused tests now assert receipt structure explicitly instead of only checking + that some non-empty string exists. + +- Verification: + `dotnet test tests\AquaSynth.Dsl.Tests\AquaSynth.Dsl.Tests.csproj --filter "CultCachePatchDocumentTests" -v minimal` + - Added the first distributed speech-training contract: `SpeechRenderRequest`, `SpeechRenderResult`, and `SpeechTrainingCheckpoint` are typed CultCache documents in diff --git a/tests/AquaSynth.Dsl.Tests/CultCachePatchDocumentTests.cs b/tests/AquaSynth.Dsl.Tests/CultCachePatchDocumentTests.cs index 2455ea4..2f55645 100644 --- a/tests/AquaSynth.Dsl.Tests/CultCachePatchDocumentTests.cs +++ b/tests/AquaSynth.Dsl.Tests/CultCachePatchDocumentTests.cs @@ -24,8 +24,7 @@ public sealed class CultCachePatchDocumentTests [Fact] public async Task EverySeriousClaimNamesAReferenceAndReceiptSurface() { - var document = await CultCachePatchDocumentStore.ReadAsync( - Path.Combine(RepositoryRoot(), "patches", "aquasynth-patch-cultcache.cc")); + var document = CultCachePatchDocumentCatalog.CreateDefault(); foreach (var claim in document.PatchClaims) { @@ -33,7 +32,7 @@ public sealed class CultCachePatchDocumentTests Assert.False(string.IsNullOrWhiteSpace(claim.Reference.FixtureOrArtifact), claim.Id); Assert.False(string.IsNullOrWhiteSpace(claim.Intent.PerceptualClaim), claim.Id); Assert.False(string.IsNullOrWhiteSpace(claim.Proof.LatestRenderArtifact), claim.Id); - Assert.False(string.IsNullOrWhiteSpace(claim.Proof.LatestListeningReceipt), claim.Id); + AssertListeningReceipt(claim.Id, claim.Proof.LatestListeningReceipt); Assert.NotEmpty(claim.Proof.KnownLies); } @@ -43,11 +42,27 @@ public sealed class CultCachePatchDocumentTests Assert.False(string.IsNullOrWhiteSpace(claim.UtteranceSource.ReferenceRenderer), claim.Id); Assert.False(string.IsNullOrWhiteSpace(claim.Target.AnatomyOrProfile), claim.Id); Assert.False(string.IsNullOrWhiteSpace(claim.Proof.LatestRenderArtifact), claim.Id); - Assert.False(string.IsNullOrWhiteSpace(claim.Proof.LatestListeningReceipt), claim.Id); + AssertListeningReceipt(claim.Id, claim.Proof.LatestListeningReceipt); Assert.NotEmpty(claim.Proof.KnownLies); } } + [Fact] + public void ListeningReceiptsCarryHazardLightWitnessFields() + { + var document = CultCachePatchDocumentCatalog.CreateDefault(); + + foreach (var claim in document.PatchClaims) + { + AssertListeningReceipt(claim.Id, claim.Proof.LatestListeningReceipt); + } + + foreach (var claim in document.SpeechClaims) + { + AssertListeningReceipt(claim.Id, claim.Proof.LatestListeningReceipt); + } + } + [Fact] public async Task CultCachePatchClaimsCoverReferenceRebuildCatalog() { @@ -77,6 +92,14 @@ public sealed class CultCachePatchDocumentTests File.ReadLines(Path.Combine(root, "patches", "library.yaml")) .Count(line => line.TrimStart().StartsWith("- path:", StringComparison.Ordinal)); + private static void AssertListeningReceipt(string claimId, CultCacheListeningReceipt receipt) + { + Assert.False(string.IsNullOrWhiteSpace(receipt.Subject), $"{claimId} subject"); + Assert.False(string.IsNullOrWhiteSpace(receipt.TouchedSurface), $"{claimId} touched"); + Assert.False(string.IsNullOrWhiteSpace(receipt.RemainingContamination), $"{claimId} contamination"); + Assert.False(string.IsNullOrWhiteSpace(receipt.WitnessSentence), $"{claimId} witness"); + } + private static string RepositoryRoot() { var directory = new DirectoryInfo(AppContext.BaseDirectory);