Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 5 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ stops startup instead of leaving a healthy-looking partial schema, and
application code must not compensate for a missing table.

Period leftover pairs (ADR 0017 / 0018 / 0048 / 0049 / 0119 / 0158 / 0162 /
0163 / 0164 / 0182 / 0185 / 0201 / 0233 / 0266 / 0267) are computed in `lineageweave/leftover_pairs.py` from the
0163 / 0164 / 0182 / 0185 / 0201 / 0233 / 0266 / 0267 / 0268) are computed in `lineageweave/leftover_pairs.py` from the
residual after a real GRM/GPCM score, never invented. Distances are
Euclidean on the two-dimensional Gabriel leftover map; missing cells stay
out of the factorization. Closest and farthest post–criterion pairs
Expand All @@ -288,7 +288,10 @@ ADR 0201 is the sole normative reconstruction formula,
storage, and audit contract; do not duplicate or reinterpret it here.
ADR 0233 is the sole unexplained leftover share contract. ADR 0266 is
the sole explained leftover share contract. ADR 0267 is the sole
leftover-map coordinate contract. When `R`, `R̂`, `U`, `x`,
leftover-map coordinate contract. ADR 0268 is the sole leftover-map
graphic-display contract: draw persisted `ξ` and `ζ` above the pair
buttons; omit the plot when coordinates are missing; click a post
marker to open that post. When `R`, `R̂`, `U`, `x`,
`s`, and `e` are finite, `e + s + x = 1`. When coordinates,
reconstruction, and distance are finite, `R̂ = ξ · ζ` and
`d = ‖ξ − ζ‖`. The pairs sit above the member
Expand Down
7 changes: 5 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -637,12 +637,15 @@ information at the group's mean θ (Lord, 1980 max-info CAT). Rankings
persist to `report_item_information`. After those IRT main effects,
residual SVD leftover pairs on two Gabriel axes (Jeon et al., 2021;
ADR 0017 / 0048 / 0049 / 0119 / 0148 / 0158 / 0162 / 0163 / 0164 / 0168 /
0182 / 0185 / 0201 / 0233 / 0266 / 0267) persist to `report_leftover_pair` with signed residual `R`,
0182 / 0185 / 0201 / 0233 / 0266 / 0267 / 0268) persist to `report_leftover_pair` with signed residual `R`,
observed `Y`, expected `E[Y|θ, item]`, full leftover-map rank, unexplained
leftover, ADR 0201 reconstruction evidence, ADR 0185 cross-share evidence,
ADR 0233 unexplained leftover share `s`, ADR 0266 explained leftover
share `e`, and ADR 0267 leftover-map coordinates `ξ_{1:2}` / `ζ_{1:2}`.
Those ADRs are the normative mathematical and storage contracts. Leftover-map axis share
ADR 0268 draws those persisted coordinates as the leftover-map graphic
display above the pair buttons. Click a post marker or a pair button
opens that post. Those ADRs are the normative mathematical, storage, and
display contracts. Leftover-map axis share
(Gabriel inertia of residual SVD axes 1 and 2; ADR 0148) persists to
`report_leftover_map_axis`. Complete-case leftover-map coverage (ADR
0168) persists to `report_leftover_map_coverage` so readers see how
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.d/2.25.0-leftover-map-graphic-display.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## 2.25.0 — Leftover-map graphic display

- Draw the leftover-map graphic display of persisted `ξ_{1:2}` and
`ζ_{1:2}` above leftover post–criterion pairs (ADR 0268). After
`make seed`, closest and farthest leftover pairs sit above the
member list with the Gabriel biplot of already-named coordinates;
click a post marker or a pair button opens that post. Omit the plot
when no pair has four finite leftover-map coordinates. Rank-0
unused axes plot at the origin. When coordinates, reconstruction,
and distance are finite, `R̂ = ξ · ζ` and `d = ‖ξ − ζ‖`. Never
invent a leftover score. Never invent a theta. No new columns.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ All notable changes to this project are documented here. Format follows

