I3304 — A prompt reaches the model within a declared capture budget, and no captured record is lost
Declare a latency budget for the UserPromptSubmit and SessionStart hooks in benchmark policy, meet it by handing the capture to the running shared server (or a durable outbox) instead of a cold executable start, and prove no record is lost.
PŘIPRAVENO vlna 0 · p2 · profil implementation · bezpečné souběžně
Připraveno. Všechny závislosti jsou hotové, takže majordomus plan start I3304 bude přijato.
Cíl
Declare a latency budget for the UserPromptSubmit and SessionStart hooks in benchmark policy, meet it by handing the capture to the running shared server (or a durable outbox) instead of a cold executable start, and prove no record is lost.
Proč
Measured 2026-09-10: the capture hook cost about 4 s per prompt, all cold start, and backgrounding it lost every record (lib/capture.sh:2244). The owner's standing order since then is that hooks never slow the owner down. Rebound to the new intent criterion #hooks-within-budget, because the hooks this intent generates (Stop per turn, edit guard per edit) carry the same cold-start cost. Milestone development-runtime belongs to no intent, so moving this issue there would leave it unbound. It extends milestone development-runtime. Sources: chatgpt-majordomus:c099#0, chatgpt-majordomus:c099#3, chatgpt-majordomus:c099#9.
Aktuální stav
Every lifecycle event is inline (mj_lifecycle_latency prints inline); policy.yaml declares prompt-capture with no budget.
Cílový stav
bench --check holds the budget; a case proves every prompt of a burst is recorded.
Rozsah
- lib/capture.sh
- .claude/hooks
- apps/majordomus-cli/src/capability/builtin/lifecycle.rs
- .ai/repo/benchmarks/rust/policy.yaml
- .ai/repo/benchmarks/rust/README.md
- .ai/repo/policy.yaml
- apps/majordomus-cli/src/bench/system.rs
- test/cases/29_prompt_capture.sh
Závislosti
Žádné. Tento úkol je kořenem grafu.
Co na tom čeká
Kritéria přijetí
- The hook's p95 is under the declared budget with the server running
- A burst of prompts yields one record each
- With no server the hook degrades to inline capture, never to loss
- The declared budget covers every generated hook that runs per prompt, per turn or per edit (capture, Stop report, edit guard), not only prompt capture
Validace
- majordomus bench --check
- bash test/run.sh 29_prompt_capture
Požadované důkazy
- bench_prompt_capture
- case_no_prompt_record_is_lost
Důkazy
Nic nezaznamenáno. Za každým tokenem výše musí stát příkaz nebo artefakt, než lze tento úkol dokončit; vyprávění se odmítá.
Časová osa
- zahájeno
- —
- ověřeno
- —
- dokončeno
- —
Tato tři pole, důkazy výše a stav závislostí jsou vše, z čeho se stav skládá. Neexistuje žádné pole stavu, které by s nimi mohlo být v rozporu.
Canonical record: .ai/repo/project/issues/I3304.yaml. Read it back with majordomus plan show I3304.