Skip to content

feat(reports): preserve grouping-comparison unexplained-leftover delta for serialized successor - #833

Draft
seonghobae wants to merge 2 commits into
feat/leftover-map-compare-cross-share-v2530from
feat/leftover-map-compare-unexplained-v2540
Draft

feat(reports): preserve grouping-comparison unexplained-leftover delta for serialized successor#833
seonghobae wants to merge 2 commits into
feat/leftover-map-compare-cross-share-v2530from
feat/leftover-map-compare-unexplained-v2540

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Preserve the valid persisted grouping-comparison unexplained leftover U delta while the serialized report stack is repaired. Missing/non-finite U omits only that metric; finite zero and negative values remain explicit. UI/read-model composition only: no SQL/schema, theta authority, or invented score.

Current serialized authority

The active repair chain is #828#829#830#831 before this successor may be reconstructed.

This PR remains on historical #831@8a12062c... with head dbff5bf47b06eded0cff64b292815861d7f514f6. Do not retarget or promote it ahead of the serialized parents merely to reduce conflicts. When #831 advances, converge this child non-force and regenerate all non-transferable evidence.

Historical identity and #832 recovery inheritance

Historical ADR0297/v2.54.0 is evidence only; current #828 owns v2.54.0. No replacement ADR/release version is materialized on this stale branch. Allocate both from fresh live authority only when the exact rebuilt #831 parent exists, keeping the new ADR Proposed while Draft.

#832 remains an open Draft recovery/evidence lane because it was previously closed before complete successor inheritance was proven. #832 head 1511166c53c16fef65f3330eee58d3a5664b1583 and this PR's feature origin are sibling deltas over historical #831. Preserve #832's valid delta explicitly during reconstruction: persisted-U finite/missing/non-finite/negative/zero semantics; helper/i18n/App regressions; the assertion that LEFTOVER_MAP_COMPARE_UNEXPLAINED_LABEL remains distinct from the unexplained-share label; generated-lock/project-version parity by regeneration rather than hand edits; and all valid fixture/contract/evidence. Do not close #832 until exact rebuilt #833 proves complete inheritance.

Product/accessibility invariants

  • Consume persisted U; never derive it from R, , distance, coordinates, residual, explained/unexplained/cross shares, rank, coverage, or unused axes.
  • Missing/non-finite U omits only its comparison suffix/badge; finite zero remains U 0.00; finite negative values are not clamped.
  • Keep Leftover map comparison unexplained leftover semantically distinct from the unexplained-share label.
  • Append finite persisted U to the actionable grouping-comparison button's accessible name and hide only the duplicate visual badge from the accessibility tree; descendant-text-only evidence is insufficient for this actionable control.
  • Preserve repaired parent read-model transport, cross-share/axis-singular/accessibility semantics, and whole-population authorization. Never recompute hidden-population psychometric truth over a caller-visible subset.
  • Canonical KO/EN/JA/ZH/VI/ES/DE/FR translation authority remains i18n: move UI translations to versioned DB ledger and complete 8-locale coverage #922/feat: establish versioned UI translation ledger foundation #929/feat(i18n): consume published Customer Master screen copy #932; do not create a second inline translation ledger.

Reconstruction/evidence boundary

After #828 is repaired and promoted, converge #829, then #830, then #831 in order. Only then reconstruct this PR from historical dbff5bf... onto exact repaired #831 with workflow-free non-destructive ancestry, preserving both #832 recovery invariants and this PR's distinct U delta. Overlapping App/i18n/lock files require semantic reconstruction rather than wholesale ours/theirs selection.

Keep Draft until realistic exact-parent RED → minimum causal fix → exact-head full backend/frontend GREEN, regenerated lock/version parity, lint/build/Storybook, current rendered responsive/pointer/touch/keyboard/focus/a11y evidence, canonical translation-ledger convergence, hosted security gates, applicable PostgreSQL/k6 acceptance, and qualifying independent review are current. No self-approval, bypass, force-push, destructive rebase, source duplication, psychometric recomputation, ancestor skip, or predecessor-evidence transfer.

…on strip (v2.54.0)

Caption leftover-map unexplained leftover U on grouping comparison leftover-pair
buttons through formatLeftoverMapUnexplained (ADR 0297). 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
U on the pair row; click a post marker or a pair button opens that post. A missing
or non-finite U omits that leftover-map comparison unexplained leftover badge and
keeps leftover-map cross share x when finite. A finite negative leftover is shown,
never clamped. Do not invent U from R and R̂. 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 2026-08-31T01:19 KST. Writes work (comment/create-PR/push). Token still empty X-OAuth-Scopes; GitHub App Grok has contents/PR/issues write as seonghobae.

