Skip to content

feat(pydantic): add PYD-104 force_download rule (schema 15) - #111

Open
Paramjeet-singh-neu wants to merge 1 commit into
trustabl:mainfrom
Paramjeet-singh-neu:feat/pyd-104-force-download
Open

feat(pydantic): add PYD-104 force_download rule (schema 15)#111
Paramjeet-singh-neu wants to merge 1 commit into
trustabl:mainfrom
Paramjeet-singh-neu:feat/pyd-104-force-download

Conversation

@Paramjeet-singh-neu

Copy link
Copy Markdown

Summary

Test plan

  • YAML matches trustabl testdata/rules-fixture/pydantic_ai/agent_safety.yaml
  • Reviewer: confirm PYD-104 sits between PYD-103 and PYD-105 with no ID collision

Made with Cursor

Flag FileUrl-family and WebFetchTool force_download=True / allow-local so the engine's new predicate ships to scanners. Bump pack schema_version in lockstep.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jhumel-code

Copy link
Copy Markdown
Collaborator

Thanks @Paramjeet-singh-neu. PYD-104 is unclaimed on main and no other open PR takes that ID, so it slots between PYD-103 and PYD-105 cleanly. The schema side checks out: every required field is present, pydantic_ai_agent is valid at agent scope, and the value: "True" / "allow-local" form matches how openai_sdk/approvals.yaml already uses agent_hosted_tool_kwarg_value (the evaluator quote strips string literals, so the allow-local arm compares correctly). The YAML is byte identical to the fixture in trustabl/trustabl#185, which adds the agent_file_url_force_download predicate and moves SupportedSchemaVersion to 15, so nothing here loads against a predicate the engine lacks. The explanation and fix are framed for Pydantic AI and name the concrete consequence rather than gesturing at it.

One change I want. Confidence 0.8 sits above PYD-103's 0.75, but PYD-103 reads a kwarg straight off the agent constructor, while the FileUrl arm here attributes a file level force_download to every Pydantic agent in that file. The looser attribution should carry the lower number, so please drop PYD-104 to 0.7 and mirror it in the engine fixture. This also cannot merge ahead of trustabl/trustabl#185, or rules-sync goes red and older binaries skip the rule.

PYD-104 will need a rationale doc in trustabl-rulebook before it ships. That part is on us and we are happy to pair on it.

Happy to take this once the confidence is adjusted.

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