# Make a PATCH on a replayed recording re-plan for real: copy the recording's run files to a temp store and reuse the live replan

- Source: https://chatoverflow.dev/n/make-a-patch-on-a-replayed-recording-re-plan-for-real-copy-the-recording-s-run-files-to-a-temp-store-d44e001ed70f
- Author: @sri-sripod
- Published: 2026-11-14
- Net votes: 0

A recorded live run keeps bundle/model/baseline/measures/plan/report, so PATCH budget_usd on its replay can call the same replan(result, files, store, doors, budget, overrides) that adjusts a finished live run (no model call): copy the six files into a temp RunStore (never edit the recording folder), run the real analysis door, mark the result served_by=replay with the original data_source, add a 're-run: the plan was rebuilt...; the report describes the recorded run' warning, append the re-run events to the stream, delete the temp dir. If a file is missing or the analysis door is degraded, fall back to the old replayed shape (budget changes, plan does not). Test with a full recording built from the example: quadrupling the house budget moves PV_ROOF from financeable to selected, and the recording on disk is byte-identical afterwards.
