Drop the extension, and give the test suite a front door

Phase 6, the last of the fresh-install spec.

159 scripts lose their .sh: 110 contracts, 47 Vicinae commands, 2 compositor
contracts. A shebang and the executable bit already select the interpreter. The
extension only ever added something that had to stay in sync, and the rename
proved the point twice over in the space of an hour.

The spec's stated risk was Vicinae's script discovery. One script was renamed and
reloaded on its own before the other 46 followed; it came back as
scripts:panama.capture and all 47 resolve. What the probe turned up instead is
that the extension was never only a filename: Vicinae's command IDs embed it, so
every ID changed. Nothing in this repository refers to them, so nothing breaks.
The only trace is Vicinae's metadata.json, whose visited map had two Panama
entries that are now orphaned -- two commands lost their usage ranking and will
earn it back. Worth knowing before anyone renames these again on a machine that
has a keybind pointing at one.

Rewriting the references by exact filename missed two things it structurally
could not see: a name built from a variable, settings-$page.sh, and a glob,
-name '*.sh'. Both were in the contract that counts the generated commands, which
promptly reported 47 expected and 0 found. The mechanical part of a rename is the
part that looks finished.

The three subcommands. panama doctor fronts a health check that already existed
and already ran at the end of every install but could not be reached from a
terminal. panama upgrade re-runs the installer from anywhere. panama test runs
the suite, which had no entry point at all -- 121 files that were the main safety
net in this repository and were invisible in it.

Writing that runner found three tests nothing was running.
calendar_agenda_bridge_test, home_assistant_bridge_test and kdeconnect_bridge_test
are unittest suites without the executable bit, so no contract invoked them and
the first draft of the runner skipped them silently. All three pass, and have
passed unobserved for weeks. The runner collects *_test.py as well now, because a
runner with a blind spot is worse than no runner for the same reason a dependency
checker with one is: it reports PASS.

Six worktrees pruned. Each was re-checked rather than trusted to the spec's list,
and two needed it: panama-commands is not on feat/panama-commands but on
feat/gnome-tweaks-parity, and fix/panama-displays-review reads [ahead 3] -- ahead
of its remote, not of main, with every commit patch-equivalent to landed work.
roadmap-completion stays; it has five commits that are genuinely unlanded. The
branches are left alone: pruning a worktree costs nothing, deleting a branch is a
decision.

121 contracts pass.

