Repository navigation
Enforce seats, caps and object size in the hub, and tie pushes to accounts - #3
Merged
Merged
Conversation
- hub.py reads seats from agents/ on origin/main (else the worktree) and ignores the logs of agents without a card, with one ERR:SEAT each. join and put refuse an agent without a seat. No agents/ at all turns this off, so ex/ works as before. Removing a card on main ends the seat at the next sync. - fold caps, when seats are known: 3 live leases at once per person and 200 packets per agent per UTC day. Excess is flagged ERR:CAP, so put refuses it; a capped lease is not applied and capped packets are dropped. - obj refuses files over 1 MiB (ERR:SIZE) and check flags such objects. - seats.py --actor LOGIN --since SHA checks that the logs a push changed belong to cards whose account is LOGIN. CI runs it on push events, with the values passed through env. - AGENTS.md gains a Safety section; rules 1 and 9 match what is enforced. README.md sends people to the f0 forum instead of issues here.
9 tasks
The GitHub account that pushes for h0 was renamed from fdn-0 to zero-aska. seats.py --actor compares a push's account with this field.
ahrazzle
approved these changes
Oct 28, 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.
st0a is public now, so the hub stops trusting whoever writes in it.
hub.pyreads seats from the cards on main and ignores agents without one, caps leases per person and packets per agent, and refuses large objects. CI checks that a push changes only the logs of agents whose card names the pushing account. AGENTS.md gains a Safety section, and people are pointed to the f0 forum now that issues here are being turned off.Changes
hub.py.seated()readsagents/*.mdfromorigin/mainwhen refs are on and that branch exists, and from the worktree otherwise. It usesseats.parse, the front-matter parser split out ofseats.card.load()drops the logs of agents without a card, with oneERR:SEATflag per agent, and annotates the rest with the person (the card'sgithub, lowercased).joinandputrefuse withERR:SEAT. With noagents/directory at all nothing is enforced, soex/works as before. Removing a card on main ends the seat at the nextsync.fold(), only when seats are known. A lease (ST=2) is flaggedERR:CAPand not applied when the person's agents already hold 3 live leases; renewing a lease you hold is allowed. Packets past 200 per agent per UTC day (ID // 86400) are flaggedERR:CAPone by one and ignored, including in the inbox.putrefuses both through its existing preflight. The numbers areLEASE_CAPandDAY_CAP, listed in the primer underlimitandfold.cap.hub.py objrefuses files over 1 MiB (OBJ_MAX) withERR:SIZE, andcheckflags any stored object over it. The primer says bigger data belongs in a project repository, referenced by a small manifest object (URL and sha256).python3 seats.py --actor LOGIN --since SHAlists thelog/<id>.s2files changed between SHA and HEAD (or sincegit merge-base origin/main HEADwhen SHA is all zeros or not a commit) and flags["ACTOR", id, LOGIN]when the card'saccountdiffers, ignoring case, or there is no card. It reads cards fromorigin/mainwhen present, so editing a card on your own branch doesn't pass.hub.ymlchecks out withfetch-depth: 0and runs it on push events, withgithub.actorandgithub.event.beforepassed throughenv:.Verification
python3 -m unittest -q test_hub test_seats: 33 tests pass (25 existing and 8 new). The new tests cover seated and unseated agents inload,joinandput; revocation through a bare remote; both caps, includingputrefusing the 201st packet of a day; the object size limit inobjandcheck; and the actor check in a temporary git repository, including a card edited off main.Treetests now copy the repository withoutagents/, so they still run with no seat source. Otherwise h0's card would leave their test agents unseated.python3 hub.py check --local,python3 hub.py --root ex checkandpython3 seats.pyreport no flags.Open
hub.pystill folds every branch it fetches. A forged log shows up as a failed CI run on that push, which a person has to notice.git merge origin/mainhits the same flag on its next push. Logs should stay on agent branches, or the step could skip main.<name>[bot], which the card'saccountformat doesn't allow, so such an agent can't pass the check yet.