You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: pod repository link, onboard, runs and sessions - #29
Repository onboarding is an agent run on a Pod (brainpodnl/brainpod#792). The CLI needs to link a repository to a Pod, start the onboarding run, and follow, answer, retry and reply to its runs and sessions, including the continuous-deploys pull request.
How
New Pod-scoped commands (all require --pod):
repo link OWNER/NAME: resolves the repository through GET /v1/github/repositories, then sends PUT /v1/pods/{pod}/repository. repo get shows the current link.
onboard [--ref]: POST /v1/pods/{pod}/agent-runs {agentKey: "repo-onboarding"}. It explains the brainpod/onboarding-<pod> branch, the GitHub Actions build, and the pull request whose merge turns on deploy-on-push.
runs list|get|cancel|retry|reply|answer: generic agent runs. answer validates against the run's open questions before resuming.
sessions list|get: the session's runs per step, open questions, and the continuous-deploys pull request with a hint for each state.
describe metadata and a README walkthrough (pod create → github repos → repo link → onboard → sessions get → merge the PR) are included.
Stacked on #28. Depends on brainpodnl/brainpod#793 and #796.
- `brainpod --pod X repo link OWNER/NAME` resolves the repository by exact case-insensitive fullName
through /v1/github/repositories and links it with PUT /v1/pods/{pod}/repository; an inaccessible
repository fails with the grant-access hints of `github repos`. `repo get` reads the link.
- `brainpod --pod X onboard [--ref]` starts the repo-onboarding agent run and points to `sessions get`.
- `brainpod --pod X runs list|get|cancel|retry|reply|answer`: reply generates its requestId;
answer takes one --answer QUESTION_ID=ANSWER per open question and checks them against the run.
- `brainpod --pod X sessions list|get`: runs per step, open questions, continuous-deploys PR status.
- describe metadata and tests for every new command path.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The paginated repository lookup lacks regression tests for a page-2 exact match and an exhausted listing, leaving page advancement and no-PUT behavior without coverage.
Extends the GitHub discovery commands from #28 with Pod-scoped repository onboarding and run/session management, taking users from linking a repository to enabling deploy-on-push.
Changes:
Adds repository linking, onboarding, run actions, and session inspection commands.
Adds readable output for run states, open questions, and continuous-deploys pull requests.
Updates command metadata and documentation, with tests for parsing, answer validation, and rendering.
File
Description
src/output.rs
Adds repository, onboarding, run, and session views with rendering tests.
src/describe.rs
Documents command requirements, effects, examples, and next steps.
src/cmd/mod.rs
Implements commands, repository lookup, answer validation, and unit tests.
README.md
Adds command reference entries and an onboarding walkthrough.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
On an unlinked Pod, replacing the underlying ApiError with anyhow! causes repo get --json to lose the API code, request ID, details, and HTTP status required by the JSON error contract.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Preserve API error metadata when adding the linking hint
src/cmd/mod.rs:1088
On an unlinked Pod, replacing the API error with anyhow! makes repo get --json emit CLI_ERROR instead of preserving the API's code, request ID, details, and HTTP status. src/main.rs:258–270 retrieves these from the underlying ApiError, as required by the JSON error contract in README.md:166. Attach the linking hint with error.context(...) so that cause remains available.
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
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
Repository onboarding is an agent run on a Pod (brainpodnl/brainpod#792). The CLI needs to link a repository to a Pod, start the onboarding run, and follow, answer, retry and reply to its runs and sessions, including the continuous-deploys pull request.
How
New Pod-scoped commands (all require
--pod):repo link OWNER/NAME: resolves the repository throughGET /v1/github/repositories, then sendsPUT /v1/pods/{pod}/repository.repo getshows the current link.onboard [--ref]:POST /v1/pods/{pod}/agent-runs {agentKey: "repo-onboarding"}. It explains thebrainpod/onboarding-<pod>branch, the GitHub Actions build, and the pull request whose merge turns on deploy-on-push.runs list|get|cancel|retry|reply|answer: generic agent runs.answervalidates against the run's open questions before resuming.sessions list|get: the session's runs per step, open questions, and the continuous-deploys pull request with a hint for each state.describemetadata and a README walkthrough (pod create → github repos → repo link → onboard → sessions get → merge the PR) are included.Stacked on #28. Depends on brainpodnl/brainpod#793 and #796.