Skip to content

chore: verify sanitized #830 reconstruction on exact #829 - #978

Closed
seonghobae wants to merge 4 commits into
automation/830-current-829-merge-r2-20260907-1945from
automation/830-sanitized-r2-20260907-1945
Closed

chore: verify sanitized #830 reconstruction on exact #829#978
seonghobae wants to merge 4 commits into
automation/830-current-829-merge-r2-20260907-1945from
automation/830-sanitized-r2-20260907-1945

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

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.

…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 Sep 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 222570d0-372d-4119-a9a0-3067b504fae2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@seonghobae
seonghobae marked this pull request as ready for review September 7, 2026 11:02
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@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 6 potential issues.

Devin Review

Comment thread pyproject.toml
[project]
name = "lineageweave"
version = "2.50.0"
version = "2.55.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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.
Devin Review

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

Comment thread frontend/src/App.tsx
Comment on lines +4076 to +4082
{comparisonAxisSingular !== null ? (
<span
className="post-badge"
aria-label={t(LEFTOVER_MAP_COMPARE_AXIS_SINGULAR_LABEL)}
>
{tf(LEFTOVER_MAP_COMPARE_AXIS_SINGULAR, comparisonAxisSingular)}
</span>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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.
Devin Review

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

Comment on lines +17 to +19
export const LEFTOVER_MAP_LIST_AXIS_SINGULAR = "leftover axis {axis} σ {value} {share}%";

export const LEFTOVER_MAP_PLOT_AXIS_SINGULAR = "leftover-map axis {axis} σ {value}";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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.
Devin Review

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

Comment on lines +229 to +237
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 });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Suggested change
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 }));
Devin Review

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

Comment on lines 283 to 323
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),
);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 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)

Devin Review

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

Comment thread frontend/src/App.tsx
Comment on lines +4076 to +4082
{comparisonAxisSingular !== null ? (
<span
className="post-badge"
aria-label={t(LEFTOVER_MAP_COMPARE_AXIS_SINGULAR_LABEL)}
>
{tf(LEFTOVER_MAP_COMPARE_AXIS_SINGULAR, comparisonAxisSingular)}
</span>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟥 Partial groupings disclose singular values

For partially visible groupings, comparisonAxisSingular renders full-population singular values. The comparison endpoint filters members but leaves leftover_map_axes intact.

Devin Review

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

Copy link
Copy Markdown
Contributor Author

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.

@seonghobae seonghobae closed this Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant