Skip to content

fix(computer): a recording of an env that declares none fails as unsupported, not on a missing key - #417

Merged
earakely-scale merged 1 commit into
mainfrom
fix/recording-unsupported-card
Oct 30, 2026
Merged

earakely-scale merged 1 commit into
mainfrom
fix/recording-unsupported-card

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

start_computer_recording on an env whose card declares no recording failed with KeyError: 'max_duration_s'. So did end_computer_recording and the teardown's end_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.

_grant now raises EnvCapabilityUnsupported, the error DeployedEnv.invoke already 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

  • Unit: tst/unit/task_step/computer_recording_test.py passes, 20 tests.
    • A new test starts a recording of a child env whose card declares no recording, and of a child the card doesn't list. Each fails the start with EnvCapabilityUnsupported, naming the child, and calls nothing on the env.
    • The existing test for a start without a child env expected the KeyError text. It now expects the same error on the env's own card.
  • Wider tiers: tst/unit/task_step and tst/unit/env pass, 3,593 tests. The new import (agent_env.env.env into the recording steps) imports cleanly from agent_env, the task-step registry and the CLI.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

The PR reports EnvCapabilityUnsupported instead of a missing-key error when an env or child card declares no recording.

  • Computer recording reports when an environment does not offer it.

Reviews (1) · Last reviewed commit: "fix(computer): a recording of an env tha..." · Reviewed by Greptile

…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>
@earakely-scale
earakely-scale requested a review from a team as a code owner October 30, 2026 21:16
@earakely-scale
earakely-scale merged commit 0ccb934 into main Oct 30, 2026
25 checks passed
@earakely-scale
earakely-scale deleted the fix/recording-unsupported-card branch October 30, 2026 21:40
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.

1 participant