feat: Add CLI subcommands for AI-native test operations (v4.0.0)#3
Merged
feat: Add CLI subcommands for AI-native test operations (v4.0.0)#3
Conversation
Phase 1-3 of CLI-first architecture: expose platform test operations
as lean CLI subcommands, reducing AI context overhead by ~90%.
New subcommands:
- qmax test (cases, scripts, run, generate, status)
- qmax crawl (start, status, results, jobs)
- qmax repo (list, review, coverage, quality)
- qmax import (repo, doc)
- qmax pr (create)
- qmax sast (verify, install, scan, setup)
Also includes review fixes:
- Fix auth header in cmd_sast (X-API-Key → Authorization: Bearer)
- Use json.Number for Assignment IDs instead of interface{}
- Unify polling timeouts to 10 minutes across all commands
- Remove duplicate exec.CommandContext in test execution
- Add JSON decode error handling in SAST commands
- Add URL validation, test-type enum validation
- Configurable review suggestions via --max-suggestions/--scope
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Headless CI runner for GitHub Actions / CI pipelines: - Auth via --token flag or QMAX_TOKEN env var (no browser) - Runs all or selected scripts with --all/--script-ids - Polls until completion, generates markdown report - Writes GitHub Actions outputs and step summary - Exit 0 on pass, exit 1 on failure (quality gate) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ScriptID changed from interface{} to json.Number (a string type),
so nil is no longer valid — use empty string instead.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Suppress filepath.Walk return value (errcheck) - Remove ineffectual browser assignment (ineffassign) - Check fs.Parse return values in cmd_ci.go and cmd_crawl.go (errcheck) - Remove unnecessary fmt.Sprintf in cmd_ci.go (gosimple S1039) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix fs.Parse unchecked returns in cmd_import, cmd_pr, cmd_repo, cmd_sast, cmd_testing - Fix empty branch SA9003 in agent.go (restore browser default) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move activeTests cleanup defer to top of ExecuteTest (before early returns) - Use numeric IDs in test JSON fixtures (json.Number rejects quoted strings) - Fix execution_id test value to numeric Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Protect a.running reads/writes with a.mu mutex — heartbeatLoop reads it from a goroutine while Run() writes it on shutdown. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- .golangci.yml: pin linters matching CI (errcheck, gosimple, etc.) - Makefile: add lint, vet, test-race, check, setup-hooks targets - scripts/pre-commit: runs build + vet + lint before each commit - Install with: make setup-hooks Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test,crawl,repo,import,pr,sastNew Commands
Test plan
go build ./...compiles cleanqmax test cases --project-id <id>returns test casesqmax crawl start --project-id <id> --url <url>starts a crawlqmax sast verifychecks local tools--test-type invalidis rejected with enum error🤖 Generated with Claude Code