Add agent rehearsal harness, findings, and per-run evidence for split-loop-with-lambda
Six scripted pi sub-agent runs (3 tool regimes × 2 models) rehearsed the exercise; deterministic gate = solution test + approved file. Key results: mandated CLI triples cost on the strong model (4:06 vs 0:39, PASS both); weak model fails only under the mandate (A+Q), passes when free or optional. Drift documented with code: scorer.updateSelection left inside the extracted method (A+Q, C+Q). Harness in tools/rehearse; summary in rehearsal-findings.md; per-run evidence in rehearsal-runs/; cheat sheet in rehearse-with-agent.md corrected (lambda-typed parameters unsupported).
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
--- Run C+Q ---
|
||||
session file: /tmp/rehearsal/runs/C+Q/session/2026-09-27T15-53-02-700Z_01a0e391-ddec-76b3-83b6-8a55d163bf7c.jsonl
|
||||
model: Qwen/Qwen3.6-35B-A3B
|
||||
session span: 71.7 s
|
||||
assistant messages: 16
|
||||
tool calls: 17 total
|
||||
bash 7
|
||||
read 5
|
||||
edit 5
|
||||
tokens input: 138747
|
||||
tokens output: 8337
|
||||
tokens cacheRead: 0
|
||||
tokens cacheWrite: 0
|
||||
tokens reasoning: 2579
|
||||
tokens TOTAL (sum): 149663
|
||||
--- /usr/bin/time -v (wall clock + max RSS) ---
|
||||
Elapsed (wall clock) time (h:mm:ss or m:ss): 1:11.84
|
||||
Maximum resident set size (kbytes): 226488
|
||||
Exit status: 0
|
||||
--- pi stdout (last 15 lines) ---
|
||||
+ long daysForward = ChronoUnit.DAYS.between(forecastDate, date);
|
||||
+ expectedWeather.add(dayOffsetToWeather.apply(daysForward));
|
||||
+ }
|
||||
+ return expectedWeather;
|
||||
+ }
|
||||
}
|
||||
```
|
||||
|
||||
## Summary of changes:
|
||||
|
||||
| Step | Change |
|
||||
|------|--------|
|
||||
| **1** | Added `import java.util.function.LongFunction`; introduced `dayOffsetToWeather` lambda wrapping `scorer.lookupWeather()` in the original method body, replacing direct scorer calls |
|
||||
| **2** | Extracted the weather-collection loop into a new `private List<Boolean> collectExpectedWeather(List<Instant>, LongFunction<Boolean>)` method |
|
||||
| **3** | Removed `String quarter` parameter; added a **no-arg** `longRangeForecast()` that delegates to the parameterized overload wrapping the `scorer`; renamed the main method to accept `LongFunction<Boolean> dayOffsetToWeather` |
|
||||
Reference in New Issue
Block a user