Repository navigation
fix(computer): a recording of an env that declares none fails as unsupported, not on a missing key - #417
Merged
Conversation
…pported, not on a missing key _grant read the card's recording params before anything checked the card declared recording, so starting or ending a recording of an env without one (a website browser with no recorder) raised KeyError: 'max_duration_s'. It now raises EnvCapabilityUnsupported, as DeployedEnv.invoke does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What and why
start_computer_recordingon an env whose card declares no recording failed withKeyError: 'max_duration_s'. So didend_computer_recordingand the teardown'send_open_recordings. That covers a child env such as a website browser without a recorder, or a child the card doesn't list at all. The grant was built from the card's recording params before anything checked the card had any, so the error named a missing key, not the missing capability._grantnow raisesEnvCapabilityUnsupported, the errorDeployedEnv.invokealready raises when a card doesn't offer a method. The entry records, for example:EnvCapabilityUnsupported: env 'shop' child env 'website-browser' does not offer 'start' on …computer-recording/v1.Seen on 10-30 while gating the Playwright MCP browser's promotion (FD-4658). Dev's first website browser has no recorder, so its gate run read
recording failed: KeyError: 'max_duration_s'.How it was tested
tst/unit/task_step/computer_recording_test.pypasses, 20 tests.EnvCapabilityUnsupported, naming the child, and calls nothing on the env.KeyErrortext. It now expects the same error on the env's own card.tst/unit/task_stepandtst/unit/envpass, 3,593 tests. The new import (agent_env.env.envinto the recording steps) imports cleanly fromagent_env, the task-step registry and the CLI.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge.Summary
The PR reports
EnvCapabilityUnsupportedinstead of a missing-key error when an env or child card declares no recording.Reviews (1) · Last reviewed commit: "fix(computer): a recording of an env tha..." · Reviewed by Greptile