Skip to content

feat(reports): preserve grouping comparison unexplained-share delta for serialized successor - #829

Draft
seonghobae wants to merge 3 commits into
feat/leftover-map-compare-axis-share-v2500from
feat/leftover-map-compare-unexplained-share-v2520
Draft

feat(reports): preserve grouping comparison unexplained-share delta for serialized successor#829
seonghobae wants to merge 3 commits into
feat/leftover-map-compare-axis-share-v2500from
feat/leftover-map-compare-unexplained-share-v2520

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Preserve the valid grouping-comparison persisted unexplained-leftover-share s = U² / R² delta as the serialized successor of exact #828. Missing/non-finite s omits only that metric; finite zero and values above 1 remain explicit and are never clamped. UI/read-model composition only: no SQL, new measurement authority, theta, or invented score.

Current stack authority

#828 is exact promoted predecessor 7b6dbbb99a09d0523bce43c6872bbd9fa382a43a (ADR0367/v2.54.0). #829 product branch is now non-force promoted to 0e4fd5815686120ec66203cb6848834b56bdf289, tree f814e6889e5d7674a9f8b65fcccb4f61cbb95662, with historical #829 118500f73251eaaf717d5329b8fb6d9895196fe7 as first parent and exact #828 as second parent. ADR0369 / v2.55.0 is the current collision-free identity; historical ADR0295/v2.52.0 remains evidence only.

Independent live verification confirms the product branch points to 0e4fd581..., the parent order is preserved, and neither .github/workflows/automation-829-current-828-reconstruction-r4.yml nor .github/automation/829-r4.py exists in the product tree.

Review finding and realistic RED

Historical frontend/src/App.tsx gave each grouping-comparison pair button an explicit aria-label ending at pair title/criterion while rendering persisted U²/R² only in a descendant span with its own label. Because the explicit parent label owns the actionable accessible name, the buyer-visible metric could be omitted for assistive technology. Review 5128914203 records that product finding.

Runs 34094051465 and 34094519359 were harness failures before product RED. r3 34096383373 fixed those but exposed a shell-quoting guard defect. r4 34098420270 then passed exact-parent/live-head verification, semantic reconstruction, frozen graph installation, the realistic accessibility RED, the minimal causal fix, and the full Exact reconstructed GREEN step. The run is nevertheless terminal failure because its combined final Verify authority and promote product branch non-force step failed after the product ref had already moved. That run-level failure is not rewritten as GREEN and should not be rerun unchanged: its initial guard expects the old product head, which is no longer true.

The product promotion itself is adopted only because its result was independently re-read from GitHub: exact branch head, exact two-parent ancestry, clean product tree, and absence of temporary harness files all match the intended promotion. The failed final harness step remains non-transferable workflow evidence rather than a product-conflict finding.

Product invariants

  • Missing or non-finite persisted s omits only the comparison unexplained-share badge and accessible-name suffix.
  • Finite zero remains U²/R² 0.00; finite values above 1 are shown rather than clamped.
  • Never derive s from U, R, distance, plotted coordinates, reconstruction, residual, explained share, rank, coverage counts, or unused-axis count.
  • A finite persisted metric rendered inside the pair action must also be present in that button's accessible name; the visual duplicate is not a second accessibility-tree label.
  • Inherit exact-current-parent authorization gating for persisted grouping aggregates; never rebuild psychometric truth over a caller-visible subset.

Descendant and evidence boundary

#830 is now the earliest stale descendant and must reconstruct from exact #829@0e4fd5815686120ec66203cb6848834b56bdf289; predecessor isolated checks do not transfer. Canonical KO/EN/JA/ZH/VI/ES/DE/FR translation authority remains #922/#929/#932. Inline five-locale strings in this reconstruction are compatibility presentation, not a competing source of truth.

Keep Draft until hosted exact-product-head required checks, current browser/keyboard/focus/a11y evidence, translation-ledger convergence, authenticated PostgreSQL/k6 acceptance where applicable, and qualifying independent approval exist. Draft-triggered Tests action-required status is not execution evidence. No self-approval, parent bypass, force-push, destructive rebase, 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.

…mparison strip (v2.52.0)

Caption persisted leftover-map unexplained leftover share s = U²/R² on
grouping comparison leftover-pair buttons through
formatLeftoverMapUnexplainedShare (ADR 0295). Distinct aria-label
Leftover map comparison unexplained leftover share. Missing or
non-finite s omits that badge and keeps e, R̂, d, and coverage notes.
Do not invent s from U and R. UI-only; no new columns.
@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 probe 2026-08-31 ~00:45 KST. Writes work (comment/close/create-PR/push). Token still empty X-OAuth-Scopes; GitHub App Grok has contents/PR/issues write as seonghobae.

