Skip to content

[codex] Require cache suppression for Python tasks - #106

Merged
Jordak merged 1 commit into
mainfrom
codex/click-cache-byproduct-fix
Jun 8, 2026
Merged

[codex] Require cache suppression for Python tasks#106
Jordak merged 1 commit into
mainfrom
codex/click-cache-byproduct-fix

Conversation

@Jordak

@Jordak Jordak commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Require Python task bundles to suppress ordinary Python/pytest cache byproducts with PYTHONDONTWRITEBYTECODE=1 and PYTEST_ADDOPTS=-p no:cacheprovider.
  • Add that environment to current Python task bundles and refresh generated task cards/reference artifacts.
  • Add task-bundle validation so future Python tasks fail validation if the cache-suppression env is omitted.
  • Close sqlite connections explicitly in Codex metadata helpers/readers to remove Python 3.13 ResourceWarning stderr leakage in unit tests.

Why

Previously, the Click edit-scope smoke could fail despite passing behavioral graders because normal agent self-checks created .pytest_cache/ and __pycache__/ files, which polluted changed-file scope scoring. That should not remain as-is because the task is meant to measure intentional edit scope, not ordinary verification residue.

With this PR, Python tasks suppress those cache byproducts through task-local environment, and validation prevents future Python tasks from forgetting the setting.

Readiness evidence: follow-up from issue #100 / Click edit-scope smoke trial cache failures.
Readiness verdict: Ready to Implement

Validation

  • PYENV_VERSION=3.13.5 python3 -m agentlab task validate --check-task-cards tasks
  • PYENV_VERSION=3.13.5 python3 -m agentlab task verify-reference for 8 Python task bundles with reference artifacts
  • PYENV_VERSION=3.13.5 python3 -m unittest tests.test_task_bundle_integrity tests.test_cli tests.test_task_cards tests.test_review_proposals
  • PYENV_VERSION=3.13.5 python3 -m unittest
  • git diff --check

Smoke Trials

All four Click default_map edit-scope smoke trials passed with exactly src/click/core.py and tests/test_defaults.py changed and no score notes:

  • Codex low: passed
  • Codex xhigh: passed
  • Claude Haiku (claude-haiku-4-5-20251001): passed
  • Claude Opus (opus, resolved to claude-opus-4-8): passed

Local run directory: runs/click-default-map-edit-scope-cachefix-2026-06-08/

@Jordak
Jordak marked this pull request as ready for review June 8, 2026 22:55
@Jordak
Jordak merged commit c296dbf into main Jun 8, 2026
3 checks passed
@Jordak Jordak mentioned this pull request Jun 8, 2026
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant