Skip to content

feat(reports): preserve grouping-comparison rank delta for serialized successor - #838

Draft
seonghobae wants to merge 2 commits into
feat/leftover-map-compare-expected-v2570from
feat/leftover-map-compare-rank-v2580
Draft

feat(reports): preserve grouping-comparison rank delta for serialized successor#838
seonghobae wants to merge 2 commits into
feat/leftover-map-compare-expected-v2570from
feat/leftover-map-compare-rank-v2580

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Preserve the valid grouping-comparison persisted leftover-map rank delta while the serialized report stack is repaired. Only non-negative integer rank is displayable and rank 0 remains explicit. UI/read-model composition only: no SQL/schema, theta authority, or invented score.

Current stack authority

GitHub base metadata points to immediate predecessor #837 (feat/leftover-map-compare-expected-v2570@d40cdf5847c3844acd54a952691fba69b18d6f7c). #837 now waits on reconstructed #836 and the repaired predecessor chain. Historical ADR0301/v2.58.0 and its focused validation are evidence only, not current release authority.

Reconstruct this rank delta only after exact promoted #837, allocate the then-next unclaimed ADR/release identity, and keep it Proposed while Draft. The historical instruction to retarget directly to #782 is superseded because it would bypass valid predecessors.

Product invariants

  • Missing, negative, or non-integer rank omits only the comparison rank badge; rank 0 remains explicit.
  • Never infer rank from coordinates, distance, expected/observed/residual/reconstruction/unexplained values, shares, coverage, pair counts, or unused-axis count.
  • Preserve independent predecessor metrics.
  • Any persisted metric rendered inside an actionable pair button must be represented in that button's accessible name without duplicate announcement.
  • Preserve current-parent ABAC and whole-population psychometric-aggregate gating; never recompute hidden-population truth from a caller-visible subset.

Evidence boundary

Historical focused frontend evidence was 352 passing tests plus oxlint success, but it predates current-parent reconstruction and does not transfer. Canonical KO/EN/JA/ZH/VI/ES/DE/FR translation authority remains #922/#929/#932. Keep Draft until realistic current-parent RED, causal repair, exact-head backend/frontend GREEN, lint/build/Storybook, applicable browser/responsive/keyboard/focus/a11y evidence, translation-ledger convergence, applicable authenticated PostgreSQL/k6 acceptance, and qualifying independent approval are current. No self-approval, bypass, force-push, destructive rebase, or ancestor skip.

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.

Gabriel, K. R. (1971). The biplot graphic display of matrices with application to principal component analysis. Biometrika, 58(3), 453–467.

Caption leftover-map rank on grouping comparison leftover-pair
buttons through formatLeftoverMapRank (ADR 0301). After make seed, closest
and farthest leftover pairs sit above the member list with the Gabriel biplot of
already-named coordinates and grouping comparison leftover-pair buttons that match
leftover-map rank on the pair row; click a post marker or a pair button opens that
post. A missing, negative, or non-integer rank omits that leftover-map comparison
rank badge and keeps leftover expected E when finite. Rank-0 origin cells still
name rank 0. Do not invent rank from plotted coordinates, leftover-map distance,
or the count of unused axes. UI-only; no new columns. Never invent a leftover
score or a theta.

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.

Gabriel, K. R. (1971). The biplot graphic display of matrices with application to
principal component analysis. Biometrika, 58(3), 453-467.
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

Cycle overlay 2026-08-31 02:15 KST

Writes work (gh OIDC). Do not self-approve. Do not squash-merge. Do not merge #808 without independent APPROVE.

Independent approval is required. No self-approval, admin bypass, or force push.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread frontend/src/App.tsx
const residual = formatLeftoverMapResidual(pair.leftover_residual);
const observed = formatLeftoverMapObserved(pair.observed_response);
const expected = formatLeftoverMapExpected(pair.expected_response);
const rank = formatLeftoverMapRank(pair.leftover_map_rank);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Comparison rank badges never appear

Real comparison responses omit leftover_map_rank, so formatLeftoverMapRank always receives undefined. Every production comparison hides the new rank badge, including rank 0.

Prompt for agents
Update backend/app/report_ingestion.py in fetch_period_comparison so its report_leftover_pair query selects leftover_map_rank and its leftover_pairs payload serializes the persisted nullable integer. Add or extend the authenticated /api/reports/compare/{period} integration test to assert that rank is present, including rank 0 where available. Keep the existing authorization filtering and metadata stripping unchanged.
Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor Author

Cycle overlay 2026-08-31 02:25 KST: leftover-map coordinates ξ / ζ on grouping comparison leftover-pair buttons (ADR 0302 / v2.59.0) is stacked as #839 (feat/leftover-map-compare-coordinates-v2590 @ 51bf33a) onto this rank increment. This PR still lacks independent APPROVE. Leave open. Do not self-approve. Do not squash-merge. Do not merge #808.

Preserve #838 ADR 0301/product delta while inheriting current #837 ancestry through a normal two-parent merge. No force-push or destructive rebase.
seonghobae added a commit that referenced this pull request Sep 5, 2026
Preserve #839 ADR 0302/product delta while inheriting current #838 ancestry through a normal two-parent merge. No force-push or destructive rebase.
@seonghobae seonghobae changed the title feat(reports): leftover-map rank on grouping comparison strip (v2.58.0) feat(reports): preserve grouping-comparison rank delta for serialized successor Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant