The check runs in the target repo
MARS changes into the repo from --repo, then runs
the command after --. It does not use a shell
unless you ask for one, for example -- sh -c "...".
Evidence
A local check is a command you already trust, such as a test,
build, lint, smoke test, or release gate. mars checks run
runs that command and records whether it passed or failed.
Use mars checks run when the result should count as
evidence for MARS. Do not use it for one-off exploration.
| Use it for | Do not use it for |
|---|---|
| A test command that proves a ticket or fix. | Listing files or checking what folder you are in. |
| A build, lint, smoke, or release check. | Commands that print secrets or private logs. |
| A repeatable command you would mention in a review. | Broad discovery commands that do not prove behavior. |
mars checks run --repo ~/my-project --name go-test -- go test ./...
The command after -- runs inside ~/my-project.
mars scores export --repo ~/my-project --window-days 30
This updates docs/QUALITY_SCORE.md from the latest score and check evidence.
Commit docs/QUALITY_SCORE.md only when the change
is useful review evidence. The check itself is stored in the
local MARS database.
MARS changes into the repo from --repo, then runs
the command after --. It does not use a shell
unless you ask for one, for example -- sh -c "...".
You see stdout and stderr while the command runs. MARS records the result, not the full output.
A passing command records checks_passed. A failing
command records checks_failed.
A failed check is still useful evidence. MARS records it first, then exits non-zero.
mars checks run --repo ~/my-project --name unit -- go test ./...
If go test ./... exits with code 1, MARS
records checks_failed and then returns an error like:
checks run: command failed with exit code 1
MARS stores one row in the scoring database. It does not write a file into the target repo.
| Stored | Not stored |
|---|---|
Check name from --name. | Full stdout. |
| Command arguments. | Full stderr. |
| Exit code and duration. | .mars/checks/latest.json. |
| Repo ID, role, and timestamp. | Secret values outside the command arguments. |
The default database is ~/.mars/db/{repo-name}/mars.db.
Use --db only when you intentionally use another MARS
database outside the target repo.
mars scores export --repo ~/my-project --window-days 30
Use this when you want the check result reflected in docs/QUALITY_SCORE.md.
mars serve --addr 127.0.0.1:9091 \
--execution-profile host --acknowledge-host-execution
When the repo is registered and the role exists, the survey loop can route recent failed checks to pipeline-fixer.
mars checks run --repo ~/my-project --name go-test-log -- bash -lc 'set -o pipefail; go test ./... 2>&1 | tee /tmp/go-test.log'
MARS stores the result, not the full output. If a reviewer needs the full log, save it separately and keep secrets out of it.
mars checks run --repo ~/my-project --name go-test -- go test ./...
mars checks run --repo ~/my-project --role qa --name npm-test -- npm test
mars checks run --repo ~/my-project --name build -- npm run build
mars checks run --repo ~/my-project --name combined -- sh -c "go test ./... && go vet ./..."
Use a shell only when you need shell behavior such as &&.
| Problem | What it means | What to do |
|---|---|---|
--repo is required | MARS needs to know which repo owns the evidence. | Pass --repo /path/to/repo. |
--name is required | Every check needs a stable name. | Use names such as go-test, build, or browser-smoke. |
The command after -- is not found. | The command is run directly in the target repo. | Use the real executable, or use sh -c when you need shell syntax. |
mars scores does not show the new result. | The check was recorded as an outcome; cached role scores are separate. | Run mars scores export --repo ... to refresh docs/QUALITY_SCORE.md. |
| You need full failure logs later. | MARS does not store stdout or stderr for the check. | Save output with your own log command and keep secrets out of logs. |