You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Hackathon] project list should validate pagination flags before auth/client setup #145
testsprite project list validates pagination flags after constructing the HTTP client. This makes local argument errors surface too late:
on a fresh/no-credentials machine, invalid --page-size / --max-items returns AUTH_REQUIRED (exit 3) instead of a local VALIDATION_ERROR (exit 5)
under --dry-run, the dry-run banner is emitted before the command rejects invalid pagination flags
The sibling testsprite test list path already validates pagination before client setup, so this appears to be a project-list ordering bug rather than a shared pagination-validator issue.
Expected: exits 5 with VALIDATION_ERROR for --page-size being a non-integer / invalid pagination flag.
Dry-run path:
node dist/index.js project list --page-size 1.5 --dry-run --output json
Actual stderr starts with:
[dry-run] sample response — not from the server
Then emits the validation error.
Expected: reject the invalid flag before dry-run client setup/banner, matching the test list behavior.
Why it matters
Local flag validation should be deterministic and should not depend on whether credentials are configured. This matters for scripts and agents that intentionally validate CLI invocations in fresh CI/dev environments before authentication is available.
Likely fix
Move validatePaginationFlags(...) before makeClient(...) in runList for src/commands/project.ts, and add regression coverage for both no-credentials and dry-run ordering.
Contributor info
Discord: JerryNee / jerry_nee
GitHub: JerryNee
I will wait for the TestSprite team to assign this issue before opening a PR.
I do not have permission to apply repository labels directly. Could a TestSprite maintainer please add the hackathon improvement/hackathon label and assign this issue to me if it is accepted for Track B?
Closing this and re-opening through the official Hackathon Improvement issue form so the repository template can apply the correct hackathon tracking labels.
Activity
JerryNee commentedon Jul 3, 2026
I do not have permission to apply repository labels directly. Could a TestSprite maintainer please add the hackathon improvement/hackathon label and assign this issue to me if it is accepted for Track B?
Discord: JerryNee / jerry_nee
GitHub: JerryNee
JerryNee commentedon Jul 3, 2026
Closing this and re-opening through the official Hackathon Improvement issue form so the repository template can apply the correct hackathon tracking labels.