I0840 — context and its subcommands under a second
Time context resolve, validate, affected and check-sync, and remove the per-document git and awk calls so each runs under a second on this repository.
BLOCKED wave 3 · p0 · implementation profile · runs alone
Part of M004 — Performance is executable evidence, and the hot path does no canonical work twice.
Blocked. This issue cannot start until I0820, I0821 are done. The status is derived from that, not declared.
Objective
Time context resolve, validate, affected and check-sync, and remove the per-document git and awk calls so each runs under a second on this repository.
Why
context is what every session runs first, and resolve is what every worker runs before touching a path.
Current state
Each takes about one second, dominated by per-document git ls-files.
Desired state
One git ls-files per invocation, one flatten per document, output unchanged.
Scope
- lib/context_docs.sh
- lib/context.sh
- test/cases/69_context_documents.sh
- test/cases/70_context_impact.sh
- test/cases/71_context_sync.sh
Dependencies
- I0820READY Catalogue, DAG, context and command-surface validators read their inputs once
- I0821READY Flattened YAML is cached under .ai/local/cache by content hash
Acceptance criteria
- Cases 23, 69, 70 and 71 pass unchanged
- git count for context validate is at most two
Validation
- MJ_TIMING=1 bin/majordomus context validate
Evidence required
- batch_reads
Evidence
None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.
Risk
The tracked-only rule must survive: one ls-files listing is filtered per document instead of asked per document.
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/I0840.yaml. Read it back with majordomus plan show I0840.