Single-agent fixture loop
What you'll do
Smoke-test the loop boundary with fixture execution — no live runner credentials, no external side effects. Useful for development, regression tests, and verifying durable-state contracts.
Same loop, deterministic runner.
The fixture executor exercises the real loop boundary. Only the runner-step results are deterministic; everything else (receipts, run outputs, handoffs) follows the production contract.
Workflow
- Create or load a task, case file, policy envelope, and runner metadata.
- Use
FixtureStepRunnerwith deterministic statuses. - Pass explicit grants for side-effect fixture steps.
- Execute
SingleAgentLoopExecutor. - Inspect the resulting task run, receipts, run outputs, and proposals.
Minimal shape
from craik.runtime.loop import FixtureStepRunner, SingleAgentLoopExecutor
from craik.runtime.memory import LocalMemoryStore
executor = SingleAgentLoopExecutor(
store=store,
memory=LocalMemoryStore(store),
runner=FixtureStepRunner(),
)
result = executor.execute(
task_id=task.id,
case_file_id=case_file.id,
policy=policy,
runner_metadata=runner_metadata,
intent_lock=intent_lock,
grants=[shell_grant],
)
Expected state
A successful fixture run leaves:
One craik.task_run
One or more craik.runner_step_result observations
Persisted craik.run_output records
Pass or denial receipts
For side-effect steps.
Optional reviewable memory proposals
A handoff
Once the handoff workflow runs.
Failure smoke tests
Stop with durable state.
Use fixture statuses to exercise blocked, failed, partial, and max-iteration paths. These runs must stop with durable state and must not rely on a live chat transcript to explain what happened.