Repository navigation
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 2bebc1db8a14b615423814b9e266d05be18c70b7, 37.6s: approve (0 critical, 0 important, 2 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Raw reviewer output
{"duration_api_ms":34713,"stop_reason":"tool_use","session_id":"e4353003-4c85-42b6-a4e2-84cc9aeb0467","total_cost_usd":0.27217,"usage":{"input_tokens":14,"cache_creation_input_tokens":22321,"cache_read_input_tokens":123330,"output_tokens":3444,"output_tokens_details":{"thinking_tokens":1844},"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":22321,"ephemeral_5m_input_tokens":0},"inference_geo":"global","iterations":[{"input_tokens":2,"output_tokens":733,"cache_read_input_tokens":26479,"cache_creation_input_tokens":1644,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":1644},"type":"message"}],"speed":"standard","fallback_credit":null},"modelUsage":{"claude-opus-5-5":{"inputTokens":14,"outputTokens":3444,"cacheReadInputTokens":123330,"cacheCreationInputTokens":22321,"webSearchRequests":0,"costUSD":0.27217,"contextWindow":1000000,"maxOutputTokens":128000,"thinkingTokens":1844,"cacheCreationEphemeral5mInputTokens":0,"cacheCreationEphemeral1hInputTokens":22321,"canonicalModel":"claude-opus-5-5","provider":"firstParty","costBasis":"list"}},"permission_denials":[],"terminal_reason":"completed","fast_mode_state":"off","fast_mode_disabled_reason":"sdk_opt_in_required","subagent_stats":{"spawned":0,"requested":{"background":0,"foreground":0,"unset":0},"started_in_background":0,"max_depth":0,"spawned_by_subagents":0,"completed":0,"failed":0,"killed":{"parent":0,"user":0,"system":0},"refused":{"depth_limit":0,"concurrency_limit":0,"budget":0},"by_type":{}},"safety_stops":0,"is_error":false,"num_turns":9,"subtype":"success","api_error_status":null,"result":"{\"verdict\":\"approve\",\"findings\":[{\"severity\":\"suggestion\",\"path\":\"tests/test_cli.py\",\"line\":420,\"title\":\"Delayed-check test checks the re-read, not the lock\",\"body\":\"`delay` runs `review` all the way through before it calls the real `_update_pr_checks`, so the check never actually overlaps with the review. The test would still pass if `_lock_task_state` were a no-op, because it only shows that the check reads the live body again before writing. That re-read does cover the acceptance criterion about a delayed check, but nothing tests the serialization. Smallest fix: add a focused test that holds `_lock_task_state(wt)` (for example from a thread or a second process). It should assert that `_update_pr_checks` / the review append does not call `pr_view`/`pr_for_branch` until the lock is released.\"},{\"severity\":\"suggestion\",\"path\":\"src/loopzero/cli.py\",\"line\":637,\"title\":\"Body built before the push is now only used for validation and draft creation\",\"body\":\"For an existing open PR, `existing`/`body` at lines 637-638 are now discarded and rebuilt from `live.body` inside the lock (line 662). Building it early still has a purpose: it raises on malformed markers or an oversized body before the push, and the create-draft path uses it. A short comment saying so would stop a later cleanup from removing it, or from going back to reusing the stale `body` in the update branch.\"}]}","structured_output":{"verdict":"approve","findings":[{"severity":"suggestion","path":"tests/test_cli.py","line":420,"title":"Delayed-check test checks the re-read, not the lock","body":"`delay` runs `review` all the way through before it calls the real `_update_pr_checks`, so the check never actually overlaps with the review. The test would still pass if `_lock_task_state` were a no-op, because it only shows that the check reads the live body again before writing. That re-read does cover the acceptance criterion about a delayed check, but nothing tests the serialization. Smallest fix: add a focused test that holds `_lock_task_state(wt)` (for example from a thread or a second process). It should assert that `_update_pr_checks` / the review append does not call `pr_view`/`pr_for_branch` until the lock is released."},{"severity":"suggestion","path":"src/loopzero/cli.py","line":637,"title":"Body built before the push is now only used for validation and draft creation","body":"For an existing open PR, `existing`/`body` at lines 637-638 are now discarded and rebuilt from `live.body` inside the lock (line 662). Building it early still has a purpose: it raises on malformed markers or an oversized body before the push, and the create-draft path uses it. A short comment saying so would stop a later cleanup from removing it, or from going back to reusing the stale `body` in the update branch."}]},"ttft_ms":2414,"type":"result","duration_ms":35884,"uuid":"78d8d8f1-7ecb-445b-ba65-3539ff7386e9","ttft_stream_ms":1682,"time_to_request_ms":718,"first_content_frame_ms":1682,"queued_turn_count":0,"result_index":0}
| assert text in updated | ||
|
|
||
|
|
||
| def test_delayed_check_preserves_review_summary(wt, gh, fake_bin, capsys, monkeypatch): |
There was a problem hiding this comment.
suggestion: Delayed-check test checks the re-read, not the lock
delay runs review all the way through before it calls the real _update_pr_checks, so the check never actually overlaps with the review. The test would still pass if _lock_task_state were a no-op, because it only shows that the check reads the live body again before writing. That re-read does cover the acceptance criterion about a delayed check, but nothing tests the serialization. Smallest fix: add a focused test that holds _lock_task_state(wt) (for example from a thread or a second process). It should assert that _update_pr_checks / the review append does not call pr_view/pr_for_branch until the lock is released.
| "run `loopzero start <new-task-slug>` for a new task" | ||
| ) | ||
| existing = _sync_task_narrative(wt, pr.body or "") if pr is not None else None | ||
| existing = _sync_task_narrative(wt, pr.body) if pr is not None else None |
There was a problem hiding this comment.
suggestion: Body built before the push is now only used for validation and draft creation
For an existing open PR, existing/body at lines 637-638 are now discarded and rebuilt from live.body inside the lock (line 662). Building it early still has a purpose: it raises on malformed markers or an oversized body before the push, and the create-draft path uses it. A short comment saying so would stop a later cleanup from removing it, or from going back to reusing the stale body in the update branch.
Architecture-Review: unchanged; keep the approved body serialization and combine it with main’s timeout handling. Co-Authored-By: Codex <noreply@openai.com>
Keep the shared task-state lock and main’s receipt publication guard. Preserve the fresh PR body read and update the test call expectations for the new branch-history lookup. Architecture-Review: unchanged; the integration preserves both documented uses of the task-state lock. Co-Authored-By: Codex <noreply@openai.com>
|
Conflict resolution at |
* Serialize updates to the pull request body Carry forward the reviewed change and tested merge resolution from #1099. Co-Authored-By: Codex <noreply@openai.com> * Integrate receipt identity with serialized PR updates Carry the already-landed receipt rendering change from #1160 into the delta. Keep the check lookup and write under the shared lock and render from the freshly read PR when publishing. Architecture-Review: unchanged; receipt verification and serialized body updates retain their documented behavior. Co-Authored-By: Codex <noreply@openai.com> --------- Co-authored-by: eowca <4008965+eowca@users.noreply.github.com> Co-authored-by: Codex <noreply@openai.com>
Preserve review summaries when check refreshes a PR
Context and goal
Closes #1003
Acceptance
Notes
Use the existing task state directory for the lock. Keep check execution, reviewer dispatch, and Git push outside the lock.
Base
main @ f717ea4
Validation
Recorded for
2bebc1db8a14uv run --group dev ruff check src tests: exit 0uv run --group dev tach check: exit 0uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0scripts/size_budget.sh: exit 0uv run --group dev pytest -q: exit 0Review
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.