Repository navigation
feat: add host file and artifact service contracts - #709
Conversation
|
@codex review Please review the current PR head a8e09e1. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads. Focus on identity/reference boundaries, chunk and aggregate resource limits, cancellation and retained cleanup, partial uploads, error disclosure, publication/retry semantics, and whether the storage/transport obligations are explicit enough for the subsequent LibreChat adapter. |
Codex Review Summary: ✅ CompletedThis 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: a8e09e1d94
ℹ️ 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".
|
@codex review Please review the current PR head 656b7ae. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads. The upload wrapper now explicitly forwards return/throw cleanup even before its first next(). The regression covers binding → host service → early store rejection → blocked producer cleanup, verifying that timeout returns while the host reservation remains charged until cleanup drains. Publication receipts also recheck the negotiated size limit at the transport consumer. The harness suite, typecheck, scoped lint and production build pass. |
|
Codex Review: Didn't find any major issues. Breezy! 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". |
Summary
SDK/custom graphs have host-model and host-tool boundaries, but no reusable interface for authorized attachment reads or generated file publication. This adds a versioned file service that can use a host's existing storage directly or through an authenticated transport. It keeps storage credentials, paths, download authorization and publication ownership on the host.
Graphs receive opaque references pinned to immutable revisions. Reads pull bounded ranges; uploads stream into private staging with exact length and host-computed SHA-256 verification. A separate publication request enters the host's native file/event pipeline. Shared admission bounds concurrent operations and chunk-copy reservations; cancelled/timed-out work remains charged until storage and input cleanup settle.
Ownership
The SDK validates identity assertions and protocol data. The transport authenticates callers; the storage adapter rechecks canonical ACLs/revisions and owns durable operation-ID reconciliation, storage quotas, private-file cleanup and native attachment events. Mutation retries are never automatic; timeout does not prove a publication failed to commit.
Verification
Scope and rollout
This is the completed SDK contract/helper slice. It does not activate LibreChat's production remote file transport, provide a durable storage implementation, or establish native UI/latency parity. The HTTP test adapter and receipt map are conformance fixtures. Sandbox session mounts, provider-specific multimodal encoding, rich rendered UI artifacts and automatic child grants remain separate integrations.
The version remains 4.2.9. Release changes belong in a separate PR, followed by LibreChat adapters using the existing attachment, snapshot, publication and download services. No existing graph/model/tool execution behavior changes.
Related: LibreChat-AI/LibreChat#18400. Contract and host integration obligations are documented in src/harness/files.md.