The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(relay): rename misnamed precedence test; document the flat-key fallback nuance
Ben Barclay6cd1ed2e78cf
diff --git a/cron/scheduler.py b/cron/scheduler.pyindex 77bc1385e9d..f45eb66d817 100644--- a/cron/scheduler.py+++ b/cron/scheduler.py@@ -1510,6 +1510,15 @@ def _resolve_cron_surface_mode(pconfig, logical_platform_name: str) -> str:scoped to its logical platform so a ``slack:`` block cannot leak ontoanother fronted platform.+ Precedence nuance vs _relay_slack_extra: that helper is all-or-nothing+ (a sub-dict REPLACES the flat extra entirely), while this one falls back+ to the flat key when the sub-block exists but omits the knob. The+ difference is deliberate — the flat key is the legacy staging shape and+ must keep working — but note a flat ``cron_continuable_surface`` then+ applies to EVERY platform this relay fronts; only the per-platform D6+ capability gate contains it. Scope the knob under the sub-block on+ multi-platform relays.+Field gap (2026-08-18): the scheduler read only the flat key, so on therelay lane — where pconfig is platforms.relay — operators had NO workinglocation for the knob and briefs always threaded.diff --git a/tests/relay/test_relay_inchannel_continuable.py b/tests/relay/test_relay_inchannel_continuable.pyindex 213a012331a..6cd65926666 100644--- a/tests/relay/test_relay_inchannel_continuable.py+++ b/tests/relay/test_relay_inchannel_continuable.py@@ -169,9 +169,10 @@ class TestSurfaceKnobResolution:pconfig = SimpleNamespace(extra={})assert _resolve_cron_surface_mode(pconfig, "slack") == "thread"- def test_flat_key_wins_over_subblock(self):- """Legacy-fallback precedence mirrors _relay_slack_extra: an explicit- flat key keeps working when both are present."""+ def test_subblock_wins_over_flat_key(self):+ """Sub-block precedence: the per-logical-platform sub-block is the+ documented relay shape and wins when both are present — matches+ _relay_slack_extra (sub-dict preferred over flat extra)."""pconfig = SimpleNamespace(extra={"cron_continuable_surface": "thread",