Skip to content

feat(window): an arm carries its donor policy, and the strata have a plain way in - #1306

Merged
github-actions[bot] merged 1 commit into
developfrom
feat/window-panel-donors-and-strata
Nov 25, 2026
Merged

github-actions[bot] merged 1 commit into
developfrom
feat/window-panel-donors-and-strata

Conversation

@frapercan

Copy link
Copy Markdown
Owner

Why

The PLM ablation on 211->227 runs every model twice: with experimental donors only, and with every code but ND. Each policy is read at depths 1, 2, 3, 5, 10, 20 and 30. The window summary described an arm by model, scoring, depth and self-exclusion only. So the two donor policies of one model:

  • drew as one series in the depth view;
  • filtered as one model;
  • carried the same label.

Separately, the strata, which the author wants front and centre, hid behind a small "show strata" toggle on each result row.

The change

  • _window_summary reads the candidate set's meta.donor_policy.evidence_codes. Each arm gets donors:
    • experimental when the policy kept experimental codes only (protea.core.ia_regimes.EXPERIMENTAL_EVIDENCE);
    • all when it kept any other code;
    • None without a recorded policy, as for a method's set.
  • armModel, the PLM plus "exp" for experimental donors, now tells arms apart in four places: the model filter, the depth view's series, the detail view's columns and the arm labels. sameExclusion also compares donors.
  • The window page has a plain entry above the panel, "Results by stratum", in the five locales. It opens the panel's strata tab (?tab=strata).

Tests

  • test_two_donor_policies_of_one_model_are_two_arms pins the rule. The existing arm test expects donors: None for a row without a policy.
  • Locally:
    • tests/test_the_window_summary.py passes;
    • lint-gates.sh is green;
    • vitest run passes (48 files, 430 tests);
    • tsc --noEmit has nothing new;
    • ESLint is clean on the touched panel files.

Not in this PR

The per-result StrataPanel, behind each row's toggle, reads the strata router, whose arm identity is the configuration. Its labels do not show the donor policy yet. The panel's own strata tab, which the new entry opens, reads the summary and does.

…plain way in

The PLM ablation for Ana runs each model with experimental donors and with
every code but ND, at seven depths. The window summary described an arm by
model, scoring, depth and self-exclusion only, so the two donor policies of
one model drew as one series in the depth view, filtered as one model and
labelled identically.

- The summary reads the candidate set's donor policy and gives each arm
  donors: "experimental" when the policy kept experimental codes only,
  "all" when it kept any other, None without a recorded policy.
- The panel tells arms apart by armModel, the PLM plus "exp" for
  experimental donors, in the model filter, the depth series, the detail
  columns and the labels. sameExclusion compares the donors too.
- The window page opens the strata tab from a plain entry above the panel,
  where before they hid behind a small toggle on each result row
  (the author, 2026-11-25).
@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.66%. Comparing base (7edfb68) to head (0d71be8).
⚠️ Report is 10 commits behind head on develop.

❌ Your project check has failed because the head coverage (83.92%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1306      +/-   ##
===========================================
- Coverage    85.69%   85.66%   -0.04%     
===========================================
  Files          471      472       +1     
  Lines        37374    37463      +89     
===========================================
+ Hits         32026    32091      +65     
- Misses        5348     5372      +24     
Files with missing lines Coverage Δ
protea/services/_window_summary.py 85.45% <100.00%> (+1.45%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@frapercan
frapercan marked this pull request as ready for review November 25, 2026 08:32
@github-actions
github-actions Bot merged commit 7836314 into develop Nov 25, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant