Skip to content

Commit 18ecebf

Browse files
merge upstream/main into fix/credentials-write-lock
Resolve conflicts and align with latest main: - vitest.config: keep globalSetup + hermetic setupFiles + fileParallelism - credentials: guard lock release with ownership token check - cli.subprocess: drop unused execFileSync import after globalSetup Closes #109
2 parents 7e1d172 + 60d55e4 commit 18ecebf

99 files changed

Lines changed: 13700 additions & 1104 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coderabbit.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# CodeRabbit configuration — AI first-pass review on every PR.
2+
# Schema: https://docs.coderabbit.ai/reference/configuration
3+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
4+
5+
language: 'en-US'
6+
7+
reviews:
8+
profile: 'chill'
9+
request_changes_workflow: false
10+
high_level_summary: true
11+
poem: false
12+
review_status: true
13+
collapse_walkthrough: false
14+
15+
auto_review:
16+
enabled: true
17+
drafts: false
18+
base_branches:
19+
- 'main'
20+
21+
# Skip generated / vendored / noise paths.
22+
path_filters:
23+
- '!dist/**'
24+
- '!coverage/**'
25+
- '!**/*.snap'
26+
- '!package-lock.json'
27+
28+
path_instructions:
29+
- path: 'src/**'
30+
instructions: |
31+
This is a thin client CLI. Focus a review on:
32+
- Correctness and clear error handling.
33+
- Exit-code mapping: error paths must map to the documented exit code
34+
(see DOCUMENTATION.md / the exit-code table); don't introduce ad-hoc codes.
35+
- Output discipline: machine output goes to stdout (JSON-clean under
36+
--output json); human chatter, hints, and advisories go to stderr.
37+
- Dry-run parity: a new endpoint needs a matching canned sample in
38+
src/lib/dry-run/samples.ts (and its test) so --dry-run stays offline.
39+
- No secrets, internal endpoints, or hard-coded credentials.
40+
- path: 'test/**'
41+
instructions: |
42+
Tests must be deterministic and offline:
43+
- No real network and no real timers — inject fetch/sleep via the test deps.
44+
- Cover new behavior, including error and exit-code paths.
45+
- path: '.github/workflows/**'
46+
instructions: |
47+
Workflow review:
48+
- All third-party actions must be pinned to a full 40-char commit SHA.
49+
- Prefer least-privilege `permissions:` blocks; never use
50+
pull_request_target with a checkout of untrusted PR code.
51+
52+
tools:
53+
github-checks:
54+
enabled: true

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Check out all text files with LF on every platform. Tests compare bytes
2+
# from checked-out files (skill templates, snapshots); a CRLF working tree
3+
# (core.autocrlf on Windows) broke those comparisons.
4+
* text=auto eol=lf
5+
6+
*.png binary

.github/CODEOWNERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Code owners for testsprite-cli
2+
#
3+
# These owners are automatically requested for review on every pull request.
4+
# A single catch-all entry routes all PRs to the release operator; additional
5+
# rotating maintainers are appended here as they are named.
6+
#
7+
# Syntax: https://docs.github.com/articles/about-code-owners
8+
9+
* @zeshi-du @ruili-testsprite
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: 🐛 Bug report
2+
description: Report something that is broken or behaving unexpectedly in the CLI.
3+
title: 'bug: '
4+
labels: ['bug', 'needs-triage']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to file a bug! Please search
10+
[existing issues](https://github.com/TestSprite/testsprite-cli/issues)
11+
first to avoid duplicates.
12+
13+
For **questions or usage help**, please use
14+
[GitHub Discussions](https://github.com/TestSprite/testsprite-cli/discussions)
15+
or [Discord](https://discord.gg/W4JDrZfdB) instead — issues are for bugs
16+
and feature requests.
17+
- type: textarea
18+
id: what-happened
19+
attributes:
20+
label: What happened?
21+
description: A clear and concise description of the bug, including what you expected to happen instead.
22+
placeholder: When I run `testsprite test run ...`, I expected X but got Y.
23+
validations:
24+
required: true
25+
- type: textarea
26+
id: repro
27+
attributes:
28+
label: Steps to reproduce
29+
description: The exact commands you ran, in order. Redact any API keys or private URLs.
30+
placeholder: |
31+
1. testsprite setup ...
32+
2. testsprite test run <id> --wait
33+
3. ...
34+
render: shell
35+
validations:
36+
required: true
37+
- type: textarea
38+
id: logs
39+
attributes:
40+
label: Relevant output
41+
description: |
42+
Paste the command output. Re-run with `--verbose` or `--debug` for more
43+
detail if you can. **Remove any API keys, credentials, or private URLs.**
44+
render: shell
45+
validations:
46+
required: false
47+
- type: input
48+
id: cli-version
49+
attributes:
50+
label: CLI version
51+
description: Output of `testsprite --version`.
52+
placeholder: e.g. 0.1.2
53+
validations:
54+
required: true
55+
- type: input
56+
id: node-version
57+
attributes:
58+
label: Node.js version
59+
description: Output of `node --version` (the CLI requires Node >= 20).
60+
placeholder: e.g. v22.11.0
61+
validations:
62+
required: true
63+
- type: input
64+
id: os
65+
attributes:
66+
label: Operating system
67+
placeholder: e.g. macOS 15.5 / Ubuntu 24.04 / Windows 11
68+
validations:
69+
required: true
70+
- type: checkboxes
71+
id: checks
72+
attributes:
73+
label: Confirmations
74+
options:
75+
- label: I have searched existing issues and this is not a duplicate.
76+
required: true
77+
- label: I am on the latest published version, or have noted why I cannot upgrade.
78+
required: true
79+
- label: I have removed any secrets (API keys, credentials, private URLs) from this report.
80+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 💬 Questions & usage help (GitHub Discussions)
4+
url: https://github.com/TestSprite/testsprite-cli/discussions
5+
about: Ask questions, share ideas, and get help. Issues are for bugs and feature requests only.
6+
- name: 🗨️ Discord
7+
url: https://discord.gg/W4JDrZfdB
8+
about: Chat with the community and the team — the fastest way to reach us.
9+
- name: 🔒 Report a security vulnerability
10+
url: https://github.com/TestSprite/testsprite-cli/security/advisories/new
11+
about: Please report vulnerabilities privately. Do not open a public issue. See SECURITY.md.
12+
- name: 📚 Documentation
13+
url: https://www.testsprite.com/docs
14+
about: Read the TestSprite docs and the CLI command reference.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: ✨ Feature request
2+
description: Suggest a new command, flag, or improvement to the CLI.
3+
title: 'feat: '
4+
labels: ['enhancement', 'needs-triage']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for the idea! Please search
10+
[existing issues](https://github.com/TestSprite/testsprite-cli/issues)
11+
and the [roadmap/VISION](https://github.com/TestSprite/testsprite-cli/blob/main/VISION.md)
12+
first.
13+
14+
For **open-ended ideas or questions**, consider
15+
[GitHub Discussions](https://github.com/TestSprite/testsprite-cli/discussions)
16+
— it is a better place for brainstorming than an issue.
17+
- type: textarea
18+
id: problem
19+
attributes:
20+
label: What problem are you trying to solve?
21+
description: Describe the use case or pain point. Focus on the "why" before the "what".
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: proposal
26+
attributes:
27+
label: Proposed solution
28+
description: What command, flag, or behavior would solve it? Sketch the CLI surface if you can.
29+
placeholder: e.g. `testsprite test run --watch` that re-runs on file changes.
30+
validations:
31+
required: true
32+
- type: textarea
33+
id: alternatives
34+
attributes:
35+
label: Alternatives considered
36+
description: Other approaches you thought about, and why this one is preferable.
37+
validations:
38+
required: false
39+
- type: checkboxes
40+
id: scope
41+
attributes:
42+
label: Scope check
43+
description: |
44+
This CLI is a thin client for the TestSprite platform. Server-side
45+
behavior (test execution, plan generation) lives in the product, not the
46+
CLI. See VISION.md for what is in scope.
47+
options:
48+
- label: This request is about the CLI itself (commands, flags, output, ergonomics), not server-side product behavior.
49+
required: true
50+
- label: I have searched existing issues and this is not a duplicate.
51+
required: true
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: 🏆 Hackathon Improvement
2+
description: Submit an improvement, fix, or contribution for the TestSprite CLI hackathon.
3+
title: '[Hackathon] '
4+
labels: ['hackathon', 'needs-triage']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for participating in the TestSprite CLI hackathon! 🎉
10+
11+
Please search
12+
[existing issues](https://github.com/TestSprite/testsprite-cli/issues)
13+
first to avoid duplicates. Questions? Join us on
14+
[Discord](https://discord.gg/W4JDrZfdB).
15+
- type: input
16+
id: discord
17+
attributes:
18+
label: Discord Username / User ID
19+
description: Please provide your exact Discord username or unique User ID so we can contact you regarding your reward.
20+
placeholder: e.g. yourname or 123456789012345678
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: summary
25+
attributes:
26+
label: What does this improvement do?
27+
description: A clear and concise description of the improvement, fix, or contribution.
28+
validations:
29+
required: true
30+
- type: textarea
31+
id: details
32+
attributes:
33+
label: Details / implementation notes
34+
description: Link a PR if you have one, describe your approach, and note anything reviewers should know.
35+
validations:
36+
required: false
37+
- type: checkboxes
38+
id: checks
39+
attributes:
40+
label: Confirmations
41+
options:
42+
- label: I have searched existing issues and this is not a duplicate.
43+
required: true
44+
- label: I have provided my Discord identity above for reward coordination.
45+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!--
2+
Thanks for contributing to testsprite-cli!
3+
4+
Open this PR against `main` (this repo has only `main` as its contribution
5+
branch). For large or breaking changes, please open an issue first so we can
6+
agree on the approach before you invest time — see CONTRIBUTING.md.
7+
-->
8+
9+
## What does this PR do?
10+
11+
<!-- A clear, concise description of the change and the motivation behind it. -->
12+
13+
## Related issue
14+
15+
<!-- e.g. "Closes #123". Required for features and behavior changes — open an
16+
issue first and get it assigned (comment `/assign` there); see
17+
CONTRIBUTING.md → Contribution model. Docs and small fixes don't need one. -->
18+
19+
## Type of change
20+
21+
- [ ] Bug fix (non-breaking change that fixes an issue)
22+
- [ ] New feature (non-breaking change that adds functionality)
23+
- [ ] Breaking change (fix or feature that changes existing behavior)
24+
- [ ] Documentation only
25+
- [ ] Build / CI / chore
26+
27+
## Checklist
28+
29+
- [ ] PR targets the `main` branch.
30+
- [ ] Commits follow [Conventional Commits](https://www.conventionalcommits.org)
31+
(`feat(...)`, `fix(...)`, `docs(...)`, …).
32+
- [ ] `npm run lint` and `npm run format:check` pass.
33+
- [ ] `npm run typecheck` passes.
34+
- [ ] `npm test` passes and coverage stays at or above the 80% gate.
35+
- [ ] New behavior is covered by unit tests (mock-based; no network or
36+
credentials required).
37+
- [ ] No secrets, API keys, internal endpoints, or personal data are included.
38+
- [ ] User-facing changes are reflected in `README.md` / `DOCUMENTATION.md` where
39+
relevant.
40+
41+
## Notes for reviewers
42+
43+
<!-- Anything reviewers should pay special attention to: trade-offs, follow-ups,
44+
out-of-scope items, manual testing performed, etc. -->

.github/dependabot.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
version: 2
2+
updates:
3+
# npm dependencies (root package.json)
4+
- package-ecosystem: 'npm'
5+
directory: '/'
6+
schedule:
7+
interval: 'weekly'
8+
day: 'monday'
9+
open-pull-requests-limit: 5
10+
commit-message:
11+
prefix: 'chore(deps)'
12+
prefix-development: 'chore(deps-dev)'
13+
labels:
14+
- 'dependencies'
15+
groups:
16+
npm-minor-and-patch:
17+
update-types:
18+
- 'minor'
19+
- 'patch'
20+
21+
# GitHub Actions used in workflows (kept SHA-pinned; Dependabot bumps the pin + comment)
22+
- package-ecosystem: 'github-actions'
23+
directory: '/'
24+
schedule:
25+
interval: 'weekly'
26+
day: 'monday'
27+
open-pull-requests-limit: 5
28+
commit-message:
29+
prefix: 'chore(ci)'
30+
labels:
31+
- 'dependencies'
32+
- 'github-actions'
33+
groups:
34+
actions-minor-and-patch:
35+
update-types:
36+
- 'minor'
37+
- 'patch'

0 commit comments

Comments
 (0)