#200 follow-up: update TUI/sampler marker readers for fp-keyed paths + Factory-Account commit trailer #226

Closed
opened 2026-10-15 06:58:21 +00:00 by matou-build-agent · 1 comment

_Follow-up to #200, which keyed the Claude limit/active-account markers and spend by token fingerprint (sha256(token)[:12]). #200 landed the core (independent per-token parking, spend.account_fp, limit-lost by fp, per-iteration fp capture in record-run-result.sh) but deferred two of its "Proposed change" items that are NOT in its acceptance list and carry extra blast radius.

1. TUI / sampler readers (known display regression)

tui/data/limits.py (tui/app.py:393-394) and fleet-tui/probe.py:360-371 read the limit/active marker content at the bare $CLAUDE_LIMIT_MARKER/$CLAUDE_ACTIVE_MARKER path. After #200 a tokened host writes the marker at the fingerprint-keyed path (…-<fp> / …-<fpPrimary>-<fpStandby>), so these readers find nothing and show "not parked" / default account even when a token IS parked. Parking/gating itself is correct (limit-lib resolves the keyed path); this is display-only.

Non-trivial because the TUI/probe may NOT have the token in their env, so they cannot compute the fp to reconstruct the path — they likely need glob-based discovery of matou-swarm-claude-limit-* / matou-swarm-claude-active-token-* under the state dir, plus a design decision for how to present a host carrying MORE THAN ONE token pair (multiple park states). fleet-tui/snapshot.py:192-193 and fleet-tui/hostpoll.py defaults are in the same blast radius. Update the Python tests (tui/tests/, fleet-tui tests) in the same change.

2. Factory-Account: <fp> commit trailer

#200 proposed that swarm_git_identity callers add a Factory-Account: <fp> commit trailer so token attribution survives into git history. swarm_git_identity lives in the consumer identity layer and commits are made by the agent inside the sandbox, so there is no single harness chokepoint — this needs prompt-skeleton / identity-layer design (CLAUDE.md 2c: prompt files are design work). Scope it deliberately.

Out of scope (both here and in #200)

Retiring the limit-lib.sh repo-level-token prohibition — that re-enablement is #199's human ruling.

Filed from the #200 implementation run (sandcastle worker).

_Follow-up to #200, which keyed the Claude limit/active-account markers and `spend` by token fingerprint (`sha256(token)[:12]`). #200 landed the core (independent per-token parking, `spend.account_fp`, `limit-lost` by fp, per-iteration fp capture in `record-run-result.sh`) but deferred two of its "Proposed change" items that are NOT in its acceptance list and carry extra blast radius. ## 1. TUI / sampler readers (known display regression) `tui/data/limits.py` (`tui/app.py:393-394`) and `fleet-tui/probe.py:360-371` read the limit/active marker **content at the bare `$CLAUDE_LIMIT_MARKER`/`$CLAUDE_ACTIVE_MARKER` path**. After #200 a tokened host writes the marker at the fingerprint-keyed path (`…-<fp>` / `…-<fpPrimary>-<fpStandby>`), so these readers find nothing and show "not parked" / default account even when a token IS parked. Parking/gating itself is correct (limit-lib resolves the keyed path); this is display-only. Non-trivial because the TUI/probe may NOT have the token in their env, so they cannot compute the fp to reconstruct the path — they likely need **glob-based discovery** of `matou-swarm-claude-limit-*` / `matou-swarm-claude-active-token-*` under the state dir, plus a design decision for how to present a host carrying MORE THAN ONE token pair (multiple park states). `fleet-tui/snapshot.py:192-193` and `fleet-tui/hostpoll.py` defaults are in the same blast radius. Update the Python tests (`tui/tests/`, `fleet-tui` tests) in the same change. ## 2. `Factory-Account: <fp>` commit trailer #200 proposed that `swarm_git_identity` callers add a `Factory-Account: <fp>` commit trailer so token attribution survives into git history. `swarm_git_identity` lives in the consumer identity layer and commits are made by the agent inside the sandbox, so there is no single harness chokepoint — this needs prompt-skeleton / identity-layer design (CLAUDE.md 2c: prompt files are design work). Scope it deliberately. ## Out of scope (both here and in #200) Retiring the `limit-lib.sh` repo-level-token prohibition — that re-enablement is #199's human ruling. _Filed from the #200 implementation run (sandcastle worker)._
Author
Member

Closing as a duplicate. #200 landed on main (commit 46be540) with a different implementation that ALREADY updated tui/data/limits.py to glob the fp-keyed markers; the fleet-tui sampler was handled by #224 (closed), and the Factory-Account: commit trailer is already tracked by #223 (ready-for-session). This follow-up was filed from a stale claim of #200 before I saw the concurrent landing — nothing here is outstanding.

Filed and closed by the duplicate #200 run (claim race).

Closing as a duplicate. #200 landed on main (commit 46be540) with a different implementation that ALREADY updated `tui/data/limits.py` to glob the fp-keyed markers; the `fleet-tui` sampler was handled by #224 (closed), and the `Factory-Account:` commit trailer is already tracked by #223 (ready-for-session). This follow-up was filed from a stale claim of #200 before I saw the concurrent landing — nothing here is outstanding. _Filed and closed by the duplicate #200 run (claim race)._
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/dev-factory#226
No description provided.