File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818DIM = "\033 [2m"
1919RESET = "\033 [0m"
2020
21+ # Step delay. Default fast; set CRASH_DEMO_DELAY=1.0 for screen captures.
22+ _DELAY = float (os .environ .get ("CRASH_DEMO_DELAY" , "0.2" ))
23+
2124
2225def main () -> None :
2326 agent = agentkeeper .create (agent_id = "dev-agent" , provider = "mock" )
@@ -34,11 +37,11 @@ def main() -> None:
3437 print (f"{ DIM } t+0.0s agent booted, identity set{ RESET } " )
3538 agent .fact ("repo: thinklanceai/auth-service" , importance = 0.8 )
3639 agent .fact ("goal: migrate JWT middleware to RS256" , importance = 0.95 )
37- time .sleep (0.2 )
40+ time .sleep (_DELAY )
3841 print (f"{ DIM } t+0.2s analysed codebase, opened auth/middleware.py{ RESET } " )
3942 agent .fact ("decision: rotate signing keys via JWKS endpoint" , importance = 0.9 )
4043 agent .event ("started editing auth/middleware.py" , when = "2026-05-24" )
41- time .sleep (0.2 )
44+ time .sleep (_DELAY )
4245 print (f"{ DIM } t+0.4s wrote 1st half of the migration{ RESET } " )
4346
4447 execution_state = {
@@ -69,6 +72,7 @@ def main() -> None:
6972 f"facts={ snap .meta .fact_count } exec_state=yes{ RESET } "
7073 )
7174 print (f"{ DIM } t+0.6s … still working when the process is killed …{ RESET } " )
75+ time .sleep (_DELAY * 2 )
7276
7377 # Hard kill: no atexit, no flush, no graceful save. Whatever wasn't
7478 # already on disk is lost forever.
You can’t perform that action at this time.
0 commit comments