Skip to content

feat(reports): preserve grouping comparison cross-share delta for serialized successor - #831

Draft
seonghobae wants to merge 47 commits into
feat/leftover-map-compare-axis-singular-v2510from
feat/leftover-map-compare-cross-share-v2530
Draft

feat(reports): preserve grouping comparison cross-share delta for serialized successor#831
seonghobae wants to merge 47 commits into
feat/leftover-map-compare-axis-singular-v2510from
feat/leftover-map-compare-cross-share-v2530

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Preserve and project the distinct persisted grouping-comparison cross-share x = 2R̂U / R² through LineageWeave's authorized period-comparison read model and actionable UI. Missing/non-finite x omits only its evidence suffix/badge; finite zero and negative values remain explicit and unclamped. No schema/measurement authority is introduced and x is never recomputed from neighbouring fields.

Current serialized authority

Historical #831 heads and predecessor receipts remain provenance only; intervening commits were read and adopted rather than overwritten.

Product repairs retained

The comparison action transports persisted leftover_map_cross_share through the real period-comparison payload, serializes it through _finite_float_or_none(), preserves finite positive/zero/negative values, maps null/NaN/+Inf/-Inf to None, composes the same persisted value into the actionable pair name, and hides only the duplicate visual badge from the accessibility tree. The normally integrated #1008 successor also applies the same finite/null normalization boundary to primary fetch_period_reports() and carries fake-boundary plus live-PostgreSQL strict-JSON regressions.

#1010 normally merged into this branch as exact 93e1b4fb... after its own exact head b013b8b7... completed Tests 34612342413 GREEN. That repair keeps repository-local contextual-orchestrator optional/fail-closed, makes synthetic authenticated seeding reproducible, fixes Playwright Pixel-7 device collection and browser-failure evidence retention, repairs locale option enumeration, and restores the existing semantic WorkspaceNav/language tools below 768px instead of hiding them for a nonexistent drawer.

Exact-head validation

Fresh Tests 34614827175 is terminal SUCCESS on unchanged exact 93e1b4fb....

  • Frontend/browser job 103314015764: SUCCESS through lint, full frontend tests, production build, Storybook, Chromium installation, authenticated product-stack startup, synthetic seed, persisted signed cross-share fixture pin, and Run authenticated grouping-comparison browser acceptance.
  • PostgreSQL/full-suite job 103314016038: SUCCESS, including the complete Run full test suite against PostgreSQL step.
  • All currently visible inline review threads are resolved.

The temporary Ready admission has served its validation purpose, so this PR is back in Draft. The receipt proves current source/test/browser coherence only; it is not independent approval, protected-main Security/CodeQL acceptance, release evidence, or permission to skip the serialized prerequisite chain.

Live descendant convergence

#832 and #833 both target the #831 branch. Their base metadata already points to exact 93e1b4fb...; their historical product heads remain Draft recovery/reconstruction evidence and are not force-rewritten. #833 is the intended semantic successor for persisted unexplained-leftover U; #832 remains recovery authority until #833 proves complete inheritance. #835 remains on historical #833 until #833 itself is reconstructed; no speculative descendant restack is authorized.

Product invariants

Consume persisted x; never derive it from , U, R, geometry, distance, other shares, rank, coverage, counts, or unused axes. Preserve whole-population authorization and inherited #829/#830 behavior. Canonical KO/EN/JA/ZH/VI/ES/DE/FR translation-ledger authority remains the governed owner path.

Promotion gate

The exact-head repository/browser/accessibility acceptance gate for 93e1b4fb... is now GREEN, but #830 remains the serialized prerequisite and is still Draft. Do not reconstruct #833 or merge this child until the ancestor chain is actually promotable under its own current-head gates. Protected-main integration later still requires the live default-branch ruleset, qualifying independent approval, Security/CodeQL and other required receipts, release evidence, and any applicable buyer-path performance acceptance. No self-approval, bypass, synthetic status, force push, destructive rebase, ancestor skip, or stale evidence transfer.

…(v2.53.0)

Caption persisted leftover-map cross share x = 2R̂U/R² on grouping
comparison leftover-pair buttons through formatLeftoverMapCrossShare
(ADR 0296). Distinct aria-label Leftover map comparison cross share.
Missing or non-finite x omits that badge and keeps s, e, R̂, d, and
coverage notes. Do not invent x from R̂, U, and R. Finite negative
share is shown, never clamped. UI-only; no new columns.

Copy link
Copy Markdown
Contributor Author

