Skip to content

Editing a recipe's script does not invalidate outputs (code_version ignores script contents) #153

@lhparker1

Description

@lhparker1

What happened

code_version is computed from the recipe command string + container image + decisions, but NOT from the contents of the script the command invokes. After materializing an output, editing the underlying script (e.g. changing the weighting logic in run_reconstruction.py) leaves lc status reporting the output as ok, and a plain lc run skips it as already-built. The output silently reflects stale code. The only ways to rebuild are lc run -f or deleting the output dir — both require the user to know the script changed, which defeats the point of provenance/staleness tracking.

Reproduction

  1. lc run <output_id> to materialize an output whose recipe is python scripts/foo.py ....
  2. Edit scripts/foo.py (change behavior, not the recipe command).
  3. lc status -> still ok; lc run <output_id> -> skipped (no rerun).

Expected: a script-content change invalidates dependent outputs (hash the resolved script file(s), or the command's file dependencies, into code_version / a rerun-trigger).

Environment

  • ASTRA (astra-spec): 0.0.7
  • lightcone-cli: 0.3.0
  • Python: 3.11.14
  • OS: Linux 6.4.0 (NERSC Perlmutter)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions