Repository navigation
feat: name leftover-map rank on leftover pairs (v2.12.21) #529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
seonghobae
merged 13 commits into
feat/oidc-return-remember-login-v21219
from
feat/leftover-map-rank-v21221
Aug 24, 2026
Merged
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1bd45fc
feat: persist leftover observed Y and expected E (v2.12.20)
seonghobae a30bb28
Repair inherited login build boundary
seonghobae df18ed6
Move leftover evidence contract to ADR 0177
seonghobae e05d63b
feat: name leftover-map rank on leftover pairs (v2.12.21)
seonghobae 6fcf603
Move leftover-map rank contract to ADR 0172
seonghobae 54f3f69
fix: restore frontend build on leftover-map PR
seonghobae cb5b21f
Merge remote-tracking branch 'origin/feat/board-source-detail-state-f…
seonghobae 435992d
fix: show leftover Y and E after stacking onto the workspace branch
seonghobae dc508ae
Merge remote-tracking branch 'origin/feat/leftover-pair-observed-expe…
seonghobae a988ca6
fix: keep leftover-map rank after stacking onto leftover Y/E
seonghobae 13d95e1
Merge remote-tracking branch 'origin/feat/oidc-return-remember-login-…
seonghobae de4ff43
Merge remote-tracking branch 'origin/feat/leftover-pair-observed-expe…
seonghobae 5dbb0c8
merge feat/oidc-return-remember-login-v21219: rebase onto post-#527 base
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| ## 2.12.20 — Leftover observed Y and expected E | ||
|
|
||
| - Persist observed `Y` and expected `E[Y|θ, item]` on leftover | ||
| post–criterion pairs (ADR 0177). Residual stays `R = Y − E`. After | ||
| `make seed`, closest and farthest leftover pairs sit above the member | ||
| list with `Y` and `E` next to leftover-map distance `d`; click opens | ||
| that post. Omit the badge when either value is missing. Never invent | ||
| a leftover score or a theta. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| ## 2.12.21 — Leftover-map rank | ||
|
|
||
| - Persist leftover-map rank on leftover post–criterion pairs (ADR 0172). | ||
| Rank is the number of Gabriel singular values above the floor. After | ||
| `make seed`, closest and farthest leftover pairs sit above the member | ||
| list with `rank {n}` next to leftover-map distance `d`; click opens | ||
| that post. Rank 0 names no leftover structure. Never invent a leftover | ||
| score or a theta. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # ADR 0172 — Name leftover-map rank on leftover pairs | ||
|
|
||
| **Decision status:** Accepted | ||
| **Date:** 2026-08-24 | ||
|
|
||
| Amends [ADR 0048](0048-persist-lsirm-leftover-pairs.md) and | ||
| [ADR 0049](0049-leftover-pair-report-ui.md). | ||
|
|
||
| ## Context | ||
|
|
||
| ADR 0048 already persists leftover-map distance and leftover residual | ||
| `R = Y − E[Y|θ, item]` on `report_leftover_pair`. A rank-0 residual | ||
| still emits a stable closest/farthest pair so `make seed` is not empty; | ||
| the stored distance is then zero, not a fabricated interaction. ADR 0049 | ||
| renders those pairs above the member list. Without leftover-map rank, a | ||
| buyer cannot tell a Gabriel biplot with leftover structure (Jeon et al., | ||
| 2021, eq. 3) from an origin collapse that still shows `d 0.00`. | ||
|
|
||
| This increment does not persist leftover-map coordinates, does not name | ||
| observed `Y` / expected `E`, does not change leftover-map axis count, and | ||
| does not land Post quality on the leftover criterion. | ||
|
|
||
| The unprotected-stack ADR for the same buyer fact was 0164. This | ||
| protected-main reconstruction uses **0172** so it does not collide with | ||
| two-axis leftover-map distance (0166), leftover coverage (0168), | ||
| leftover-map axis share (0148), leftover observed Y / expected E | ||
| (0177), or analysis-run status same clock (0171). | ||
|
|
||
| ## Decision | ||
|
|
||
| Each leftover pair names `leftover_map_rank`: the number of Gabriel | ||
| singular values above the leftover singular floor on the complete-case | ||
| residual rectangle. Closest and farthest pairs on one period report share | ||
| that rank. A fallback pair that is not placed on a leftover map stores | ||
| rank `0`. Migration `0172` is the single source of the column on every | ||
| install path; shipped migrations (`0001` / `0012`) are never rewritten. | ||
| It adds a nullable column so older leftover rows keep distance and residual | ||
| without fabricating a rank. | ||
|
|
||
| The pair button shows `rank {n}` when the value is a finite | ||
| non-negative integer. Rank `0` next action: leftover map has no leftover | ||
| structure after IRT main effects; open this post. Rank `≥ 1` next action: | ||
| read leftover map rank after IRT main effects, then open this post. Omit | ||
| the rank badge when the value is missing. Do not invent a leftover score. | ||
| Do not invent a theta. | ||
|
|
||
| ## Consequences | ||
|
|
||
| `GET /api/reports/{grouping}/{period}` returns `leftover_map_rank`. After | ||
| `make seed`, closest and farthest leftover pairs sit above the member | ||
| list with leftover-map rank; click opens that post. Hidden posts stay | ||
| hidden. | ||
|
|
||
| ## Related | ||
|
|
||
| Independent of leftover interaction-map persistence, leftover-criterion | ||
| evaluation landing, leftover residual UI extraction, leftover-map | ||
| complete-case coverage, leftover-map axis share, leftover pairs on the | ||
| grouping comparison strip, two-axis leftover-map distance, and leftover | ||
| observed `Y` / expected `E`. | ||
|
|
||
| ## 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| # ADR 0177 — Persist observed Y and expected E on leftover pairs | ||
|
|
||
| **Decision status:** Accepted | ||
| **Date:** 2026-08-24 | ||
|
|
||
| Amends [ADR 0048](0048-persist-lsirm-leftover-pairs.md) and | ||
| [ADR 0049](0049-leftover-pair-report-ui.md). | ||
|
|
||
| ## Context | ||
|
|
||
| ADR 0048 already persists leftover-map distance and leftover residual | ||
| `R = Y − E[Y|θ, item]` on `report_leftover_pair`. ADR 0049 already | ||
| renders closest and farthest pairs above the member list and opens the | ||
| named post. Residual disclosure without naming `Y` and `E` leaves a | ||
| reader unable to tell whether a leftover cell is a high observed | ||
| response or a low expected category after IRT main effects. | ||
|
|
||
| Jeon et al. (2021, eq. 3) leftover interaction is `−γ‖ξ_p − ζ_i‖`. | ||
| Gabriel (1971) supplies the leftover-map coordinates from a residual | ||
| biplot of `R`. `R` is not an invented leftover score: it is the | ||
| observed category minus the already-fitted expected category. Those | ||
| two inputs must travel with the pair row. | ||
|
|
||
| This increment does not persist leftover-map coordinates, does not | ||
| change leftover-map axis count, does not name complete-case coverage, | ||
| and does not land Post quality on the leftover criterion. | ||
|
|
||
| The unprotected-stack ADR for the same leftover-pair fact was 0163. This | ||
| protected-main reconstruction uses **0177** so it does not collide | ||
| with any current open-head ADR. | ||
|
|
||
| ## Decision | ||
|
|
||
| Each leftover pair names: | ||
|
|
||
| 1. `observed_response` — the observed category `Y` for that | ||
| post–criterion cell; | ||
| 2. `expected_response` — `E[Y|θ, item]` from the already-fitted | ||
| GRM/GPCM main effects; | ||
| 3. `leftover_residual`, which must equal `Y − E` within `1e-6`. | ||
|
|
||
| Migration `0177` is the single source of both columns on every | ||
| install path, fresh or existing -- shipped migrations (`0001`/`0012`) | ||
| are never edited after the fact. It adds them as nullable so older | ||
| leftover rows keep distance and residual without fabricating `Y` or | ||
| `E`. The pair button shows | ||
| `Y {observed} · E {expected}` next to leftover-map distance `d` when | ||
| both values are finite. The next action remains ADR 0049: | ||
| `Open {post}, then read Post quality criterion {criterion}.` Omit the | ||
| `Y` / `E` badge when either value is missing or non-finite. Do not | ||
| invent a leftover score. Do not invent a theta. | ||
|
|
||
| ## Consequences | ||
|
|
||
| `GET /api/reports/{grouping}/{period}` returns `observed_response` | ||
| and `expected_response`. After `make seed`, closest and farthest | ||
| leftover pairs sit above the member list with named `Y` and `E`; | ||
| click opens that post. Hidden posts stay hidden. | ||
|
|
||
| ## Related | ||
|
|
||
| Independent of leftover interaction-map persistence, leftover-criterion | ||
| evaluation landing, leftover residual UI extraction, leftover-map | ||
| complete-case coverage, leftover-map axis share, leftover pairs on the | ||
| grouping comparison strip, and two-axis leftover-map distance. | ||
|
|
||
| ## 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
devin-ai-integration[bot] marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Info: 2.12.21 changelog entry placed out of version order
The new
## [2.12.21]section sits between## [2.12.19]and## [2.12.20](CHANGELOG.md:216). Newest-first order would put 2.12.21 above both. The surrounding entries are already non-monotonic (2.12.19 before 2.12.20), so this may reflect merge-order layout rather than a defect.Was this helpful? React with 👍 or 👎 to provide feedback.