feat(controller-peers-env-fallback): name the environment source in xceadmin's controller errors (task 4.3)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-10-03 07:57:00 +00:00
parent bdfa6051c7
commit 148507980b
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
3 changed files with 270 additions and 6 deletions

View file

@ -87,7 +87,7 @@
- _Requirements: 2.1, 2.4, 2.5, 2.6, 2.7, 4.3_
- _Boundary: xceadmin CLI_
- [ ] 4.3 Name the environment source in xceadmin's controller errors
- [x] 4.3 Name the environment source in xceadmin's controller errors
- Write the failing CLI tests first: in-order failover over an env-derived named list (patching the per-candidate request so the first fails and the second answers); unreachable values from each variable and from an explicit `--controller` (source note only for the two variables); a missing cluster-bin file with the variable set (no source note); a malformed entry from an explicit `--controller` and from the variable (entry quoted, note only for the variable). Use `config push` with a real cluster-bin file, or patch out the record commands' retry pause
- Add a helper that returns "(from $NAME)" when the value came from the environment, using the same first-non-empty rule click applies
- Append it to the "cannot connect" messages only for network errors (not local file errors), and to the controller-reachability and controller-value errors in the existing handlers; leave other errors unchanged