Repository navigation
verify-agent-server: a known bug reproduces only with its documented failure - #5728
Conversation
A `known bug` bullet was reported xfail whenever its `# bug` line failed, for any reason, so an unrelated 401/404/503 at the marked command passed for a reproduction of the bug. Each marker now names the documented failure, `# bug: PREDICATE`: - `exit N` for lines with no CLI call (`test`, `jq -e`, ...); - `PATH OP [VALUE]` clauses joined by `&&`, matched like --check against the JSON the last control-agent-server call on the line printed. map run reports xfail only when the marked command fails and the predicate holds; any other failure is `fail`, with the observed status and a hint. map check rejects a missing or malformed predicate. Every CLI call writes its printed object to a per-bullet observation file, which the ERR trap snapshots before a recipe's EXIT cleanup runs. All 204 marked lines in the map get a predicate for the failure their prose documents. Fixes #5726 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019YEJjVG4YeJMcv4nG4kfTb
REST API breakage checks (OpenAPI) — ✅ PASSEDResult: ✅ PASSED |
Two holes found by comparing with verify-openhands (OpenHands/OpenHands#18348): - `# bug: exit 1` on a comparison (`jq -e '.status == 409'`, `test "$N" = ...`) accepted any wrong value as the bug. A new `assert` verb checks a value the recipe computed (--value, --json FILE or stdin) and prints it, so those 53 lines now name the value the bug produces (`# bug: value.status eq 200`). Only lines with exec output fields keep their own predicate. - Negative bug lines (`if cmd; then false; fi`, `test !`) exited 0 when cmd broke for an unrelated reason, which read as xpass. map check now rejects those shapes; the 8 such lines assert the correct behavior positively, so xpass means it was observed. mapping.md states the known-bug contract to keep in step with the sibling verification skills. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019YEJjVG4YeJMcv4nG4kfTb
With --keep-going, a known-bug recipe whose Preconditions or Requires: recipe failed can pass on empty variables (a replay without a model key showed F10.ask-agent-unknown passing against /api/conversations//ask_agent). Such a pass is now fail, with a hint naming what failed earlier. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019YEJjVG4YeJMcv4nG4kfTb
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019YEJjVG4YeJMcv4nG4kfTb
all-hands-bot
left a comment
There was a problem hiding this comment.
This review was posted by an AI agent (OpenHands).
Scope
The change belongs in this repository: it modifies the in-repo .agents/skills/verify-agent-server/ skill (its control CLI, feature map, and docs) plus tests/cross/test_verify_agent_server_skill.py. The linked issue #5726 explicitly keeps the sibling OpenHands/automation runner port out of this repo, so there is no misplaced scope.
Verification
- Re-fetched head
6048c5bad8cfe51393a9892cb09153f1b988c9f3; it still matches the review request. PR is open, not draft, no labels, no prior reviews/comments from this account. - All GitHub Actions check runs for the head are
success(onlycleanup-after-merge/cleanup-on-approvalare skipped); no failing or pending required checks. uv run pytest tests/cross/test_verify_agent_server_skill.py→ 59 passed.control-agent-server map check --no-routes→ ok, 34 files, 935 ids, no problems.- Inspected every changed branch against the base classifier:
bug_ranges→bug_marks/BugMarknow carry the predicate;parse_bug_predicateandbug_predicate_matchesgatexfailon the documented failure;assertverb added;NEGATIVE_BUG_REand the CLI-presence check added tomap check; the ERR trap snapshotsOBSERVATION_ENVbeforeEXITcleanup can overwrite it.
Assessment
The classifier now distinguishes the documented failure from an unrelated error at the same marked command, which is exactly the defect #5726 describes. I confirmed by reading the code and running the map that:
xfailrequires the marked command to fail and itsPATH OP/exit Npredicate to hold against the observation the marked line's CLI call printed; a different 401/404/503 isfailwith the observed status and a hint.xpassonly when every command passed and nofailed Preconditions/Requires:recipe preceded it, so a pass over a broken arrange isfail.map checkrejects a missing/malformed predicate, aPATH OPpredicate on a line with no CLI call, and the negative shapes (if cmd; then false; fi,! cmd,test !), and all 204 marked lines carry a predicate (only 2 useexit Nas the documented last resort).- The observation file is per-bullet and refreshed on every CLI call, and the ERR trap copies it at the failing command before any
EXITtrap runs;cmd_helper_startdeliberately stripsOBSERVATION_ENVfrom detached helpers.
I found no material correctness, security, or compatibility defect in the current head, and each acceptance criterion in #5726 (retained correct-behavior assertion, xfail/xpass/fail semantics, malformed-predicate rejection, docs, and the F08.secrets-bad-value predicate) is addressed. The added tests cover the documented failure, an unrelated 503, correct behavior, a pass after a broken arrange, test exiting 2, the EXIT-cleanup case, the assert verb, and the rejected-bug-line cases.
✅ APPROVED
…full Requires closure A `# bug:` clause other than `missing` now needs its path present in the observed output (a stored null counts), so an error object without `checks` no longer matches `checks.0.actual eq null`. A predicate made only of `missing` clauses is rejected. The arrange guard now walks the whole `Requires:` closure, so a known bug whose indirect prerequisite failed cannot read as fixed. F10.fork-keeps-credentials also anchors on the stored agent. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019YEJjVG4YeJMcv4nG4kfTb
neubig
left a comment
There was a problem hiding this comment.
Architecture looks good: the runner retains the correct-behavior assertion, matches the documented failure separately, captures observations before cleanup, and guards missing paths and transitive prerequisites. Current-head CI and the controlled-server regression coverage support the classifier change. This addresses a worthwhile medium-priority verification-integrity issue.
Non-blocking suggestion: add one representative real baseline/fixed replay pair (for example F08.secrets-bad-value), showing xfail on the unfixed server and xpass on the fixed server with the same commands and prerequisites. That would complete the strongest acceptance evidence beyond the partial live replay and controlled HTTP tests.
Reviewed head c3b8af8. No independent test execution was performed in this review.
[RISK ASSESSMENT] Medium: shared verification classification changes, but no production API change. Approved; the representative pair is a suggestion, not a merge blocker.
This review was created by an AI agent (OpenHands) on behalf of Graham Neubig.
|
Thanks for the review. Here is the baseline/fixed pair you suggested for control-agent-server map run --file F08 --only F08.secrets-bad-value --fresh --repeat 2 --checkout <unfixed checkout> # baseline
control-agent-server map run --file F08 --only F08.secrets-bad-value --fresh --repeat 2 # fixed
Preconditions passed in all four runs. The "fixed" server is a throwaway patch that only exists for this check; it is not part of this PR: else:
- # Keep other types as-is (will likely fail validation later)
- converted[key] = value
+ raise ValueError(
+ f"secret {key!r} must be a string or a secret object"
+ )(in Generated by Claude Code |
…re (#582) * verify-automation: known-bug xfail must match the documented failure A `known bug` bullet was reported xfail whenever its `# bug` line failed, for any reason, so an unrelated 401/404/503 at the marked command passed for a reproduction of the bug. This ports the known-bug contract from verify-agent-server (OpenHands/software-agent-sdk#5728), shared with verify-openhands (OpenHands/OpenHands#18348): - Each marker names the documented failure, `# bug: PREDICATE`: `PATH OP [VALUE]` clauses joined by `&&`, matched like --check against the JSON the last control-automation call on the line printed, with `exit N` as a last resort. Paths must be present (a stored null counts). - map run reports xfail only when the marked command fails and the predicate holds; any other failure is fail, with the observed status and a hint. Every CLI call writes its printed object to a per-bullet observation file, which the ERR trap snapshots before an EXIT cleanup. - xpass needs the correct behavior observed: map check rejects negative bug lines (`if cmd; then false; fi`, `! cmd`, `test !`), and a pass after a failed Preconditions or Requires: closure is fail. - A new `assert` verb checks a value a recipe computed, so a predicate can name the bug's value instead of a bare exit status. All 8 marked lines get a predicate; a live replay of F05, F06, F09, F10 and F12 reports each of them xfail. mapping.md states the contract. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VG2xJHeFL935pKEFRsFpsu * verify-automation: reserve `exit` in known-bug predicates `# bug: exit eq 2` parsed as a PATH clause on the CLI's own `exit` field, which only its usage and environment errors set, so a CLI usage error could read as the documented bug. A clause on `exit` is now rejected unless it is `exit N`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VG2xJHeFL935pKEFRsFpsu --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
HUMAN:
This PR adds improvements to how agents record bugs, so that they can compare them better across runs. It adds subcommands they can use, to save the exact error, so then they can check if the same reproduces twice or something else changed between baseline/current.
AGENT:
I'm an AI agent helping Engel Nyst (@enyst) with the verification work.
Why
map runreported aknown bugbullet asxfailwhenever the command marked# bugexited non-zero. It checked which command failed but not which failure it saw, so a new 401, 404 or 503 at that line counted as reproducing a documented 500. That undermines the twice-baseline/twice-fix proof from #5621 (#5726).Summary
# bug: PREDICATE, made ofPATH OP [VALUE]clauses joined by&&. They are matched like--checkagainst the JSON that the lastcontrol-agent-servercall on that line printed.exit Nis kept only as a last resort. Here isF08.secrets-bad-valuebefore and after:--expect 422assertion of the correct behavior is unchanged.assertverb.control-agent-server assert --value|--json FILE|stdin --check ...checks a value that the recipe computed and prints it. Comparison lines that used to say only "the jq was false" now name the value the bug produces. For example,jq -e '.status == 409' f # bug: exit 1becomescontrol-agent-server assert --json f --check status eq 409 # bug: value.status eq 200 && value.response.body.message eq "Profile 'qa-alias.json' deleted".map run:xfailonly when the marked command fails and its predicate holds. Any other failure at that line isfail, reported with the observed status and a hint.xpassonly when every command passed and the bullet's arrange ran. A known bug that passes after its Preconditions or aRequires:recipe failed earlier in the run (with--keep-going) isfail.EXITcleanup can't overwrite the evidence.map checkrejects:PATH OPpredicate on a line with no CLI call;if cmd; then false; fi,! cmd,test !), because an unrelated error incmdwould read as a fix. The 8 such lines now assert the correct behavior positively.mapping.mdgains a known-bug contract, worded so the sibling skills (verify-openhands in feat(verify-openhands): executable known bugs and a repeatable fix proof OpenHands#18348, verify-automation) can keep the same rules.SKILL.mdcovers the twice-baseline/twice-fix proof.maintenance.mdsays a known bug failing in a different way is a finding, never a reason to widen the predicate.Issue Number
Fixes #5726
How to Test
uv run pytest tests/cross/test_verify_agent_server_skill.py: 59 pass. The new tests cover:xfail);fail);xpass);fail);testexiting 2 instead of 1 (fail);EXITcleanup calling the CLI after the failure (stillxfail);assertverb;map check.The existing setup-failure and timeout tests still report
fail.control-agent-server map check --no-routes: ok, 34 files.Live replay of all 34 families at
fbe39f1(map run --fresh --keep-going). There was no DeepSeek key, so model-backed bullets fail before their marked lines.xfail. That includes 37 of the rewrittenassertand positive lines. No bullet failed on a predicate mismatch.F10.ask-agent-unknown, used to read asxpass: its Preconditions had failed, so$NOPEwas empty. It now reportsfail.Video/Screenshots
n/a
Type
Notes
# buglines in a bullet whose first one already failed) have predicates written from their prose. A replay with a model key will check them.🐳 Agent Server images for this PR — GHCR package, pull/run commands, and all pushed tags (click to expand)
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
eclipse-temurin:17-jdkpython-node-runtimepython-node-runtimepython-node-runtimegolang:1.21-bookwormPull (multi-arch manifest)
# Each variant is a multi-arch manifest supporting both amd64 and arm64 docker pull ghcr.io/openhands/agent-server:c3b8af8-pythonRun
All tags pushed for this build
About Multi-Architecture Support
c3b8af8-python) is a multi-arch manifest supporting both amd64 and arm64c3b8af8-python-amd64) are also available if needed