myxce/.kiro/specs/xce-test-cli-ux
Rongsong Shen c709eba813
feat(xce-test-cli-ux): add in-session source command with cycle detection
cmd_source reuses rcfile_load() unmodified for line execution, adding
an explicit missing-file check (bypassing rcfile_load's silent-missing
policy, which is correct for its one existing startup-rc-file caller
but wrong for an explicit user command) and a realpath()-canonicalized
in-flight path stack that rejects direct or transitive cycles instead
of hanging. Registered in all four command contexts. Translates
rcfile_load's raw positive "aborted" return to -1 so an enclosing
source line correctly sees a transitively-aborted nested source as
failure, not success (preprocess_and_run only treats negative returns
as failure). Proven via real fixture files driven through the black-box
pty harness: a genuine two-file mutual cycle, a missing path, and
ordered execution across a non-cyclic nested source. 1310/1310
controller suite passing (+3).

Task 2.4 of .kiro/specs/xce-test-cli-ux/tasks.md.
Requirements: 13.1, 13.2, 13.3, 13.4, 13.5, 13.6

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019jaMf9QEwpugH2W9KAuc7f
2026-09-09 14:25:37 +00:00
..
design.md feat(xce-test-cli-ux): add per-connection lock to interruptible-call adapter 2026-09-09 09:36:27 +00:00
requirements.md docs(xce-test-cli-ux): commit requirements/design/tasks spec-phase artifacts 2026-09-09 11:40:26 +00:00
research.md docs(xce-test-cli-ux): commit requirements/design/tasks spec-phase artifacts 2026-09-09 11:40:26 +00:00
spec.json docs(xce-test-cli-ux): commit requirements/design/tasks spec-phase artifacts 2026-09-09 11:40:26 +00:00
tasks.md feat(xce-test-cli-ux): add in-session source command with cycle detection 2026-09-09 14:25:37 +00:00