### Added

- Period leftover pairs now draw the leftover-map graphic display of
persisted `ξ_{1:2}` and `ζ_{1:2}` (ADR 0268 / v2.25.0). After
`make seed`, closest and farthest leftover pairs sit above the
member list with the Gabriel biplot of already-named coordinates;
click a post marker or a pair button opens that post. Omit the plot
when no pair has four finite leftover-map coordinates. Rank-0 unused
axes plot at the origin. When coordinates, reconstruction, and
distance are finite, `R̂ = ξ · ζ` and `d = ‖ξ − ζ‖`. Never invent
a leftover score or a theta. No new columns.

- Period leftover pair rows now name leftover-map coordinates `ξ_{1:2}`
and `ζ_{1:2}` after two-axis Gabriel reconstruction (ADR 0267 /
v2.24.0). After `make seed`, closest and farthest leftover pairs sit
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ cutoff. Global Ask optional `knowledge_cutoff` uses the same cover

Create/start endpoint rules (ADR 0017 / 0021), tie-vs-miss similarity
(ADR 0026), R&R catalog ids (ADR 0019 / 0027), leftover pairs
(ADR 0048–0164 / 0182 / 0185 / 0201 / 0233 / 0266 / 0267), occupational construct catalog search
(ADR 0048–0164 / 0182 / 0185 / 0201 / 0233 / 0266 / 0267 / 0268), occupational construct catalog search
(ADR 0257), the text-channel embedding swap and cosine
clamp (ADR 0190), per-edge channel-score persistence (ADR 0195),
token-backed status notices (ADR 0220),
Expand Down
6 changes: 4 additions & 2 deletions docs/adr/0048-persist-lsirm-leftover-pairs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
[ADR 0201](0201-leftover-map-reconstruction.md) (signed reconstruction R̂);
[ADR 0233](0233-leftover-map-unexplained-share.md) (unexplained leftover share s);
[ADR 0266](0266-leftover-map-explained-share.md) (explained leftover share e);
[ADR 0267](0267-leftover-map-coordinates.md) (leftover-map coordinates ξ, ζ)
[ADR 0267](0267-leftover-map-coordinates.md) (leftover-map coordinates ξ, ζ);
[ADR 0268](0268-leftover-map-graphic-display.md) (leftover-map graphic display)

## Context

Expand Down Expand Up @@ -64,7 +65,8 @@ leftover residual `R`, leftover-map distance `d`, unexplained leftover
When `R`, `R̂`, `U`, `x`, `s`, and `e` are finite, `e + s + x = 1`.
ADR 0267 persists leftover-map coordinates `ξ_{1:2}` and `ζ_{1:2}` so
reconstruction `R̂ = ξ · ζ` and distance `d = ‖ξ − ζ‖` stay auditable
from the pair row.
from the pair row. ADR 0268 draws those persisted coordinates as the
leftover-map graphic display; it adds no columns.

Cascade the rows with `report_period_score`. A leftover post must
also be a `report_member_score` row, and the leftover criterion
Expand Down
10 changes: 8 additions & 2 deletions docs/adr/0049-leftover-pair-report-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
[ADR 0201](0201-leftover-map-reconstruction.md) (signed reconstruction R̂);
[ADR 0233](0233-leftover-map-unexplained-share.md) (unexplained leftover share s);
[ADR 0266](0266-leftover-map-explained-share.md) (explained leftover share e);
[ADR 0267](0267-leftover-map-coordinates.md) (leftover-map coordinates ξ, ζ)
[ADR 0267](0267-leftover-map-coordinates.md) (leftover-map coordinates ξ, ζ);
[ADR 0268](0268-leftover-map-graphic-display.md) (leftover-map graphic display)

## Context

