From 4c7e0507a145f7281ab3be4d10e5d84f9955daab Mon Sep 17 00:00:00 2001 From: daniel-c-harvey Date: Sun, 2 Aug 2026 17:08:11 -0400 Subject: [PATCH] Fix vacuous bounds test and stale/circular comments from the settle Replace the self-comparing render-window loop with a genuinely discriminating floor-vs-exact check; correct two stale claims; mark the Auto/Manual floor-parity premise as unverified; drop the STARTPOS/ENDPOS comment's circular justification. --- docs/VERIFICATION.md | 2 +- src/shell/capture/capture.cpp | 8 +++----- tests/test_render_settings.cpp | 15 +++++++++------ tests/test_render_window.cpp | 32 +++++++++++++++++++------------- 4 files changed, 32 insertions(+), 25 deletions(-) diff --git a/docs/VERIFICATION.md b/docs/VERIFICATION.md index c6f86b9..02cdf28 100644 --- a/docs/VERIFICATION.md +++ b/docs/VERIFICATION.md @@ -27,7 +27,7 @@ Checks for Θ, Ξ, and Ψ work that no unit test can close. Build **Release**, i - [ ] One razor-union case (two disjoint areas, one track) — lands the requested window, no `ReaSampler capture failed:` line (`PLAN.md:2137`) - [ ] Capture an item whose extent already equals the window — still lands, unchanged (the byte-identity regression floor) (`docs/COMPLETED.md:829`) - [ ] **The millisecond floor — SETTLED, nothing to re-run for `TailMode::None`.** The floor lives in the custom-time-bounds field (`RENDER_BOUNDSFLAG=0`), not in the render engine. Two live 48 kHz `TailMode::None` renders on `RENDER_BOUNDSFLAG=2` (time selection, handed over via `GetSet_LoopTimeRange`) came back exact — 97627 frames against 97627 — the second over a window whose START carried a sub-millisecond remainder, with no floored model of that window able to reproduce the count. Time selection is now the only bounds mode a capture can reach; the console verdict line and the `RENDER_STARTPOS`/`ENDPOS` read-back probe that answered this are gone. Full observation: `src/core/capture/render_settings.h`'s `kRenderBoundsTimeSelection` -- [ ] **Still open — Auto and Manual tail.** `checkRenderedBounds` judges `TailMode::None` only (Auto/Manual add frames by design), so the settled result covers those two by INFERENCE, not observation: the floor applied to the bounds identically on all three tail modes, and all three now hand the window over the same way. What would establish it: repeat an off-grid-start capture at **Manual** over a source that is loud right to the window's end, and check the landed file's frames against window + `tailMs` — a floored edge shows up in that count. **Auto** cannot be checked by count (it trims trailing silence), so it needs the null test by ear/inversion against the source instead +- [ ] **Still open — Auto and Manual tail.** `checkRenderedBounds` judges `TailMode::None` only (Auto/Manual add frames by design), so the settled result covers those two by INFERENCE, not observation, and the inference rests on an unverified PREMISE too: that the (retired) floor applied to the bounds identically across all three tail modes, and that all three now hand the window over the same way. Neither is measured — both live short renders that settled the bounds mode were `TailMode::None`; no Auto or Manual capture has been observed at all. **On Auto/Manual, the ONLY automatic check left is the 0-byte gate (`checkRenderedFileNotEmpty`)** — there is no automatic bounds signal for those two modes at all until this bullet is closed by hand. What would establish it: repeat an off-grid-start capture at **Manual** over a source that is loud right to the window's end, and check the landed file's frames against window + `tailMs` — a floored edge shows up in that count. **Auto** cannot be checked by count (it trims trailing silence), so it needs the null test by ear/inversion against the source instead - [ ] `[verify — DAW]` A tail is assumed to render PAST the window end — the SDK header (`:3048`) confirms only that `RENDER_TAILMS` is a length in ms, not that it extends past the end. If that assumption is wrong, a tail capture is silently SHORTER than its window with no detector at all. Report whether either tail capture comes up short against the source - [ ] A refused render is kept for diagnosis at `/reasampler_refused/` (the refusal line names the path; a failed move leaves it unindexed in the bank folder and says so). Delete the folder when done — nothing in the bank references it - [ ] **If a capture is refused for a short render**, report the refusal line verbatim. A message naming `floored to the millisecond` means the floor is back on a mode measured escaping it; a shortfall of one or two frames with no such sentence may be the gate's own edge-convention tolerance rather than the render (`render_window.h`'s `renderHonoredBounds`) diff --git a/src/shell/capture/capture.cpp b/src/shell/capture/capture.cpp index 6ba7b73..1bd3993 100644 --- a/src/shell/capture/capture.cpp +++ b/src/shell/capture/capture.cpp @@ -464,11 +464,9 @@ CaptureResult OfflineRenderBackend::capture(const CaptureRequest& request) { // millisecond (render_settings.h's kRenderBoundsTimeSelection). // // RENDER_STARTPOS/ENDPOS are written anyway, to the same window. The header - // (~3045-3046) documents them as mode-0-only, but the DAW run that settled this - // channel had both stores holding the identical window, so it cannot distinguish - // "mode 2 ignored them" from "mode 2 read them and they happened to agree". Writing - // them keeps the two stores agreeing rather than resting exactness on that - // distinction; a stale leftover here could only ever misalign a render silently. + // (~3045-3046) documents them as mode-0-only, so on mode 2 this is a cheap, + // fully-restored (ScopedRenderSettings) defensive write against that + // documentation being an incomplete account of what the renderer reads. GetSetProjectInfo(proj, "RENDER_BOUNDSFLAG", static_cast(kRenderBoundsTimeSelection), true); GetSetProjectInfo(proj, "RENDER_STARTPOS", request.startSeconds, true); diff --git a/tests/test_render_settings.cpp b/tests/test_render_settings.cpp index 1ae1b3c..952f964 100644 --- a/tests/test_render_settings.cpp +++ b/tests/test_render_settings.cpp @@ -65,9 +65,11 @@ static void testRealtimeIsUnsupportedOffline() { } static void testEveryRenderSourceLabelIsPinnedVerbatim() { - // docs/VERIFICATION.md asks Daniel to report the refusal's `Render source:` line - // back verbatim, so every label is pinned to its literal — a typo in any of them - // breaks the report that quotes it, and only a literal catches that. + // docs/VERIFICATION.md's short-render bullet asks Daniel to report the refusal + // line back verbatim, and that line always carries the render source + // (render_bounds_gate.cpp appends "Render source: