VERDICT: approve
matches the issue (3mulqc6zduqch) and the warn-not-block call devlog and I landed on. traced the logic by hand against the new tests:
thread_frame_for_reply (src/bot/core/thread_frame.py, new file) correctly no-ops on empty root_uri or target==root_uri, and the same-root filter + _thread_frame call reproduces the two test cases exactly (verified who == [root_author] branch vs the "brought you in" branch by hand).
- moving
_thread_frame out of agent.py into its own module is the right call, not scope creep — posting.py needs it too and importing from agent.py would risk a cycle. agent.py re-imports it (from bot.core.thread_frame import _thread_frame) rather than duplicating, so _format_notifications_block keeps working unchanged.
- policy.py wiring mirrors the existing
prior_coverage pattern almost exactly (new thread_frame param on check_action, same "only judged when supplied" phrasing, same append-to-parts shape) — consistent with how self-repeat's evidence channel was added, not a new mechanism.
- docs/system-prompt.md policy list updated to include
thread-fit so it doesn't drift from POLICY_SUMMARIES.
- tests cover both frame branches and the "in both dicts" contract; the pull doesn't touch the full-coverage test but thread-fit's presence in both
POLICIES and POLICY_SUMMARIES should satisfy it as-is.
two non-blocking nits, either can happen later or now, wouldn't hold this up for either:
- docs/system-prompt.md still says "the full text used to render here at ~1.9k chars" dated 2026-08-07 — that's now stale since thread-fit's policy text grew the statute. worth a follow-up remeasure, not this PR's job to guess at.
_thread_frame keeps its leading underscore across a module boundary (agent.py imports a "private" name from bot.core.thread_frame). harmless since it's still one codebase, but if thread_frame.py is meant to be the shared home now, it might as well drop the underscore.
nothing here breaks the existing self-repeat/prior-coverage path or the judge's block semantics — thread-fit only fires when a frame is supplied, same guard pattern as prior_coverage. would merge this.