Expand All @@ -33,7 +34,10 @@ unexplained leftover `U`, signed reconstruction `R̂` when finite,
leftover-map unexplained leftover share `s = U² / R²` when finite,
leftover-map explained leftover share `e = R̂² / R²` when finite,
leftover-map coordinates `ξ_{1:2}` and `ζ_{1:2}` when finite, and
leftover-map cross share next to distance when finite. The next action names every available
leftover-map cross share next to distance when finite. When four finite
coordinates exist, the leftover-map graphic display of those positions
sits above the pair buttons (ADR 0268); click a post marker to open
that post. The next action names every available
measurement before opening the post; no amendment hides another, rank 0
explicitly names no leftover structure, and unexplained leftover names
"leftover map leaves unexplained `U` after IRT main effects; open this
Expand All @@ -57,6 +61,8 @@ Explained leftover share naming is
[ADR 0266](0266-leftover-map-explained-share.md).
Leftover-map coordinate naming is
[ADR 0267](0267-leftover-map-coordinates.md).
Leftover-map graphic display is
[ADR 0268](0268-leftover-map-graphic-display.md).

After `make seed`, closest and farthest leftover pairs sit above the
member list. Click a pair to open that post with the leftover
Expand Down
7 changes: 5 additions & 2 deletions docs/adr/0267-leftover-map-coordinates.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
**Decision status:** Accepted
**Date:** 2026-08-28

**Amended by:** [ADR 0268](0268-leftover-map-graphic-display.md)
(leftover-map graphic display)

Amends [ADR 0048](0048-persist-lsirm-leftover-pairs.md),
[ADR 0049](0049-leftover-pair-report-ui.md), and
[ADR 0201](0201-leftover-map-reconstruction.md). Independent of leftover-map
Expand Down Expand Up @@ -99,8 +102,8 @@ axis share, leftover pairs on the grouping comparison strip, two-axis
leftover-map distance, leftover-map rank, leftover-map inner product,
leftover-map cosine, leftover-map length, leftover-map reconstruction,
leftover-map unexplained leftover, leftover-map cross share,
leftover-map unexplained leftover share, and leftover-map explained
leftover share.
leftover-map unexplained leftover share, leftover-map explained
leftover share, and leftover-map graphic display.

## References

Expand Down
104 changes: 104 additions & 0 deletions docs/adr/0268-leftover-map-graphic-display.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# ADR 0268 — Show leftover-map graphic display of persisted coordinates

**Decision status:** Accepted
**Date:** 2026-08-28

Amends [ADR 0049](0049-leftover-pair-report-ui.md) and
[ADR 0267](0267-leftover-map-coordinates.md). Independent of leftover-map
explained leftover share ([ADR 0266](0266-leftover-map-explained-share.md)),
leftover-map unexplained leftover share ([ADR 0233](0233-leftover-map-unexplained-share.md)),
and leftover-map reconstruction ([ADR 0201](0201-leftover-map-reconstruction.md)).

## Context

ADR 0267 already persists two-axis Gabriel person coordinates
`ξ_{1:2}` and item coordinates `ζ_{1:2}` on leftover pair rows so
`R̂ = ξ_{1:2} · ζ_{1:2}` and `d = ‖ξ_{1:2} − ζ_{1:2}‖` stay
auditable. Those four numbers still read as a badge next to distance.
Gabriel (1971) is a *graphic display* of the same two marker sets;
Jeon et al. (2021) plot the leftover interaction map as person and
item positions after IRT main effects. Hiding the plot lets leftover
residual `R`, leftover-map distance `d`, or reconstruction `R̂` be
read as leftover-map location even after the coordinates themselves
are named.

This increment draws the leftover-map graphic display from already
persisted `ξ` and `ζ`. It does not add columns. It does not persist
leftover-map inner product, cosine, or length (`R̂` and `d` already
are those two-axis facts). It does not land Post quality on the
leftover criterion. Leftover-map distance stays two-axis Euclidean.
Do not invent a leftover score. Do not invent a theta.

