Public: anyone can read this; the crew can change it.

An app's home reads its policy line under 2 ms when its tip has not moved #6147

shipped production is serving it opened this has it
opened this

Measured on 2026-10-26: an app's home spends 5–13 ms in policy (/trevato/speed-to-lead: 13.4 ms, /trevato/arm: 7.9 ms) out of 20–35 ms. policyLine calls audit(reposRoot, repo) (src/contract/audit.ts:112), which reads the repository on every load.

Done when:

  • [ ] audit caches its result by (repository, default tip), in memory and bounded.
  • [ ] A test asserts that a warm audit is under 2 ms, and that a push changing forge.json changes the result on the next read.

Files: src/contract/audit.ts, test/contract-audit-cache.test.ts. Risk: #4757 restyles the same policy line in src/web/studio/app.ts. This issue stays in src/contract/audit.ts, so the two do not collide.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs