Skip to content

Limits do not reach the bundled dispatchers #21

Description

@liamcrumm

Limits carries a URL fetch budget: max_manifest_url_bytes, manifest_url_timeout_ms, and max_manifest_url_redirects (src/limits.rs:12-14). It reaches manifest extends resolution through Manifest::from_path_with_limits, and it reaches the runtime through Runtime::with_limits.

It does not reach the bundled dispatchers. default_annotator_dispatcher() takes no arguments and default_policy_dispatcher(&manifest) takes only the manifest (src/dispatchers/mod.rs:39,53), so a dispatch-time fetch of a system_prompt_url or a file-sourced bundle_url uses the dispatchers' own defaults regardless of what the host configured.

The practical effect is that a host hardening against slow or oversized responses can bound the manifest fetch and believe it has bounded the rest. The two fetches happen at different times and only one of them is governed.

The pre-extraction AGT engine threaded limits through, with default_annotator_dispatcher_for(&manifest, limits) and default_policy_dispatcher_with_limits(&manifest, limits). Both are absent from 0.4.0-alpha.1, so a caller cannot pass a budget even if it wants to.

Adding limits-accepting variants alongside the current constructors would close it without changing the zero-configuration path.

Verified against the published 0.4.0-alpha.1 sources.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions