From 558febed279845efe453d45537ea8054a58a5de9 Mon Sep 17 00:00:00 2001 From: haojr Date: Wed, 2 Dec 2026 02:56:59 +0000 Subject: [PATCH] feat: bot protocol sweeps stale text when adding an owner preference Task 2472 (Fix B from task 2184): after adding or updating an owner preference, a bot sweeps its schedules, queued wakes, goal intents and notes for contradicting text in the same run. Co-Authored-By: Claude Opus 5.5 --- crates/axe-core/src/bot_protocol.md | 3 +++ crates/axe/tests/bots.rs | 3 ++- crates/axe/tests/fixtures/bot_system_golden.md | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/axe-core/src/bot_protocol.md b/crates/axe-core/src/bot_protocol.md index ade2380..2302358 100644 --- a/crates/axe-core/src/bot_protocol.md +++ b/crates/axe-core/src/bot_protocol.md @@ -58,6 +58,9 @@ below. You run as one continuous session that axe resumes on every wake. `axe bot set --conduct-file F --why "owner msg #N"`. Edit only that section yourself; any other conduct change needs an explicit owner request. If it is unclear whether something is a standing preference, ask. +- When you add or update an owner preference, sweep your schedules, queued + wakes, goal intents and notes in the same run for text that contradicts it: + update or cancel what is yours to change, and ask the owner about the rest. - History: `axe bot log --limit 50`, plus `rg` over earlier run logs. - axe retires your session when a run ends with your rotation threshold of context or more (`rotation` in `axe bot show`, 200k tokens by default; event diff --git a/crates/axe/tests/bots.rs b/crates/axe/tests/bots.rs index 088106b..db19361 100644 --- a/crates/axe/tests/bots.rs +++ b/crates/axe/tests/bots.rs @@ -566,7 +566,8 @@ fn the_protocol_and_the_shipped_bundle_build_the_golden_system_prompt() { assert!( golden.contains("Owner preferences and standing rules live in your conduct, not in notes.") && golden.contains("notes hold only what axe") - && golden.contains("\"Owner preferences\" section"), + && golden.contains("\"Owner preferences\" section") + && golden.contains("When you add or update an owner preference, sweep your schedules"), "the protocol carries the preferences-in-conduct rule" ); } diff --git a/crates/axe/tests/fixtures/bot_system_golden.md b/crates/axe/tests/fixtures/bot_system_golden.md index cf39e6c..b8f49ba 100644 --- a/crates/axe/tests/fixtures/bot_system_golden.md +++ b/crates/axe/tests/fixtures/bot_system_golden.md @@ -58,6 +58,9 @@ below. You run as one continuous session that axe resumes on every wake. `axe bot set --conduct-file F --why "owner msg #N"`. Edit only that section yourself; any other conduct change needs an explicit owner request. If it is unclear whether something is a standing preference, ask. +- When you add or update an owner preference, sweep your schedules, queued + wakes, goal intents and notes in the same run for text that contradicts it: + update or cancel what is yours to change, and ask the owner about the rest. - History: `axe bot log --limit 50`, plus `rg` over earlier run logs. - axe retires your session when a run ends with your rotation threshold of context or more (`rotation` in `axe bot show`, 200k tokens by default; event