LibreChat/api
Marco Beretta ae44437e16
🗂️ feat: Record Lane Git State and Serve Conversation Pull Requests (#16793)
* feat: Record Lane Git State and Serve Conversation Pull Requests

A conversation now stores the branch, head and repository its code lane last reported, written only by the server after a finished bash command and excluded from ordinary reads, generic saves, unset fields and imports. GET /api/convos/:conversationId/pull-request finds the pull request for that branch through an injected GitHub source with a bounded cache, answers null for an absence, and maps failures to stable codes without upstream text. The feature is off unless endpoints.agents.pullRequests is enabled with a token reference.

* fix: Address Review Findings on Pull Request Lookup and Lane Writes

Scope the lookup cache, shared in-flight request and rate limit cooldown to the credential, so one tenant's token never serves another. Ask for open pull requests on their own before falling back to the newest closed one, read every page of check runs up to a bound and never report an incomplete rollup as passing, order lane writes per conversation so an older write cannot land last, and name both required token permissions in the example config.

* fix: Address Second Round Review Findings on Pull Request Lookup

Clear the stored lane when the conversation moves to another workspace or leaves attached execution, so the previous workspace's pull request is never served. Fence the lane write on the time it was reported, so an older report from another replica cannot replace a newer one. Honor GitHub's reset window up to an hour instead of ten minutes, and expose the request timeout, whole lookup timeout and check run page limit as endpoints.agents.pullRequests settings with the previous values as defaults.

* fix: Authorize Pull Request Repositories and Fence Lane Writes

Require an administrator allowlist of repositories before the server token is used, since a worker reports its own repository. Match a pull request to the commit the conversation last ran at, so a reused branch name does not return another pull request. Fence the lane write on the workspace the command ran in, so a write queued before a move cannot bring the old lane back, and record a subagent thread's lane on the visible root conversation. Key the lookup cache and shared request by the recorded commit and the lookup policy, and document the worker flag in the example config.

* fix: Order Lane Reports by a Database Sequence and Tighten Head Matching

Replace wall clock ordering of lane reports with a per conversation counter reserved in the database when the command settles, so replica clock skew cannot reject a newer report. Treat a pull request whose head is behind the recorded commit as no match, and expose the candidate and comparison bounds of the history search as settings. Read the app config and the owner scoped lane together, inject the HTTP transport from the route instead of falling back to a global, skip a report identical to the last one written, and name the Contents permission that commit comparison needs.

* fix: Queue Lane Reports by the Visible Conversation and Read Checks for the Current Head

Order lane report reservations by the conversation the write lands on, so two subagent threads of one conversation share a chain, and write every report instead of skipping a repeat, since another recorder may have changed the lane in between. Read a pull request's detail before its check runs and use the head it reports, so line counts, mergeability and checks describe one commit. Treat an expired temporary chat as gone when reserving, writing and reading the lane, and make the shared cache capacity a setting.

* fix: Fence Lane Reports by Attachment Epoch and Place Recorders Before Reporting

Strip dotted descendants of lane fields from saves and imports, partition the pull request cache per credential, resolve the lane write target when the tool is created, and fence reports with a codeAttachmentEpoch that advances only on an owner move or detach.

* fix: Fence Subagent Lane Reports by the Root Epoch and Cover Forks and Moved Heads

Read the visible root's attachment epoch for a subagent report, gate lane recording on pullRequests.enabled, make the credential partition bound a config field, revalidate the detail head against the recorded commit, and find fork pull requests through the recorded commit.

* fix: Keep the Credential Cache Bound Deployment Wide and Budget Head Revalidation

Apply the largest configured credential bound to the shared cache, count cache hits as use, spend the comparison budget on a moved head, and fix the data-provider config default test.

* fix: Cool Down Headerless Secondary Rate Limits

A 403 whose message names a secondary rate limit now starts the credential cooldown for at least a minute instead of being cached as a ten second failure.
2026-10-06 09:56:22 +02:00
..
app 🦉 feat: Compare Review Commit Ancestry Without Git (#16734) 2026-10-05 08:20:51 -04:00
cache 🔗 feat: use LibreChat prompt groups as agent instructions (#16686) 2026-10-04 21:27:26 -04:00
config 🛬 fix: Land MCP OAuth Callbacks on Waiting Connections (#15876) 2026-09-13 01:46:41 -04:00
db 🛬 fix: Land MCP OAuth Callbacks on Waiting Connections (#15876) 2026-09-13 01:46:41 -04:00
models 🥢 fix: Fit MCP App Snapshots Within Message Documents (#16299) 2026-10-01 03:46:17 +00:00
server 🗂️ feat: Record Lane Git State and Serve Conversation Pull Requests (#16793) 2026-10-06 09:56:22 +02:00
strategies 🔁 fix: Recover Concurrent First SAML, LDAP and Social Logins (#16779) 2026-10-05 17:57:23 -04:00
test 📔 feat: Preserve Owner Text During PII Redaction (#16311) 2026-10-02 11:43:10 -04:00
utils ⚡ feat: Add Gemini 3.8 Flash Support (#15519) 2026-09-02 15:06:40 -04:00
jest.config.js 🧩 feat: MCP Apps support (#13831) 2026-10-01 03:46:16 +00:00
jsconfig.json
package.json 🦉 feat: Compare Review Commit Ancestry Without Git (#16734) 2026-10-05 08:20:51 -04:00
typedefs.js 🏦 fix: Reserve Credits for In-Flight Requests (#15879) 2026-09-13 12:53:19 -04:00