Skip to content

Add DOCKET_HOOKS=off opt-out for the hooks - #33

Merged
NovusEdge merged 1 commit into
mainfrom
hooks-off
Oct 28, 2026
Merged

NovusEdge merged 1 commit into
mainfrom
hooks-off

Conversation

@NovusEdge

@NovusEdge NovusEdge commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Setting DOCKET_HOOKS=off makes hooks/guard_ledger.py exit silently for every call (no ask on ledger writes, no guidance, no governing-decisions context, no feature nudge). docket context still prints the ledger but drops the no-feature hint and the update and merge notices. Unset behaves as before. Tests added next to the hook tests; README paragraph and changelog entry.

Summary by CodeRabbit

  • New Features
    • Set DOCKET_HOOKS=off to silence edit-hook prompts and feature, update, and merge notices in the session briefing. The ledger output remains visible.
  • Documentation
    • Added guidance on the DOCKET_HOOKS=off setting.

Signed-off-by: NovusEdge <novusedge0@gmail.com>
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Walkthrough

Setting DOCKET_HOOKS=off now silences the ledger edit hook and suppresses feature, update, and merge notices in the session briefing. The briefing still prints the ledger. Tests cover the opt-out and the existing prompt behavior when the setting is on.

Changes

Hook and briefing opt-out

Layer / File(s) Summary
Silence the ledger edit hook
hooks/guard_ledger.py, tests/test_guard_ledger.py
When DOCKET_HOOKS is exactly off, the guard returns success without reading input or printing output. Tests cover ledger and project-file edits. A test also confirms that on still prompts for a ledger edit.
Suppress briefing notices
docket/cli/context_cmd.py, tests/test_feature_hint.py, README.md, CHANGELOG.md
When DOCKET_HOOKS is exactly off, the context command suppresses the feature hint and update and merge notices. The ledger output remains. Tests and documentation cover the setting.

Priority: Not assessed

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Possibly related issues

  • NovusEdge/docket issue 32: The opt-out suppresses the guard_ledger prompt reported for flocc commit, but does not classify that command as a permitted ledger operation.
  • NovusEdge/docket issue 31: The opt-out suppresses the guard_ledger prompt reported for read-only grep, but does not change quote-aware command parsing.
Merge Risk: Low · up to 46d56

The opt-out silences hooks and briefing notices while retaining ledger output. This is mergeable with follow-up tests for notice suppression and stderr silence.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit sets the hooks to rest
The ledger stays, as rabbits guessed
No feature hint hops into view
Update and merge notices too
The quiet briefing prints its best

Comment @coderabbitai help to get the list of available commands.

@NovusEdge
NovusEdge merged commit 84f6a16 into main Oct 28, 2026
4 checks passed
@NovusEdge
NovusEdge deleted the hooks-off branch October 28, 2026 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant