feat(controller-peers-env-fallback): read XCE_CONTROLLER_PEERS ahead of XCEADMIN_CONTROLLER in every --controller option (task 4.2)

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

View file

@ -79,7 +79,7 @@
- _Requirements: 2.2, 2.8_
- _Boundary: xceadmin discovery and errors_
- [ ] 4.2 (P) Read the new variable ahead of the legacy one in every `--controller` option
- [x] 4.2 (P) Read the new variable ahead of the legacy one in every `--controller` option
- Write the failing CLI tests first: the variable alone; both variables set (new one wins); explicit `--controller` overriding both; neither set (built-in default); each option's `--help` naming both variables
- Add `monkeypatch.delenv` for the new variable to every existing test that asserts legacy-variable or no-variable behavior, so ambient state cannot affect them
- Make the shared env-var setting an ordered list (new variable first, legacy second) and rewrite each option's help string and the precedence comment, since the help strings interpolate the setting today