Skip to content

feat(reports): preserve grouping-comparison expected delta for serialized successor - #837

Draft
seonghobae wants to merge 2 commits into
feat/leftover-map-compare-observed-v2560from
feat/leftover-map-compare-expected-v2570
Draft

feat(reports): preserve grouping-comparison expected delta for serialized successor#837
seonghobae wants to merge 2 commits into
feat/leftover-map-compare-observed-v2560from
feat/leftover-map-compare-expected-v2570

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

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

Current stack authority

GitHub base metadata points to immediate predecessor #836 (feat/leftover-map-compare-observed-v2560@9f9cc71324d3197bf582bb30a935105803517d75). #836 now explicitly waits on reconstructed #835, which waits on the repaired #833 and #828#831 chain. Historical ADR0300/v2.57.0 and its focused validation are evidence only, not current release authority.

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

Product invariants

  • Missing/non-finite persisted E omits only the comparison expected badge; finite zero/negative values remain explicit.
  • Never derive E from Y and R, geometry, reconstruction, shares, rank, coverage, pair counts, or unused-axis count.
  • Preserve independent predecessor metrics.
  • Any finite persisted metric shown inside an actionable pair button must be included in that button's accessible name without double-announcing duplicate visible badge text.
  • Preserve current-parent ABAC and whole-population psychometric-aggregate gating; never recompute hidden-population truth from a visible subset.

Evidence boundary

Historical focused frontend evidence was 341 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 expected E on grouping comparison leftover-pair
buttons through formatLeftoverMapExpected (ADR 0300). 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
E on the pair row; click a post marker or a pair button opens that post. A missing
or non-finite E omits that leftover-map comparison expected badge and
keeps leftover observed Y when finite. A finite negative leftover is shown,
never clamped. Do not invent E from Y 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-31 01:45 KST. Head e6638a8. Independent collaborator APPROVE required. Copilot/Devin COMMENTED is not independent APPROVE. Only collaborator is seonghobae — no second human reviewer to request.

Leave this PR open. Do not squash-merge onto the unprotected leftover base (#836). Do not self-approve. After independent review, retarget onto leftover-coordinates (feat/leftover-map-coordinates-v2240 / #782) rather than squash-merging here.

Next increment on this head: leftover-map rank on grouping comparison leftover-pair buttons. Synthetic fixtures only. NVIDIA_NIM_API_KEY only. Do not merge revert #808 without independent APPROVE.

@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 2 potential issues.

Devin Review

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 Info: Valid edge values remain visible

formatLeftoverMapExpected rejects only nullish and non-finite values. Zero and finite negatives remain visible without clamping.

(Refers to this code)

Devin Review

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

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Expected values never reach comparisons

Real comparison responses omit expected_response, so formatLeftoverMapExpected always receives undefined. Persisted expected-value badges never appear outside mocked tests.

Prompt for agents
Update backend/app/report_ingestion.py fetch_period_comparison so its leftover-pair query selects report_leftover_pair.expected_response and its payload serializes the nullable numeric value. Add or extend the authenticated /api/reports/compare/{period_code} integration test to assert that expected_response reaches comparison leftover pairs. The frontend already reads this property at App.tsx formatLeftoverMapExpected.
Devin Review

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

Copy link
Copy Markdown
Contributor Author

Cycle 2026-08-31T02:03 KST write probe. Independent APPROVE still required on exact head e6638a8. No self-approval. Next buyer gap is leftover-map rank on grouping comparison leftover-pair buttons (ADR 0301 / v2.58.0), stacked onto this PR, not mixed into #808.

Copy link
Copy Markdown
Contributor Author

Cycle overlay 2026-08-31 02:15 KST: leftover-map rank on grouping comparison leftover-pair buttons (ADR 0301 / v2.58.0) is stacked as #838 (feat/leftover-map-compare-rank-v2580 @ 6c7c66f) onto this expected increment. This PR still lacks independent APPROVE (Devin COMMENTED only). Leave open. Do not self-approve. Do not squash-merge. Do not merge #808.

Preserve #837 ADR 0300/product delta while inheriting current #836 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 #838 ADR 0301/product delta while inheriting current #837 ancestry through a normal two-parent merge. No force-push or destructive rebase.
@seonghobae seonghobae changed the title feat(reports): leftover expected on grouping comparison strip (v2.57.0) feat(reports): preserve grouping-comparison expected 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