Docs: Clarify contract output handling

This commit is contained in:
Gabriel Brown
2026-08-26 23:38:09 -04:00
parent 34e295d184
commit 77f625d7bb
4 changed files with 12 additions and 5 deletions
+1
View File
@@ -60,6 +60,7 @@ Every executable contract under `tests/` is classified in `tests/contracts.manif
`panama test --allow live-compositor --allow live-desktop keybinds`.
- Each contract has a 180-second outer timeout by default. Override it with a positive
`PANAMA_TEST_TIMEOUT_SECONDS` value. Failures print the contract's captured stdout and stderr.
Successful stdout stays quiet. Successful stderr is surfaced as a warning.
- Contracts run directly too: `tests/setup/interview-contract`.
- After changing `PreferenceSchema.qml` or `services/SettingsRoutes.qml`, regenerate:
`config/dot/quickshell/scripts/panama-settings-docs` (writes `docs/settings.md`) and
+2 -1
View File
@@ -215,7 +215,8 @@ before it starts any non-hermetic contract. Automation cannot answer that
prompt, so it must grant every required capability with a repeatable `--allow`.
Each contract has a 180-second outer timeout by default. Set
`PANAMA_TEST_TIMEOUT_SECONDS` to a positive integer to override it. When a
contract fails, the runner prints its captured stdout and stderr.
contract fails, the runner prints its captured stdout and stderr. Successful
stdout stays quiet. Successful stderr is surfaced as a warning.
They are called contracts rather than unit tests because that is what they are:
each one pins a decision that was expensive to get right and is cheap to undo by
+7 -3
View File
@@ -89,8 +89,10 @@ ${BOLD}Commands:${RESET}
pattern to run a subset. --safe selects hermetic contracts only.
Plain terminal runs prompt before non-hermetic work. Automation
must grant each required capability with a repeatable --allow.
Failures print captured stdout/stderr; the default outer timeout
is 180 seconds.
Failures print captured stdout/stderr. Successful stdout stays
quiet; successful stderr is a warning. The default outer timeout
is 180 seconds. Set PANAMA_TEST_TIMEOUT_SECONDS to a positive
integer to override it.
${GREEN}contracts${RESET} Name the contracts that mention a given file, each labeled
with manifest capabilities. A heuristic over the text of tests/, so it
answers "what should I run" rather than "what covers this".
@@ -491,7 +493,9 @@ is_contract_capability() {
# each external capability it skipped. A plain terminal run asks before any
# selected non-hermetic work. Automation must grant every required capability
# with repeatable --allow flags. Each contract gets an outer timeout, 180
# seconds by default, and failures include the captured stdout and stderr.
# seconds by default. PANAMA_TEST_TIMEOUT_SECONDS accepts a positive integer
# override. Failures include captured stdout and stderr. Successful stdout stays
# quiet, while successful stderr is surfaced as a warning.
cmd_test() {
local timeout_seconds="${PANAMA_TEST_TIMEOUT_SECONDS:-180}"
[[ "$timeout_seconds" =~ ^[1-9][0-9]*$ ]] || {
+2 -1
View File
@@ -46,7 +46,8 @@ Other tools that beat raw commands:
A plain `panama test` prompts in a terminal before it starts non-hermetic contracts. Automation
must grant each required capability with a repeatable `--allow`, such as
`panama test --allow live-host updates`. Each contract has a 180-second outer timeout by default,
and failures print captured stdout and stderr.
which a positive `PANAMA_TEST_TIMEOUT_SECONDS` value overrides. Failures print captured stdout
and stderr. Successful stdout stays quiet. Successful stderr is surfaced as a warning.
## Settings