pool_list: wire --json flag + stale-cache guard#5
Merged
Conversation
…ENTS.tape Idempotent bash sweep — appends a one-line @x wilson_pool resource- utilization pointer (→ ~/core/atlas/POOL.tape) right below the @v spec entry of each ~/core/*/AGENTS.tape. Until wilson is the primary harness, Claude Code CLI sessions read CLAUDE.md (→ AGENTS.tape) on project open; this nudges every session toward host-pool resource utilization. --commit flag commits each repo's AGENTS.tape in isolation (git commit --only), guarded so a repo with pre-existing AGENTS.tape changes is left as a working-tree edit, never swept into our commit. Re-runnable when new repos appear. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…er; add hexa_verify Renamed tools/pool-banner-sync.sh → tools/agents-banner-sync.sh and generalized from a single hardcoded entry to a BANNER_MARKERS / BANNER_TEXT list — per-entry idempotent (a file keeps the entries it already has; only missing ones are inserted). Banner now carries two @x entries swept below the @v spec of every ~/core/*/AGENTS.tape: @x wilson_pool → ~/core/atlas/POOL.tape (host-pool resource use) @x hexa_verify → ~/core/atlas/VERIFY.tape (verification via hexa CLI) --commit guard generalized: commits only when the AGENTS.tape diff is exactly our insertion (added == 4·entries-inserted, removed == 0) so a repo with pre-existing AGENTS.tape edits is left as a working-tree edit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pool_list's schema advertised {"json":{"type":"boolean"}} and the CLI
layer parsed `pool list --json` into args.json=true, but pool_invoke_list
only ever read args.fresh — the json param was dead. Added a want_json
branch to all four exit paths (cache-hit · hosts.json malformed · empty
roster · roster fallback) emitting json_stringify of the host data.
wilson test 23/23 PASS.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A cache older than 1h (or missing probed_at) can have `reachable` silently lie — e.g. the WireGuard mesh goes down after the probe, so `pool list` keeps reporting a dead host as reachable and consumers route work to it. pool_invoke_list's cache path now computes age_sec from probed_at vs timestamp() and flags stale=true past the 1h threshold. Human output gains a `⚠ STALE cache` warning line + `age` in the header; --json gains `stale` + `age_sec` fields (and metadata.stale). Verified: forged-old cache → ⚠ + stale:true; fresh cache → no warning. wilson test 23/23 PASS. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
wilson pool listimprovements (+ branch carries 2 pre-existing agents-banner commits).f01598cfix(pool-list-json) —pool_list's schema advertised{"json":{"type":"boolean"}}and the CLI parsedpool list --json, butpool_invoke_listnever readargs.json— a dead param. Added awant_jsonbranch to all four exit paths (cache-hit · malformed · empty roster · roster fallback).046718bfeat(pool-list-stale-guard) — a cache older than 1h can havereachablesilently lie (e.g. WireGuard mesh drops after the probe). Cache path now computesage_secand flagsstale; human output gains a⚠ STALE cacheline +age,--jsongainsstale+age_sec.8334932,2cce1f4— pre-existing agents-banner-sync / docs commits already on the branch.Test
wilson buildOK ·wilson test23/23 PASS. Stale branch verified with a forged-oldprobed_at(⚠ +stale:true); fresh cache → no warning. Test cache backed up/restored byte-identical.🤖 Generated with Claude Code