Repository navigation
fix: bound large repository tree memory and cleanup - #918
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd05781eb5
ℹ️ 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".
fd05781 to
314d961
Compare
|
@codex review Please review current head 314d961. This PR now stacks on #919, whose message-only progress updates fix the previous statusDate finding while preserving lifecycle fences. The latest heap/cleanup changes also capture and retire the persisted path-index key with compare-and-swap retries during reset and activation, including concurrent-search regression tests. |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review Please review current head e96d235, stacked on #919. The latest fix fences tree retirement against the captured lifecycle, source/access/settings/metadata revisions and applicable refresh lease before mutating any state. Stale workers now cancel without retiring archived metadata. All 194 focused tests pass, including archive-before-reset and archive-between-key-read/CAS races, source/access changes, expired/re 8000 placed leases and valid guarded removal. Earlier persisted-key and progress-timestamp findings are addressed. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review Please review latest head abfe153, stacked on #919. Latest fix keeps proposed owner source/access/anonymization changes separate until removal under the persisted snapshot completes. Two real-Mongo save-route regressions reproduced repository_changed on the previous head and now pass for ordinary source changes and reconnects. All 221 focused tests plus TypeScript/ESLint pass; final full suite and CI running. Prior persisted path-index CAS, lifecycle retirement fence and queue progress timestamp findings are addressed. Please review the full current delta and source-change/removal interactions. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review Please review latest head bb366b3, stacked on #919. Two independent-review races are fixed: guarded removal now checks the full cached-source/lifecycle snapshot plus settingsSavedAt before claiming REMOVING, and preparation accepts options-only saves without cancelling its job. All source/access/generation/metadata/lifecycle/lease reset fences remain; expiry still checks settings changes. New real-Mongo regressions reproduce both failures on abfe153 and pass now, including the actual save route and download processor. All236focusedtests plus TypeScript/ESLint pass. Please review the whole current delta and prior persisted-key, lifecycle, source replacement, progress and settings-save fixes. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Validation complete for bb366b3. All four CI checks passed: Lint, Node 22, Node 24 and consent transactions. GitHub Codex and fresh independent Codex round 5 found no actionable issues on this exact SHA. The existing inline review thread is resolved. Independent validation passed 316 focused tests; local validation passed 236 focused tests. The earlier abfe153 full local suite passed 1,686 tests with 25 skipped. Stack dependency: #919 at 19b1d5b. Deployment requires the additive performance-index migration documented in this PR. No merge or deployment performed. |
|
Retargeted to main after #919 merged and integrated main in 97e5b50, including #917 and #915. Resolved the documentation conflict by retaining both the large-repository and shared-cache sections. TypeScript/build and lint pass; 263 focused tests pass, including MongoDB lifecycle races, progress fences, large-tree handling, and shared-cache integration. Fresh CI is running. The documented additive performance-index migration is still required at deployment. |
Large repositories can exhaust the V8 heap while downloading their tree or listing files. Refresh also waits for metadata deletion across millions of rows before enqueueing a replacement.
Consume GitHub tree pages as plain metadata and persist at most 500 entries per batch under build ownership guards. Preparation no longer reloads the completed tree. Bound listings and folder counts at 10,000 entries and pending traversal folders at 100,000, returning HTTP 413 when exceeded.
Preparation resets atomically retire old generations and persisted path-index keys. Maintenance deletes metadata in batches of at most 500 IDs and resumes interrupted cleanup. Expiration and removal check lifecycle ownership between batches; activation limits foreground cleanup. Source replacement keeps proposed settings separate until cleanup completes, rejects stale removal claims before changing status, and accepts options-only edits during preparation.
Validation:
Targets main after #919 merged. Its message-only progress writes preserve publication timestamps. Integration commit 97e5b50 includes current main, with build/lint and 263 focused tests passing; fresh CI is running. Run
npm run migrate:performancewhen deploying for the retired path-index maintenance index. Physical deletion still scales with row count; preparation no longer waits for that metadata deletion. No production deployment performed.