Claude-Session: https://claude.ai/code/session_01NvgBuSWB5sE43yWmg21ozj
This commit is contained in:
Gabriel Brown
2026-08-20 21:55:55 -04:00
parent 47f29f9fa9
commit e1faaf7a76
185 changed files with 533 additions and 377 deletions
@@ -26,7 +26,7 @@
**Files:**
- Create: `config/dot/quickshell/services/DisplayLayout.js`
- Create: `config/dot/quickshell/display-layout-harness.qml`
- Create: `tests/quickshell/display-layout-contract.sh`
- Create: `tests/quickshell/display-layout-contract`
**Interfaces:**
- Consumes: records `{name,width,height,scale,transform,x,y,primary}`.
@@ -47,7 +47,7 @@ Assert transformed logical sizes, normalized DP-2 position `0,0`, normalized HDM
- [ ] **Step 2: Run and verify RED**
Run: `tests/quickshell/display-layout-contract.sh`
Run: `tests/quickshell/display-layout-contract`
Expected: FAIL because the geometry module and harness do not exist.
@@ -71,14 +71,14 @@ Assert rejection of duplicate outputs, zero or two primaries, fractional coordin
- [ ] **Step 5: Run and verify GREEN**
Run: `tests/quickshell/display-layout-contract.sh`
Run: `tests/quickshell/display-layout-contract`
Expected: PASS for geometry, deterministic snapping, normalization, and invalid cases.
- [ ] **Step 6: Commit layout geometry**
```bash
git add config/dot/quickshell/services/DisplayLayout.js config/dot/quickshell/display-layout-harness.qml tests/quickshell/display-layout-contract.sh
git add config/dot/quickshell/services/DisplayLayout.js config/dot/quickshell/display-layout-harness.qml tests/quickshell/display-layout-contract
git commit -m "Model multi-monitor layout geometry"
```
@@ -89,8 +89,8 @@ git commit -m "Model multi-monitor layout geometry"
- Modify: `config/dot/quickshell/displays-harness.qml`
- Modify: `config/dot/hypr/monitors.lua`
- Modify: `config/dot/quickshell/config/PreferenceSchema.qml`
- Modify: `tests/quickshell/displays-contract.sh`
- Modify: `tests/quickshell/settings-preferences-contract.sh`
- Modify: `tests/quickshell/displays-contract`
- Modify: `tests/quickshell/settings-preferences-contract`
**Interfaces:**
- Consumes: `hyprctl -j monitors` x/y values and backward-compatible persisted entries.
@@ -111,7 +111,7 @@ Assert only one valid persisted primary is honored and DP-2's 10-bit/color polic
- [ ] **Step 2: Run and verify RED**
Run: `PANAMA_DISPLAYS_STATIC_ONLY=1 tests/quickshell/displays-contract.sh`
Run: `PANAMA_DISPLAYS_STATIC_ONLY=1 tests/quickshell/displays-contract`
Expected: FAIL because x/y/primary are neither parsed nor replayed.
@@ -129,14 +129,14 @@ Change the internal `displays` detail to **Resolution, scale, rotation, position
- [ ] **Step 6: Run and verify GREEN**
Run: `PANAMA_DISPLAYS_STATIC_ONLY=1 tests/quickshell/displays-contract.sh && tests/quickshell/settings-preferences-contract.sh`
Run: `PANAMA_DISPLAYS_STATIC_ONLY=1 tests/quickshell/displays-contract && tests/quickshell/settings-preferences-contract`
Expected: PASS for old and new records.
- [ ] **Step 7: Commit extended persistence**
```bash
git add config/dot/quickshell/services/Displays.qml config/dot/quickshell/displays-harness.qml config/dot/hypr/monitors.lua config/dot/quickshell/config/PreferenceSchema.qml tests/quickshell/displays-contract.sh tests/quickshell/settings-preferences-contract.sh
git add config/dot/quickshell/services/Displays.qml config/dot/quickshell/displays-harness.qml config/dot/hypr/monitors.lua config/dot/quickshell/config/PreferenceSchema.qml tests/quickshell/displays-contract tests/quickshell/settings-preferences-contract
git commit -m "Persist complete monitor layouts"
```
@@ -145,8 +145,8 @@ git commit -m "Persist complete monitor layouts"
**Files:**
- Modify: `config/dot/quickshell/services/Displays.qml`
- Modify: `config/dot/quickshell/displays-harness.qml`
- Modify: `tests/quickshell/displays-contract.sh`
- Create: `tests/quickshell/display-transaction-contract.sh`
- Modify: `tests/quickshell/displays-contract`
- Create: `tests/quickshell/display-transaction-contract`
**Interfaces:**
- Consumes: `DisplayLayout.validate/normalize` and complete current monitor records.
@@ -162,7 +162,7 @@ Assert timeout, explicit revert, non-zero apply exit, wrong readback, and a disc
- [ ] **Step 3: Run and verify RED**
Run: `tests/quickshell/display-transaction-contract.sh`
Run: `tests/quickshell/display-transaction-contract`
Expected: FAIL because `Displays.qml` tracks only one output per operation.
@@ -195,14 +195,14 @@ Keep `apply(output, mode, scale, transform)` by cloning `currentLayout()`, repla
- [ ] **Step 7: Run and verify GREEN**
Run: `tests/quickshell/display-transaction-contract.sh && PANAMA_DISPLAYS_STATIC_ONLY=1 tests/quickshell/displays-contract.sh`
Run: `tests/quickshell/display-transaction-contract && PANAMA_DISPLAYS_STATIC_ONLY=1 tests/quickshell/displays-contract`
Expected: PASS for apply, confirm, timeout, all revert paths, disconnect, and stale generations.
- [ ] **Step 8: Commit safe transactions**
```bash
git add config/dot/quickshell/services/Displays.qml config/dot/quickshell/displays-harness.qml tests/quickshell/displays-contract.sh tests/quickshell/display-transaction-contract.sh
git add config/dot/quickshell/services/Displays.qml config/dot/quickshell/displays-harness.qml tests/quickshell/displays-contract tests/quickshell/display-transaction-contract
git commit -m "Apply monitor layouts transactionally"
```
@@ -211,8 +211,8 @@ git commit -m "Apply monitor layouts transactionally"
**Files:**
- Create: `config/dot/quickshell/modules/settings/DisplayArrangement.qml`
- Modify: `config/dot/quickshell/modules/settings/DisplaysPage.qml`
- Create: `tests/quickshell/display-arrangement-contract.sh`
- Modify: `tests/quickshell/settings-pages-contract.sh`
- Create: `tests/quickshell/display-arrangement-contract`
- Modify: `tests/quickshell/settings-pages-contract`
**Interfaces:**
- Consumes: `Displays.currentLayout()`, `Displays.applyLayout()`, `Displays.makePrimary()`, and `DisplayLayout.canvasRects/snap`.
@@ -224,7 +224,7 @@ Render two literal monitors at wide and 500 px content widths. Through harness I
- [ ] **Step 2: Run and verify RED**
Run: `tests/quickshell/display-arrangement-contract.sh`
Run: `tests/quickshell/display-arrangement-contract`
Expected: FAIL because no arrangement component exists.
@@ -242,14 +242,14 @@ Show the card only for two or more monitors. Keep the existing connected-display
- [ ] **Step 6: Run and verify GREEN**
Run: `tests/quickshell/display-arrangement-contract.sh && PANAMA_DISPLAYS_STATIC_ONLY=1 tests/quickshell/displays-contract.sh && tests/quickshell/settings-pages-contract.sh`
Run: `tests/quickshell/display-arrangement-contract && PANAMA_DISPLAYS_STATIC_ONLY=1 tests/quickshell/displays-contract && tests/quickshell/settings-pages-contract`
Expected: PASS at both widths with no QML warnings.
- [ ] **Step 7: Commit the canvas**
```bash
git add config/dot/quickshell/modules/settings/DisplayArrangement.qml config/dot/quickshell/modules/settings/DisplaysPage.qml tests/quickshell/display-arrangement-contract.sh tests/quickshell/settings-pages-contract.sh
git add config/dot/quickshell/modules/settings/DisplayArrangement.qml config/dot/quickshell/modules/settings/DisplaysPage.qml tests/quickshell/display-arrangement-contract tests/quickshell/settings-pages-contract
git commit -m "Add monitor arrangement canvas"
```
@@ -259,7 +259,7 @@ git commit -m "Add monitor arrangement canvas"
- Create: `config/dot/quickshell/modules/settings/DisplayIdentify.qml`
- Modify: `config/dot/quickshell/modules/settings/DisplayArrangement.qml`
- Modify: `config/dot/quickshell/shell.qml`
- Modify: `tests/quickshell/display-arrangement-contract.sh`
- Modify: `tests/quickshell/display-arrangement-contract`
**Interfaces:**
- Consumes: `Displays.identifying` and each `Quickshell.screens` entry.
@@ -271,7 +271,7 @@ Invoke identify through the fixture harness. Assert screen 1 renders connector/n
- [ ] **Step 2: Run and verify RED**
Run: `tests/quickshell/display-arrangement-contract.sh`
Run: `tests/quickshell/display-arrangement-contract`
Expected: FAIL because identify state and overlays do not exist.
@@ -281,14 +281,14 @@ Expected: FAIL because identify state and overlays do not exist.
- [ ] **Step 4: Run and verify GREEN**
Run: `tests/quickshell/display-arrangement-contract.sh`
Run: `tests/quickshell/display-arrangement-contract`
Expected: PASS with a fixed window count and no focus-grab warnings.
- [ ] **Step 5: Commit identification**
```bash
git add config/dot/quickshell/modules/settings/DisplayIdentify.qml config/dot/quickshell/modules/settings/DisplayArrangement.qml config/dot/quickshell/shell.qml tests/quickshell/display-arrangement-contract.sh
git add config/dot/quickshell/modules/settings/DisplayIdentify.qml config/dot/quickshell/modules/settings/DisplayArrangement.qml config/dot/quickshell/shell.qml tests/quickshell/display-arrangement-contract
git commit -m "Add display identification overlays"
```
@@ -298,10 +298,10 @@ git commit -m "Add display identification overlays"
- Modify: `config/dot/quickshell/services/SettingsSearch.qml`
- Modify: `config/dot/quickshell/services/SettingsBackup.qml`
- Modify: `config/dot/quickshell/modules/settings/README.md`
- Modify: `tests/quickshell/settings-search-contract.sh`
- Modify: `tests/quickshell/settings-backup-live-contract.sh`
- Modify: `tests/quickshell/settings-commit-reset-contract.sh`
- Modify: `tests/quickshell/settings-ownership-contract.sh`
- Modify: `tests/quickshell/settings-search-contract`
- Modify: `tests/quickshell/settings-backup-live-contract`
- Modify: `tests/quickshell/settings-commit-reset-contract`
- Modify: `tests/quickshell/settings-ownership-contract`
**Interfaces:**
- Consumes: the existing internal `displays` preference and complete-layout transaction.
@@ -313,7 +313,7 @@ Assert **arrange displays**, **monitor position**, and **primary display** route
- [ ] **Step 2: Run and verify RED**
Run: `tests/quickshell/settings-search-contract.sh && tests/quickshell/settings-backup-live-contract.sh && tests/quickshell/settings-commit-reset-contract.sh`
Run: `tests/quickshell/settings-search-contract && tests/quickshell/settings-backup-live-contract && tests/quickshell/settings-commit-reset-contract`
Expected: FAIL for missing terms and one-output restore assumptions.
@@ -327,14 +327,14 @@ Document Displays as the sole owner of mode, scale, rotation, arrangement, and p
- [ ] **Step 5: Run and verify GREEN**
Run: `tests/quickshell/settings-search-contract.sh && tests/quickshell/settings-backup-live-contract.sh && tests/quickshell/settings-commit-reset-contract.sh && tests/quickshell/settings-ownership-contract.sh`
Run: `tests/quickshell/settings-search-contract && tests/quickshell/settings-backup-live-contract && tests/quickshell/settings-commit-reset-contract && tests/quickshell/settings-ownership-contract`
Expected: PASS with no new duplicated controls.
- [ ] **Step 6: Commit integration**
```bash
git add config/dot/quickshell/services/SettingsSearch.qml config/dot/quickshell/services/SettingsBackup.qml config/dot/quickshell/modules/settings/README.md tests/quickshell/settings-search-contract.sh tests/quickshell/settings-backup-live-contract.sh tests/quickshell/settings-commit-reset-contract.sh tests/quickshell/settings-ownership-contract.sh
git add config/dot/quickshell/services/SettingsSearch.qml config/dot/quickshell/services/SettingsBackup.qml config/dot/quickshell/modules/settings/README.md tests/quickshell/settings-search-contract tests/quickshell/settings-backup-live-contract tests/quickshell/settings-commit-reset-contract tests/quickshell/settings-ownership-contract
git commit -m "Integrate complete display layouts"
```
@@ -343,12 +343,12 @@ git commit -m "Integrate complete display layouts"
- [ ] **Step 1: Run all static display contracts**
```bash
tests/quickshell/display-layout-contract.sh
tests/quickshell/display-transaction-contract.sh
tests/quickshell/display-arrangement-contract.sh
PANAMA_DISPLAYS_STATIC_ONLY=1 tests/quickshell/displays-contract.sh
tests/quickshell/settings-search-contract.sh
tests/quickshell/settings-backup-live-contract.sh
tests/quickshell/display-layout-contract
tests/quickshell/display-transaction-contract
tests/quickshell/display-arrangement-contract
PANAMA_DISPLAYS_STATIC_ONLY=1 tests/quickshell/displays-contract
tests/quickshell/settings-search-contract
tests/quickshell/settings-backup-live-contract
```
Expected: all PASS without touching the physical display.
@@ -361,7 +361,7 @@ Expected: `config ok`.
- [ ] **Step 3: Defer the live display test**
Do not run the state-changing portion of `tests/quickshell/displays-contract.sh` here. The master Phase 2 completion gate runs it once after every slice is stable and restores the observed mode, scale, transform, and position.
Do not run the state-changing portion of `tests/quickshell/displays-contract` here. The master Phase 2 completion gate runs it once after every slice is stable and restores the observed mode, scale, transform, and position.
- [ ] **Step 4: Review branch state**