Skip to content
Cockpit0.29.0
A snapshot: read at commit 707a04c7ce8 on 2026-10-18T00:06:01Z by majordomus 0.29.0. Nothing on this page is read again. See it live

I0821

Flattened YAML is cached under .ai/local/cache by content hash

Where it stands

devtask.issue
Readiness
ready no dependency and no gate holds it; nobody has started it
Status
READY
Can start
startable
Milestone
Milestone status
ACTIVE
Wave
1
Waiting on
none
Holds back
Behind it in all
3
Evidence
0 of 1
A move writes the repository: it stamps one field of this issue's record and appends one event to the ledger, and a commit will carry both.
The same moves from a terminal

majordomus plan start I0821

majordomus plan verify I0821

majordomus plan done I0821

What it is

Objective
Cache the output of mj_yaml_flatten under .ai/local/cache/flat/<sha256>, keyed by the file's content hash and the flattener's own version, so a second command on unchanged files does no parsing.
Why
doctor flattens 181 files and knowledge nodes 146; across the hook, watch and context the same files are parsed again and again.
Now
.ai/README.md already reserves local/cache/ for rebuildable caches; nothing uses it.
Wanted
A miss parses and writes atomically; a hit copies; a changed file cannot hit because its hash changed; the cache is bounded by an entry cap in the policy and trimmed oldest first.
Done when
unknown: the record declares no `completion`
Risk
Hashing a file costs a subprocess too; the cache pays only when a flatten is materially dearer than a hash, which the counters must show before this lands.

Acceptance

  • Byte-identical output of every read-only command with a cold and a warm cache, proved by case 77
  • A changed file is re-parsed, proved by mutation
  • The cache never grows past the cap
  • yaml_flatten count is unchanged; a new counter flatten_cache_hit reports hits
Validation
bash test/run.sh 77_flatten_cacheMJ_TIMING=1 bin/majordomus doctor
Evidence required
flatten_cache
Evidence present
unknown: the record carries no `evidence` entries

Scope

Touches
lib/common.shshare/allow/policy.txtshare/skeleton/policy.yaml.ai/repo/policy.yamldocs/SCHEMAS.mdtest/cases
Not
A cross-process cache of command results
Depends on
Priority
p0
Profile
implementation
Parallel safe
false
Owner
unknown: the record declares no `owner`

The work so far

Branches
none
Merged
none
Commits
0
Trunk
master
Sessions
none
Created
2026-09-05
Updated
2026-09-05
Started
unknown: the record declares no `started_at`
Verified
unknown: the record declares no `verified_at`
Completed
unknown: the record declares no `completed_at`

Synchronisation

Adapter
scripts/github-sync
Repository
unknown: the derived plan's header carries no repository
External issue
unknown: a live GitHub state; this executable makes no network call, so only `scripts/github-sync --check` can answer it
State there
unknown: a live GitHub state; this executable makes no network call, so only `scripts/github-sync --check` can answer it

Findings

LevelCodeMessageReproduce
WARNscope_conflictshares docs/SCHEMAS.md with I1302; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I1951; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I1965; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I1985; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares share/skeleton/policy.yaml with I1988; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares share/allow/policy.txt with I2401; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2403; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2484; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2700; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares .ai/repo/policy.yaml with I2701; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2706; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2708; they may not run concurrentlymajordomus plan validate
WARNscope_conflictshares test/cases with I2709; they may not run concurrentlymajordomus plan validate