Skip to content

Merge the two hook-freshness flags into one - #747

Merged
mergify[bot] merged 1 commit into
mainfrom
stack/EdbertChan/flags/hook-freshness-flag/merge-two-hook-freshness-flags-one--960a699d
Sep 17, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
stack/EdbertChan/flags/hook-freshness-flag/merge-two-hook-freshness-flags-one--960a699d

Conversation

@EdbertChan

@EdbertChan EdbertChan commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Summary

A helper warns when this project's copy on your computer is out of date. One setting now turns it off, keeps it offline, or lets it check online first.

Having two settings for one helper made it hard to see which one wins.

Now one setting takes three words. The old second setting is ignored, and the warning says so.

Review Claim

One setting picks between off, offline, and check online first for the out-of-date warning.

Review Lane

behavior

Review Unit

engine-runtime

Safety Invariant

The hook only gives advice and never goes online unless the flag says fetch.

Slice Rationale

Bottom of a two-PR stack; the root README row follows as its own review unit.

  • CATSTACK_HOOK_FRESHNESS=off|local|fetch, default local. 0 still means off.
  • fetch replaces CATSTACK_HOOK_FRESHNESS_FETCH=1. A leftover _FETCH and unknown values are named in the advisory, never dropped silently.
  • The flag is still read from the process environment only.

Non-goals

  • No change to what the advisory checks or how often it fires.
  • Reading the flag from .env files is not added here.

Test Plan

Test Plan
  • python3 -m unittest discover -s engine/hooks/hook-freshness/tests before the fix:
    Ran 25 tests in 0.103s
    FAILED (failures=3, errors=2)
    
    after the fix:
    Ran 25 tests in 0.121s
    OK
    
  • python3 scripts/ci/check_hook_test_coverage.py engine/hooks/hook-freshnessOK (1 hook(s) checked)
  • python3 engine/skills/make-pr/scripts/preflight.py --base origin/mainunit engine-runtime: 3 file(s), all gates ok

Revert Plan

Revert Plan
  • Safe to revert? Yes, after reverting the README PR stacked on it.
  • Revert command: git revert <sha>
  • Post-revert steps: set CATSTACK_HOOK_FRESHNESS_FETCH=1 again if fetch was in use.
  • Data migration? No

🤖 Generated with Claude Code

CATSTACK_HOOK_FRESHNESS now takes off, local, or fetch. local is the
default and never touches the network; fetch replaces
CATSTACK_HOOK_FRESHNESS_FETCH=1; off (and the old 0) silences the hook.
The retired name and unknown values are named in the advisory instead of
being dropped silently.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Change-Id: I960a699d2a6b4cef1b620fcac3e1f1e349d52af5
@EdbertChan

Copy link
Copy Markdown
Owner Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 Merge the two hook-freshness flags into one #747 👈
2 README: document the three CATSTACK_HOOK_FRESHNESS settings #748

@mergify

mergify Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@EdbertChan

Copy link
Copy Markdown
Owner Author

@Mergifyio queue

@mergify

mergify Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 6 minutes 52 seconds in the queue, including 6 minutes 18 seconds running CI.

Required conditions to merge
  • check-success = lint
  • check-success = test
  • check-success = validate

@mergify mergify Bot added the queued label Sep 17, 2026
@EdbertChan

Copy link
Copy Markdown
Owner Author

@Mergifyio queue admin-bypass

@mergify
mergify Bot merged commit 7e54837 into main Sep 17, 2026
5 of 8 checks passed
@mergify mergify Bot removed the queued label Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant