Docs: Explain contract capability gates
This commit is contained in:
@@ -50,13 +50,16 @@ Editing `config/dot/quickshell/**` hot-reloads the live shell on every save.
|
||||
|
||||
## The contract discipline
|
||||
|
||||
~180 executable contracts under `tests/` pin behavior. The rules:
|
||||
Every executable contract under `tests/` is classified in `tests/contracts.manifest`. The rules:
|
||||
|
||||
- `panama contracts <file>` names the contracts that mention a file; run those after touching it.
|
||||
- During a desktop session, run `panama test --safe [pattern]` — it skips everything listed in
|
||||
`tests/desktop-hijacking` (contracts that restart the shell, open real overlays, or write
|
||||
through the live compositor). Run the full `panama test` only with the user's go-ahead, and say
|
||||
so first: it visibly hijacks the desktop.
|
||||
- During a desktop session, run `panama test --safe [pattern]`. `--safe` selects only contracts
|
||||
classified as `hermetic`.
|
||||
- A plain full run prompts in a terminal before any selected non-hermetic contract starts. In
|
||||
automation, grant every required capability with repeatable flags, for example
|
||||
`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.
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user