Add initial TriggerMind project skeleton (CLI, scheduler, storage, models, tests)#5
Add initial TriggerMind project skeleton (CLI, scheduler, storage, models, tests)#5Sunnylincc wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 69cb93c572
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| dirty = True | ||
|
|
||
| if dirty: | ||
| store.save(records) |
There was a problem hiding this comment.
Guard daemon writes against concurrent store updates
The scheduler writes back a full snapshot with store.save(records) after processing due triggers, but that snapshot was loaded earlier in the loop; if triggermind start, at, or cancel updates the JSON file between load and this save, the daemon overwrites those newer changes and silently drops user updates. Because the CLI and daemon are designed to run concurrently, this creates real data-loss races for scheduled/cancelled triggers.
Useful? React with 👍 / 👎.
| info = default | ||
| if info.is_option: | ||
| param_names = info.param_decls or (f"--{param.name.replace('_', '-')}",) | ||
| cmd_func = click.option(*param_names, param.name, default=info.default, show_default=True, help=info.help, type=annotation)(cmd_func) |
There was a problem hiding this comment.
Preserve Typer boolean-flag semantics in the local shim
In the offline typer shim, options are always registered with type=annotation; for bool options this makes Click require an explicit value, so commands like triggermind list --all fail with Option '--all' requires an argument instead of acting as a flag. This breaks advertised CLI behavior whenever the project runs against the bundled shim (the exact mode this fallback is meant to support).
Useful? React with 👍 / 👎.
| stderr=subprocess.DEVNULL, | ||
| ) | ||
| finally: | ||
| print(f"\033[93m⚡ TriggerMind Intervention:\033[0m {message}") |
There was a problem hiding this comment.
Route notification fallback to a user-visible channel
The fallback path in send_notification only does a print(...), but the daemon process is launched detached with stdout/stderr redirected to daemon.log; when desktop notification commands are unavailable (for example Linux without notify-send), fired triggers are written only to the log and the user receives no visible reminder. That undermines the core reminder flow in non-desktop/minimal environments.
Useful? React with 👍 / 👎.
Motivation
Description
triggermind/main.pywith interactiveguide,start,at,list,cancel,doctor, andupdateactions.models(TriggerRecord), JSON-backed store (storage/json_store.py), time parsing (timeparse.py), trigger factories (triggers/*), scheduler daemon (scheduler/daemon.py), notifications (notifications/manager.py), and filesystem helpers (paths.py).pyproject.toml,README.md,CONTRIBUTING.md,LICENSE, install scripts (scripts/install.sh,scripts/install.ps1), and a.gitignore.typershim and test helpers plus unit tests undertests/covering CLI flows, store operations, and time parsing; also add docsdocs/ARCHITECTURE.mdand trigger stubs for roadmap clarity.Testing
pytestwhich executedtests/test_timeparse.py,tests/test_store.py, andtests/test_cli.py.9tests passed).Codex Task