Skip to content

fix: resolve valid audit findings from PRs #200-#203 - #223

Merged
devarshishimpi merged 1 commit into
mainfrom
fix/pr-200-203-audit-findings
Dec 3, 2026
Merged

devarshishimpi merged 1 commit into
mainfrom
fix/pr-200-203-audit-findings

Conversation

@devarshishimpi

@devarshishimpi devarshishimpi commented Dec 3, 2026 •

Copy link
Copy Markdown
Owner

Description

Follow-up fixes for valid findings from the reviews of PRs #200, #201, #202, and #203 (excluding items already resolved in #219).

  • UI and diff viewer: Removed public/diff-preview.html, moved the file-diff.css import to the top of tokens.css and exported it, fixed unified diff parsing for indented lines, CRLF, extended git headers, and file paths with spaces, removed demo fallbacks, improved dark-mode specificity, gutter sizing, WCAG AA contrast, and <pre> unwrapping in comment cards.
  • Webhooks and core review: Enforced quota checks on mention triggers, ignored bot/self-mentions and quoted or code-block mentions, rejected non-object webhook payloads, restored WebhookRuntime boundaries, skipped dead queue jobs for ignored PR events, and guarded KV reads and SHA inputs in the diff cache.
  • GitHub HTTP retries: Prioritized retry-after over x-ratelimit-reset, capped retry delays at 60s, added jitter and AbortSignal support, restricted GitHubError.headers to allowlisted keys, and disabled 5xx/timeout retries on mutating review and check-run POST requests.
  • OpenAI models and Dockerfile: Updated isOpenAIReasoningModel for gpt-5*, gateway prefixes, and ft: IDs, fixed legacy o1-mini/o1-preview payloads, removed the reasoning_content fallback, and aligned apps/node/Dockerfile HEALTHCHECK with /health/ready.
  • CI and tests: Removed duplicate package test globs in vitest.config.ts and split static checks from Verify Stability in .github/workflows/ci.yml with job timeouts, Playwright caching, and single-pass builds.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring, dependency updates, etc.)

How Has This Been Tested?

  • Unit Tests (npm run test:unit and npm run test:all)
  • Integration Tests (npm test against PostgreSQL: 75 files, 554 tests passed)

Also ran check:builds, build:packages, check:exports, publint, typecheck, typecheck:all, lint, vite build, wrangler deploy --dry-run, and build:node. Playwright E2E (npm run test:e2e) was not run locally because local Postgres, Redis, and Docker are not running on this host.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

@codra-app-personal codra-app-personal 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.

Codra Review

Here are some automated review suggestions for this pull request.

Note

1 file could not be reviewed, so this pass is incomplete.

Reviewed commit: db568e55cc

ℹ️ About Codra in GitHub

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

  • Open a pull request for review
  • Mark a draft as ready

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

if (key.toLowerCase() === lower && typeof value === "string") {
return value;
}
const timestamp = Date.parse(trimmed);

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 Use of unreliable Date.parse for HTTP header parsing

The parseRetryAfterMs function uses Date.parse() to handle the Retry-After header when it is not a decimal number. The Retry-After header, according to RFC 7231, can be an HTTP-date (e.g., 'Wed, 21 Oct 2015 07:28:00 GMT') or a delay-seconds integer. Date.parse() is implementation-dependent and often fails to parse standard HTTP-date formats in non-browser environments or specific locale settings, potentially leading to incorrect delay calculations or failures to delay when required by the API, which could cause increased rate-limiting.

@devarshishimpi
devarshishimpi merged commit 964f0ec into main Dec 3, 2026
7 of 8 checks passed
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