Skip to content

feat(reports): preserve grouping comparison axis-singular delta for serialized successor - #830

Draft
seonghobae wants to merge 2 commits into
feat/leftover-map-compare-unexplained-share-v2520from
feat/leftover-map-compare-axis-singular-v2510
Draft

feat(reports): preserve grouping comparison axis-singular delta for serialized successor#830
seonghobae wants to merge 2 commits into
feat/leftover-map-compare-unexplained-share-v2520from
feat/leftover-map-compare-axis-singular-v2510

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

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 ef5fcf63b6bcc2f6b451cb22b277116fb10fe138 and 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 SHA 0e4fd5815686120ec66203cb6848834b56bdf289. Historical base ancestry is evidence only and is not a permissible reconstruction parent.

Preserved product delta

Historical feature-origin commit ef5fcf63b6bcc2f6b451cb22b277116fb10fe138 is exactly one commit after historical axis-share commit e79137611f0d3041ad836c21e49a95bf7ef1001e. 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 inherits leftoverMapCompareAxisShare; historical #830 adds the distinct leftoverMapCompareAxisSingular formatter/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 34103171306 is terminal failure, but it produced one valid finding: on exact #829 the realistic formatter test REDs because leftoverMapCompareAxisSingular does 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, and frontend/src/leftoverMapPlotLayout.ts. By contrast the historical App.tsx, App.test.tsx, and backend serialization test hunks applied cleanly. Review 5130538327 records 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@0e4fd5815686120ec66203cb6848834b56bdf289 using 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.

…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.
@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-30T15:40Z: stacked leftover-map singular values on the grouping comparison strip (ADR 0294 / v2.51.0) @ exact head ef5fcf6. Distinct aria-label Leftover map comparison axis singular. Copy leftover map comparison axis {axis} σ {value}. Rank-0 leftover-map singular value 0 shown when persisted. Missing, non-finite, or negative leftover-map singular value omits independently of leftover-map comparison axis share. Do not invent leftover-map singular value from leftover-map axis share. UI-only; no SQL. Waiting on independent APPROVE of exact head. Copilot/Devin COMMENT is not independent APPROVE. Do not self-approve. Do not squash-merge this leftover stack onto unprotected leftover base. Coverage-strip census is complete; leftover-map axis share and leftover-map singular values are now named. Next buyer gap on this stack after independent APPROVE is leftover-map graphic on the strip. #79 and #87 stay open.

Copy link
Copy Markdown
Contributor Author

@copilot review

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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

Comment thread frontend/src/App.tsx
Comment on lines 4061 to 4064
const comparisonAxisShare = leftoverMapCompareAxisShare(axis);
if (comparisonAxisShare === null) {
const comparisonAxisSingular = leftoverMapCompareAxisSingular(axis);
if (comparisonAxisShare === null && comparisonAxisSingular === null) {
return null;

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: Independent axis badge validation

leftoverMapCompareAxisSingular validates persisted singular values independently. The shared rendering guard keeps either valid badge when its counterpart is malformed.

Devin Review

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

Comment on lines +49 to +67
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),

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: Persisted values remain authoritative

The comparison API supplies stored leftover_singular_value values. leftoverMapCompareAxisSingular consumes only that field, avoiding derived or invented values.

Devin Review

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

@seonghobae seonghobae closed this Aug 30, 2026
@seonghobae seonghobae changed the title feat(reports): leftover-map singular values on grouping comparison strip (v2.51.0) feat(reports): preserve grouping comparison axis-singular delta for serialized successor Sep 7, 2026
@seonghobae seonghobae reopened this Sep 7, 2026
@seonghobae
seonghobae marked this pull request as draft September 7, 2026 00:39

@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.

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 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.

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 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-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 added a commit that referenced this pull request Sep 7, 2026
seonghobae added a commit that referenced this pull request Sep 7, 2026
seonghobae added a commit that referenced this pull request Sep 7, 2026

@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.

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.

… current stack

Preserve the valid historical #830 delta on exact #829; consume only persisted singular values, accept the persisted field as optional at the read boundary, and keep share/singular omission independent.
github-actions Bot pushed a commit that referenced this pull request 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