fix(cli): temporarily disable the --endpoint-url global flag - #2350
Conversation
The --endpoint-url override behaved inconsistently across commands. Unregister it as a global flag so it is rejected as an unknown option, rather than deleting the mechanism: EndpointKey, its coreOptsFromCtx threading, and the runtime-shell guard stay defined, so re-enabling is adding the flag back to root.groupFlags. Update the shell/gateway-invoke/memory tests that exercised the flag to reflect it being disabled.
|
Claude Security Review: no high-confidence findings. (run) |
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Changes requested
The code changes are clean and the rationale (temporarily disable --endpoint-url while keeping EndpointKey plumbing intact for easy re-enable) is well-documented in the code comments. However, user-facing docs still advertise the flag:
README.mdline 244 – The "Global flags" table still lists--endpoint-urlas a supported global flag. Users following the README will hit an "unknown option '--endpoint-url'" error. Please remove this row (or annotate it as temporarily unavailable).README.mdline 796–797 – The Runtime Shell section notes that shell "does not support--jsonor--endpoint-url". With the flag now globally rejected, this callout should be dropped or rephrased so it doesn't imply the flag is otherwise available.
(command.md also mentions it, but that file is auto-generated by scripts/generate-command-reference.mjs at release time, so no manual edit needed there.)
Non-blocking observation, mentioned only for awareness: the defensive endpointUrl !== undefined check in src/handlers/runtime/shell/operation.ts (lines 28–30) is now unreachable via the CLI, and the updated test in shell.test.tsx no longer exercises it. That's fine as defense-in-depth for programmatic callers / re-enable, and matches the "keep plumbing defined" intent — just noting it in case you'd rather drop the dead check.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #2350 +/- ##
============================================
- Coverage 97.26% 97.26% -0.01%
============================================
Files 610 610
Lines 40590 40590
============================================
- Hits 39480 39479 -1
- Misses 1110 1111 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Why
--endpoint-urlbehaved inconsistently across commands (bug-bash finding #5). Disable it for now rather than ripping out the mechanism.What
EndpointKeyfromroot.groupFlags(...)(one line).--endpoint-urlis now rejected as an unknown option.groupFlags):EndpointKeydefinition,coreOptsFromCtxthreading, the runtime-shell guard, and the internalendpointUrloption (still used by tests to point Core at mock endpoints).Tests
runtime/shell: now asserts--endpoint-urlis rejected as an unknown option.gateway/invoke+memory event get: dropped the--endpoint-urlarg + its threaded-option assertion.