The dashboard stack already used neighbouring leftover facts under
other numbers. This protected increment uses **0268** so it does not
collide with leftover-map coordinates (0267 / migration 0245),
leftover-map explained leftover share (0266 / migration 0244),
leftover-map unexplained leftover share (0233 / migration 0233),
leftover-map reconstruction (0201 / migration 0206), leftover-map
cross share (0185), leftover residual disclosure, leftover observed
`Y` / expected `E`, leftover-map rank, two-axis leftover-map
distance, leftover coverage, leftover-map axis share (0148), leftover
interaction-map persistence, occupational construct catalog search
(0265), or the dashboard stacks.

## Decision

On each period-report group that already lists leftover pairs, render
a two-axis leftover-map graphic display **above** the leftover pair
buttons when at least one pair has four finite coordinates. Person
markers are posts at persisted `ξ_{1:2}`; item markers are criteria
at persisted `ζ_{1:2}`. A faint segment joins each closest or
farthest pair so leftover-map distance `d` is the drawn length, not a
second score. The origin stays in view because it is the rank-0
unused-axis location. Scale is isotropic so Euclidean `d` is visually
comparable on both axes. A rank-0 origin cell plots at `(0, 0)` with
a unit display window; that window is drawing scale, not a leftover
score.

Click a post marker to open that post with leftover focus so Post
quality marks the named criterion current (ADR 0158). Criterion
markers are not post buttons. A missing or non-finite coordinate omits
that pair from the plot rather than inventing a location. When no
pair has four finite coordinates, omit the plot and keep the existing
pair-list next action. Duplicate posts share one person marker;
duplicate criteria share one item marker. The grouping comparison
strip (ADR 0149) stays on its reduced leftover payload and does not
gain this plot.

Do not add SQL. Do not edit shipped migrations. Do not persist inner
product, cosine, or length as separate columns.

## Consequences

After `make seed`, closest and farthest leftover pairs sit above the
member list with the leftover-map graphic display of persisted `ξ`
and `ζ`; click a post marker or a pair button opens that post.
Hidden posts stay hidden. When coordinates, reconstruction, and
distance are all finite, `R̂ = ξ_{1:2} · ζ_{1:2}` and
`d = ‖ξ_{1:2} − ζ_{1:2}‖` remain the same identities already
persisted by ADR 0267.

## Related

Independent of leftover interaction-map persistence, leftover-criterion
evaluation landing, leftover residual disclosure, leftover observed
`Y` / expected `E`, leftover-map complete-case coverage, leftover-map
axis share, leftover pairs on the grouping comparison strip, two-axis
leftover-map distance, leftover-map rank, leftover-map inner product,
leftover-map cosine, leftover-map length, leftover-map reconstruction,
leftover-map unexplained leftover, leftover-map cross share,
leftover-map unexplained leftover share, leftover-map explained
leftover share, and leftover-map coordinate persistence.

## References

Gabriel, K. R. (1971). The biplot graphic display of matrices with
application to principal component analysis. *Biometrika, 58*(3),
453–467. https://doi.org/10.1093/biomet/58.3.453

Jeon, M., Jin, I. H., Schweinberger, M., & Baugh, S. (2021). Mapping
unobserved item–respondent interactions: A latent space item response
model with interaction map. *Psychometrika, 86*(2), 378–403.
https://doi.org/10.1007/s11336-021-09762-5
(LSIRM interaction `−γ‖ξ_j − ζ_i‖` after main effects
`α_j − β_i`; typically `p = 2` for the interaction map.)
14 changes: 14 additions & 0 deletions docs/product-technical-gap-baseline.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Product & Technical Gap Baseline

