fix(tests): keep __pycache__ out of a clean checkout - #899
Conversation
A green tests/run-tests.sh run left agentkit/hooks/lib/__pycache__/ behind because test-rewrite-runtime.sh's --prefix-fixture reinvocation launches python3 with -I (which implies -E and so ignores PYTHONDONTWRITEBYTECODE) but not -B, so it re-imports rewrite_runtime.py without bytecode-write protection. .gitignore also didn't exclude __pycache__/, so agent-run.sh --cmd test then reported the checkout dirty and finding-ledger.sh evidence refused. Ignore __pycache__/ and *.pyc, export PYTHONDONTWRITEBYTECODE=1 from run-tests.sh as defense in depth, add -B to the reinvocation that was the actual write path, and pin all of it with a new suite that fails on the unfixed fixture and passes after. Closes #897 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: 9 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour. 📝 WalkthroughWalkthroughThe test runner and rewrite-runtime fixture now disable Python bytecode writes. A new shell test checks for ChangesPython bytecode cleanliness
Priority: ➖ Normal Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to No actionable merge risk remains; the new cleanliness test is included in the normal test run. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation PR Full details: Docstring CoverageExplanation Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. (1 skipped: 1 unsupported.) Comment |
|
This was written agentically; verify its assertions: Adversarial review receipt
🤖 Co-authored by Claude Fable 5.1 noreply@anthropic.com. |
|
This was written agentically; verify its assertions: Review ledgerMachine-readable record of every review already performed on this PR. {
"version": 1,
"pr": 899,
"repo": "wrzonance/agent-kit",
"reviews": [
{
"kind": "adversarial",
"provider": "openai",
"model": "gpt-6-astra",
"effort": "xhigh",
"mode": "cross-provider",
"attemptId": "4ae5f6c6-c113-4200-a923-1f5c77c98d1e",
"launcherSha256": "4d1fc623db1b387d5d6dc0792b56ea5fcc25bf1297a77b9aca4dab243902bd50",
"procedure": "one-shot diff review; no contract-blind or two-pass attestation",
"reviewerOverride": "configured=gpt-6-astra-xhigh; operator-authorized=gpt-6-astra-xhigh",
"harness": "codex",
"head_sha": "3a3949b80b17ff03815f0e39cb90551b17c61d75",
"covered_heads": [
"3a3949b80b17ff03815f0e39cb90551b17c61d75"
],
"diff_payload": "wrzonance/agent-kit:899:5fe49204b3157c9d4fac18a74f914c8f9c304286fe552acd08fcf19e373f36bb",
"findings": [],
"counts": {
"p1": 0,
"p2": 0
},
"reviewed_at": "2026-09-24T04:57:28Z"
}
]
}🤖 Co-authored by Claude Fable 5.1 noreply@anthropic.com. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
This was written agentically; verify its assertions:
Why
A green
tests/run-tests.shrun leftagentkit/hooks/lib/__pycache__/behind, soagent-run.sh --cmd testreported the checkout dirty andfinding-ledger.sh evidencerefused to record the run.What
.gitignorenow excludes__pycache__/and*.pyc.tests/run-tests.shexportsPYTHONDONTWRITEBYTECODE=1as defense in depth. The actual write path wastest-rewrite-runtime.sh's--prefix-fixturereinvocation, which launchespython3 -I(implies-E, so it ignoresPYTHONDONTWRITEBYTECODE) without-B; it now passes-Btoo. A new suite,tests/test-clean-tree-after-probe.sh, pins the fix: it fails on the unfixed fixture and passes after.Testing
tests/run-tests.shgreenagent-run.sh --cmd testexits 0 with a clean tree,PYTHONDONTWRITEBYTECODEunset🤖 Co-authored by Claude Fable 5.1 (plan) and Claude Sonnet 5 (implementation). Closes #897.
🤖 Generated with Claude Code
Summary by CodeRabbit