Skip to content

fix(examples): honor AGENTDESCENT_CACHE in skill_evolution and ADAS hard-cache - #1274

Merged
Birfy merged 1 commit into
mainfrom
agent/1273-example-cache-root
Nov 24, 2026
Merged

Birfy merged 1 commit into
mainfrom
agent/1273-example-cache-root

Conversation

@Birfy

@Birfy Birfy commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Closes #1273

Base: 57ad6a8
Tip SHA: eb02a5b

What changed

#1267 made cache_path honor AGENTDESCENT_CACHE / XDG_CACHE_HOME. Two example ports still hardcoded ~/.cache/agentdescent and makedirs it themselves, so a read-only home that already set the new knob still failed when those ports ran.

  • examples.skill_evolution.download_bbh now uses cache_path("bbh", ...) and drops CACHE_DIR.
  • ADAS _HardCache uses cache_path("mgsm/hard", ...) when enabled, and still creates no directory when disabled.
  • Tests: download_bbh with urlopen mocked, and _HardCache enabled/disabled, all under a temp AGENTDESCENT_CACHE.
  • changelog.d/1273-example-cache-root.md.

No change to cache keys, which files are stored, or CLI flags.

Verification

Tip SHA: eb02a5b

Ran:

  • pytest -q -o addopts='' tests/test_skill_evolution_example.py tests/test_adas_example.py tests/test_dataloader_cache_root.py tests/test_changelog_fragments.py → 83 passed
  • python -m tools.changelog_fragments check → 43 changelog fragment(s) OK
  • python -m tools.gen_api_docs --check → docs/api.md is up to date
    Not run:
  • Full offline suite locally — the CI test matrix is the line
  • Live BBH download or an ADAS model call

…ard-cache

#1267 moved dataloader.cache_path off a hardcoded ~/.cache root. These two
ports still mkdir'd that default path themselves, so a read-only home that
already set the new knob still failed. Route them through cache_path.

Closes #1273
@Birfy

Birfy commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

Review (Birfy)

Tip SHA: eb02a5b
Ran:

  • .github/scripts/risk_gate.py --repo ThinkFlowLab/agentdescent --pr 1274 → T1
  • pytest -q -o addopts='' tests/test_skill_evolution_example.py tests/test_adas_example.py tests/test_dataloader_cache_root.py tests/test_changelog_fragments.py at this tip → 83 passed
  • python -m tools.changelog_fragments check → 43 changelog fragment(s) OK
  • python -m tools.gen_api_docs --check → docs/api.md is up to date
    Not run:
  • Full offline suite locally — the CI test matrix is the line
  • Live BBH download or an ADAS model call
    Findings:
  • No actionable defects. download_bbh and ADAS _HardCache now write through cache_path, so they follow AGENTDESCENT_CACHE / XDG_CACHE_HOME instead of mkdir'ing ~/.cache/agentdescent themselves. A disabled hard cache still creates no directory. Cache keys and CLI flags are unchanged.
    Verdict: PASS

@Birfy
Birfy enabled auto-merge (squash) November 24, 2026 22:24
@github-actions github-actions Bot added risk:T1 Risk tier T1 (tests, examples, changelog.d), set by the controller from the diff agent-pr Pull request opened by an agent labels Nov 24, 2026
@Birfy
Birfy merged commit 2dd92cb into main Nov 24, 2026
12 checks passed
@Birfy
Birfy deleted the agent/1273-example-cache-root branch November 24, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-pr Pull request opened by an agent risk:T1 Risk tier T1 (tests, examples, changelog.d), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

examples: skill_evolution and the ADAS hard-cache still mkdir under ~/.cache after #1267

1 participant