Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e9e4c2a
feat(reports): leftover-map singular values on leftover-axis ticks in…
seonghobae Aug 31, 2026
a223d2e
test(red): reconstruct leftover-axis tick singular contract
seonghobae Sep 10, 2026
fa93ae7
chore(stack): converge report axis tick lane on repaired parent
seonghobae Sep 11, 2026
2c509c0
chore(stack): converge #871 onto repaired #870 head
seonghobae Sep 12, 2026
a39c9eb
chore(stack): converge #871 onto repaired #870
seonghobae Sep 12, 2026
645a5b0
chore(stack): converge #871 onto repaired ancestry
seonghobae Sep 13, 2026
871e2e9
chore(stack): converge #871 onto repaired #870
seonghobae Sep 15, 2026
2cf3902
chore(stack): converge #871 onto repaired #870
seonghobae Sep 15, 2026
e9ec88e
merge: converge v2.87.0 onto current v2.86.0 parent
seonghobae Sep 15, 2026
2834dd5
merge: converge v2.87.0 onto repaired v2.86.0 parent
seonghobae Sep 15, 2026
ddcba83
chore(stack): converge #871 onto repaired #870
seonghobae Sep 15, 2026
78ce946
chore(stack): converge #871 onto repaired #870
seonghobae Sep 15, 2026
0427b93
merge(reports): converge report-axis missingness repair into report t…
seonghobae Sep 15, 2026
2c419d2
merge(reports): converge #871 onto #870 RED contract head
seonghobae Sep 15, 2026
b7b9ad8
chore(stack): converge current #870 into #871
seonghobae Sep 15, 2026
4448ffd
chore(stack): converge #871 on current #870
seonghobae Sep 15, 2026
dc15919
chore(stack): converge semantic RED harness onto #871
seonghobae Sep 16, 2026
3427b5e
chore(stack): converge #870 product repair into #871
seonghobae Sep 16, 2026
685f110
chore(stack): converge #871 on repaired tick foundation
seonghobae Sep 16, 2026
c64050b
chore(stack): converge #871 on repaired comparison tick foundation
seonghobae Sep 16, 2026
32e5615
chore(stack): converge #871 on repaired comparison-strip tick foundation
seonghobae Sep 16, 2026
1713554
fix(reports): project report axis tick singular evidence
seonghobae Sep 16, 2026
ade0c61
merge: converge report tick singular wiring into report-axis tick lane
seonghobae Sep 18, 2026
52dc852
merge: converge comparison tick consumer into report-axis lane
seonghobae Sep 18, 2026
4dc970b
chore(stack): converge v2.84 comparison tick contract repair
seonghobae Sep 19, 2026
abb2478
merge: converge #871 on report contract repairs
seonghobae Sep 19, 2026
91cde2a
chore(stack): converge #871 onto #870 owner stack
seonghobae Sep 20, 2026
014e741
chore(stack): converge #871 onto repaired #870 head
seonghobae Sep 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions frontend/src/leftoverMapAxisBadge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export const LEFTOVER_MAP_AXIS_BADGE_SINGULAR = "leftover axis {axis} σ {value}

export const LEFTOVER_MAP_AXIS_BADGE_SINGULAR_ONLY = "leftover axis {axis} σ {value}";

export const LEFTOVER_MAP_AXIS_TICK_SINGULAR =
"leftover axis {axis} tick {value} σ {singular}";

export type LeftoverMapAxisBadge = {
template: string;
values: Record<string, string | number>;
Expand Down Expand Up @@ -70,3 +73,19 @@ export function leftoverMapAxisBadge(
values: { axis: axis.axis_index, value: singular, share },
};
}

/** Project finite persisted σ onto one report-axis tick without inventing share evidence. */
export function leftoverMapAxisTickBadge(
axisIndex: number,
tickLabel: string,
leftoverSingular: number | null | undefined,
): LeftoverMapAxisBadge | null {
const singular = formatLeftoverMapPlotAxisSingular(leftoverSingular);
if (singular === null) {
return null;
}
return {
template: LEFTOVER_MAP_AXIS_TICK_SINGULAR,
values: { axis: axisIndex, value: tickLabel, singular },
};
}
27 changes: 27 additions & 0 deletions tests/test_leftover_axis_tick_singular_contract.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""Executable contract for period/report leftover-axis tick singular captions."""

from pathlib import Path


ROOT = Path(__file__).resolve().parents[1]
BADGE_SOURCE = ROOT / "frontend" / "src" / "leftoverMapAxisBadge.ts"


def test_report_leftover_axis_tick_keeps_persisted_singular_without_share() -> None:
"""A report leftover-axis tick may name valid persisted σ with no axis share."""
assert BADGE_SOURCE.exists(), "report-axis badge helper is missing"
source = BADGE_SOURCE.read_text(encoding="utf-8")

assert "leftoverMapAxisTickBadge" in source
assert "leftover axis {axis} tick {value} σ {singular}" in source


def test_report_leftover_axis_tick_never_infers_sigma_or_share() -> None:
"""Invalid σ falls back to an ordinary leftover-axis tick; share is never synthesized."""
assert BADGE_SOURCE.exists(), "report-axis badge helper is missing"
source = BADGE_SOURCE.read_text(encoding="utf-8")

assert "formatLeftoverMapPlotAxisSingular" in source
assert "Math.sqrt" not in source
tail = source.split("leftoverMapAxisTickBadge", 1)[-1][:1600]
assert "leftover_share" not in tail
Loading