Skip to content

feat(reports): preserve grouping-comparison observed delta for serialized successor - #836

Draft
seonghobae wants to merge 2 commits into
feat/leftover-map-compare-residual-v2550from
feat/leftover-map-compare-observed-v2560
Draft

feat(reports): preserve grouping-comparison observed delta for serialized successor#836
seonghobae wants to merge 2 commits into
feat/leftover-map-compare-residual-v2550from
feat/leftover-map-compare-observed-v2560

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Preserve the valid grouping-comparison persisted observed value Y delta while the serialized report stack is repaired. Missing/non-finite Y 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 already points to immediate predecessor #835 (feat/leftover-map-compare-residual-v2550@f0da90928f0a01ba46ad82f3c53104edc910a630). #835 itself must first converge after #833 and the repaired #828#831 chain. Historical ADR0299/v2.56.0 and this branch's old validation are evidence only; they are not a current release allocation or transferable GREEN.

Reconstruct this Y delta only after exact promoted #835, choose the then-next unclaimed ADR/release identity from live authority, and keep it Proposed while Draft. The old instruction to bypass the repaired stack and retarget directly to #782 is superseded and must not be followed.

Product invariants

  • Missing/non-finite persisted Y omits only the comparison observed badge; finite zero/negative values remain explicit.
  • Never derive Y from R and E, geometry, reconstruction, shares, rank, coverage, pair counts, or unused-axis count.
  • Preserve independent badges/metrics inherited from predecessors.
  • Any finite persisted metric rendered inside an actionable pair button must also be present in that button's accessible name; duplicate visible badge text should not cause double announcement.
  • Inherit 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 336 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 observed Y on grouping comparison leftover-pair
buttons through formatLeftoverMapObserved (ADR 0299). 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
Y on the pair row; click a post marker or a pair button opens that post. A missing
or non-finite Y omits that leftover-map comparison observed badge and
keeps leftover residual R when finite. A finite negative leftover is shown,
never clamped. Do not invent Y from R and E. 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:42 KST. Head ada0c86. 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 (#835). 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 expected E 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: Formatter preserves valid edge values

formatLeftoverMapObserved keeps zero and finite negatives while rejecting missing or non-finite values. Its result cannot suppress neighboring badges.

(Refers to this code)

Devin Review

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

Comment thread frontend/src/App.tsx
pair.leftover_map_unexplained,
);
const residual = formatLeftoverMapResidual(pair.leftover_residual);
const observed = formatLeftoverMapObserved(pair.observed_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.

🟡 Observed comparison badges never appear

Real comparison responses omit observed_response in fetch_period_comparison, so formatLeftoverMapObserved always receives undefined. Every new Y badge stays hidden.

Prompt for agents
The frontend now renders pair.observed_response in frontend/src/App.tsx, but backend/app/report_ingestion.py fetch_period_comparison does not select observed_response from report_leftover_pair or serialize it into comparison leftover_pairs. Extend that comparison query and payload to carry the persisted nullable value without deriving it from residual or expected response. Add comparison-endpoint coverage using a real fetch_period_comparison-shaped payload, including finite, null, and zero values, so frontend mocks cannot mask future API omissions.
Devin Review

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

Copy link
Copy Markdown
Contributor Author

Cycle 2026-08-31 01:45 KST. Head ada0c86. Leftover expected E (ADR 0300 / v2.57.0) is stacked as #837 (feat/leftover-map-compare-expected-v2570 @ e6638a8). Leave both open. Independent APPROVE still missing. Do not squash-merge. Do not self-approve.

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