Skip to content

feat(hooks): add job descriptions, skip descriptions, and OS/arch conditions#248

Merged
avihut merged 5 commits intomasterfrom
feat/hook-desc-and-arch
Feb 21, 2026
Merged

feat(hooks): add job descriptions, skip descriptions, and OS/arch conditions#248
avihut merged 5 commits intomasterfrom
feat/hook-desc-and-arch

Conversation

@avihut
Copy link
Owner

@avihut avihut commented Feb 21, 2026

Summary

  • Add description field for hook jobs, shown in progress output for better UX
  • Add desc field for skip conditions, shown when a job is skipped
  • Add os and arch conditions for platform-specific job execution
  • Render skipped jobs distinctly from successful jobs in output
  • Add manual hook execution with hooks run command
  • Replace direnv with mise for PATH management (_.path in mise.toml)

Fixes #246

Test plan

  • Unit tests pass (mise run test:unit)
  • Clippy passes with zero warnings
  • Formatting verified
  • Manual testing of daft hooks run post-clone on macOS
  • Verify ./target/release is on PATH via mise (no direnv needed)

🤖 Generated with Claude Code

avihut and others added 4 commits February 21, 2026 12:30
…ditions

Add `description` field to jobs for human-readable context shown in dry-run
output and shell completions. Add `desc` field to skip/only structured rules
to override auto-generated skip reasons. Add `os` and `arch` fields to jobs
for platform-based conditional execution.

Also adds `--verbose` flag to `hooks run` to show skipped jobs with reasons,
and updates zsh/fish/bash completions to display job descriptions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Skipped jobs were incorrectly rendered as successful: they showed a
spinner, printed "No output", and appeared in the summary with a green
checkmark. This was misleading when jobs were skipped due to skip/only
conditions.

Changes:
- Add SkipInfo struct to conditions.rs that tracks whether a skip check
  ran a command (ran_command: true for `run` checks, false for ref/env)
- Add skip_ran_command field to HookResult and skipped_after_command()
  constructor to propagate this information
- Update finish_job_skipped() to always print a single inline line with
  yellow reason text and no blank line after (not gated on verbose)
- Add skipped jobs to the summary with ⊘ icon in yellow, with
  conditional duration display based on whether a command was run
- Fix DAG parallel executor which incorrectly called finish_job_success
  for skipped jobs instead of finish_job_skipped
- Replace JobResultEntry.success bool with JobOutcome enum
  (Success/Failed/Skipped) for richer summary rendering

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move `PATH_add ./target/release` from `.envrc` to `mise.toml`'s
`_.path` config, eliminating the direnv dependency. Remove the
`direnv allow` and `direnv revoke` hooks from `daft.yml` since
mise handles environment activation automatically via `mise trust`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@avihut avihut modified the milestone: v1.1.0 Feb 21, 2026
@avihut avihut added feat New feature labels Feb 21, 2026
@avihut avihut self-assigned this Feb 21, 2026
@avihut avihut merged commit 3c37882 into master Feb 21, 2026
@avihut avihut deleted the feat/hook-desc-and-arch branch February 21, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant