This commit is contained in:
alex wiesner
2026-03-13 13:28:20 +00:00
parent 95974224f8
commit cb208a73c4
62 changed files with 1105 additions and 3490 deletions

View File

@@ -0,0 +1,36 @@
---
title: doc-coverage-waybar-pomodoro-fix
type: note
permalink: dotfiles/gates/doc-coverage-waybar-pomodoro-fix
tags:
- waybar
- pomodoro
- documentation
- doc-coverage
---
# Documentation Coverage: Waybar Pomodoro Visibility Fix
## Summary
Documentation coverage reviewed for the waybar pomodoro visibility fix (explicit binary path instead of PATH reliance).
## Observations
- [decision] No repo documentation changes needed for the pomodoro visibility fix — this is a personal dotfiles repo with no README, no docs/ directory, and AGENTS.md contains only agent workflow config, not dotfiles-specific documentation
- [decision] Changed files (`.config/waybar/config`, `.config/waybar/scripts/pomodoro-preset.sh`) are self-documenting through clear variable naming (`POMODORO_BIN`) and standard Waybar config format
- [decision] The plan note `plans/waybar-pomodoro-not-showing` already records full execution context, outcomes, and verification results — no additional knowledge capture needed
## Surfaces Checked
| Surface | Exists | Update Needed | Reason |
|---|---|---|---|
| README | No | N/A | Personal dotfiles repo, no README |
| docs/ | No | N/A | No docs directory exists |
| AGENTS.md | Yes | No | Contains only agent workflow config, not dotfiles project docs |
| Inline docs | Yes (self-documenting) | No | Variable naming and script structure are clear |
| Plan note | Yes | No | Already has execution notes and outcomes |
## Relations
- documents [[waybar-pomodoro-not-showing]]

View File

@@ -0,0 +1,44 @@
---
title: gate-waybar-pomodoro-not-showing-review
type: note
permalink: dotfiles/gates/gate-waybar-pomodoro-not-showing-review
tags:
- gate
- review
- waybar
- pomodoro
- approved
---
# Gate: Waybar Pomodoro Not Showing — Correctness Review
## Verdict
- [decision] APPROVED — REVIEW_SCORE: 0 #gate #approved
## Scope
- Reviewed `.config/waybar/config`
- Reviewed `.config/waybar/scripts/pomodoro-preset.sh`
- Cross-referenced plan `[[waybar-pomodoro-not-showing]]` (`memory://plans/waybar-pomodoro-not-showing`)
- Confirmed prior critic guidance is reflected in current code
## Evidence checked
- [evidence] `.config/waybar/config:136-139` now uses `$HOME/.local/bin/waybar-module-pomodoro` for `exec`, `on-click`, and `on-click-middle`, while preserving the existing preset script hook for right-click
- [evidence] `.config/waybar/scripts/pomodoro-preset.sh:6-10` introduces `POMODORO_BIN="$HOME/.local/bin/waybar-module-pomodoro"` and replaces PATH-dependent lookup with an executable-file guard
- [evidence] `.config/waybar/scripts/pomodoro-preset.sh:30-32` routes `set-work`, `set-short`, and `set-long` through the same explicit binary path
- [evidence] Repository search found pomodoro binary references only in the expected changed lines, with no stale bare `waybar-module-pomodoro` invocations remaining in `.config/waybar/config` or `.config/waybar/scripts/pomodoro-preset.sh`
- [evidence] Fresh verification supplied by lead/coder: `bash -n` on the script passed; `/home/alex/.local/bin/waybar-module-pomodoro --help` succeeded and confirmed required subcommands/options exist
## Findings
- [observation] No correctness defects found in the reviewed change set
- [observation] The implementation matches the approved minimal fix for launch-time PATH mismatch and updates all user-triggered pomodoro entry points called out in the plan pre-mortem
## Related regression checks
- [check] `.config/waybar/config:136-139` — no stale bare binary references remain in `exec`, left-click toggle, right-click preset hook, or middle-click reset
- [check] `.config/waybar/scripts/pomodoro-preset.sh:6-10,30-32` — helper now uses one consistent binary path for validation and all preset subcommands; no path drift found in changed lines
## Freshness notes
- [finding] Prior critic guidance was confirmed, not contradicted: the old PATH-based guard was removed and replaced with an explicit executable-path check, matching the approved fix direction
## Relations
- gates [[waybar-pomodoro-not-showing]]
- related_to [[waybar-pomodoro-not-showing]]

View File

@@ -0,0 +1,39 @@
---
title: gate-waybar-pomodoro-not-showing
type: note
permalink: dotfiles/gates/gate-waybar-pomodoro-not-showing
tags:
- gate
- critic
- waybar
- pomodoro
- approved
---
# Critic Gate: Waybar Pomodoro Not Showing
## Verdict
- [decision] APPROVED — plan is clear, correctly scoped, and adequately de-risked #gate #approved
## Rationale
- [finding] Root cause (bare binary name in PATH-less Waybar launch environment) is the most likely explanation and is well-supported by explorer research
- [finding] All 8 bare `waybar-module-pomodoro` references are confined to the two target files: `.config/waybar/config` (3 refs) and `.config/waybar/scripts/pomodoro-preset.sh` (5 refs) — no other source files reference this binary
- [finding] Verification steps (bash -n, --help check) adequately gate against the alternative failure mode of a missing binary
- [finding] Plan scope is correctly limited to pomodoro-only; no decomposition needed
## Assumption Challenges
- [challenge] Binary path validity → mitigated by plan's --help verification step
- [challenge] Completeness of reference coverage → confirmed all 8 references across both files; no others in repo
- [challenge] JSONC $HOME expansion → confirmed Waybar does shell-expand $HOME in exec/on-click fields (existing config uses it on lines 94, 138)
## Coder Guidance
- [recommendation] Update or remove the `command -v waybar-module-pomodoro` guard (line 7 of pomodoro-preset.sh) since it checks bare PATH and will fail in the same environment that caused the original bug
- [recommendation] Consider using `$HOME/.local/bin/waybar-module-pomodoro` to match existing config style conventions (lines 94, 138 already use `$HOME`)
## Files Evaluated
- `.config/waybar/config` (142 lines)
- `.config/waybar/scripts/pomodoro-preset.sh` (33 lines)
## Relations
- gates [[waybar-pomodoro-not-showing]]
- related_to [[knowledge]]

