---
id: TASK-6.2
title: Add tests for CLI `--` args ordering and phases
status: Done
assignee:
  - codex
created_date: '2026-02-03 14:30'
updated_date: '2026-02-03 14:38'
labels: []
dependencies: []
parent_task_id: TASK-6
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Extend tests to cover CLI additional args and verify concatenation order with global/profile config across conf/build/flash/run.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 Tests cover CLI-only `--` args for each phase.
- [x] #2 Tests cover combined global + profile + CLI args and ordering.
- [x] #3 Tests cover both string/list config inputs alongside CLI args.
<!-- AC:END -->

## Implementation Plan

<!-- SECTION:PLAN:BEGIN -->
1. Add manager_spec cases that set config[''] to simulate CLI `--` args and assert the command arrays.
2. Cover CLI-only args for conf/build/flash/run.
3. Add combined cases verifying order: global config args -> profile config args -> CLI args, including string/list config inputs.
<!-- SECTION:PLAN:END -->

## Implementation Notes

<!-- SECTION:NOTES:BEGIN -->
Added manager_spec cases for CLI-only `--` args across conf/build/flash/run and combined ordering with global/profile args. Ran `busted spec/api_spec/manager_spec.lua` (21/0/0/0).
<!-- SECTION:NOTES:END -->
