Skip to content

ci: add test suite, remove dormant workflows, add auto-merge#13

Merged
govindkavaturi-art merged 1 commit into
mainfrom
ci/fix-cueapi-cli-pipeline
Apr 4, 2026
Merged

ci: add test suite, remove dormant workflows, add auto-merge#13
govindkavaturi-art merged 1 commit into
mainfrom
ci/fix-cueapi-cli-pipeline

Conversation

@govindkavaturi-art
Copy link
Copy Markdown
Member

Summary

  • Add tests/test_cli.py — 12 unit tests covering all CLI commands via Click CliRunner
  • Delete staging-deploy.yml — CLI doesn't deploy anywhere
  • Delete argus-qa.yml — not needed without staging deploy
  • Update cli-test.yml — now runs pytest tests/ instead of just --help/--version
  • Add feature-to-main.yml — pytest → auto-merge → CueAPI merge confirmation cue

Tests added

Test What it checks
test_version --version returns version string
test_help --help lists all commands
test_login_help login --help works
test_create_help create --help shows --name and --url
test_list_help list --help works
test_get_help get --help works
test_pause_help pause --help works
test_resume_help resume --help works
test_delete_help delete --help works
test_whoami_help whoami --help works
test_usage_help usage --help works
test_quickstart_help quickstart --help works

All tests pass locally (12/12, 0.17s).

Also applied via API

  • Branch protection: PR + 1 review, enforce_admins=true, required check: test
  • Secrets added: GOVIND_GITHUB_TOKEN, ARGUS_CUEAPI_KEY

🤖 Generated with Claude Code

- Add tests/test_cli.py: 12 unit tests using Click CliRunner covering
  all 16 commands (--version, --help, and help for each subcommand)
- Delete staging-deploy.yml (CLI doesn't deploy anywhere)
- Delete argus-qa.yml (not needed without staging deploy)
- Update cli-test.yml to run pytest instead of just --help/--version
- Add feature-to-main.yml: pytest → auto-merge → CueAPI merge cue

Also via API:
- Branch protection: PR + 1 review, enforce_admins, required check: test
- Secrets added: GOVIND_GITHUB_TOKEN, ARGUS_CUEAPI_KEY

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@govindkavaturi-art govindkavaturi-art merged commit 3a36788 into main Apr 4, 2026
3 of 4 checks passed
mikemolinet added a commit that referenced this pull request May 10, 2026
…es send + --notify to message-to (#49)

Closes the cli-side coverage gap that was blocking action ports for
--mode and --notify on `messages send`.

## --notify (hosted PR #619, §17 BCC-light)

Both `messages send` and `message-to` now accept `--notify <agent_ref>`
(repeatable, max 10). Each ref gets a stripped notification copy
alongside the main delivery, sharing thread_id. Server contract:
MessageCreate.notify (List[str], max-10, app/schemas/message.py).

CLI enforces the max-10 cap client-side via UsageError so the failure
surfaces at parse time instead of as a server 422.

## --mode parity for messages send

cueapi-cli #41 added `--mode` to `message-to` (Surface 6 v2
delivery_mode) but `messages send` was left without it — a
cross-product gap surfaced when porting cueapi-action #12 (action
couldn't wire --mode through messages-send). Mirroring the existing
shape from `message-to`:

- click.Choice(["live","bg","inbox","webhook","auto"]), default "auto"
- Default-omit: only emit `delivery_mode` on the wire when caller
  opts away from `auto`. Server treats absent === auto, so the wire
  format stays identical to pre-Surface-6 senders for the common path.

Pinned in regression-guard tests so explicit `--mode auto` is also
omitted (not just default omission).

## Wire format

Both fields are body fields on POST /v1/messages:
- `notify`: List[str], default omit when empty
- `delivery_mode`: enum, default omit when "auto"

Different from `idempotency_key` (header) and `from_agent`
(X-Cueapi-From-Agent header). Verify-server-transport-per-endpoint
discipline applied.

## Tests

8 new tests:
- messages_send_notify_passed_as_body_list
- messages_send_notify_omitted_when_unset
- messages_send_notify_max_10_enforced_client_side
- messages_send_mode_default_omitted
- messages_send_mode_explicit_passed_through (live/bg/inbox/webhook)
- messages_send_mode_auto_explicitly_omitted
- message_to_notify_passed_as_body_list
- message_to_notify_omitted_when_unset

179/179 pass total.

## Why now

This unblocks 2 follow-on cueapi-action ports:
- action `messages-send` --notify wire-through
- action `messages-send` --mode wire-through (reusing existing `mode`
  input from PR #13 which already wires it for `message-to`)

Will chain a small action follow-up PR after this lands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants