infospace-bench/workplans
tegwick b0d67ae79e IB-WP-0020-T05: shadow-mode CLI flags; close IB-WP-0020
Add --shadow-baseline <id> and --shadow-rate <float> opt-in flags to
generate run, generate resume, and generate from-source. When
--shadow-baseline names a candidate id from the routing config,
build_routing_policy_from_config wraps every other candidate in an
llm-connect ShadowingAdapter using that baseline plus a
PairedGrader(ExactMatchJudge()) and the workspace-resolved
QualityLedger. The baseline candidate itself is never wrapped — that
would shadow it against itself. --shadow-rate defaults to 0.1 when
--shadow-baseline is set; passing --shadow-rate without
--shadow-baseline fails fast with shadow_rate_without_baseline.
Setting --shadow-baseline without a ledger_path in the config fails
with missing_routing_ledger_for_shadow so observations have a place to
land before any call goes out.

run_generation grew shadow_baseline + shadow_rate kwargs and
_adapter_for("routing", ...) plumbs them into
build_routing_policy_from_config. The wrapped ShadowingAdapter slots
into the policy's prefer/fallback per task type via a
(candidate_id, task_type) reverse lookup, and adapters_by_id on the
adaptive policy gets the string-keyed entries.

Five new tests cover: shadow_rate without baseline fails fast, shadow
mode without a ledger fails fast, unknown shadow baseline id fails
fast, structural assertion that ShadowingAdapter wraps non-baseline
candidates and leaves the baseline raw, and a behavioural check that
shadow_rate=1.0 calls the baseline on every call while shadow_rate=0.0
skips entirely. Test forces async_shadow=False so the call counter is
deterministic.

Closes IB-WP-0020: T01-T05 all done. Workplan status flips from active
to finished. 179 tests pass, 2 skipped (both live OpenRouter smokes).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 23:30:36 +02:00
..
IB-WP-0001-state-hub-and-repo-bootstrap.md workplan cleanup 2026-05-14 12:46:32 +02:00
IB-WP-0002-infospace-lifecycle-baseline.md Initial implementation 2026-05-14 11:32:25 +02:00
IB-WP-0003-evaluation-and-inspection.md Initial implementation 2026-05-14 11:32:25 +02:00
IB-WP-0004-reference-infospace-pilot.md Initial implementation 2026-05-14 11:32:25 +02:00
IB-WP-0005-orthogonal-successor-architecture.md docs and stuff 2026-05-14 13:47:36 +02:00
IB-WP-0006-markitect-tool-adapter.md markitect-tool integration 2026-05-14 14:53:16 +02:00
IB-WP-0007-entity-relation-model-migration.md entity relationship model 2026-05-14 15:06:17 +02:00
IB-WP-0008-evaluation-history-metrics-parity.md eval history and metrics 2026-05-14 15:35:04 +02:00
IB-WP-0009-applied-workflow-generation-pipeline.md acceptance matrix and workflow generation 2026-05-14 16:01:32 +02:00
IB-WP-0010-kontextual-engine-integration-boundary.md engine and lifecycle 2026-05-14 16:26:42 +02:00
IB-WP-0011-pruned-legacy-reference-pilot.md Kontextual Engine Integration Boundary 2026-05-14 16:43:29 +02:00
IB-WP-0012-replacement-readiness-cli-parity.md command parity and migration guide 2026-05-14 17:16:39 +02:00
IB-WP-0013-wealth-vsm-generation-pipeline-parity.md infospace pipeline for wealth of nations example 2026-05-14 18:04:38 +02:00
IB-WP-0014-infospace-backend-abstraction.md chore(consistency): sync task status from DB [auto] 2026-05-17 11:52:20 +02:00
IB-WP-0015-generic-source-infospace-generator-cli.md generic source-to-infospace generator 2026-05-14 19:33:22 +02:00
IB-WP-0016-lefevre-ebook-infospace-readiness.md IB-WP-0016-T07: review report and output policy; close IB-WP-0016 2026-05-18 01:22:41 +02:00
IB-WP-0017-agentic-memory-profile-pilot.md Agentic memory profile 2026-05-15 16:01:35 +02:00
IB-WP-0018-adaptive-llm-routing-consumer.md IB-WP-0018-T03+T04: shadow sampling + report/CLI surfacing; close IB-WP-0018 2026-05-18 11:52:05 +02:00
IB-WP-0019-budget-and-usage-registry.md IB-WP-0019-T07: archive integration; close IB-WP-0019 2026-05-17 21:53:28 +02:00
IB-WP-0020-provider-routing-cli.md IB-WP-0020-T05: shadow-mode CLI flags; close IB-WP-0020 2026-05-18 23:30:36 +02:00