chore: verify sanitized #830 reconstruction on exact #829 - #978
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 Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
…reconstruction
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
| [project] | ||
| name = "lineageweave" | ||
| version = "2.50.0" | ||
| version = "2.55.0" |
There was a problem hiding this comment.
🟡 Released builds persist stale provenance
After this release bump, rebuilds still persist version 2.20.0. Both reconstruction_version and PACKAGE_VERSION read the unchanged lineageweave.__version__.
Prompt for agents
Synchronize the runtime version in lineageweave/__init__.py with the 2.55.0 package and frontend versions. The runtime value feeds lineageweave.lineage_persistence.reconstruction_version and backend.app.analysis_run_ingestion.PACKAGE_VERSION, so add or restore a contract test that compares Python metadata, lineageweave.__version__, and frontend/package.json.
Was this helpful? React with 👍 or 👎 to provide feedback.
| {comparisonAxisSingular !== null ? ( | ||
| <span | ||
| className="post-badge" | ||
| aria-label={t(LEFTOVER_MAP_COMPARE_AXIS_SINGULAR_LABEL)} | ||
| > | ||
| {tf(LEFTOVER_MAP_COMPARE_AXIS_SINGULAR, comparisonAxisSingular)} | ||
| </span> |
There was a problem hiding this comment.
🟡 Comparison rows exceed their axis contract
Every valid comparisonAxisSingular now appears on comparison rows. ADR 0293 explicitly excludes singular-value captions from this strip.
Prompt for agents
Remove grouping-comparison singular-value rendering until a normative ADR accepts that presentation, or add the required ADR before implementation and reconcile ADR 0293's explicit exclusion. Keep the axis-share behavior unchanged and ensure documentation, tests, and release notes reference the actual governing decision.
Was this helpful? React with 👍 or 👎 to provide feedback.
| export const LEFTOVER_MAP_LIST_AXIS_SINGULAR = "leftover axis {axis} σ {value} {share}%"; | ||
|
|
||
| export const LEFTOVER_MAP_PLOT_AXIS_SINGULAR = "leftover-map axis {axis} σ {value}"; |
There was a problem hiding this comment.
🟡 Report and plot singular captions missing
The new LEFTOVER_MAP_LIST_AXIS_SINGULAR and LEFTOVER_MAP_PLOT_AXIS_SINGULAR formats have no renderers. Report badges and plot axes remain share-only.
Prompt for agents
Wire persisted finite, non-negative leftover_singular_value values into both existing presentation sites. ReportsPanel's report-level axis badges must include singular values independently of share validity. LeftoverMapPlot's axis text must support singular-only, share-only, and combined captions. Preserve zero values and omit negative or non-finite singular values. Add component tests for all independent validity combinations.
Was this helpful? React with 👍 or 👎 to provide feedback.
| const seen = new Set<number>(); | ||
| const ticks: { value: number; label: string }[] = []; | ||
| for (const value of values) { | ||
| const label = formatSignedLeftoverValue(value); | ||
| if (label === null) { | ||
| if (label === null || seen.has(value)) { | ||
| continue; | ||
| } | ||
| if (!byLabel.has(label)) { | ||
| byLabel.set(label, value); | ||
| } | ||
| seen.add(value); | ||
| ticks.push({ value, label }); |
There was a problem hiding this comment.
🟡 Rounded coordinates duplicate plot ticks
seen distinguishes raw coordinates that format to the same label. Those ticks overlap and receive identical React keys in LeftoverMapPlot.
| const seen = new Set<number>(); | |
| const ticks: { value: number; label: string }[] = []; | |
| for (const value of values) { | |
| const label = formatSignedLeftoverValue(value); | |
| if (label === null) { | |
| if (label === null || seen.has(value)) { | |
| continue; | |
| } | |
| if (!byLabel.has(label)) { | |
| byLabel.set(label, value); | |
| } | |
| seen.add(value); | |
| ticks.push({ value, label }); | |
| const byLabel = new Map<string, number>(); | |
| for (const value of values) { | |
| const label = formatSignedLeftoverValue(value); | |
| if (label === null || byLabel.has(label)) { | |
| continue; | |
| } | |
| byLabel.set(label, value); | |
| } | |
| return [...byLabel.entries()].map(([label, value]) => ({ value, label })); |
Was this helpful? React with 👍 or 👎 to provide feedback.
| y2: number, | ||
| ): { labelX: number; labelY: number } { | ||
| const coincident = Math.abs(x1 - x2) < 0.01 && Math.abs(y1 - y2) < 0.01; | ||
| const midpointX = (x1 + x2) / 2; | ||
| const midpointY = (y1 + y2) / 2; | ||
| if (coincident) { | ||
| return { | ||
| labelX: midpointX, | ||
| labelY: midpointY - COINCIDENT_LABEL_OFFSET, | ||
| }; | ||
| } | ||
| const deltaX = x2 - x1; | ||
| const deltaY = y2 - y1; | ||
| const length = Math.hypot(deltaX, deltaY); | ||
| return { | ||
| labelX: (x1 + x2) / 2, | ||
| labelY: coincident ? (y1 + y2) / 2 - COINCIDENT_LABEL_OFFSET : (y1 + y2) / 2, | ||
| labelX: midpointX - (deltaY / length) * SEGMENT_LABEL_OFFSET, | ||
| labelY: midpointY + (deltaX / length) * SEGMENT_LABEL_OFFSET, | ||
| }; | ||
| } | ||
|
|
||
| function leftoverMapStackedCaptionY(labelY: number, stackedAbove: number): number { | ||
| return stackedAbove > 0 ? labelY + stackedAbove * RECONSTRUCTION_LABEL_OFFSET : labelY; | ||
| function leftoverMapStackedCaptionY( | ||
| labelY: number, | ||
| stackedAbove: number, | ||
| captionSpacing = RECONSTRUCTION_LABEL_OFFSET, | ||
| ): number { | ||
| return stackedAbove > 0 ? labelY + stackedAbove * captionSpacing : labelY; | ||
| } | ||
|
|
||
| function leftoverMapCaptionSpacing(height: number, captionCount: number): number { | ||
| if (captionCount <= 1) { | ||
| return 0; | ||
| } | ||
| const availableStackHeight = Math.max( | ||
| 0, | ||
| height - SEGMENT_LABEL_TOP_INSET - SEGMENT_LABEL_BOTTOM_INSET, | ||
| ); | ||
| return Math.min( | ||
| RECONSTRUCTION_LABEL_OFFSET, | ||
| availableStackHeight / (captionCount - 1), | ||
| ); | ||
| } |
There was a problem hiding this comment.
🔍 Unrelated plot changes remain
The stated singular-value-only reconstruction also rewrites tick deduplication and segment-caption placement. Verify these inherited layout changes belong in this promotion.
(Refers to this code)
Was this helpful? React with 👍 or 👎 to provide feedback.
| {comparisonAxisSingular !== null ? ( | ||
| <span | ||
| className="post-badge" | ||
| aria-label={t(LEFTOVER_MAP_COMPARE_AXIS_SINGULAR_LABEL)} | ||
| > | ||
| {tf(LEFTOVER_MAP_COMPARE_AXIS_SINGULAR, comparisonAxisSingular)} | ||
| </span> |
There was a problem hiding this comment.
|
Temporary reconstruction proof is superseded by exact-parent r2 run 34115069739. This PR never became product authority and contains no independent product delta: its only purpose was to test whether GitHub could merge the sanitized historical branch directly. GitHub correctly reported conflicts, and r2 now applies only the clean feature-origin hunks plus the current-parent singular helper before full GREEN. Closing this temporary proof does not discard #830 product behavior. |
Temporary reconstruction proof for #830. Base is exact #829
0e4fd5815686120ec66203cb6848834b56bdf289; head descends from historical #830 but resets stale cumulative files to the current-parent versions, drops superseded ADR0294, and keeps only the intended singular-value product delta. This PR exists only to let GitHub perform the ordinary three-way merge and expose the exact resulting file set before any product-branch promotion. Do not treat it as product authority.