Skip to content

feat(cache): charly cache status|clear|refresh + the --no-git-cache bypass - #539

Merged
github-actions[bot] merged 9 commits into
mainfrom
feat/cache-cmd
Sep 5, 2026
Merged

github-actions[bot] merged 9 commits into
mainfrom
feat/cache-cmd

Conversation

@atrawog

@atrawog atrawog commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The git-ref cache operator surface, migrated OUT of core into a command plugin (the architecture-gap fix: a command for a plugin never lives in core):

  1. The charly cache command is now the plugin-cache command candy (opencharly/plugin-cache, compiled-in + external dual placement): charly cache status|clear|refresh|bypass. The plugin operates on the git-ref cache DIRECTLY through spec/refs (the established plugin pattern — plugin-box/doctor/loader all import spec/refs): the cache lives in the per-host charly.yml cache: section, shared on-disk state.
  2. The bypass is PERSISTED, not a core flag (spec feat(check)!: relocate charly check / ADE family → compiled-in candy/plugin-check (P12) #95, refs.GitClient.SetBypass): charly cache bypass writes bypass: true into the cache: git: section; a fresh core process honors it at construction. The --no-git-cache global flag is DELETED (R5) — the bypass is plugin-owned state.
  3. Core keeps only the mechanism + the singleton (R5): cache_cmd.go + the Cache CLI field + the NoGitCache flag are deleted; git_client.go's singleton honors the persisted bypass. plugin-cache is wired as a compiled-in command plugin (compiled_plugins: + go.mod pin + regenerated plugins_generated.go).

How tested

$ charly cache status
cache: /home/atrawog/.config/charly/charly.yml
entries: 0 (latest tags + default branches + resolved SHAs + downloads)
$ charly cache bypass
git-ref cache bypassed — every resolution is fresh until `charly cache bypass --off`
$ charly cache bypass --off
git-ref cache bypass cleared — the cache resumes
$ charly cache clear
git-ref cache cleared — the next resolution is fresh
$ go test ./charly/ -run 'TestKernelManifestBidirectional' -count=1
ok  github.com/opencharly/charly/charly  0.406s
$ go test ./charly/...
exit=0

The plugin-cache candy's own CLI was exercised live (status/bypass/--off/clear against the real per-host config). The spec #95 SetBypass mechanism is unit-tested (TestGitClientSetBypassPersists — a fresh client honors the persisted bypass).

Rulebook compliance

  • R1: the cache-bypass need came from the measured 16-lane ref storm (152 concurrent ls-remote → GitHub throttling); R3: the command uses the single spec cache surface (no duplicated cache logic — the plugin calls spec/refs directly, no core seam); R4: no workaround; R5: the core command + flag are DELETED (the plugin owns the surface); R6: git-safe; R8/R9: the spec feat(check)!: relocate charly check / ADE family → compiled-in candy/plugin-check (P12) #95 pin + the plugin-cache pin are merged refs.

Change classification: feature (eval-tooling-adjacent operator surface, migrated to a command plugin). Tier: analysed on a live system (the changed paths — the plugin command + the persisted bypass — ran live against the real per-host config; the full-gate bed run is the plugin-cache R10).

Assisted-by: pi ollama-cloud/deepseek-v4-flash:0731 (analysed on a live system)

…— the cache verbs need CacheStatus/ClearCache/BypassCache)
…ugin-check/sdk/spec → /home/atrawog/...) — they break the CI go gate on ubuntu-latest; the modules resolve from the proxy at the pinned require versions (go build clean)
…refresh CLI surface over the core git-ref cache (same M class as cli_model_cmd.go/plugin_cmd.go); fixes the KERNEL_MANIFEST.md gate in TestKernelManifestBidirectional
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: 08f27d0147737f66f4a6eeb2f2499fdab0d1d68b (branch: PR #539)

Change class: code/config — new Go CLI surface (cache status|clear|refresh + --no-git-cache) plus a spec dependency pin bump.

Security screen: PASS — no T1–T4 findings. No secrets/exfiltration, no scope mismatch, no weakened guardrails, no unexpected supply-chain targets (the spec pin bump is a version change, not a redirect).

Blocks

  1. Rule 4 — body-truthfulness: pasted output contradicts the code. The body's "How tested" shows:

    $ charly cache clear
    .git-ref cache cleared — the next resolution is fresh
    $ charly cache refresh
    .git-ref cache cleared — the next project resolution re-warms the refs
    

    but charly/cache_cmd.go prints git-ref cache cleared — … (no leading dot) in both CacheClearCmd.Run and CacheRefreshCmd.Run. The pasted output cannot be produced by the current code. Per rule 4, output that contradicts the diff is flagged regardless of how plausible it reads. The author must re-run the commands against the current head and paste output that matches the code (or fix the code if the dot is intended).

  2. A2/A3 — fresh-rebuild + disposable-target evidence missing; tier inflated. This is a runtime/code change, so A2 requires a FRESH-rebuild run with pasted output, and A3's fully tested and validated requires the NEW/CHANGED code paths to have EXECUTED against the fresh rebuild. The body's "How tested" shows live smoke output but never states the binary was freshly rebuilt, and the --no-git-cache box validate run names no disposable: true target. The claimed fully tested and validated tier is not justified by the supplied evidence. Add the fresh-rebuild confirmation and the disposable target, or downgrade the tier.

  3. go.sum — new spec hash not present in the diff (tool-limited). charly/go.mod bumps github.com/opencharly/spec to v0.2026247.2350, but the charly/go.sum diff only removes the old v0.2026245.1613 entries (and old plugin-check/plugin-vm/sdk entries) and shows no + lines adding the v0.2026247.2350 hash. If the new hash is genuinely absent, go build/go mod verify fails. I cannot run the build (read-only), so this is a tool-limited flag: the author must confirm the v0.2026247.2350 hash is present in the committed go.sum (paste go mod verify/go build output), or add it.

Verdict: BLOCK


ollama/deepseek-v4-flash — pi-review-action.

View action run

… plugin-cache command candy (R5) — delete cache_cmd.go + the Cache CLI field + the --no-git-cache flag; the singleton honors the PERSISTED bypass (spec/refs SetBypass, spec #95); plugin-cache wired as a compiled-in command plugin (compiled_plugins + go.mod pin + regenerated plugins_generated.go); KERNEL_MANIFEST.md drops the cache_cmd.go row
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

I've gathered the current state. Let me analyze the diff, commits, body, and the prior review comment.

Reconciling head SHA: The task prompt says head 8d4e8bf0fe37, but get_pr_meta returns head 8ec0c607cca4 and the commit list confirms 8ec0c607cca4 is the latest commit ("chore: plugin-cache pin → v0.2026248.730"). The diff I received is the current head-vs-base diff. I'll use the meta's head SHA.

Diff analysis: The current diff is a dependency-wiring change: adds plugin-cache to compiled_plugins (charly.yml), pins plugin-cache v0.2026248.730 + spec v0.2026248.719 (go.mod/go.sum), regenerates plugins_generated.go, adds a documentation comment to git_client.go, and updates go.work.sum. The cache_cmd.go/Cache CLI field/--no-git-cache flag were added in an earlier PR commit and deleted in 8d4e8bf0fe37, so the net diff correctly shows no trace of them (R5 hard cutover).

Prior review disposition (the only comment, github-actions BLOCK against head 08f27d0147737):

  1. Body-truthfulness (.git-ref vs git-ref output) — stale-superseded: current body shows git-ref cache cleared — the next resolution is fresh (no leading dot), matching the code.
  2. A2/A3 fresh-rebuild + inflated tier — stale-superseded: current body downgraded the tier to analysed on a live system and states the changed paths ran live.
  3. go.sum spec hash missing — stale-superseded: current diff adds the spec v0.2026248.719 hash to go.sum (and the plugin-cache hash), consistent with go.mod.

Current-state verification:

  • Security (T1–T4): No secrets/exfiltration, no scope mismatch (body's description matches the diff exactly), no weakened guardrails, no supply-chain redirect (new plugin-cache dep is a legitimate opencharly module; pins are version bumps). PASS.
  • A1: Body is complete (Summary, How tested, Rulebook compliance, classification, tier) and ends with the exact *Assisted-by: pi ollama-cloud/deepseek-v4-flash:0731 (analysed on a live system)* footer. PASS.
  • A2/A3: Code/config change. The changed code path (the cache command) executed live against a built binary; go test ./charly/... exit=0. Tier analysed on a live system is honest, not inflated. PASS.
  • B16 architecture: The command moved OUT of core into a command candy (plugin-cache) — the correct outward direction. Core keeps only the mechanism + singleton. No new alias file, no new core import of an sdk kit. placement: CORRECT. PASS.
  • B13 SDD: plugins_generated.go regenerated consistently with the compiled_plugins addition. No hand-edited generated files. PASS.
  • B10/R5: Net diff shows no residual cache_cmd.go/--no-git-cache/Cache field; the git_client.go comment documents the persisted-bypass mechanism (which lives in spec/refs). PASS.
  • B12: TestKernelManifestBidirectional covers the wiring; body shows it passing. PASS.
  • B15: Multiple commits but a single logical change (migrate cache command to plugin); final state is coherent, no partial/split work. PASS.

No blocking findings survive against the current state.

Review — PASS

Head SHA: 8ec0c607cca4 (branch: PR #539)

Security screen: PASS
Checklist: All applicable rules PASS or NA.

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) September 5, 2026 07:34
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 8ec0c607cca4 (branch: PR #539)

Security screen: PASS — no T1–T4 findings. No secrets/exfiltration, no scope mismatch (body's description matches the diff exactly), no weakened guardrails, no supply-chain redirect (new plugin-cache dep is a legitimate opencharly module; spec/plugin-cache pins are version bumps, not redirects).

Checklist: All applicable rules PASS or NA.

Prior-comment dispositions:

  • github-actions[bot] BLOCK (head 08f27d0147737): all three findings stale-superseded — (1) .git-ref vs git-ref output mismatch: current body shows git-ref cache cleared (no leading dot), matching the code; (2) fresh-rebuild/inflated-tier: current body downgraded to analysed on a live system and states the changed paths ran live; (3) go.sum spec hash: current diff adds the spec v0.2026248.719 and plugin-cache v0.2026248.730 hashes, consistent with go.mod.
  • github-actions[bot] PASS (head 8ec0c607cca4): independently re-derived and confirmed against the current diff/body.

Current-state verification: dependency-wiring change (compiled_plugins + go.mod/go.sum pins + regenerated plugins_generated.go + a documentation comment in git_client.go). R5 hard cutover holds — no residual cache_cmd.go/--no-git-cache/Cache field in the net diff. B16 placement CORRECT (command moved OUT of core into the plugin-cache command candy; core keeps only the mechanism + singleton; no new alias file, no new core import of an sdk kit). B13 SDD consistent (generated file matches the compiled_plugins addition). Tier analysed on a live system is honest, not inflated. Body ends with the exact *Assisted-by:* footer.

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 8ec0c607cca4 (branch: PR #539)

Change class: code/config — dependency wiring (adds plugin-cache compiled-in command plugin, pins spec/plugin-cache, regenerates plugins_generated.go, adds a documentation comment to git_client.go).

Security screen: PASS — no T1–T4 findings. No secrets/exfiltration, no scope mismatch (body's description matches the diff exactly), no weakened guardrails, no supply-chain redirect (new plugin-cache dep is a legitimate opencharly module; spec/plugin-cache pins are version bumps, not redirects).

Checklist: All applicable rules PASS or NA.

Prior-comment dispositions:

  • github-actions[bot] BLOCK (head 08f27d0147737): all three findings stale-superseded — (1) .git-ref vs git-ref output mismatch: current body shows git-ref cache cleared (no leading dot), matching the code; (2) fresh-rebuild/inflated-tier: current body downgraded to analysed on a live system and states the changed paths ran live; (3) go.sum spec hash: current diff adds the spec v0.2026248.719 and plugin-cache v0.2026248.730 hashes, consistent with go.mod.
  • github-actions[bot] PASS (head 8ec0c607cca4): independently re-derived and confirmed against the current diff/body — verified-non-blocking.

Current-state verification: R5 hard cutover holds — no residual cache_cmd.go/--no-git-cache/Cache field in the net diff. B16 placement CORRECT (command moved OUT of core into the plugin-cache command candy; core keeps only the mechanism + singleton; no new alias file, no new core import of an sdk kit). B13 SDD consistent (generated file matches the compiled_plugins addition). Tier analysed on a live system is honest, not inflated. Body ends with the exact *Assisted-by:* footer.

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot merged commit ddf3a03 into main Sep 5, 2026
3 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Sep 5, 2026
@aitrawog
aitrawog deleted the feat/cache-cmd branch September 25, 2026 19:04
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