Skip to content

πŸ—‚οΈ fix: Guard Lane Worktree Registration - #304

Merged
danny-avila merged 2 commits into
mainfrom
lia/git-metadata-admission
Oct 4, 2026
Merged

danny-avila merged 2 commits into
mainfrom
lia/git-metadata-admission

Conversation

@lia-by-librechat

@lia-by-librechat lia-by-librechat Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Propose explicit target-lane worktree lifecycle operations instead of checkout-wide shell admission. A git worktree add in the root must currently wait for every active lane. Short admission failures discard that FIFO entry before lanes drain, as reported in chat e2fedf18 during LibreChat PR #16722.

  • Reserve the target lane for the whole create/remove operation.
  • Hold a separate common-Git metadata mutex only during registration changes.
  • Stage bulk checkout/deletion outside that mutex, with a worker-owned journal and fenced recovery.
  • Keep arbitrary root shell commands checkout-exclusive. Lane Git guards now reject worktree registration changes; read-only worktree list remains available.

This is a proposal plus guard hardening, not an enabled lifecycle API. service/src/bridge/slots.ts scheduling and worker concurrency are unchanged.

Verification

  • Code-package tsc --noEmit and build passed.
  • Git guard and linked-worktree tests: 16 passed.
  • Split-phase local Git probe passed: no-checkout registration then target checkout; rename then metadata removal then bulk deletion.

The probe does not establish Redis scheduling, crash recovery or sandbox containment. The proposal lists those as blocking implementation tests. No deployment or live agent changes.

Delivery Status

Head 6f54d948e314ac6760ed25c279c4364f3f9b0741: independent review completed with no findings. All 11 GitHub CI checks passed. The reviewer independently passed 8 guard tests, 4 identity/write-grant tests and the local split-phase probe. Redis lifecycle scheduling, crash recovery and sandbox containment remain blocking tests for a future implementation.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head 6f54d94: target-lane lifecycle proposal plus lane registration guard. No new scheduler/API enabled. Local split-phase Git probe, 16 focused tests, code-package build and typecheck passed. Ready for exact-head review.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Independent review completed with no findings at 6f54d94. Reviewer independently passed 8 Git guard tests, 4 linked-worktree validation tests and the split-phase Git probe. Parent passed 16 focused tests, code build and tsc --noEmit. Lifecycle APIs remain proposed, not enabled. No deployment.

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review the latest head, final review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
πŸ“ Code Review βœ… Completed 2026-10-04T15:36:12.584068Z 6f54d94 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with πŸ‘€ while any review is running, comments if it has suggestions, and reacts with πŸ‘ once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 6f54d948e3

ℹ️ 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".

@danny-avila
danny-avila merged commit e829f75 into main Oct 4, 2026
11 checks passed
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.

2 participants