Repository navigation
perf(status): cache the guest tool-probe results - #7
Merged
Merged
Conversation
The guest probes (podman exec per container, spawning conmon/crun) were the remaining cost of `charly status` with multiple containers. The probe results are the container's TOOL availability (metadata — the tools change only on an image rebuild), so they are cached with a 30s TTL; the LIVE up/down status (podman ps) is never cached. The probe script (the concatenated snippets) is the cache key — a change to any probe invalidates the cache. Measured: `charly status` 0.63s → 0.50s warm with 3 containers.
Review — PASSHead SHA: Security screen: PASS — no secrets, exfiltration, scope mismatch, weakened guardrails, or supply-chain changes. The diff adds a local cache file read/write via the shared Checklist: All applicable rules PASS or NA.
Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
This was referenced Nov 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The guest probes (
podman execper container, spawning conmon/crun) were the remaining cost ofcharly statuswith multiple containers. The probe results are the container's TOOL availability (metadata — the tools change only on an image rebuild), so they are cached with a 30s TTL; the LIVE up/down status (podman ps) is never cached. The probe script (the concatenated snippets) is the cache key — a change to any probe invalidates the cache. Measured:charly status0.63s → 0.50s warm with 3 containers.How tested
Full-stack measurement (charly binary rebuilt from the committed tree with these changes + the spec/sdk caches):
Live-vs-cached verification (strace of the warm run):
podman ps— 1 call (LIVE up/down status, never cached)podman images— 0 calls (CACHED)podman execprobes — 0 calls (CACHED)git— 0 calls (CACHED)Rulebook compliance
git statusclean before commit; no force-push; PR-only landing.go build+go testpass on the final tree; the full-stack measurement is pasted above.check-charly-vmdisposable bed (the spec#67 bed run is pasted there).Change classification
fully tested and validated— the changes ran live on the rebuilt binary with retained output (above), and the unit suite passes from the committed tree.Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (fully tested and validated)