feat(reports): preserve grouping comparison axis-singular delta for serialized successor - #830
Conversation
…rip (v2.51.0)
Caption persisted leftover-map singular values on GET /api/reports/compare/{period} through leftoverMapCompareAxisSingular (ADR 0294). Distinct aria-label Leftover map comparison axis singular. Omit missing, non-finite, or negative leftover-map singular value independently of leftover-map comparison axis share. Do not invent leftover-map singular value from leftover-map axis share. No SQL. No leftover score or theta.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Cycle 2026-08-30T15:40Z: stacked leftover-map singular values on the grouping comparison strip (ADR 0294 / v2.51.0) @ exact head |
|
@copilot review |
|
@coderabbitai review |
|
| const comparisonAxisShare = leftoverMapCompareAxisShare(axis); | ||
| if (comparisonAxisShare === null) { | ||
| const comparisonAxisSingular = leftoverMapCompareAxisSingular(axis); | ||
| if (comparisonAxisShare === null && comparisonAxisSingular === null) { | ||
| return null; |
There was a problem hiding this comment.
| export function leftoverMapCompareAxisSingular( | ||
| axis: Pick<LeftoverMapAxis, "axis_index" | "leftover_singular_value"> | null | undefined, | ||
| ): LeftoverMapCompareAxisSingular | null { | ||
| if (axis == null) { | ||
| return null; | ||
| } | ||
| if (!Number.isInteger(axis.axis_index) || axis.axis_index < 1) { | ||
| return null; | ||
| } | ||
| if ( | ||
| axis.leftover_singular_value == null || | ||
| !Number.isFinite(axis.leftover_singular_value) || | ||
| axis.leftover_singular_value < 0 | ||
| ) { | ||
| return null; | ||
| } | ||
| return { | ||
| axis: axis.axis_index, | ||
| value: axis.leftover_singular_value.toFixed(2), |
There was a problem hiding this comment.
seonghobae
left a comment
There was a problem hiding this comment.
Recovery finding: this closed-unmerged PR still owns a distinct grouping-comparison axis-singular product delta, and exact current #824 does not contain frontend/src/leftoverMapCompareAxis.ts. Closing it therefore did not satisfy the valid-delta succession rule. The PR is reopened as Draft; preserve the feature but treat historical ADR0294/v2.51.0 and old base as evidence only, then reconstruct after the current serialized descendants with a live unclaimed identity.
seonghobae
left a comment
There was a problem hiding this comment.
Fresh review finding: #829 has already moved non-force to 0e4fd5815686120ec66203cb6848834b56bdf289, so the historical #830 head cannot be treated as current-parent evidence even though its axis-singular delta is still valid. I refreshed the PR base to exact #829 and started automation/830-current-829-reconstruction-r1-20260907-1758@2fd79f5eb0308abb272139fb87ba79863310cbb9 / run 34103171306. That lane first requires a real Vitest RED for missing persisted singular-value behavior on exact #829, then reapplies only the one-commit e7913761...ef5fcf63 source/test delta with three-way conflict reporting and a focused GREEN. No product ref moves unless a later current-parent lane obtains complete causal/release/governance GREEN.
seonghobae
left a comment
There was a problem hiding this comment.
Current-parent diagnostic r1 is a valid RED but not a valid reconstruction. Exact #829 0e4fd5815686120ec66203cb6848834b56bdf289 passed the authority check, and the realistic formatter test failed as expected because leftoverMapCompareAxisSingular is absent. Replaying the entire historical e7913761…ef5fcf63 child delta then conflicted in LeftoverPairList.tsx, i18n.test.ts, i18n.ts, leftoverMapCompareAxis.ts, and leftoverMapPlotLayout.ts; those conflicts are stale cumulative-history conflicts, not evidence that current #829 is defective. The historical App/App-test/backend-serialization hunks applied cleanly. Repair should therefore preserve only the independent persisted-singular contract: current leftoverMapCompareAxis.ts gains a finite/non-negative formatter that preserves zero, current grouping-strip rendering computes share and singular independently, and only the clean serialization/render regressions are adopted. Do not replay the conflicted i18n/list/plot-layout files or create a second translation source; eight-locale authority remains #922/#929/#932. Candidate identity remains ADR0370/v2.56.0 after rechecking that no open PR currently claims ADR0370. Product head must stay historical until that minimal current-parent reconstruction has an exact-head GREEN and can be promoted non-force with historical #830 first parent and exact #829 second parent.
seonghobae
left a comment
There was a problem hiding this comment.
Valid reconstruction finding on exact current parent #829: r2 run 34115069739 reproduced the missing singular formatter as RED, reconstructed only the five current-compatible files, passed focused 113 tests + oxlint and the full 735-test frontend suite, then failed the production TypeScript build. The failure is causal and narrower than the feature: historical leftoverMapCompareAxis.test.ts intentionally calls leftoverMapCompareAxisSingular({ axis_index: 1 }) to verify a missing persisted singular field is omitted, while the reconstructed function typed leftover_singular_value as required. Runtime already handles the field as optional. Repair the production formatter input type (required axis_index, optional leftover_singular_value) rather than weakening the test or fabricating a value. r3 is being reconstructed from exact #829 so the workflow remains a single child of the authority parent; no force-push or historical cumulative replay.
Recovery / valid delta
This PR was previously closed without merge while its grouping-comparison axis-singular delta remained distinct; reopening preserved that valid product delta instead of discarding it. Historical head
ef5fcf63b6bcc2f6b451cb22b277116fb10fe138and historical ADR0294/v2.51.0 remain evidence only.Current serialized authority
#829 is now the exact promoted predecessor
0e4fd5815686120ec66203cb6848834b56bdf289(ADR0369/v2.55.0), itself a two-parent non-force convergence of historical #829 and exact #828. Its r4 run passed the realistic RED, causal fix, and full reconstructed GREEN before the combined final promotion-verification step failed after the product ref had already advanced. Independent GitHub reads confirm the promoted #829 branch, exact two-parent ancestry, and clean product tree; the failed final harness step is not transferred as GREEN.GitHub base remains the immediate predecessor branch
feat/leftover-map-compare-unexplained-share-v2520(#829), exact base SHA0e4fd5815686120ec66203cb6848834b56bdf289. Historical base ancestry is evidence only and is not a permissible reconstruction parent.Preserved product delta
Historical feature-origin commit
ef5fcf63b6bcc2f6b451cb22b277116fb10fe138is exactly one commit after historical axis-share commite79137611f0d3041ad836c21e49a95bf7ef1001e. Preserve only that commit's distinct axis-singular behavior after exact #829; do not replay the older cumulative axis-share history.Caption each grouping-comparison leftover-map axis with persisted finite, non-negative
leftover_singular_value, including persisted zero. Missing/non-finite/negative singular value omits only the singular badge and must not be invented from axis share, pair/marker counts, distance, rank, coverage, incomplete counts, or unused-axis count. Current #829 already inheritsleftoverMapCompareAxisShare; historical #830 adds the distinctleftoverMapCompareAxisSingularformatter/label/value contract.Inherit the current full-visible-grouping authorization contract for persisted grouping aggregates and never recompute psychometric truth over the caller-visible subset. Eight-locale translation authority remains the canonical #922/#929/#932 ledger path; do not create a competing translation source.
Current reconstruction evidence
Diagnostic r1
34103171306is terminal failure, but it produced one valid finding: on exact #829 the realistic formatter test REDs becauseleftoverMapCompareAxisSingulardoes not exist. Exact-parent/live-head checks and frozen frontend install passed first. The subsequent broad historical replay failed in five stale cumulative files:frontend/src/components/LeftoverPairList.tsx,frontend/src/i18n.test.ts,frontend/src/i18n.ts,frontend/src/leftoverMapCompareAxis.ts, andfrontend/src/leftoverMapPlotLayout.ts. By contrast the historicalApp.tsx,App.test.tsx, and backend serialization test hunks applied cleanly. Review5130538327records this RCA.Those five conflicts are repair evidence, not reasons to close or overwrite current-parent authority. The next reconstruction must implement the formatter against the current
leftoverMapCompareAxis.ts, adopt only the clean current-compatible render/serialization regressions, compute axis share and singular independently, and leave the conflicted i18n/list/plot-layout history behind. Current source lacks the singular translation key; canonical eight-locale truth still belongs to #922/#929/#932, so this PR must not add another translation store merely to resolve a historical patch conflict.A purpose-specific write-capable Actions reconstruction was not added after the repository connector rejected that workflow mutation. Product head therefore remains
ef5fcf63b6bcc2f6b451cb22b277116fb10fe138; no unvalidated code or synthetic status was promoted.Reconstruction acceptance
Reconstruct from exact
#829@0e4fd5815686120ec66203cb6848834b56bdf289using only the valid singular-value child delta and a collision-free next identity. ADR0370 / v2.56.0 remains unclaimed by open PR authority at the latest check and is the candidate identity; keep it Proposed while Draft and re-check immediately before promotion.Require a realistic current-parent RED for the missing singular-value presentation/contract, the smallest causal implementation, full relevant PostgreSQL-backed backend and frontend GREEN, lint/build/Storybook, version/ADR parity, clean non-force promotion with historical #830 first parent and exact #829 second parent, current rendered responsive/keyboard/focus/a11y evidence, and qualifying independent approval. Do not skip #829, force-push, destructively rebase, transfer predecessor evidence, derive psychometric truth, or weaken gates.
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.