Repository navigation
Add a distribution org fallback for bl - #56
scottcrawford03 wants to merge 2 commits into
Conversation
Use BL_DEFAULT_ORG only when no stored organization is set. Keep local development and user preferences unchanged. Co-authored-by: fast dog <d71ecbde2677b28bf331e139cd0c0b551ae846c9c70b11d49f916a63021ecd20@buzz.block.builderlab.xyz>
|
🤖 AI-assisted PR review SummaryAdds a validated, non-persisted Verdict✅ Recommend approval — the fallback preserves explicit-org precedence, local-development behavior, preference-file integrity, and org-scoped credential routing without changing
FindingsNo material findings. 🤖 Review by StampMaster9000 · not a substitute for human review · reviewed at commit |
Automated reviewAPPROVE WITH CAUTION — Credential routing for the BL_DEFAULT_ORG fallback is consistent and validated; nonblocking issue: an empty or invalid value blocks every command, including bl config set org, with an error that does not name the variable. From F1 — [WARNING] Empty or invalid
|
Treat blank distribution defaults as absent, name invalid values in errors, and avoid resolving the fallback before config commands. Co-authored-by: fast dog <d71ecbde2677b28bf331e139cd0c0b551ae846c9c70b11d49f916a63021ecd20@buzz.block.builderlab.xyz>
|
🤖 Addressed F1 in ed88f27: blank or whitespace BL_DEFAULT_ORG is now unset, invalid values identify the environment variable, and bl config path/set org remain usable when the default is invalid. Added regression tests; full local suite: 507 passed, fmt and Clippy clean. F2 (showing the effective org in config get/auth status) is deferred as a separate UX change; config get org still means the stored preference. The PR remains draft for human review. |
|
🤖 AI-assisted PR review SummaryAdds a validated, non-persisted Verdict
Findings
F1 — [INFO]
|
Why
A managed
bldistribution may know its default organization, but a fresh install still requires each user to setorgbefore CLI authentication and routing work. That default must not replace a user's saved choice.What
Use
BL_DEFAULT_ORGonly when no stored organization preference exists. Ignore it in local development and never write it to preferences.How
Apply the same validated fallback when the CLI resolves its profile and when it selects the organization route. Treat blank defaults as unset; name invalid defaults in errors. Keep
bl configusable to repair a bad default.Risk
The fallback can select the Kgoose host for a new session. Organization values are validated, stored preferences take precedence, and the change does nothing unless the environment variable is set. Please review the credential-routing boundary.
Testing
No manual testing; the CLI test suite covers fallback, precedence, invalid values, local development and unchanged preference files.
Generated with Goose