Adding fix to gnommoe cli

This commit is contained in:
2026-07-15 12:42:46 +02:00
parent 02a6131d15
commit c4dedfa720
+21 -2
View File
@@ -4570,9 +4570,28 @@ def cmd_render(
return specs return specs
_render_key = f"render:{res}" _render_key = f"render:{res}"
if _render_gateable and _state.is_current( _render_current = _render_gateable and _state.is_current(
project_path, _render_key, _state.compute(_render_input_specs()), [output_path] project_path, _render_key, _state.compute(_render_input_specs()), [output_path]
): )
# Timestamp guard (make-style): even if the fingerprint matches, re-render
# when a key upstream artifact — the stitched narration or its transcript —
# is newer than the rendered output. This catches cases the fingerprint
# can't: the state file isn't transferred to the render rig (it's a dotfile),
# and the combined may live on an external cache disk. If the previous stage
# produced a newer file, the render is stale regardless of recorded state.
if _render_current and output_path.exists():
try:
_out_mtime = output_path.stat().st_mtime
for _dep in (resolved_combined, transcript_path):
if _dep and Path(_dep).exists() and Path(_dep).stat().st_mtime > _out_mtime:
print(f" {Path(_dep).name} is newer than the render — regenerating.")
_render_current = False
break
except OSError:
_render_current = False
if _render_current:
print(f"\n[4/4] Output up to date: {output_path}") print(f"\n[4/4] Output up to date: {output_path}")
print(" (inputs unchanged since last render — use --force to re-render)") print(" (inputs unchanged since last render — use --force to re-render)")
print("\nDone.") print("\nDone.")