Skip to content

fix(refs): the git-ref cache lives in the per-host deploy config; move it under the cache root (D-STORE-1) #433

Todo

Description

@aitrawog

Category

category:runtime

Type

type:fix

Remedy / files the remedy will touch

spec/refs/git_client.go cacheFile resolution + spec/storeroot: persist refs.yml under the cache root with a one-time migration from the old cache: section

Cited design decision or org-rulebook rule (or none)

D-STORE-1

Problem

The git-ref cache is persisted in the per-host deploy config (~/.config/charly/charly.yml),
as a cache: section beside deploy, provides, ledger and system. That is a cache living in
a CONFIG document — and it made a cache operation destructive: until #427,
ClearCache (the charly cache clear/refresh surface) called os.Remove on the whole file,
wiping a host's deployments (measured 2026-11-24; fixed by preserving the file).

The placement is also the reason the file is rewritten on every ref resolution (a yaml.Node
read-modify-write under a .lock), which turns each resolver run into a write of the operator's
deployments' source of truth.

Remedy / files

Move the ref cache to the cache root — ~/.cache/charly/refs.yml (or its own store under
spec/storeroot, D-STORE-1 / D-STORE-11 / D-STORE-12) — with a one-time migration that reads the
old cache: section if present and leaves the deploy config alone. Files:
spec/refs/git_client.go (cacheFile resolution), storeroot for the path, and the charly cache
surface.

Agent: ollama-vision-models · Claude Code session c765900b-523f-458a-b38f-a0f925f2a9b9
Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (analysed on a live system)

Activity

  1. added
    category:runtime
    type:fix
    on Nov 24, 2026
  2. aitrawog commented on Dec 2, 2026

    @aitrawog
    ContributorAuthor

    CLAIM

    This issue is in scope of the definition-vs-deployment / one default: / Compose-like volume-node / multi-port publish / pull: redesign (H0+A0), tracked and claimed in opencharly/opencharly#1390 (operator-approved plan, 2026-12-02). It will be resolved by that program's cutover in this repo, producer-first; I will post STATUS here when its leg starts and RESOLVED with the merged PR.

    Agent: claude-default-volume-design · Claude Code session session_01Tvdn3tjf8tKajCd43DwENP
    Assisted-by: Claude Code Anthropic Claude Opus 5.5 (theoretical suggestion)

  3. self-assigned this
    on Dec 2, 2026
  4. aitrawog commented on Dec 2, 2026

    @aitrawog
    ContributorAuthor

    STATUS

    D-DOC (the local document as #Document). Not started. One step landed that this leg builds on: the per-host document now carries port_range (#478).

    Wave order (producer-first, tracked on opencharly/opencharly#1390 / #1391): D-PUB (in flight) → D-DEF → D-VOL/D-PULL → D-DOC → check instances (B). Still claimed by this session; no one else should start it without a HANDING OVER here.

    Agent: claude-default-volume-design · Claude Code session session_01Tvdn3tjf8tKajCd43DwENP
    Assisted-by: Claude Code Anthropic Claude Opus 5.5 (documentation reviewed)

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

Metadata

Metadata

Assignees

Labels

category:runtimetype:fix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions