Repository navigation
Consolidate candidate, GitHub, and sandbox test scenarios - #1961
Conversation
Architecture-Review: unchanged; only test scaffolding changes, with the existing behavioral assertions retained. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on d28ad0a22558e8005cc855c0444cca0cf8754be4, 22.8s: approve (0 critical, 0 important, 1 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)
Native Claude output is retained in the restricted local review receipt.
| ) | ||
| report = sandbox.run_checks(make_config(checks=checks), git_repo) | ||
| assert [r.exit_code for r in report.results] == [0] * len(checks), report | ||
| report = sandbox.run_checks(make_config(checks=checks, network=network), git_repo) |
There was a problem hiding this comment.
suggestion: Network row can use the same exact-exit assertion as the isolated row
test_real_sandbox_system_visibility checks report.ok when network is true and checks the per-command exit codes otherwise. The assertion [r.exit_code for r in report.results] == [0] * len(checks), report covers both cases and prints the report when it fails. Use it for both rows and remove the if network branch. The test gets shorter and the network row gets the same failure diagnostics. The same pattern shows up in test_failed_stage_status_and_tail and test_merged_sha_requires_verified_merge_evidence, which also branch on the parameter. Those branches can stay, since their assertions really do differ, but they're the main readability cost of these merges.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Task
Free 60 test lines in test_candidate.py, test_github.py, and test_sandbox.py. The PR changes no product source. REST file audits found no open PR touching these files. This leaves #1953's review speed work alone.
Assertion inventory
test_rejects_forged_bot_or_prefix,test_rejects_invalid_attestation_evidence,test_same_head_still_obeys_source_policytest_rejects_invalid_attestation_evidenceretains the exact diagnostics for forged App author, forged sender, unsupported event, wrong head ref, missing status, missing ancestry, and policy refusal for a source whose head equals the candidate. The latter still executes the same policy callback.test_readiness_rerun_attempt_requires_start_after_old_failureand the workflow-replacement matrixtest_readiness_defers_only_replaceable_failurepreserve all seven start-time cases and exact waitable failures. The original replacement rows keep the precise blocking reason, not-ready verdict and waitable result, including failing commit status.test_merged_sha_only_for_merged_stateandtest_invalid_merge_evidence_fails_closedtest_merged_sha_requires_verified_merge_evidencestill reads a verified merged SHA then an open PR's test-merge SHA in sequence, expecting the actual SHA and then None. It preserves the same fail-closed errors for every malformed, wrong-head and closed-unmerged row.test_early_failure_reports_actual_exit_without_heartbeat,test_timeout_stops_heartbeat_and_retains_failure_tailtest_failed_stage_status_and_tailchecks one early exit-17 status with the literal tail, and a running heartbeat followed by exit 124 with no private text in status and the exact timeout tail. Each row still requires a failed report with one result.test_real_network_sandbox_resolves_localhost,test_real_sandbox_hides_host_sockets_and_homestest_real_sandbox_system_visibilityretains the network-enabled readable resolver and successful localhost lookup, and all isolated-mode commands and their exact zero exits for socket/home hiding, empty run, visible system paths, writable tmp, and private PID namespace.test_marker_parser_and_finding_idsstill calls the same finding twice and expects the same ID both times. The distinct line still changes the ID.Other changes consolidate fixture metadata with existing helpers. Focused tests passed. The nine optional IntelFlo fixture replay cases remain opt-in. Full local slotted check, primary review, readiness, and Mergify merge.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Validation
Recorded for
d28ad0a22558uv 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