Skip to content

bench: the dataset cache ignores AGENTDESCENT_HOME and XDG_CACHE_HOME, so a read-only home aborts every dataset-backed run #1261

Done

Description

@HugoXK

Implementation: AgentDescent (ours) — do not pick up; the pair PR is dispatched separately.

The dataset cache cannot be moved: CACHE_ROOT = os.path.expanduser("~/.cache/agentdescent") at agentdescent/dataloader.py:40, and cache_path does os.makedirs at :199. AGENTDESCENT_HOME moves the run store and XDG_CACHE_HOME is ignored, so on a host whose home is read-only — a container or CI sandbox, exactly the hosts our docs tell agents to give a writable AGENTDESCENT_HOME — every dataset-backed port and bench dies with a traceback, and the documented knob does not help.

Measured at 22ea7528915a761c579dc4c7f47d8444c159cd8a, with AGENTDESCENT_HOME pointed at a writable directory: from agentdescent import dataloader; dataloader.cache_path("gsm8k", "train.jsonl") raises OSError: [Errno 30] Read-only file system: '/home/xuke/.cache/agentdescent'; setting XDG_CACHE_HOME to a writable directory changes nothing (the path still starts with ~/.cache/agentdescent), and python -m bench.candidate_methods --help fails through this call (that import-time half is a separate issue).

Add an overridable cache root:

  • resolve the root at call time: AGENTDESCENT_CACHE when set, else XDG_CACHE_HOME/agentdescent when set, else today's ~/.cache/agentdescent;
  • keep cache_path(subdir, filename)'s signature and its makedirs;
  • one test that sets each variable and asserts the returned path, and one that asserts the no-variable path is byte-identical to today;
  • no change to what is fetched, cached or keyed; no new dependency.

Acceptance: red first — with XDG_CACHE_HOME set to a tmp dir, dataloader.cache_path("gsm8k", "x.jsonl") must start with that dir; today it starts with ~/.cache and (on a read-only home) raises OSError; AGENTDESCENT_CACHE wins over XDG_CACHE_HOME; with neither set the path is exactly today's; no network or model call; docs/testing-guide.md's writable-home note gains one sentence; docs/changelog.

Activity

  1. added
    bug
    area:bench
    risk:T2
    on Nov 24, 2026
  2. HugoXK commented on Nov 24, 2026

    @HugoXK
    CollaboratorAuthor

    Working #1261 on agent/1261-cache-root, branched from main e6c01493371a9a1f9cf921705fd8c9f9f49b609f (API Date: Tue, 24 Nov 2026 10:55:14 GMT). Red-first test for the call-time cache root, then the fix, the docs/testing-guide.md sentence and a changelog fragment; draft PR follows in this session.

  3. HugoXK commented on Nov 24, 2026

    @HugoXK
    CollaboratorAuthor

    Claim retracted. The 11:02:59Z claim on this card is withdrawn: no agent/1261-cache-root existed on the remote at the thirty-minute mark (11:32:59Z), so that claim never held the slot. Assignee and agent-working are already clear.

    The card has been re-dispatched to a different dev. A push on the old branch after this line does not restore the old claim, and the next claim comment on this issue is the live one — this line retracts the earlier claim only, it does not freeze the card.

    Nothing about the work itself changed: the scope, the acceptance block and the base are as written above.

  4. HugoXK commented on Nov 24, 2026

    @HugoXK
    CollaboratorAuthor

    Claimed: #1261, branch agent/1261-cache-root at dd45cd43d3443d2e62b4f69eb20fa90903082496 (parent e6c01493), taking over from the retracted 11:02:59Z claim; the branch already exists on the remote. PR base is main 441ac2bd23a248fa56d8da68efc4aaca859e21ad. I re-run the red at 441ac2bd and the targeted family at the tip myself before the draft PR opens.

    API Date: Tue, 24 Nov 2026 11:51:12 GMT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:benchbugrisk:T2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions