Repository navigation
Remove the leftover upload copy after a retried upload is admitted - #3580
Conversation
Capture the scoped ingestion and Answer implementation with portable test candidates and a sanitised plan, progress and verification record. Retain failed and unrun evidence; no new readiness checks or bulk ingestion.
…ilot-handover-20261014
Deno accepts explicit .ts import extensions, so @ts-expect-error is reported unused (TS2578) and fails check:edge:functions. Node's tsc still needs the suppression, so ts-ignore satisfies both. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M6gRtN6r4vZDgDfzMtjs95
- Treat invalid pilot tickets as inactive - Scope pilot identity refusals to the owner
CodeAnt Nitpicks2 code suggestions1.
|
CodeAnt PR Risk: Medium Risk
Assessed commit: |
CodeAnt review: reindex-health reads the 25 oldest open jobs, so a stuck final-attempt job behind a larger backlog is flagged late. Queue recovery scans every open job, so it still resets the job when run directly. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M6gRtN6r4vZDgDfzMtjs95
Qodo FixerNo findings are available for this PR yet. Findings appear here once Qodo has reviewed the PR. |
|
Re the CodeAnt risk summary on 16c0b22:
Generated by Claude Code |
Code Review by Qodo
No findings for this group No findings for this group No findings for this group Resolved findings 1.
|
Qodo review on PR 3580: - Log why removal and the ledger insert failed when both do. - Give each post-admission cleanup call a 5 s deadline so a committed upload is not held open for up to a minute. - Say queue recovery applies at most --limit actions (default 20) per run. CodeAnt nit: pin that both release calls pass the superseded and committed paths. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M6gRtN6r4vZDgDfzMtjs95
|
Addressed in 580aa95:
Checks: focused tests 228/228 passed, typecheck and eslint clean, Generated by Claude Code |
|
Code review by qodo was updated up to the latest commit 580aa95 |
Qodo review: --apply is not the only way the tool changes jobs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M6gRtN6r4vZDgDfzMtjs95
Code Review ✅ Approved🔴 High risk · Deleting the collided storage object after admission is durable could remove bytes still needed if the path-reference assumptions are wrong. Removes the orphaned upload copy left at the intended storage path after a retried upload is admitted from its recovery copy, with cleanup queued on the existing VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Approved For more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Important Your trial ends in 5 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more. Was this helpful? React with 👍 / 👎 | Gitar |
|
Code review by qodo was updated up to the latest commit 8cdf07e |
User description
Summary
storage_cleanup_jobsledger. If both fail, the upload still succeeds and the path is logged for manual reconciliation.docs/decisions/2026-10-16-stuck-final-attempt-uses-existing-recovery.md,docs/ingestion-state-machine.mdC1a). Drops the two ledger inbox rows that this change and that decision close.Areas touched: Source intake and indexing, Delivery and assurance, Knowledge and records
Verification
npm run verify:cheap:Test Files 1943 passed (1943)andTests 31531 passed | 2 skipped (31533), lint and typecheck clean.npm run test:focusedon the changed files:Tests 228 passed (228).npm run check:decisions:0 errors, 0 warnings.Risk and rollout
Clinical Governance Preflight
Notes
🤖 Generated with Claude Code
https://claude.ai/code/session_01M6gRtN6r4vZDgDfzMtjs95
Generated by Claude Code
Summary by cubic
Removes the orphaned upload copy left behind when a retried upload collides with an identical file already at its intended storage path.
Previously, a retried upload with an unknown earlier outcome stored a second recovery copy and admitted it, leaving the first copy in private storage with nothing referencing it. Now, once this request's own admission is durable on the recovery copy, the collided object at the intended path is removed, or queued on the existing
storage_cleanup_jobsledger if removal fails. Each cleanup call has a 5-second deadline so a committed upload is not held open; if both fail, the failure reasons and path are logged and the upload still succeeds. This is safe because the document id is fixed by the correlation id, so no other admission for that document can commit.--limitactions (default 20) per run, via--apply,--yes, or an interactive confirm.Written for commit 8cdf07e. Summary will update on new commits.
CodeAnt-AI Description
Clean up collided files after retried uploads succeed
What Changed
Impact
✅ Fewer orphaned files after retried uploads✅ Successful uploads despite cleanup failures💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by CodeRabbit