Ψ-W1-T1 second-round remediation: ±1-frame bounds tolerance, self-cleanup a refused render, hedge two unverified render-source inferences

Loosens the exact-bounds gate against REAPER's edge rounding; deletes the bytes a BoundsMismatch refusal writes, per prune_fs's self-cleanup carve-out.
This commit is contained in:
2026-08-01 21:18:03 -04:00
parent 7dc80e7a4f
commit a0220e8c57
7 changed files with 81 additions and 18 deletions
+4 -3
View File
@@ -246,9 +246,10 @@ static void testRangedItemScopeRendersTimeBounded() {
static void testMultiTrackRangedItemRenderIsNamedForRefusal() {
// The one shape that cannot land: a ranged item capture (item scope re-sourced to
// the selected-tracks render) whose items span more than one track. That source
// renders one file per track with no single-file bit available, so N stems would
// collapse onto one render pattern and one track's audio would land as a
// successful capture.
// is INFERRED to render one file per track with no single-file bit available
// (unverified; see src/shell/capture/CLAUDE.md §Gotchas for what that inference
// rests on), so N stems would collapse onto one render pattern and one track's
// audio would land as a successful capture.
CHECK(isMultiTrackRangedItemRender(CaptureScope::Item,
SourceMode::SelectedTracks, 2));
CHECK(isMultiTrackRangedItemRender(CaptureScope::Item,
+10
View File
@@ -70,6 +70,15 @@ static void testUnterminatedFolderSwallowsTheRest() {
CHECK(sameIndices(directChildIndices(depths, 0), {1, 2}));
}
static void testSiblingFolderAfterParentClosesIsNotIncluded() {
// 0: folder parent, 1: child, 2: last child (closes it). 3: an unrelated sibling
// folder that opens AFTER track 0's folder has already closed, 4: its child, 5:
// its last child. A walk that fails to stop at track 0's own close would keep
// consuming and wrongly pull the sibling's children in too.
const std::vector<int> depths{1, 0, -1, 1, 0, -1};
CHECK(sameIndices(directChildIndices(depths, 0), {1, 2}));
}
int main() {
testFlatProjectHasNoChildren();
testFolderParentReturnsItsDirectChildren();
@@ -77,6 +86,7 @@ int main() {
testMultiLevelCloseEndsTheOuterFolderToo();
testNonFolderAndOutOfRangeReturnEmpty();
testUnterminatedFolderSwallowsTheRest();
testSiblingFolderAfterParentClosesIsNotIncluded();
if (g_fail == 0) std::printf("track_topology: all tests passed\n");
return g_fail == 0 ? 0 : 1;