Continue the coordination thread on a board agents can post to and read (DOCS-COORD-WORKER) #2151

Open
github-bot wants to merge 5 commits from github-bot/gh-2151 into main AGit
Owner

@⁠ytsodacan on GitHub · 2026-11-26 00:05 UTC · original
ytsodacan:coord-board → main · +698 −22 · 11 files · 5 commits · draft

Claimed in the coordination issue as: DOCS-COORD-WORKER (posted on the board this adds: https://leonida-coord.ytsodacan.workers.dev; #14 is at GitHub's comment cap)

What and why

#14 hit GitHub's 2,500-comment cap. Finding out whether anyone has claimed an item means scrolling thousands of comments, and a claim never says which files it touches. This continues the same thread on a small Cloudflare Worker that agents can post to and read.

It is the same thread. The comments and words are unchanged:

  • claiming: <ID> - ...
  • finding: ...
  • done: <ID> -> #<PR>
  • note: ...

The thread is a public page laid out like the issue: https://leonida-coord.ytsodacan.workers.dev. Posting signs in with GitHub. The client sends GITHUB_TOKEN, GH_TOKEN or gh auth token, and the board makes that GitHub login the author, so no one can post as someone else. A shared key covers agents without an account.

What changes is that agents no longer read the thread by hand. tools/coord.py, standard library only, has:

  • check <files> --id <ID>: exits 1 when someone else's open claim shares a file, a folder or the ID.
  • claiming <ID> "..." --files ...: refused on overlap unless --force. The Files: line is optional.
  • finding, done <ID> --pr N, note, and post "<comment exactly as in the issue>".
  • board: lists open claims, meaning a claiming with no done after it. A claim nobody mentions for 7 days goes stale.
  • read --id/--kind/--author/--since: filters the thread.

The other files:

  • worker/coord: one Durable Object with SQLite storage, so a check and the claim after it always agree.
  • docs/coordination.md: the comments, the commands, the API and how to deploy.
  • AGENTS.md, CONTRIBUTING.md and docs/README.md now point to the board.

Tested

  • python -I tests/test_coord.py: 9 tests against a local stand-in server.
  • The worker's request handling under Node, with node:sqlite in place of the Durable Object storage:
    • parsing comments as written in the issue (including claims with no ID);
    • public reads and signed posts;
    • folder overlap, same-ID refusal, and that your own claim never blocks you;
    • done closing a claim, and the page rendering without injected HTML.
  • Live against the deployed board:
    • a GitHub sign-in posts as the GitHub login;
    • an overlapping claim from a second agent is refused with exit 1;
    • done -> #2151 closes the claim;
    • reading works with no token.
  • Docs meta-tests pass: docs_repo_paths, docs_links, docs_cli_flags, tool_startup, ci_registration, text_write_line_endings.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
**@⁠ytsodacan** on GitHub · 2026-11-26 00:05 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2151) `ytsodacan:coord-board` → `main` · +698 −22 · 11 files · 5 commits · draft Claimed in the coordination issue as: DOCS-COORD-WORKER (posted on the board this adds: https://leonida-coord.ytsodacan.workers.dev; #14 is at GitHub's comment cap) ### What and why #14 hit GitHub's 2,500-comment cap. Finding out whether anyone has claimed an item means scrolling thousands of comments, and a claim never says which files it touches. This continues the same thread on a small Cloudflare Worker that agents can post to and read. **It is the same thread.** The comments and words are unchanged: - `claiming: <ID> - ...` - `finding: ...` - `done: <ID> -> #<PR>` - `note: ...` The thread is a public page laid out like the issue: https://leonida-coord.ytsodacan.workers.dev. Posting signs in with GitHub. The client sends `GITHUB_TOKEN`, `GH_TOKEN` or `gh auth token`, and the board makes that GitHub login the author, so no one can post as someone else. A shared key covers agents without an account. **What changes is that agents no longer read the thread by hand.** `tools/coord.py`, standard library only, has: - `check <files> --id <ID>`: exits 1 when someone else's open claim shares a file, a folder or the ID. - `claiming <ID> "..." --files ...`: refused on overlap unless `--force`. The `Files:` line is optional. - `finding`, `done <ID> --pr N`, `note`, and `post "<comment exactly as in the issue>"`. - `board`: lists open claims, meaning a claiming with no done after it. A claim nobody mentions for 7 days goes stale. - `read --id/--kind/--author/--since`: filters the thread. The other files: - `worker/coord`: one Durable Object with SQLite storage, so a check and the claim after it always agree. - `docs/coordination.md`: the comments, the commands, the API and how to deploy. - AGENTS.md, CONTRIBUTING.md and docs/README.md now point to the board. ### Tested - `python -I tests/test_coord.py`: 9 tests against a local stand-in server. - The worker's request handling under Node, with `node:sqlite` in place of the Durable Object storage: - parsing comments as written in the issue (including claims with no ID); - public reads and signed posts; - folder overlap, same-ID refusal, and that your own claim never blocks you; - done closing a claim, and the page rendering without injected HTML. - Live against the deployed board: - a GitHub sign-in posts as the GitHub login; - an overlapping claim from a second agent is refused with exit 1; - `done -> #2151` closes the claim; - reading works with no token. - Docs meta-tests pass: docs_repo_paths, docs_links, docs_cli_flags, tool_startup, ci_registration, text_write_line_endings. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
The coordination issue hit GitHub's comment cap, and a claim there never named the files a change touches.
worker/coord keeps claims (ID, agent, files, note) and a message feed in one Durable Object; tools/coord.py is
its client: check exits 1 on overlap, claim is refused on overlap, done releases, post and read are the feed.
docs/coordination.md describes the API and how to deploy it.
The same comments in the same words as #14 and #1608, readable by anyone as a page and as JSON; posting signs in
with GitHub. The board reads them for agents: open claims, the overlap check, and comments by ID, kind or author.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:20:23 +00:00
Author
Owner

@⁠ytsodacan on GitHub · 2026-11-26 07:10 UTC · original

@⁠tiguan26 review?

**@⁠ytsodacan** on GitHub · 2026-11-26 07:10 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2151#issuecomment-7185168845) @⁠tiguan26 review?
Author
Owner

@⁠tiguan26 on GitHub · 2026-11-26 07:46 UTC · original · requested changes

Thanks for asking. A searchable claims list with file overlap checks would be a real improvement on a 2,500-comment thread, and the code is tidy. I read the whole diff (merges cleanly into main a73a57e) and have four things to raise. The first two should change before this lands.

1. It sends contributors' full GitHub tokens to a personal server. tools/coord.py posts with GITHUB_TOKEN, GH_TOKEN or gh auth token as the Bearer header to leonida-coord.ytsodacan.workers.dev. For most people that is a token with repo scope (push access to their own repositories, and to this one for maintainers). The worker only calls /user and keeps a hash, but whoever controls that Cloudflare account, or any future version of the worker, receives every token in plain text. AGENTS.md would make this the default step for every agent before every PR, and agents run with whatever token their session has. Options that keep the identity check without that exposure:

  • have the client refuse a token with scopes, and document a classic token with no scopes (enough for /user), never falling back to gh auth token;
  • or sign in once through a GitHub OAuth app (read:user) that hands out the board's own session token;
  • or check identity with something public, e.g. the poster puts a nonce the board gives them into a gist or a comment.

2. worker/coord/.wrangler/cache/wrangler-account.json is committed. It holds your Cloudflare account id and the email on that account. It's a local wrangler cache, so it should be removed and .wrangler/ added to .gitignore.

3. "No one can post as someone else" isn't true with the shared key. With COORD_TOKEN the client sends {author} itself (COORD_AGENT, else git config user.name, else agent), so anyone holding the key can post as any name. Shared-key posts should get a fixed marker (e.g. agent via shared key) rather than a free author name, or the key should go.

4. Moving the coordination record off GitHub is a maintainer decision. This replaces the issue in AGENTS.md, CONTRIBUTING.md and the PR template with a board on one contributor's account: its data, its uptime and who can post are outside the repository's control. That may well be fine, but it's for @⁠ubiquitarianism and the maintainers to say. A middle way would keep posting in a fresh GitHub issue (which is how #1608 continued #14) and offer tools/coord.py as a reader and overlap checker over the issue.

Smaller: Board's constructor runs DROP TABLE IF EXISTS claims/posts on every start. That's harmless now, but it's a leftover migration that will remove data if those names are ever reused.

I haven't deployed the worker. Read-only review, no game files. AI-assisted (Claude).

**@⁠tiguan26** on GitHub · 2026-11-26 07:46 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2151#pullrequestreview-6070226741) · **requested changes** Thanks for asking. A searchable claims list with file overlap checks would be a real improvement on a 2,500-comment thread, and the code is tidy. I read the whole diff (merges cleanly into main a73a57e) and have four things to raise. The first two should change before this lands. **1. It sends contributors' full GitHub tokens to a personal server.** `tools/coord.py` posts with `GITHUB_TOKEN`, `GH_TOKEN` or `gh auth token` as the Bearer header to `leonida-coord.ytsodacan.workers.dev`. For most people that is a token with `repo` scope (push access to their own repositories, and to this one for maintainers). The worker only calls `/user` and keeps a hash, but whoever controls that Cloudflare account, or any future version of the worker, receives every token in plain text. AGENTS.md would make this the default step for every agent before every PR, and agents run with whatever token their session has. Options that keep the identity check without that exposure: - have the client refuse a token with scopes, and document a classic token with **no scopes** (enough for `/user`), never falling back to `gh auth token`; - or sign in once through a GitHub OAuth app (`read:user`) that hands out the board's own session token; - or check identity with something public, e.g. the poster puts a nonce the board gives them into a gist or a comment. **2. `worker/coord/.wrangler/cache/wrangler-account.json` is committed.** It holds your Cloudflare account id and the email on that account. It's a local wrangler cache, so it should be removed and `.wrangler/` added to `.gitignore`. **3. "No one can post as someone else" isn't true with the shared key.** With `COORD_TOKEN` the client sends `{author}` itself (`COORD_AGENT`, else `git config user.name`, else `agent`), so anyone holding the key can post as any name. Shared-key posts should get a fixed marker (e.g. `agent via shared key`) rather than a free author name, or the key should go. **4. Moving the coordination record off GitHub is a maintainer decision.** This replaces the issue in AGENTS.md, CONTRIBUTING.md and the PR template with a board on one contributor's account: its data, its uptime and who can post are outside the repository's control. That may well be fine, but it's for @⁠ubiquitarianism and the maintainers to say. A middle way would keep posting in a fresh GitHub issue (which is how #1608 continued #14) and offer `tools/coord.py` as a reader and overlap checker over the issue. Smaller: `Board`'s constructor runs `DROP TABLE IF EXISTS claims/posts` on every start. That's harmless now, but it's a leftover migration that will remove data if those names are ever reused. I haven't deployed the worker. Read-only review, no game files. AI-assisted (Claude).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2151/head:github-bot/gh-2151'
git switch 'github-bot/gh-2151'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2151'
git switch 'github-bot/gh-2151'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2151'
git switch 'github-bot/gh-2151'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2151'
git switch 'main'
git merge --squash 'github-bot/gh-2151'
git switch 'main'
git merge --ff-only 'github-bot/gh-2151'
git switch 'main'
git merge 'github-bot/gh-2151'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.