Repository navigation
feat(cua): surface per-step final_url on success steps in result.json - #958
Open
mercurialsolo wants to merge 1 commit into
Open
mercurialsolo wants to merge 1 commit into
mercurialsolo wants to merge 1 commit into
Conversation
result.json only exposed a step's browser URL on failure (via _stamp_failure_context) — successful steps stayed slim. That let a downstream extraction reward be earned from a landing page that happens to show the target field (HN's front page shows comment counts; lu.ma cards show dates), conflating "right data" with "right page". This blocks any URL-verified reward (e.g. SA-OPSD's segment reward) from confirming a "successful" extract actually landed on the intended page. - run_executor: stamp step_result.final_url from the post-step env URL on SUCCESS steps too (only when not already set; page_title/screenshot stay failure-only to keep success payloads slim). - result_payload.pack_step: emit final_url on success when non-empty; failure keeps it unconditionally (unchanged contract). Tests: two new cases in test_result_payload.py — success surfaces final_url when present; a URL-less success step stays slim. The existing slim-success assertion is unchanged (URL-less success adds no key). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This branch has not been deployed
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.
Why
result.jsononly exposed a step's browser URL on failure (via_stamp_failure_context); successful steps stayed slim. So a downstream extraction reward can be earned from a landing page that happens to show the target field — HN's front page shows comment counts, lu.ma cards show dates — conflating "right data" with "right page". This blocks any URL-verified reward (e.g. SA-OPSD's segment reward) from confirming a "successful" extract actually landed on the intended page.What
run_executor: stampstep_result.final_urlfrom the post-step env URL on success steps too (only when not already set;page_title/screenshot stay failure-only to keep success payloads slim).result_payload.pack_step: emitfinal_urlon success when non-empty; failure keeps it unconditionally (contract unchanged).Tests
tests/test_result_payload.py— two new cases: success surfacesfinal_urlwhen present; a URL-less success step stays slim. The existingtest_success_payload_stays_slimis unchanged (URL-less success adds no key).17 passed.Notes
Independent of #957 (that's volume/profile reliability; this is result-payload observability). The sibling backlog item — per-run cost attribution (
session_costs.gpu_usdis0) — is intentionally not in this PR; it's a separate, murkier GPU-cost-attribution change.🤖 Generated with Claude Code