Repository navigation
perf(status): direct per-host config read + bulk ledger read - #6
Conversation
- status_flat.go: loadFleetConfig reads the per-host charly.yml DIRECTLY (a lightweight yaml.Unmarshal into the FleetConfig) instead of the full LoadUnified project walk — measured ~197MB of allocation per load (the GC pressure that dominated `charly status`). The per-host config is a small file with no imports; the direct read is placement-invariant. - status_local.go: collectLocalStatus reads the FULL ledger maps in ONE read (kit.ReadLedger) instead of re-reading the 310KB config once per record (measured: 186 reads per status run). - Pins sdk v0.2026241.1311 + spec v0.2026241.1322 (the status-caches tags).
Review — BLOCKHead SHA: Change class: code (perf refactor of the Blocks
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — BLOCKHead SHA: Change class: code (perf refactor of the Security screen: FAIL — supply-chain / "works on my machine" shim in Blocks
Comment intake
Placement
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — BLOCKHead SHA: Change class: code (perf refactor of the Blocks
Comment intake
Placement
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — BLOCKHead SHA: Change class: code (perf refactor of the Security screen: PASS — the Blocks
Comment intake
Placement
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — BLOCKHead SHA: Change class: code (perf refactor of the Security screen: PASS — the Blocks
Comment intake
Placement
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — PASSHead SHA: Security screen: PASS — the Checklist: All applicable rules PASS or NA.
Comment intake — all prior comments disposed:
Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
Summary
status_flat.go:loadFleetConfigreads the per-host charly.yml DIRECTLY (a lightweight yaml.Unmarshal into the FleetConfig) instead of the full LoadUnified project walk — measured ~197MB of allocation per load (the GC pressure that dominatedcharly status). The per-host config is a small file with no imports; the direct read is placement-invariant.status_local.go:collectLocalStatusreads the FULL ledger maps in ONE read (kit.ReadLedger) instead of re-reading the 310KB config once per record (measured: 186 reads per status run).How tested
Full-stack measurement (charly binary rebuilt from the committed tree with these changes + the spec/sdk/plugin caches — the changed
loadFleetConfig/collectLocalStatuspaths run on everycharly status):Disposable fresh-rebuild bed run —
check-charly-vm(thedisposable: trueArch VM bed). The charly binary was rebuilt from the committed tree with these changes + the spec/sdk/plugin caches, synced tocandy/charly-dev/bin/charly, and the bed run:summary.yml:
errors: 0, warnings: 0, allowlisted: 19(the documenteddev-worktree-binary-notice+pacman-pacnew-config-notice+pacman-needed-package-already-currentallowances). The bed installs and runs the rebuilt binary (with the changed code compiled in) on a fresh Arch VM; the changedloadFleetConfig/collectLocalStatuspaths are exercised by the full-stackcharly statusmeasurement (the status verb is not part of the bed's plan — the bed proves the binary installs and runs).Rulebook compliance
git statusclean before commit; no force-push; PR-only landing.go build+go testpass on the final tree; the full-stack measurement + the disposable bed run are pasted above.check-charly-vmdisposable bed ran the rebuilt binary (with the changed code compiled in) on a fresh rebuild (above) — ZERO errors, ZERO warnings (19 documented allowances). The changed status paths ran live on the rebuilt binary (the full-stack measurement), but the status verb is not part of the bed's plan — see the tier below.Change classification
check-charly-vmdisposable bed run (fresh rebuild, ZERO errors/warnings)analysed on a live system— the changed status paths ran live on the rebuilt binary with retained output (the full-stack measurement), and the unit suite passes from the committed tree; the disposable bed ran the rebuilt binary but the status verb is not part of its plan, so the changed status paths did not execute on a disposable target.Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (analysed on a live system)