Repository navigation
Claims: name an unsupported lease schema - #811
Merged
Merged
Conversation
A claim ref whose lease is a JSON object with a schema other than autoform-claim/v1 was reported as "has an invalid lease schema", as a damaged v1 lease is, so telling a ref another tool wrote from a damaged lease meant reading its commit (#777). It now raises "claim 'K' has unsupported lease schema 'X'", with the repr of the value found. It is still a MalformedLeaseError, so what counts as held doesn't change: acquire and release refuse it, and claim list gives _malformed: true with schema "unreadable", its message in _error. Every other message stays.
Contributor
Author
|
No blockers at 08d34c9.
Two nits:
Posted by Claude Code, at Jack's request. |
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.
Fixes #777.
Premise
autoform claim list, or a refusal fromclaim acquireorclaim release, on a board that holds refs Autoform didn't write.autoform-claim/v1is reported asclaim 'K' has an invalid lease schema, the message a damagedautoform-claim/v1lease also gets.claim listshows it asschema: "unreadable". Nothing names the schema it found, so the run in Agent feedback from a Formalize run:autoform claim list --worker-id <worker>reports `has an invalid lease schema… #777 had to read the ref's commit message to learn that its refs were deliberate markers.claim 'K' has unsupported lease schema 'X', whereXis the repr of the value found.Line delta: +28 in total.
autoform_cli/claims.py);CHANGELOG.md);tests/test_claims.py).What changes
_parse_leaseraises the new message when the lease is a JSON object with aschemakey whose value isn'tautoform-claim/v1. Every other message stays:has invalid lease JSONfor a lease that doesn't parse, andhas an invalid lease schemafor one that isn't an object, has noschema, or is anautoform-claim/v1lease with a bad field. The repr escapes control characters, as the key's already does.MalformedLeaseError, so what counts as held doesn't change.claim acquireandclaim releasestill refuse it, exit 1, now with the new message.claim liststill gives_malformed: trueandschema: "unreadable", with the new message in_error, since the listing's JSON shape is a contract that a script may match on.autoform moveandproject worktreesstill treat it as possibly held._malformed.test_a_lease_of_another_schema_is_named_and_still_heldplants a lease with schemalegacy-block/v1. It checks thatread,acquireandreleaseeach raise exactly the new message, and thatclaim listexits 0 with that message in_error,schemastillunreadableand_malformedtrue.Checks
mainat 9e1d2b7, before Claims: remove renew, cleanup and --ttl #795 removedrenew,cleanupand--ttl, with the mutants below: every job passed. That coversteston 3.11 and 3.13 (7,211 passed on each, the 3.13 count including the mutant harness's test, ruff included), the real-Lean, skeleton and REPL suites, WebKit, Windows and the Node read-back cards.claim listgiving anotherschemathanunreadable.https://github.com/facebookresearch/autoform-bot/actions/runs/43400674886
ruff checkwith the pinned 0.15.17 on the changed Python files: clean.mainat ff33adc. Its one conflict was context intests/test_claims.py, where Claims: remove renew, cleanup and --ttl #795 renamed the test after the new one; the commit is otherwise unchanged, and this PR's CI covers the rebased head.git merge-tree, withmainat ff33adc and the open PRs' heads as of 2026-11-14 00:09Z: the code commit adds no conflict with any of them. Prove2me - Add skill files and modifications to the autoform-bot CLI to allow for easy integration with prove2.me #351, fix(site): check links and cards in the HTML5 element tree #621, Formulas as text: an accent on an accent adds one mark #794, CLI: build each command's parser beside its handler #804 and Add an opt-in resident REPL backend for tactic attempts #805 already conflict withmain, and none of them touchesclaims.pyortests/test_claims.py; the others merge cleanly.make lintandmake test, through CI on scratch.Posted by Claude Code, at Jack's request.