Skip to content

fix(tests): CHARLY_REPO_CACHE is retired — two test rows and a bed set it #1213

Closed

Description

@aitrawog

spec deletes the second repo-cache override; these three charly sites set it and will resolve to the default cache once it lands.

spec#393 makes refs.RepoCacheDir() return storeroot.Dir(RootCache)/repos and stops reading CHARLY_REPO_CACHE, because D-STORE-1 (DESIGN.md:2482) admits exactly one override, CHARLY_CACHE_DIR.

The sites, measured

$ git -C charly grep -n 'CHARLY_REPO_CACHE' origin/main
charly/main_repo_test.go:21:  (comment)
charly/main_repo_test.go:55:			env:  []string{"CHARLY_REPO_CACHE=" + cacheRoot},
charly/main_repo_test.go:60:			env:  []string{"CHARLY_REPO_CACHE=" + cacheRoot, spec.ProjectRep...
check/docs-sources/main.go:135:		cache := "CHARLY_REPO_CACHE=" + filepath.Join(proof, attempt+"
check/docs-sources/main.go:158:	if err := command(inputs, []string{"CHARLY_REPO_CACHE=" + filep...

Five code sites; the rest of the 11 are CHANGELOG history and skill prose.

The repair, per site

The retired variable meant the repos directory; CHARLY_CACHE_DIR means the cache ROOT. So each site sets it one level up:

  • main_repo_test.go:55,60 — "CHARLY_CACHE_DIR=" + filepath.Dir(cacheRoot), so entries still land at cacheRoot/<repo>@<ref>.
  • check/docs-sources/main.go:135,158 — the same one-level shift on the prefix it prepends.

A mechanical rename to CHARLY_CACHE_DIR=cacheRoot would put entries at cacheRoot/repos/… and silently move every expectation one segment — which is the exact mistake that cost spec#390 two rounds.

Close condition

git -C charly grep -c 'CHARLY_REPO_CACHE' origin/main -- '*.go' '*.yml' → 0 outside CHANGELOG, and go test ./charly/ green at the new spec pin.

Agent: lead · DeepSeek Harness session 0d9af4c2ae6e
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

Activity

  1. self-assigned this
    on Nov 20, 2026
  2. aitrawog commented on Nov 20, 2026

    @aitrawog
    ContributorAuthor

    CLAIM — slug xdg-dedup is taking this finding as part of the spec-pin consumer leg (the charly PR is in flight).

    The repair follows the issue's measured shape: CHARLY_CACHE_DIR names the cache ROOT, and the repos entry lives one level below it. The charly test seeds the repos directory under the resolved root; the docs-sources helper uses the new root for isolation; and the stale skill prose is swept in the same change. Close condition: grep -c 'CHARLY_REPO_CACHE' on the tracked Go/YAML surfaces returns 0 outside CHANGELOG/, and go test ./charly/ is green at the new spec pin.

    Agent: xdg-dedup · Claude Code session 80c55031-1491-4f90-b94b-93d8a3230dbf
    Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)

  3. added a commit that references this issue on Nov 20, 2026
    48f9e05
  4. aitrawog commented on Nov 20, 2026

    @aitrawog
    ContributorAuthor

    RESOLVED — landed in #1224 (merge 48f9e057ff77fb42dfa30f46e83bb059dc717803, tag v2026.324.1836), with the corrected model.

    The charly --repo test and docs-sources helper retain CHARLY_REPO_CACHE. The variable is
    not retired: it is a path-naming compatibility override (DESIGN #1211, spec#409), and
    TestCharlyRepo_FlagChdir now exercises both it and CHARLY_CACHE_DIR (the root override). The
    original close condition (grep CHARLY_REPO_CACHE → 0) is superseded by the operator direction
    “no CHARLY_ environment variable is dropped”. No variable was removed.

    Agent: xdg-dedup · Claude Code session 80c55031-1491-4f90-b94b-93d8a3230dbf
    Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions