feat(vigil): vigil persistence and dirge vigil CLI (slice 1 of 5) - #807
Closed
allen-munsch wants to merge 1 commit into
Closed
feat(vigil): vigil persistence and dirge vigil CLI (slice 1 of 5)#807allen-munsch wants to merge 1 commit into
dirge vigil CLI (slice 1 of 5)#807allen-munsch wants to merge 1 commit into
Conversation
First slice of the vigil phase-5 decomposition: config types + SQLite store + CLI CRUD, independent of the runtime/keeper/triggers. - vigil_db: VigilStore (open/upsert/get/remove/set_status, list_non_resting) with Active/Paused/Resting status - config: VigilEntry/VigilTrigger/VigilRite/VigilCommand/SocketMode, gated on the `vigil` feature (opt-in, NOT in default) - cli: `dirge vigil` subcommand with VigilAction + VigilAddTrigger - main: handle_vigil_command + build_vigil_entry dispatch - tests: vigil_db store CRUD/status + build_vigil_entry parsing + config serde shape - docs/config.md: document the `vigils` top-level key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #765, which was closed as too large to review comfortably. This is the first slice of the decomposition agreed in #760 (ELEGY-1): split the monolithic vigil phase-5 branch into small, individually-mergeable PRs, with the queue/reaper core in Rust and the external engine adapters (Jenkins/Prefect/Airflow) in the Janet plugin space.
What this slice does
VigilStore(SQLite) withActive/Paused/Restingstatus andlist_non_restingfiltering.vigilconfig types (VigilEntry,VigilTrigger,VigilRite,VigilCommand,SocketMode), gated on a newvigilfeature.dirge vigilCLI subcommand (list,add,remove,pause,resume,rest).vigilstop-level config key.It is deliberately not the runtime: no keeper, no triggers, no TUI panel. Just the store and the management surface.
Why this shape
The crate is bin-only (no
src/lib.rs), and CI fails on anydead_codeunder-D warnings. That means I could not land the keeper/trigger runtime first with no caller: it would not compile standalone. The CLI CRUD arm exercises every store method, so this slice has no dead code and stands on its own.Two things the monolithic branch masked, which I had to fix while extracting this slice:
serde::Serializeimport insrc/config/mod.rswas un-gated, which is an unused-import warning whenevervigilis off.Vigil { .. } => {}arm to stay exhaustive.Decomposition plan (the rest of the stack)
dirge vigilCLI CRUD.--vigil-onceheadless path.Each later slice carries the relevant review fixes from the original #765 review (the drg-* findings) so the fixes land with the code they protect rather than arriving as a separate cleanup PR.
Verification
cargo fmt --all --checkcleancargo clippy --all-targets --all-features -- -D warningscleancargo clippy --all-targets --no-default-features --features windows-default -- -D warningscleancargo build --bin dirge --no-default-features --features windows-defaultcleancargo build --bin dirgeclean (vigil off)cargo test --bin dirge --all-features vigil12 passedcargo test --bin dirge --all-features config::166 passedcargo test --bin dirge --all-features cli::16 passedQuestions for maintainers
vigilstaying opt-in (not indefault), or should it join the default feature set as the original branch had it? I left it opt-in here to keep this slice minimal, and will gladly move it intodefaultif that is preferred.