Skip to content

fix(file-search): bound dispatcher database work - #7909

Merged
icecrasher321 merged 4 commits into
stagingfrom
codex/fix-file-search-dispatch-deadlines
Sep 17, 2026
Merged

icecrasher321 merged 4 commits into
stagingfrom
codex/fix-file-search-dispatch-deadlines

Conversation

@icecrasher321

@icecrasher321 icecrasher321 commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Bound search-dispatch preparation with transaction-local database deadlines, using PostgreSQL 17's native transaction timeout, matching the documented deployment baseline.
  • Add phase timings and PostgreSQL error codes. Preserve claim cleanup under contention and retain both failures if enqueue and cleanup fail.
  • Keep raw revision timestamps in UTC so failed enqueue cleanup matches the claimed rows, and register the database regressions in CI.

Type of Change

  • Bug fix

Testing

13 focused unit tests passed. All 3 integration tests passed on PostgreSQL 17 in a non-UTC process timezone, covering cancellation, rollback, advisory-lock release, and claim cleanup with preparation deadlines cleared. App type-check, lint, API validation, repository audits, and generated-artifact checks passed.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 17, 2026 3:03am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/workspace-files/search/dispatcher.ts Outdated
@greptile-apps

greptile-apps Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the previous findings are resolved and no new actionable failures remain.

Summary

Bounds file-search dispatch preparation with transaction-local PostgreSQL deadlines while preserving enqueue-failure cleanup and diagnostic context.

  • Applies statement, lock, and transaction deadlines before acquiring the dispatcher advisory lock.
  • Preserves UTC revision identity and retains both enqueue and cleanup errors when both operations fail.
  • Adds PostgreSQL 17 integration coverage for cancellation, rollback, advisory-lock release, claim cleanup, and timeout isolation.
  • Replaces the cleanup contention test’s real-time delay with deterministic inspection of the cleanup transaction’s active timeout settings.

Reviews (4) · Last reviewed commit: "test(file-search): observe cleanup deadl..."

Comment thread apps/sim/lib/workspace-files/search/dispatcher.ts Outdated
Comment thread apps/sim/lib/workspace-files/search/dispatcher.ts Outdated
Comment thread apps/sim/lib/workspace-files/search/dispatcher.integration.ts
@icecrasher321
icecrasher321 force-pushed the codex/fix-file-search-dispatch-deadlines branch from d043a9a to 20a36ad Compare September 17, 2026 02:39
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

Comment thread apps/sim/lib/workspace-files/search/dispatcher.ts Outdated
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/lib/workspace-files/search/dispatcher.integration.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@icecrasher321
icecrasher321 merged commit afefd96 into staging Sep 17, 2026
35 checks passed
@icecrasher321
icecrasher321 deleted the codex/fix-file-search-dispatch-deadlines branch September 17, 2026 03:08
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