View File

@@ -0,0 +1,87 @@
---
title: gate-waybar-pomodoro-visibility-fix
type: gate
permalink: dotfiles/gates/gate-waybar-pomodoro-visibility-fix
tags:
- waybar
- pomodoro
- gate
- pass
---
# Gate: Waybar Pomodoro Visibility Fix
**Status:** PASS
**Date:** 2026-03-12
**Plan ref:** [[waybar-pomodoro-not-showing]]
**Scope:** `.config/waybar/config`, `.config/waybar/scripts/pomodoro-preset.sh`
## Verdict Summary
The implementation correctly addresses the root cause (PATH mismatch between Hyprland/Waybar environment and interactive shell). All four invocation points for `waybar-module-pomodoro` are now explicit, and no residual bare-binary references remain. Both standard and adversarial checks pass.
## Standard Pass
### Acceptance Criteria Verification
| Criterion | Result |
|---|---|
| `custom/pomodoro` exec uses explicit path | ✅ Line 136: `$HOME/.local/bin/waybar-module-pomodoro --no-work-icons` |
| on-click uses explicit path | ✅ Line 137: `$HOME/.local/bin/waybar-module-pomodoro toggle` |
| on-click-middle uses explicit path | ✅ Line 139: `$HOME/.local/bin/waybar-module-pomodoro reset` |
| on-click-right still delegates to preset script | ✅ Line 138 unchanged |
| Preset script no longer uses PATH-dependent guard | ✅ `[[ ! -x "$POMODORO_BIN" ]]` replaces `command -v` |
| Preset script routes all set-* calls through `$POMODORO_BIN` | ✅ Lines 3032 |
| Change is pomodoro-scoped only | ✅ No other modules touched |
| Binary syntax check (`bash -n`) passes | ✅ (Lead evidence, exit 0) |
| Binary exists and responds to `--help` | ✅ (Lead evidence, exit 0 with usage) |
### Pre-mortem Risk Tracking
| Risk | Status |
|---|---|
| Middle-click reset still using bare name | Resolved — line 139 uses explicit path |
| Only one entry point updated | Resolved — all four updated |
| Preset helper using `command -v` | Resolved — replaced with `[[ ! -x ... ]]` |
| Binary path unstable across sessions | Not triggered — binary confirmed at path |
## Adversarial Pass
### Hypotheses
| # | Hypothesis | Design | Expected failure | Observed |
|---|---|---|---|---|
| H1 | Empty/corrupt STATE_FILE causes crash | State file exists but empty | `current` reads as `""`, falls to else-branch | Safe: defaults to B-preset (short cycle), no crash |
| H2 | Binary missing/non-executable | Guard `[[ ! -x ]]` fires | Exit 1 with stderr | Guard correctly triggers, script exits cleanly |
| H3 | `$HOME` unset in Waybar env | `$HOME/.local/bin/...` fails to expand | Module fails silently | Same risk applies to all other modules using `$HOME` (line 94: `custom/uptime`); no regression introduced |
| H4 | `set -e` aborts mid-preset (daemon down) | First `set-work` fails → remaining calls skipped | Partial preset applied | Pre-existing behavior; not a regression from this change |
| H5 | STATE_FILE lost on reboot (`/tmp`) | Preset reverts to A-cycle | Unexpected preset on first right-click post-reboot | Intentional design, not a regression |
| H6 | No bare `pomodoro` left anywhere in config | Grep scan | Old reference found | Zero old references found — clean |
### Mutation Checks
| Mutation | Would current tests detect? |
|---|---|
| One of exec/on-click/on-click-middle reverted to bare name | Yes — structural grep confirms all three use explicit path |
| `POMODORO_BIN` guard inverted (`-x` instead of `! -x`) | Yes — guard would skip missing-binary error |
| `read -r current` without fallback | Caught — `|| current="A"` handles failure |
| `set-work` but not `set-short`/`set-long` through `$POMODORO_BIN` | Yes — all three lines verified |
**MUTATION_ESCAPES: 0/4**
## Unverified Aspects (Residual Risk)
1. **Live Waybar rendering** — Cannot verify the module actually appears on the bar without a running Waybar session. The Lead noted this is impractical in the task context.
2. **Binary behavior correctness**`--help` confirms the binary exists and accepts the right subcommands, but actual timer JSON output format was not sampled. The `return-type: json` config assumes the binary outputs conforming JSON.
3. **`$HOME` behavior under Waybar systemd unit** — Low risk (all other `$HOME`-using modules work), but not runtime-confirmed.
These residual risks are infrastructure-gated (no running Wayland/Waybar session available in this context), not implementation defects.
## Lesson Checks
- [confirmed] PATH mismatch is the failure mode for Waybar custom modules — explicit paths are the correct fix pattern.
- [confirmed] `[[ ! -x path ]]` guard is the right check for script-invoked binary dependencies.
- [not observed] Any silent failures from the old `command -v` approach (fix is in place, no regression).
## Relations
- resolves [[waybar-pomodoro-not-showing]]