Cycle probe 2026-08-31 ~00:50 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 (#831 / v2.53.0 / ADR 0296 / 2cefc0b) captions persisted leftover-map cross share x = 2R̂U/R² on grouping comparison leftover-pair buttons through formatLeftoverMapCrossShare. Distinct aria-label Leftover map comparison cross share. UI-only; no new columns. Missing or non-finite x omits that badge independently of s, e, , d, and coverage notes. A finite negative share is shown, never clamped. Do not invent x from , U, and R. When finite, e + s + x = 1 is now strip-auditable.

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

Next buyer increment after this: leftover-map unexplained leftover U on the same grouping comparison leftover-pair buttons so U + R̂ = R is strip-auditable.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

📝 Walkthrough

Walkthrough

비교용 leftover pair 응답이 persisted cross-share 값을 포함합니다. 프론트엔드는 값을 포맷하여 접근 가능한 페어 이름과 시각적 배지에 표시합니다. 백엔드와 프론트엔드 회귀 테스트는 signed, zero, null 값을 검증합니다.

Changes

Leftover cross-share 흐름

Layer / File(s) Summary
비교 응답 필드 확장
backend/app/report_ingestion.py, backend/tests/test_period_comparison_cross_share.py
SQL 조회가 leftover_map_cross_share를 선택합니다. 비교 응답은 None을 유지하고 그 외 값을 float으로 변환합니다. 회귀 테스트는 signed, zero, null 값을 검증합니다.
비교 페어 표시
frontend/src/App.tsx, tests/test_grouping_comparison_cross_share_contract.py
프론트엔드는 cross-share 값을 포맷하여 접근 가능한 이름과 숨김 배지에 표시합니다. 계약 테스트는 유한한 signed 값의 형식과 fail-closed 동작을 검증합니다.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🟡 Moderate · up to 5e2db

Period-comparison requests can fail when persisted cross-share data is non-finite, so the response normalization should be fixed before merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 persisted grouping-comparison cross-share delta를 백엔드와 UI에 보존하고 전달하는 주요 변경을 정확하게 설명합니다.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/leftover-map-compare-cross-share-v2530

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.

@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

Copy link
Copy Markdown
Contributor Author

Queue cycle 2026-08-31T01:06KST: write probe. Leave open for independent review. Do not self-approve.

Copy link
Copy Markdown
Contributor Author

Cycle 2026-08-31T01:19 KST: write-retry on #831 (v2.53.0 leftover-map cross share). Independent APPROVE required; no self-approve. Next buyer gap continues from this head if checks/reviews allow.

Copy link
Copy Markdown
Contributor Author

Stacked #833 (feat/leftover-map-compare-unexplained-v2540 @ 18d89b4, v2.54.0 / ADR 0297) captions persisted leftover-map unexplained leftover U on the same grouping comparison leftover-pair buttons. Leave #831 open for independent APPROVE. Do not self-approve. Do not squash-merge this leftover base.

Copy link
Copy Markdown
Contributor Author

Cycle 2026-08-31 01:19 KST. Head 2cefc0b still has no independent collaborator APPROVE (Devin Review COMMENTED is not independent APPROVE). Leave open. Do not squash-merge. Do not self-approve.

Downstream: #833 (U / v2.54.0 on this head) then local residual R / v2.55.0. Parallel #832/#834 also stacked from this head. After independent review, retarget onto leftover-coordinates rather than squash-merging onto this leftover base.

@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 PR is Ready while its base #829 remains an unmerged feature prerequisite and the live leftover-map foundation is still #802 with #811 Draft/conflicting. Preserve the cross-share delta and evidence, but this descendant has no current protected-main merge path. Return it to Draft so the prerequisite lane remains the only active validation lane; do not close, squash, or discard its ADR/product delta.

Preserve #831 ADR 0296/product delta while inheriting current #829 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 #833 ADR 0297/product delta while inheriting current #831 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 #829 exact 118500f73251eaaf717d5329b8fb6d9895196fe7, but the PR body still cites obsolete parent 4d82c28, predecessor verification, and historical retarget guidance. Preserve ADR 0296/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.

Current-stack finding: #830 has been reopened because its distinct comparison-axis-singular delta was previously closed without merge or verified succession. This PR can no longer treat historical #829 as its final parent authority or ADR0296/v2.53.0 as reserved. Preserve the cross-share delta, stay Draft, and reconstruct after exact promoted #830 with a then-unclaimed ADR/release identity. Do not bypass the recovered valid delta or transfer historical verification.

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

Copy link
Copy Markdown
Contributor Author

Fresh review finding on historical #831@8a12062cd8efef0c99abe794ef3e9f8dcbc31617: the grouping-comparison pair button has an explicit aria-label that stops at title/criterion, while reconstruction, explained share, unexplained share, and the new cross-share are rendered only as labelled descendant spans. Those persisted buyer-visible metrics are therefore not reliably included in the actionable accessible name. When this delta is reconstructed after #830, preserve the predecessor accessible-name repairs and append the localized finite cross-share value to the button name; mark duplicate visible metric badges aria-hidden. Add a regression that queries the button by the complete accessible name. This is a valid a11y repair finding, not a reason to close the cross-share delta.

@seonghobae
seonghobae marked this pull request as draft September 11, 2026 06:49
@seonghobae
seonghobae marked this pull request as ready for review September 11, 2026 07:01
Keycloak 26 hostname v2 derives the iss claim from the request host.
With a bare KC_HOSTNAME=localhost, the in-network call the seed makes to
keycloak:8080 mints iss=http://localhost:8080/... while the backend
validates KEYCLOAK_ISSUER=http://localhost:18080/... -- so every seeded
post-content warm-up 401s and the authenticated browser gate cannot start.

Pin KC_HOSTNAME to the full public URL so one issuer serves browser and
in-network callers alike, and lock the invariant with a compose contract
test.
The keycloak_issuer comment still described hostname-strict=false
reflecting the request Host into the iss claim. Compose now pins
KC_HOSTNAME to the public URL, so the issuer no longer varies by caller.
@seonghobae
seonghobae marked this pull request as draft September 11, 2026 13:59
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