> Exact-head loop overlay: 2026-08-28 16:05 KST. Protected `main` is
> `fc13acaa20adca11968238e398d4aafcf62b6cee` (v2.23.0 leftover-map
> explained leftover share, #775). Open ready PRs still lack independent
> APPROVE. #782 leftover-map coordinates (v2.24.0 / ADR 0267) is on
> `e2d13019004a5d8c019fecf7a39ceeef4093b8dd`; Strix fail-closed and no
> independent APPROVE. Drafts remain dirty against `main`. #96 stays
> closed as a weaker duplicate of #91. GitHub writes through MCP succeed.
>
> Next buyer increment on this cycle: leftover-map graphic display
> of already-persisted `ξ_{1:2}` / `ζ_{1:2}` (ADR 0268 / v2.25.0).
> UI-only; no new columns. `R̂` and `d` already are inner product and
> length. Do not invent leftover scores. Do not mix into dashboard
> stacks #640/#778/#781.

> Exact-head loop overlay: 2026-08-28 13:00 KST. Protected `main` is
> `fc13acaa20adca11968238e398d4aafcf62b6cee` (v2.23.0 leftover-map
> explained leftover share, #775). Open ready PRs still lack independent
Expand Down
2 changes: 2 additions & 0 deletions docs/storybook-inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ operator-facing control you can click before changing product CSS.

| Story | Operator next action | Token / module |
|---|---|---|
| `Reports/LeftoverMapPlot` | Read the leftover-map graphic display of persisted `ξ` (posts) and `ζ` (criteria), then click a post marker to open that post. `ClosestAndFarthest`, `RankZeroOrigin`, and `MissingCoordinates` cover two-pair maps, rank-0 origin, and omitted plots. The plot does not invent a leftover score. | `LeftoverMapPlot`, `leftoverMapPlotLayout`, `--color-primary`, `--color-palette-blue-mid` |
| `Reports/LeftoverPairList` | Read closest/farthest leftover pairs with named `R`, `Y`/`E`, rank, `U`, `s`, `e`, `x`, `R̂`, `ξ`/`ζ`, and `d`, then open that post. The leftover-map graphic display sits above the pair buttons when coordinates are finite. | `LeftoverPairList`, `LeftoverMapPlot`, `ticket-list`, `post-badge` |
| `Workspace/OperationsDashboard` | Compare Event and post counts, inspect external-information coverage, then open the cited source behind a claim, handover, or repeat-issue fact. `EvidenceReady`, `NarrowViewport`, `AnalysisPendingAndMissingEvidence`, `AnalysisFailed`, and `LoadError` cover populated, mobile, unavailable-evidence, analysis-pending, retryable failure, and transport-error states. | `--color-dashboard-*`, `OperationsDashboard` |
| `Post/SimilarVocPanel` | Compare ontology/semantic similar VOC and prior action evidence, then open the source; unavailable states show no fabricated TEPP theta or weight. | `SimilarVocPanel.css`, `SimilarVocPanel` |
| `Post/Recorded perspectives` | Read the imported primary and every evidence-connected additional Voice with its recorded truth state instead of flattening them into one compound category. `CombinedEvidence`, `RejectedEvidence`, and `NarrowViewport` cover desktop, rejected-evidence, and narrow layouts. | `VoicePerspectiveList`, `ticket-list`, `post-meta` |
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "frontend",
"private": true,
"version": "2.24.0",
"version": "2.25.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4143,6 +4143,12 @@ describe("App, authenticated", () => {
expect(screen.getByRole("button", { name: /open report post: public post/i })).toHaveTextContent("Open");
expect(screen.getByRole("button", { name: /open report post: public post/i })).toHaveTextContent("due 2026-01-12");
expect(screen.getByLabelText("Leftover pairs")).toBeInTheDocument();
expect(screen.getByLabelText("Leftover-map graphic display")).toBeInTheDocument();
expect(
screen.getByRole("button", {
name: /open leftover-map post public post at ξ \(\+0\.50, \+0\.10\)/i,
}),
).toBeInTheDocument();
expect(screen.getByLabelText("Leftover map coverage")).toHaveTextContent(
"Leftover map used 2 of 3 scored posts (complete-case)",
);
Expand Down
Loading