This PR (#829 / v2.52.0 / ADR 0295 / 4d82c28) captions persisted leftover-map unexplained leftover share s = U²/R² on grouping comparison leftover-pair buttons through formatLeftoverMapUnexplainedShare. Distinct aria-label Leftover map comparison unexplained leftover share. UI-only; no new columns. Missing or non-finite s omits that badge independently of e, , d, and coverage notes. Do not invent s from U and R.

Verification: pnpm exec vitest run src/leftoverMapUnexplainedShare.test.ts src/leftoverMapExplainedShare.test.ts src/leftoverMapReconstruction.test.ts src/i18n.test.ts src/App.test.tsx — 5 files, 303 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 #827 @ ead81bd. Issues #79 and #87 stay open. #96 remains closed. Do not merge revert #808 without independent APPROVE.

Next buyer increment after this: leftover-map cross share x = 2R̂U/R² on the same grouping comparison leftover-pair buttons so e + s + x = 1 is strip-auditable.

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

Copilot review requested via GitHub App. Copilot review is not independent APPROVE. Leave this PR open.

@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 +4080 to +4082
const unexplainedShare = formatLeftoverMapUnexplainedShare(
pair.leftover_map_unexplained_share,
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Unexplained share badge never renders

Live payloads from fetch_period_comparison omit leftover_map_unexplained_share, so formatLeftoverMapUnexplainedShare always receives undefined. The new badge only appears with mocked data.

Prompt for agents
The grouping comparison endpoint must include the persisted unexplained share consumed by ReportsPanel. Update backend/app/report_ingestion.py fetch_period_comparison so its leftover-pair query selects report_leftover_pair.leftover_map_unexplained_share and its payload serializes a finite database value as a float while preserving null. Add or extend backend comparison tests to verify the field reaches GET /api/reports/compare/{period_code}; keep the existing authorization filtering unchanged.
Devin Review

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

@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 Ready PR is a dependent increment on still-open #827, while the current leftover-map foundation #802 has not merged and #811 is Draft/conflicting. Preserve the v2.52.0 unexplained-share delta, but keep this child Draft until prerequisite convergence provides a legal protected-main path. No close, squash, or evidence transfer.

Preserve #829 ADR 0295/product delta while inheriting current #827 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 #831 ADR 0296/product delta while inheriting current #829 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 #827 exact 8b3011b03777822a23af831b4fddcc06e7837019, but the PR body still cites obsolete parent ead81bd, predecessor verification, and historical retarget guidance. Preserve ADR 0295/product semantics and Draft state; make live parent/head/evidence authoritative and do not transfer predecessor tests.

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

Serialized-descendant finding: #825's reconstructed identity and #826/#827 collision repairs make this PR's historical ADR0295/v2.52.0 non-authoritative. Preserve the unexplained-share delta and exact historical ancestry as evidence, but do not promote that identity. After #825#826#827 converge, reconstruct from exact promoted #827 with an unclaimed ADR/release identity and inherited authorization/UI contracts.

@seonghobae seonghobae changed the title feat(reports): leftover-map unexplained leftover share on grouping comparison strip (v2.52.0) feat(reports): preserve grouping comparison unexplained-share delta for serialized successor Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Fresh review finding on historical #829@118500f73251eaaf717d5329b8fb6d9895196fe7: valid accessibility defect, same causal class already repaired in #827. frontend/src/App.tsx gives each grouping-comparison pair button an explicit aria-label containing only pair title/criterion, while the persisted U²/R² value is rendered in a descendant span with its own aria-label. The explicit button label therefore suppresses the descendant metric from the actionable accessible name. Reconstructing this delta after #828 must append the localized unexplained-share label + formatted persisted value to the button's accessible name when finite, and mark the duplicate visible badge aria-hidden; missing/non-finite values must remain absent. This is a repair finding, not a reason to close the valid delta or copy #827 source wholesale.

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

Verified current historical-head accessibility finding for successor reconstruction. The grouping-comparison pair button sets an explicit aria-label to Open leftover … pair from comparison: <title> · <criterion>, while the persisted unexplained-share value is rendered only inside a descendant badge with its own aria-label. Because the button already has an explicit accessible name, that descendant metric is not part of the actionable name. Preserve the valid unexplained-share delta, but on reconstruction after exact promoted #828 append the localized unexplained-share label and finite persisted value to the button name and make the duplicate visual badge non-name-bearing (aria-hidden). Add a regression that locates the button by an accessible name containing the persisted U²/R² value. Missing/non-finite share must remain absent; do not derive or clamp psychometric truth.

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

r3 run 34096383373 is a harness RED, not a product-conflict RED. Exact #828/live-head verification passed, then reconstruction exited before dependency setup. The failing guard quotes the i18n semantic key as grep -c '"'Leftover map comparison unexplained leftover share'"' ...; Bash splits the unquoted spaces into additional grep operands, so the guard exits 2 even when reconstruction is valid. Repair by replacing this shell-quoting assertion with a semantic Python count/assertion, start again from exact #828, and do not reuse failed staging. Preserve the planned realistic accessible-name RED, minimal parent-name/duplicate-badge fix, full exact-head GREEN, and non-force product promotion only after live-head re-verification.

…urrent stack

Preserve valid historical #829 delta on exact #828, repair actionable naming, and allocate ADR0369/v2.55.0 without rewriting history.
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