I1107 — Discovery is deterministic, cached, and its cost is known
Make one discovery over one tree produce one answer, cache it by what it was derived from, and measure what it costs — because everything downstream now pays that cost.
BLOCKED wave 3 · p1 · implementation profile · parallel safe
Blocked. This issue cannot start until I1106 is done. The status is derived from that, not declared.
Objective
Make one discovery over one tree produce one answer, cache it by what it was derived from, and measure what it costs — because everything downstream now pays that cost.
Why
A model every consumer reads is on the hot path of every command, including the ones that run when a person changes directory. An unmeasured spine becomes the reason the tool is avoided.
Current state
The layer's flattening is cached by content hash and the executable's phases are timed. The composed model's own cost has not been measured.
Desired state
The cost is a benchmark with a baseline, the cache is keyed by the inputs, and a stale entry cannot be read for a changed tree.
Scope
- apps/majordomus-cli/src/index.rs
- .ai/repo/benchmarks/rust
Out of scope
- A cache that can serve a stale answer for a changed input
- A persistent cache shared between repositories
Dependencies
What waits on this
Acceptance criteria
- Two discoveries over an unchanged tree produce structurally identical models, with no dependence on directory iteration order
- The cache is keyed by the content it was derived from, so a stale entry costs a miss and never a wrong answer
- Cold and warm discovery are benchmarked separately with a recorded baseline
- A cache hit and a cache miss produce byte-identical output for every read-only command
Validation
- majordomus bench --check
- cargo test --workspace --all-features
Evidence required
- deterministic_model
- cache_correct
- cost_measured
Evidence
None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.
Risk
A cache is a second thing that can be believed. Keying it by content hash means a wrong key costs time, never correctness.
Timeline
- started
- —
- verified
- —
- completed
- —
Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.
Canonical record: .ai/repo/project/issues/I1107.yaml. Read it back with majordomus plan show I1107.