Skip to content

Act on the fleet-run feedback: thread wakes, rotation, handoffs, guards - #78

Merged
TiantianFlow merged 4 commits into
mainfrom
claude/project-thread-so28ot
Oct 22, 2026
Merged

TiantianFlow merged 4 commits into
mainfrom
claude/project-thread-so28ot

Conversation

@TiantianFlow

Copy link
Copy Markdown
Owner

Closes #69.

What changes

  • Room replies (1). foil post --re wakes only the seats that wrote a waking post in that thread and the seats its text names as @name. A new post still wakes every other alive seat. A decline, and a hand-written file without contract: room/v1, do not join a thread. No hard cap.
  • Rotation (2, 6). The pair list now rotates on a per-role count of spawns in the fleet, stored in the registry's new rotation record with the lists it counts for. A killed or archived seat still counts, every lead respawn takes the next entry, and an edited list (mapping or fleet overrides) starts again at its first entry. Resume does not advance it. The viewer's Rotation line marks the entry the next seat takes.
  • Model ids (7). Spawn and roster add/update print one warning line when a model is not in that harness's models, naming the ids it lists, and still launch or write it (there is no --force flag in the fixed command surface).
  • Reply to the operator (8). The lead, and only the lead, can foil send user. That mail lands in board/mail/user/ and nudges nothing. Outside the fleet, foil mail list lists that mailbox. The operator skill reads it at each check-in. --name user is refused.
  • Privacy and worktree guard (5). Each seat's git runs Foil's hooks, set through GIT_CONFIG_COUNT/KEY/VALUE in the seat's environment only. Nothing is written to the repository, its config, or its hooks (F7). In the project's repository, pre-commit refuses a commit outside the seat's worktree and staged lines that add a home directory path, the hostname, a non-noreply git email, or a token. pre-push scans each pushed commit that is on no remote (at most 200 per ref). Every client hook name passes through to the repository's own hook, found without Foil's variables. Other repositories a seat creates or tests get pass-through only.
  • Handoff (3). Skills only: a seat near a full context writes board/handoffs/<name>.md and mails the lead, which kills it and spawns a new seat from the file. The lead writes board/handoffs/lead.md and sends user, and the operator replaces the lead. Foil does not read context use.
  • Not done. Usage- or quota-aware rotation and per-harness usage display stay out of scope (requirements section 11, see auto detect plan usage and load balance #31). Item 4 was handled by Global settings (#66) #68.

docs/requirements.md (F3, F14, F21, F23, F30, F33, F38 info texts, new F40, sections 6, 7, 8, 11), the three skills, both READMEs, docs/architecture.md, and CHANGELOG.md are updated.

Verification

  • pytest -m "not e2e_live" without tests/test_view_browser.py: 563 passed. The browser tests were not run here because this container's Playwright Chromium build does not match the locked version. CI runs them.
  • ruff check . is clean.
  • New tests cover reply wakes and mentions, declines and hand-written files, rotation (lead respawn, edited list, killed seats), the model warning, the user mailbox and its authority, and the hooks against real git: refusals, chaining (including from a seat that spawned a seat), another repository, and false positives such as risk-assessment-... and a Signed-off-by trailer.
  • Not verified: a live-harness run, and an install from the branch into a fresh tool directory.
  • Three independent review rounds covered the code, privacy, and publish safety. The last round found nothing worth fixing. One known low item remains: two spawns of the same role at the same moment can read the same rotation count.

Generated by Claude Code

TiantianFlow and others added 3 commits October 22, 2026 01:41
A room reply wakes only the seats that wrote a waking post in that
thread and the seats it names as @name; a new post still wakes every
other alive seat. Rotation over a role's pair list now counts that
role's spawns in the fleet, stored in the registry's rotation record,
so each lead respawn takes the next entry and an edited list starts at
its first entry. Spawn and roster add/update warn when a model is not
in that harness's models. The lead can answer the human with
`foil send user`, read outside the fleet with `foil mail list`. Each
seat's git runs Foil's pre-commit and pre-push hooks, set only in the
seat's environment, which refuse a commit outside the seat's worktree
and private text in a commit or push, then run the repository's own
hooks. The skills describe a handoff file for a seat near a full
context.

Refs #69.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C1NdtWX7xJPttvLUXwm4Xk
…rough

Compute the repository's own hooks path at hook time without Foil's
GIT_CONFIG variables, so a seat spawned by the lead still chains them.
Run the checks only where the common dir is the project's, write a
pass-through hook for every client hook name, replace a hook only when
its text changed, anchor the token patterns, skip trailer lines for the
email check, and bound the push scan by the remote's old tip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C1NdtWX7xJPttvLUXwm4Xk
…ks race-free

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C1NdtWX7xJPttvLUXwm4Xk
@TiantianFlow TiantianFlow self-assigned this Oct 22, 2026
@TiantianFlow
TiantianFlow merged commit f3cf6a3 into main Oct 22, 2026
6 checks passed
@TiantianFlow
TiantianFlow deleted the claude/project-thread-so28ot branch October 22, 2026 02: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.

Feedback from a 9-role fleet run on 0.5: room wakes, round-robin, handoffs, privacy guard

1 participant