feat: aggregate all authenticated GitHub hosts - #8
Draft
tensorcopy wants to merge 6 commits into
Draft
tensorcopy wants to merge 6 commits into
tensorcopy wants to merge 6 commits into
Conversation
- the lock still said 0.5.0 while package.json says 1.0.1
- a shared budget went to whichever relation held the newest items, so a full review queue pushed the viewer's own work off the board
- nodes(ids:) caps at 100 ids; ask in batches of that size so a longer board keeps its checks
- match the pull request each active or retained workspace tracks to the first agent created there, the originating conversation - an action on the row and in the panel jumps straight to that chat
- resolve the hostname from GH_HOST or the plugin's settings file and set it on every gh subprocess
- gh auth status names every authenticated host and its active account - item ids carry their host, so reads and actions reach the host that owns the item - the sweep unions every host's columns and keeps each host's failure in the column error
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.
Why. The board served one GitHub host with one account. A GitHub Enterprise login meant a second board or a hand-set
GH_HOST, and a read or action had no way to reach the host an item actually came from.What.
gh auth status --json hostsnames every authenticated host and its active account; the sweep queries them all at once and unions their columns, keeping each host's failure in the column error rather than failing the board.ghcall against the host that owns the item. Calls outside any item's context useGH_HOSTfrom the daemon environment.gh auth statusexits non-zero when any one host has a problem, so its stdout is parsed first and the failure honoured only when the stdout says nothing usable.How.
server/github/host.tsdiscovers and caches the accounts (single-flight, five minutes);server/github/item-id.tsencodeshost\u0000nodeIdandwithItemIdruns a handler inside that host's context throughAsyncLocalStorage;server/board/handler.tssweeps each account and merges the columns. No host is named in code — the set comes fromghitself.Test.
host.test.tsanditem-id.test.tscover the account parsing and the id encoding, with generic fixtures (ghe.example.com,octocat). Typecheck and the suite pass at this point in the stack: 61 tests.