Repository navigation
v0.6.5
Selo v0.6.5
Patch release. The receipt now tells the truth about test results, and there is
an opt-in gate for teams that want failing tests to fail the run.
The defect
A receipt could say SUCCESS while every configured test command had failed,
and nothing on the receipt showed it. Measured against the shipped binary:
$ selo run "<goal>" --commands "false"
final_verdict : SUCCESS_WITH_RECEIPT
scans_passed : true
gatechain : pass / pass
test_output : "$ false\n\n[exit code: 1]\n"
The verdict keys off the agent's exit code, so this is by design — but the
receipt offered no field that said "the tests failed", and scans_passed: true
reads like "tests passed" to anyone skimming a compliance report.
It was worse than a missing field. tests_passed was computed by counting output
lines, in cmd/selo/main.go:
if strings.Contains(line, "PASS") || strings.HasPrefix(line, "ok ") {
testsPassed++
}That is a case-sensitive substring match on output text that never consults an
exit code, and it was wrong in both directions:
| scenario | old tests_passed |
truth |
|---|---|---|
command exits 1, output contains PASSWORD=secret |
3 | 0 — the command failed |
echo 1 passed (pytest style, exit 0) |
absent (0) | the command passed |
And because the field is omitempty, a genuine 0 was dropped from the JSON
entirely — leaving only scans_passed: true.
What changed
Test results are now derived from exit codes:
tests_ok(new) —trueonly when every configured command exited 0;
falsewhen at least one did not; absent when no test command was
configured. The absence is deliberate: with no commands there is nothing to
assert, and claiming "tests passed" would be a false assurance. It is a
*boolfor the same reason — a plainboolwithomitemptywould drop a
genuinefalsefrom the JSON, which is exactly the ambiguity being removed.test_exit_codes(new) — each configured command's exit code, in order.
-1(runner.ExitCodeNotRun) means the command never ran.tests_passedis now the number of configured commands that exited 0.runner.CaptureTestResultsreturns(output, exitCodes);
CaptureTestOutputis retained as an output-only wrapper.
Same three scenarios, after:
| scenario | verdict | tests_ok |
test_exit_codes |
tests_passed |
|---|---|---|---|---|
--commands "false" |
SUCCESS (default unchanged) | false |
[1] |
absent |
--commands "false" --require-tests-pass |
FAILED_TESTS |
false |
[1] |
absent |
echo 1 passed |
SUCCESS | true |
[0] |
1 |
The gate
selo run "<goal>" --commands "go test ./..." --require-tests-passOverrides the verdict to FAILED_TESTS when any configured command exits
non-zero. Also settable as forge.require_tests_pass in the config, so the
daemon honours it too.
It is off by default. The default verdict continues to key off the agent's
exit code, so no existing run changes meaning. Turning this on by default would
have silently rewritten what every already-issued SUCCESS_WITH_RECEIPT asserts,
which is the opposite of what a signed receipt is for. selo run already exits 1
on any FAILED* verdict, so CI needs no extra wiring.
FAILED_TESTS is inserted into the verdict severity order just above
NEEDS_HUMAN; every existing verdict keeps its relative order, so existing
override behaviour is unchanged.
Documentation
- README: new section "What the receipt says about tests" —
scans_passed
is the safety scans (forbidden files, forbidden claims, secret scan) and says
nothing about tests; readtests_ok/test_exit_codesfor that. docs/api/README.mdanddocs/architecture/README.md: the two struct
listings now carry the new fields and the same warning onscans_passed.
Compatibility
- Additive receipt fields only. Old receipts still verify unchanged; they simply
predate these fields. - New opt-in flag and config key. Default behaviour is unchanged.
FAILED_TESTSis a new verdict string — any tooling that enumerates verdicts
should be aware of it.
Upgrade
Same as v0.6.4: curl -fsSL https://selo.c1.run/install.sh | sh. The cosign
keyless identity is unchanged (C1-run/Selo, because this is < v0.7.0).
Full Changelog: v0.6.4...v0.6.5