Repository navigation
Add a global organization flag to CLI commands - #1024
Conversation
Allow build list, build view, and other organization-scoped commands to select an organization for one invocation without changing saved defaults. Use the existing organization-specific credential selection and preserve command-specific authentication and pipeline behavior. Keep temporary pipeline discoveries out of saved configuration and make explicit organization switches persist independently of the override. Cover precedence, credentials, persistence, and flag compatibility. Resolves PB-2563 Amp-Thread-ID: T-e2c85e09-760b-48dd-9382-cdc2132f076c
There was a problem hiding this comment.
No blocking findings. I’m leaving approval to a human because this changes organization-specific credential routing across authentication and secret commands.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 38215, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
About buildsworth
Model: gpt-6.1-sol with xhigh thinking.
How to request a review: Comment @buildsworth-bk review on the PR, or request buildsworth-bk as a reviewer.
Risk labels (how buildsworth classifies risk) — buildsworth classifies risk itself from the diff. Unless repository policy already allows L2 approval, grant it by mentioning @buildsworth-bk (see approval ceiling and L2 approval grant):
- L1 — Low risk (dep bumps, docs/copy, lockfiles, small presentational fixes). buildsworth may approve by default.
- L2 — Standard risk (new UI, additive API fields, refactors). Approved only when repository policy or a verified grant allows it; otherwise comment-only.
- L3 — High risk (auth, migrations, payments, secrets, perf-critical pipeline paths). Human approval required unless repository policy explicitly allows L3 approval; per-PR grants cannot allow it.
scadu
left a comment
There was a problem hiding this comment.
One blocker: --org still reads pipelines cached for the saved org. Also, --org and org/pipeline win in a different order depending on the command, see inline.
Keep cached pipeline names scoped to the saved organization so a one-off organization cannot reinterpret them as a different target. Reject disagreements between --org and qualified source targets before execution. Leave cross-organization pipeline copy destinations intact. Cover matching and conflicting targets, cache boundaries, and repository rediscovery in regression tests. Amp-Thread-ID: https://ampcode.com/threads/T-e2c85e09-760b-48dd-9382-cdc2132f076c
There was a problem hiding this comment.
No new actionable findings. I’m still leaving approval to a human because this changes organization-specific credential routing across authentication and secret commands.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 38226, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
A valid build number needs a pipeline before it can be resolved. Keep pipeline lookup errors instead of reporting the build input as invalid, and include the effective organization and a --pipeline hint. Cover empty repository discovery under an overridden organization, underlying error identity, and unchanged invalid-input behavior. Amp-Thread-ID: https://ampcode.com/threads/T-e2c85e09-760b-48dd-9382-cdc2132f076c
There was a problem hiding this comment.
No new actionable findings. Approval still needs a human because --org changes organization-specific credential routing through authentication and secret commands.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 38228, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
Description
Build list and view currently rely on the selected organization, making multi-organization use awkward for scripts and agents. Add a global
--orgflag so callers can select an organization for one invocation without editing configuration:Resolves PB-2563.
Changes
--orgabove environment and saved defaults for all organization-scoped commands, using the selected organization's credentials. Explicit API environment tokens retain precedence.--organd qualified pipeline/build source targets before execution. Cross-organizationpipeline copy --targetdestinations remain independent.--pipelinehint instead of an invalid-input error.Testing
go test ./...throughmise run test, with injected API token/organization variables unset as in CI).mise run format, using gofumpt).mise run lint: 0 issues.