Skip to content

feat(check): report a daily kit watch that stopped running - #995

Open
sandstream wants to merge 1 commit into
mainfrom
claude/web-kit-status-sync-p6fg9a-watch-freshness
Open

sandstream wants to merge 1 commit into
mainfrom
claude/web-kit-status-sync-p6fg9a-watch-freshness

Conversation

@sandstream

Copy link
Copy Markdown
Owner

Owner decision from kit-research patching-what-you-build-vs-kit: yes.

Why

Dennis Beatty's Plex server stopped updating itself and nobody noticed until honeypots reported it. kit's equivalent is kit watch, the daily ranking of open security PRs and Dependabot alerts. Measured in a scratch repository:

State kit watch status kit check Status line
never set up nothing no row nothing
last run 40 days ago sec-prs:stale no row sec-prs:stale, Claude Code only

The stale marker reached only Claude Code users, with no age and no next step. Under the owner's rule from today, a signal for one harness either covers the others or says it does not.

What

src/check-watch-freshness.ts, appended to the security step of kit check (src/check-run.ts):

State Row
cache younger than 48 h pass: "last kit watch run 6 h ago; 0 open security PR(s) ranked"
cache older warn: "the last kit watch run was 40 days ago (2026-10-14): the daily run has stopped, so new security PRs and Dependabot alerts are not being ranked", suggestion kit watch run, then check the scheduler entry
no cache, but .github/workflows/kit-watch.yml or the project's launchd plist exists warn: scheduled but never ran
no cache and no entry kit can see no row (the watch is opt-in)
  • 48 h is the threshold the status line already uses (WATCH_STALE_MS, now exported).
  • The launchd label derivation moves into watchLaunchdLabel() in src/watch.ts, so kit watch install and the check use one function.
  • A cron entry cannot be seen: kit prints the line and never edits a crontab. The doc comment says so.

Measured after the change, on the same 40-day-old cache: ! security watch freshness warn the last kit watch run was 40 days ago (2026-10-14) ….

Verification

  • src/check-watch-freshness.test.ts: five tests (no setup, fresh, stale, scheduled-but-never-ran for workflow and launchd, unverified).
  • node scripts/prepush.mjs: build, format, lint, tests of the changed files, self-audit pass. kit review and the new-source-file check fail locally for container reasons. Semgrep did not run (not installed here).
  • runCheckGate's complexity warning predates this change and is in the baseline; this PR does not touch that function.
  • No protected path. Harness-neutral.

Generated by Claude Code

A stopped watch showed only as sec-prs:stale in Claude Code's status
line, with no age; kit check had no row, so other harnesses never saw
it. The row warns with the age and date, or when a scheduler entry
exists but the watch never ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
@github-actions

Copy link
Copy Markdown

Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published.

@sandstream-kit-reviewer sandstream-kit-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kit review gate at 3cd9770a79e4: not approved.

  • checks did not pass: windows shard 3/4, windows-native

Copy link
Copy Markdown
Owner Author

Re-ran the failed Windows jobs once. Shard 3/4 failed in preserves both history links when read-only mode starts after publication, a test this PR does not touch; windows-native only reports the shard result.


Generated by Claude Code

This branch has not been deployed

No deployments
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.

2 participants