feat(sleep): opt-in llm_dream mode for LLM-generated dream variants - #244
feat(sleep): opt-in llm_dream mode for LLM-generated dream variants#244Bogdan (Dan) Baciu (bogdanbaciu21) wants to merge 4 commits into
Conversation
Add llm_dream (default off). When enabled, the optimizer writes paraphrase-only variants; parent reference and judge are copied unchanged. Parse or fidelity failure falls back to the existing wrappers, so template mode stays byte-identical and a night can degrade but not break. Generated variants are train-only.
|
Thanks for making LLM dream generation opt-in and retaining a fallback. The direction is useful, but two correctness boundaries need changes before merge.
Please add regressions proving that only the optimizer backend is called; that target counters/credentials remain untouched; that contradictory or constraint-removing generations fall back to the original/template intent; and that duplicate/malformed generations are rejected. Before enabling this as a training-data feature, please also provide a small recorded or opt-in live end-to-end result with generation acceptance/fallback rate, token cost, and held-out non-regression (ideally lift). The existing lexical-diversity fixture uses author-written strings and does not validate the behavior or practical effect of the live generation path. |
|
Yifan Yang (@Yif-Yang) Thanks for the detailed review. I fixed both correctness boundaries and added the requested regressions and end-to-end evidence at head
I reran the focused and entire repository suites against that exact head on native Linux, macOS, and Windows. The full suite passed with 1,463 tests on Linux, 1,463 on macOS, and 1,418 on Windows; no tests failed or were deselected. Ready for re-review. |
|
Thanks — the routing and fail-closed fidelity changes look addressed. The remaining evidence still does not validate practical benefit from LLM dreams, however. The real OpenCode cycle sets both |
Summary
This adds an opt-in
sleep.llm_dreampath that creates LLM-generated training variants through the optimizer while preserving target isolation, held-out inputs, staging, and the existing non-regression gate. The default remains off, and rejected or unavailable generations fall back to the deterministic template.Review fixes
DualBackendroutes generation only to the optimizer; tests prove target calls, credentials, counters, and token accounting remain untouched.Validation
Exact head:
09d8cef1ea2a6c0a4b21bf7527b1360bab666c93Six-job native validation run
No tests failed or were deselected. The focused skips are two unavailable external-fixture tests on every runner, plus one Windows-only PATHEXT test skipped on Linux/macOS; no live-provider test ran. The deterministic full cycle runs on every platform. Ruff on the changed surface, compileall,
git diff --check, and strict MkDocs pass.