mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-11-23 01:25:39 +00:00
Hanzo CI/CD / test (linux-amd64) (push) Skipped
Hanzo CI/CD / test (linux-arm64) (push) Skipped
Hanzo CI/CD / test-advisory (push) Skipped
Hanzo CI/CD / test-amd64 (push) Successful in 3m22s
Hanzo CI/CD / cicd (push) Failing after 5m5s
CI/CD / cicd (push) Failing after 8m37s
`fs` apply_patch required a base_hash from a prior read, and its schema never said so: a model called it, was refused, read, retried. With enso-auto that was 5-15 failing calls per edit and hundreds of thousands of cached input tokens (hanzo-inc/cloud#758). A missing parameter surfaced as a Python TypeError (INTERNAL_ERROR), not a sentence the model could act on. Same contract as the Rust runtime (hanzoai/mcp#41) and the TypeScript tool: - base_hash is optional. Sent, a stale edit is still refused (CONFLICT). Omitted, old_text must match exactly once, so one call edits a file. - The action's schema names uri, old_text and new_text as required and base_hash as optional, in the Rust tool's words. - Missing old_text/new_text is INVALID_PARAMS saying what apply_patch takes; a `*** Begin Patch` text sent as `input` is pointed at action "patch". Test: pkg/hanzo-tools-fs/tests/test_fs_tools.py TestFsApplyPatch, 4 of 5 red before (the stale-hash case already held), 12/12 after. Refs hanzo-inc/cloud#758 Co-authored-by: Claude Opus 5.5 <[email protected]>