Incremental cache for task results (inputsHash)
- Dominant language
- Rust
- Stars
- 209
- Forks
- 65
- Avg merge
- 8h 55m
- Merged PRs (30d)
- 126
Description
## Context
The out-directory design (`docs/superpowers/specs/2026-09-02-out-directory-design.md`, branch `t3code/understand-compile-output`) gives every task a scratch directory (`.dest/`) and a result record (`.json`) under the workspace out root, following the Mill layout. The record currently carries `task`, `module`, `inputs`, `value`, `ir`, `ejected`, and `completedAt`. It deliberately leaves out any input hashing so that the first implementation stays small.
## What this issue covers
Add incremental execution on top of the result record:
- An `inputsHash` field on the result record: a content hash over the task's source files, its configuration slice, and the `inputsHash` of each task named in `inputs`.
- A skip path in compile and generate: when the current hash matches the stored record, report the existing `.dest` as up to date and do not rerun the extension.
- A `--force` flag (or equivalent) to bypass the check.
- Clear handling for a `.dest` that exists without a record (treat as stale and rerun).
## Related design
`docs/design/draft/daemon/build.md` already sketches a cache manifest under `.morphir/cache///manifest.json` with per-file hashes and dependency hashes. That design should be reconciled with the result record: either the record absorbs the manifest, or the manifest lives beside the record and the record points to it. Pick one and update `build.md`.
## Out of scope
Transform stages between compile and generate are tracked separately.
Contributor guide
Research direction
Start with docs/superpowers/specs/2026-09-02-out-directory-design.md and docs/design/draft/daemon/build.md, then locate the result-record and compile/generate entry points they describe. Reconcile the result record with the cache manifest design, implement hashing, skip and force behavior, and verify that missing records cause reruns while transform stages remain separate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100