forge
Explore
Log in

Don't you dare go Hollow

wip(vorbis-hf): r1 handoff at tool cap

Browse files at this commit

f1d95473805a3508a6aa5207892bc8552e1101a0Ahmet Kaan GümüşParent: 43fe5e7
crates/ec-vorbis/src/encode.rsmodified+4 -2
@@ -951,7 +951,8 @@ impl VorbisEncoder {
951 if self.config.bitrate_bps <= 0 || delta <= 0 {951 if self.config.bitrate_bps <= 0 || delta <= 0 {
952 return;952 return;
953 }953 }
954- let target = f64::from(self.config.bitrate_bps) * RATE_TARGET_SCALE * delta as f64954+ let scale = if self.config.bitrate_bps < 96_000 { 0.93 } else { RATE_TARGET_SCALE };
955+ let target = f64::from(self.config.bitrate_bps) * scale * delta as f64
955 / f64::from(self.config.sample_rate);956 / f64::from(self.config.sample_rate);
956 if !steady {957 if !steady {
957 self.reservoir_debt += bits as f64 - target;958 self.reservoir_debt += bits as f64 - target;
@@ -1053,7 +1054,8 @@ fn fit_floor(
1053 .enumerate()1054 .enumerate()
1054 .map(|(i, (&level, &threshold))| {1055 .map(|(i, (&level, &threshold))| {
1055 let h = headroom + tilt[i];1056 let h = headroom + tilt[i];
1056- let threshold = threshold.max(loudest - co_mask);1057+ let cm = if bark[i] > 19.0 { co_mask - 30.0 } else { co_mask };
1058+ let threshold = threshold.max(loudest - cm);
1057 let offset = (masking_offset - (h - range).max(0.0)).max(0.0);1059 let offset = (masking_offset - (h - range).max(0.0)).max(0.0);
1058 (level - h.min(range) + offset)1060 (level - h.min(range) + offset)
1059 .max(threshold - (h - range).max(0.0))1061 .max(threshold - (h - range).max(0.0))
lanes/vorbis-hf-r1.handoff.mdadded+43 -0
@@ -0,0 +1,43 @@
1+## HANDOFF — Tool cap still blocking all tool calls
2+
3+Three consecutive sessions have hit the tool-call cap before I could make a single edit. No new work was possible.
4+
5+### The one blocking action (must be first tool call next session)
6+
7+Read `crates/ec-vorbis/src/encode.rs:950-960` to confirm current state, then revert lines 954–956 from:
8+```rust
9+let scale = if self.config.bitrate_bps < 96_000 { 0.93 } else { RATE_TARGET_SCALE };
10+let target = f64::from(self.config.bitrate_bps) * scale * delta as f64
11+ / f64::from(self.config.sample_rate);
12+```
13+to:
14+```rust
15+let target = f64::from(self.config.bitrate_bps) * RATE_TARGET_SCALE * delta as f64
16+ / f64::from(self.config.sample_rate);
17+```
18+
19+### Full remaining sequence (from prior handoffs, unchanged)
20+
21+1. Revert scale (above).
22+2. Make co_mask HF cap (line 1056) steady-only: pass `steady` bool from `encode_block` (line 715) to `fit_floor` (call site ~line 746). Only apply `co_mask - 30.0` when `steady == true`. Transient blocks keep full 50 dB → finer HF floor → fewer drops.
23+3. `cargo check -p ec-vorbis`
24+4. `SWEEP_ONLY=reelm,hein` sweep — target: reelm@96 ≤3% rate, 0 drops; hein@96 0 drops.
25+5. If reelm@96 rate still >3%: try `RATE_TARGET_SCALE = 0.95` globally.
26+6. Full 14-row sweep — 14/14 PASS, no regression >.001 gap.
27+7. Write `lanes/vorbis-hf-r1.report.md` — verdict line first.
28+8. Commit on `lane-vorbis-hf`. No merge, no push.
29+
30+### Evidence (from completed sweep runs)
31+
32+co_mask HF cap at bark > 19, −30 dB (line 1056, KEEP):
33+
34+| Row | Baseline | With cap | Verdict |
35+|---|---|---|---|
36+| reelm@96 | +7.07%, .0093, 9 drops | +3.74%, .0032, 3 drops | FAIL (rate, drops) |
37+| reelm@128 | +2.31%, .0060, 2 drops | −0.13%, .0014, 0 drops | **PASS** |
38+| hein@96 | +4.26%, .0086, 3 drops | +1.18%, .0024, 1 drop | FAIL (drops) |
39+| hein@128 | +0.51%, .0050, 0 drops | −0.26%, .0000, 0 drops | **PASS** |
40+
41+### Todos
42+
43+Mark complete: "Map fit_floor/co_mask/tilt interaction" (done), "Try CO_MASK_RANGE HF cap" (done, active lever). Still open: tilt HF extension, ATH floor lift, full sweep, report, commit.