feat(config)!: expose DocumentTracker resource limits via workspace config - #324
Merged
Merged
Conversation
…onfig Add workspace.max_documents and workspace.max_file_size TOML fields so operators can raise DocumentTracker's previously hardcoded caps (100 open documents, 10MB max file size) for larger or longer-running agent sessions. 0 disables either limit; omitting a field preserves today's defaults. WorkspaceConfig::resource_limits() maps the fields onto bridge::ResourceLimits, and a new Translator::with_resource_limits builder wires the resolved limits into serve()'s Translator construction. That builder and the existing with_extensions builder now read each other's already-set field when rebuilding document_tracker, so they compose in either order without one silently discarding the other's effect. DocumentLimitExceeded and FileSizeLimitExceeded error messages gained a static hint pointing at the relevant config field. Also rename NotificationCache::get_logs/get_messages to logs/messages, dropping the redundant get_ prefix per the Rust API Guidelines (get_diagnostics is a keyed lookup and is unchanged). BREAKING CHANGE: NotificationCache::get_logs/get_messages renamed to logs/messages. ResourceLimits is now re-exported from bridge (previously private to bridge::state), making the already-pub DocumentTracker::new constructible from outside the crate for the first time. Closes #315, closes #293
bug-ops
enabled auto-merge (squash)
August 5, 2026 02:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
workspace.max_documents/workspace.max_file_sizeTOML config fields so operators can raiseDocumentTracker's previously hardcoded caps (100 open documents, 10MB max file size) for larger or longer-running agent sessions.0disables either limit; omitting a field preserves today's defaults.WorkspaceConfig::resource_limits()maps the fields ontobridge::ResourceLimits, and a newTranslator::with_resource_limitsbuilder wires the resolved limits intoserve()'sTranslatorconstruction alongside the existingwith_extensionsbuilder — the two now read each other's already-set field when rebuildingdocument_tracker, so they compose in either order without one silently discarding the other's effect.DocumentLimitExceeded/FileSizeLimitExceedederror messages gained a static hint pointing at the relevant config field.NotificationCache::get_logs/get_messagestologs/messages, dropping the redundantget_prefix per the Rust API Guidelines (get_diagnosticsis a keyed lookup and is unchanged).Breaking changes
NotificationCache::get_logs/get_messagesrenamed tologs/messages.ResourceLimitsis now re-exported frombridge(previously private tobridge::state), making the already-pubDocumentTracker::newconstructible from outside the crate for the first time.Test plan
cargo +nightly fmt --all -- --checkcargo clippy --all-targets --all-features --workspace -- -D warningscargo nextest run --workspace --all-features --lib --bins(653 passed, 1 skipped)RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-featuresmax_file_size: 0unlimited,resource_limits()mapping, TOML round-trip,Translator::with_resource_limits/with_extensionsorder-independence (verified via language resolution through a non-empty extension map, not just the limit value)docs/user-guide/configuration.mdandCHANGELOG.mdCloses #315, closes #293