This PR (#833 / v2.54.0 / ADR 0297 / 18d89b4) captions persisted leftover-map unexplained leftover U = R − R̂ on grouping comparison leftover-pair buttons through formatLeftoverMapUnexplained. Distinct aria-label Leftover map comparison unexplained leftover. UI-only; no new columns. Missing or non-finite U omits that badge independently of x, s, e, , d, and coverage notes. A finite negative leftover is shown, never clamped. Do not invent U from R and . When finite, U + R̂ = R is now strip-auditable.

Verification: pnpm exec vitest run src/leftoverMapUnexplained.test.ts src/leftoverMapUnexplainedShare.test.ts src/leftoverMapCrossShare.test.ts src/leftoverMapExplainedShare.test.ts src/leftoverMapReconstruction.test.ts src/i18n.test.ts src/App.test.tsx — 7 files, 317 passed. pnpm exec oxlint on changed frontend files — 0 warnings, 0 errors.

Leave open for independent review. Do not squash-merge onto the leftover base. Do not self-approve. Copilot review is not independent APPROVE. Stacked onto #831 @ 2cefc0b. Issues #79 and #87 stay open. #96 remains closed. Do not merge revert #808 without independent APPROVE.

Next buyer increment after this: leftover residual R on the same grouping comparison leftover-pair buttons so Y − E = R is strip-auditable.

@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
Comment on lines +4094 to +4096
const unexplainedLeftover = formatLeftoverMapUnexplained(
pair.leftover_map_unexplained,
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Production unexplained badges never appear

Real comparisons omit leftover_map_unexplained in fetch_period_comparison, so formatLeftoverMapUnexplained always hides the new badge. Only mocked responses display it.

Prompt for agents
Expose the persisted unexplained leftover through the real comparison API. In backend/app/report_ingestion.py, update fetch_period_comparison so its leftover-pair query selects report_leftover_pair.leftover_map_unexplained and its payload serialization returns the nullable finite value, matching fetch_period_reports. Add or extend the backend /api/reports/compare/{period_code} integration test to verify the field reaches authorized comparison pairs. Keep the frontend formatter fail-closed for missing or non-finite values.
Devin Review

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

Copy link
Copy Markdown
Contributor Author

Cycle 2026-08-31 01:19 KST. Head 18d89b4 still has no independent collaborator APPROVE (Devin Review COMMENTED is not independent APPROVE). Only collaborator is seonghobae — cannot request a second human reviewer.

Local leftover residual R on grouping comparison leftover-pair buttons (ADR 0298 / v2.55.0, feat/leftover-map-compare-residual-v2550) is stacked onto this branch next. Leave this PR open. Do not squash-merge onto the unprotected leftover base. Do not self-approve. Do not merge revert #808 without independent APPROVE.

Parallel stack #832 / #834 is a competing U-then-R increment on the same buyer gap; leave those open too. After independent review, retarget onto leftover-coordinates (feat/leftover-map-coordinates-v2240 / #782) rather than squash-merging here.

Next after R: leftover observed Y on comparison leftover-pair buttons. Synthetic fixtures only. NVIDIA_NIM_API_KEY only.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Parent-first/capacity finding: this PR is Ready while its base is the still-open feature branch owned by #831, which is itself stacked on an unmerged descendant chain behind the current #802/#811 foundation. Ready here is premature validation admission and can consume review/Actions capacity without a legal protected-main merge path. Preserve the full v2.54.0 delta, but keep this dependent PR Draft until its prerequisite chain converges normally; do not close or squash it.

Preserve #833 ADR 0297/product delta while inheriting current #831 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 #835 ADR 0298/product delta while inheriting current #833 ancestry through a normal two-parent merge. No force-push or destructive rebase.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Current-head stack-authority finding: live base already equals #831 exact 8a12062cd8efef0c99abe794ef3e9f8dcbc31617, but the PR body still cites obsolete parent 2cefc0b, predecessor verification, and historical retarget guidance. Preserve ADR 0297/product semantics and Draft state; make live parent/head/evidence authoritative and do not transfer predecessor tests.

@seonghobae seonghobae changed the title feat(reports): leftover-map unexplained leftover on grouping comparison strip (v2.54.0) feat(reports): preserve grouping-comparison unexplained-leftover 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