Skip to content

Organize dirty work: codex/dependency-reproducibility - #1329

Closed
BigSimmo wants to merge 4 commits into
mainfrom
codex/dependency-reproducibility
Closed

Organize dirty work: codex/dependency-reproducibility#1329
BigSimmo wants to merge 4 commits into
mainfrom
codex/dependency-reproducibility

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

This PR organizes local dirty work for branch codex/dependency-reproducibility.

@supabase

supabaseBot commented Jul 28, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in:27 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5f580ac4-1328-462c-9d98-2d6ff0ea3873

📥 Commits

Reviewing files that changed from the base of the PR and between 8917466 and fc3b55e.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (17)
  • .coderabbit.yaml
  • .github/actions/setup-node-cached/action.yml
  • .github/workflows/dependency-report.yml
  • .github/workflows/eval-canary.yml
  • .github/workflows/ingestion-autopilot.yml
  • .github/workflows/live-drift.yml
  • .github/workflows/staging-tenancy.yml
  • README.md
  • package.json
  • scripts/check-installed-lock-parity.mjs
  • scripts/optimize-public-images.mjs
  • src/app/api/images/[id]/signed-url/route.ts
  • src/app/layout.tsx
  • src/components/clinical-dashboard/signed-image.tsx
  • tests/ci-cache-safety.test.ts
  • tests/installed-lock-parity.test.ts
  • worker/main.ts

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:331e355f36

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 71 to +73
const signed = await supabase.storage
.from(env.SUPABASE_IMAGE_BUCKET)
.createSignedUrl(image.storage_path, signedUrlTtlSeconds);
.createSignedUrl(image.storage_path, signedUrlTtlSeconds, { transform });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve no-transform signed URL calls

When w is omitted—as it is for every existing SignedImage caller—this now passes { transform: undefined } as a third argument. The existing private-access route tests at lines 1117, 1147, and 1176 assert the established two-argument call, so the required unit suite fails for ordinary image requests. Only supply the options argument when a transform exists, or deliberately update and test the changed contract.

Useful? React with 👍 / 👎.

Comment on lines +65 to +69
const { searchParams } = new URL(request.url);
const widthParam = searchParams.get("w");
const transform = widthParam
? { width: parseInt(widthParam, 10), resize: "contain" as const }
: undefined;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject invalid image transform widths

For requests such as ?w=abc, ?w=-1, or an extremely large width, parseInt produces NaN, a negative value, or an unbounded resize request and forwards it to storage. This can turn malformed client input into a provider error/500 and permits unnecessary transformation work; validate w as a bounded positive integer and return a 4xx response before calling storage.

Useful? React with 👍 / 👎.

Comment on lines +35 to +36
thumbnail = false,
placeholderBase64,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Wire optimized previews into image callers

For every normal document or evidence image, both new props remain at these defaults: the repository's SignedImage callers pass neither thumbnail nor placeholderBase64, and document-detail.ts deletes image metadata without projecting placeholder_base64. Consequently no caller requests ?w=400 or renders the generated LQIP, while ingestion still pays to generate and store it; project the placeholder into the image payload and enable thumbnails at the preview call sites.

Useful? React with 👍 / 👎.

@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation.

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:331e355f36

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const signed = await supabase.storage
.from(env.SUPABASE_IMAGE_BUCKET)
.createSignedUrl(image.storage_path, signedUrlTtlSeconds);
.createSignedUrl(image.storage_path, signedUrlTtlSeconds, { transform });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Update signed-URL assertions for the options argument

For every existing request without ?w, this now records a third { transform: undefined } argument on the storage mock, while the ownership/public cases in tests/private-access-routes.test.ts lines 1117, 1147, and 1176 still require exact two-argument calls. Those focused tests will therefore fail and block the required unit gate. Either omit the options argument when no transform is requested or update the assertions and add a transformed-request case; npm test -- tests/private-access-routes.test.ts is the smallest proof.

Useful? React with 👍 / 👎.

@github-actions

github-actionsBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

CI triage

CI failed on this PR. Automated classification of the 4 failed job(s):

  • Production UIneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Unit coverageneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Static PR checksneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #6289 (success).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:039d719e76

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadworker/main.ts
.toBuffer();
placeholderBase64 = `data:image/webp;base64,${placeholderBuffer.toString("base64")}`;
} catch (e) {
console.warn(`Failed to generate placeholder for ${image.path}`, e);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Sanitize placeholder-generation errors before logging

When Sharp rejects a malformed or unsupported extracted image, this logs both the full temporary image path and the raw exception, including its stack, bypassing the worker's established safeErrorLogDetails redaction used for other ingestion failures. This can expose filesystem details in production worker logs; log a generic message with safeErrorLogDetails(e) instead, and extend tests/worker-safe-logging.test.ts to reject raw placeholder errors.

Useful? React with 👍 / 👎.

Comment on lines +47 to +49
console.log(`Optimized: ${file}`);
} catch (err) {
console.error(`Failed to optimize ${file}:`, err);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Propagate image optimization failures

When any PNG is corrupt, unreadable, or unsupported by one encoder, this catch logs the error but lets the command continue to print Successfully generated variants and exit 0, potentially leaving only one of the WebP/AVIF outputs. Automation or a developer therefore cannot distinguish a complete optimization from partial failure; collect failures and set a nonzero exit code, with a corrupt-PNG fixture as the smallest proof.

Useful? React with 👍 / 👎.

@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

Reviewed at exact head fc3b55e. Superseded by #1360. Reproducible npm-cache installs and parity guards were retained; duplicate image contamination was dropped. Source branch and worktree are preserved; this PR is closed only to remove the superseded review queue entry.

@BigSimmo
BigSimmo deleted the codex/dependency-reproducibility branch July 30, 2026 09:10
Sign up for freeto 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

@BigSimmo