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 badge; finite zero and negative values remain explicit and are never clamped. UI/read-model composition only: no SQL, new measurement authority, theta, or invented score.

Current stack / identity authority

#828 is promoted at 7b6dbbb99a09d0523bce43c6872bbd9fa382a43a as ADR0367/v2.54.0. #829 is the immediate active successor; reconstruction r4 34098420270 starts directly from exact #828 and has passed exact-parent/live-head checks, semantic reconstruction, frozen installation, realistic accessible-name RED, and the minimal causal fix; full reconstructed GREEN/non-force promotion remains required. #830 must then reconstruct its distinct axis-singular delta on exact promoted #829, followed by #831's cross-share delta. This PR remains the serialized U successor only after exact promoted #831.

Historical head dbff5bf47b06eded0cff64b292815861d7f514f6, ADR0297 and v2.54.0 remain evidence only. The v2.54.0 identity is already owned by exact #828 and must not be retained here. Allocate the then-next unclaimed ADR/release identity only when the current parent is exact and stable. Do not skip ancestors, force-push, destructively rebase, or transfer predecessor checks.

#832 recovery inheritance

#832 has been reopened as a Draft recovery/evidence lane because it was previously closed unmerged before complete successor inheritance was proven. #832 head 1511166c53c16fef65f3330eee58d3a5664b1583 and this PR's feature origin 18d89b498a58d68ec58100065d71664f2c691347 are sibling commits over the same historical #831 parent 2cefc0b63436989210bca3204e7750e87edba662, not ancestor/descendant commits. The core persisted-U behavior is equivalent, but #832 additionally carries an explicit test preventing the comparison unexplained-leftover label from regressing to the unexplained-share label and a generated-lock project-version update. During this PR's reconstruction, inherit that explicit label non-confusion invariant and regenerate (never hand-edit) the lock for the new collision-free version. Do not close #832 again until this exact reconstructed successor has proven source/test/fixture/contract/evidence and lock/version parity.

GitHub base is the #831 branch feat/leftover-map-compare-cross-share-v2530, currently historical until #831 itself converges. Base movement is dependency topology and must be adopted non-force before reconstruction.

Product / accessibility invariants

  • Missing or non-finite persisted U omits only the comparison unexplained-leftover badge and accessible-name suffix.
  • Finite zero remains U 0.00; finite negative values are shown rather than clamped.
  • Never derive U from R and , distance, plotted coordinates, reconstruction, residual, explained/unexplained/cross shares, rank, coverage counts, or unused-axis count.
  • Leftover map comparison unexplained leftover remains a distinct semantic label and must never alias Leftover map comparison unexplained leftover share.
  • Preserve predecessor comparison-pair accessible-name repairs and append the localized finite U value to the actionable button name; hide only the duplicate visual U badge from the accessibility tree. A descendant-text-only assertion is insufficient.
  • Inherit current-parent full-visible-grouping authorization; never recompute psychometric truth from a caller-visible subset.

The broader pre-existing LeftoverPairList explicit-label composition defect is separately tracked by #976 and must not be folded into this serialized comparison-strip lane.

UI / evidence boundary

Canonical KO/EN/JA/ZH/VI/ES/DE/FR translation authority remains #922/#929/#932. Historical inline five-locale copy is compatibility evidence only. Keep Draft until current-parent RED → causal fix → full GREEN, exact-head repository/security checks, Storybook/browser/keyboard/focus/a11y evidence, translation-ledger convergence, applicable authenticated PostgreSQL/k6 acceptance, and qualifying independent review are current. No self-approval, bypass, force-push, or gate weakening.

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.

…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