Repository navigation
feat(watchdog): test mode with synthetic candidates and a test-only marker - #492
Conversation
…arker Standards-sync audit Phase 1.1. The watchdog's issue-write path has never executed: with every target disarmed there is nothing to scan, so the create/update/close/fail lifecycle that gates fleet re-arm is unproven. - New workflow_call inputs: test-mode (boolean, default false) and test-synthetic-candidates (string, default '1' — string so '0', which drives the close-path proof, survives the caller's empty-string fallback). - Test mode empties the scan list (no live probing; the real-scan path is byte-identical either way) and fabricates labeled SYNTHETIC rows whose links point at the producing run. - Marker and title become single-source workflow env (ALERT_MARKER / ALERT_ISSUE_TITLE) that diverge under test-mode, so a test issue in the tracking repository is invisible to the production lookup — the same App authors both, so identity alone cannot separate them. All five former literal sites now read the env. - Job and step names are byte-identical to v0.14.2: the standards caller's failure classifier matches them as literal strings. - Tests: 9 new cases (synthetic counts 2/1/0, off-on-'false', off-on-absent, and raw-YAML pins asserting each marker/title literal is defined exactly once with every consumer reading the env); the harness gains explicit TEST_MODE/ALERT_MARKER env management and a context mock. The suite's own ISSUE_TITLE constant never matched the workflow's real title — aligned while pinning it. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_013NhxMDn7vZdbs7Cq32m56M
Security review —
|
|
Claude finished @kyle-sexton's task in 6m 41s —— View job Claude's review
SummaryReviewed the full diff against One issue, CI-confirmed on this PR:
Other CI failures on this run ( Note: my sandbox blocked running No inline comments — the diff is otherwise correct and consistent with the workflow's existing conventions. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c292461cfe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Last security-reviewed head: |
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
…he suite Codex review on the test-mode PR: Number() would map an empty, negative, or garbled test-synthetic-candidates to 0/NaN and silently take the all-clear path — a typo'd create/update proof would close the test issue while appearing to succeed. Test mode now rejects any raw value outside '0'/'1'/'2' before use; outside test mode the value stays ignored. Two new cases cover both sides. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_013NhxMDn7vZdbs7Cq32m56M
|
Addressed in 82d0dc6: test mode now rejects any raw count outside '0'/'1'/'2' with core.setFailed before use (an invalid value can no longer fake the all-clear path), ignored as before outside test mode; two new cases cover both sides. |
Security review —
|
….0 re-pin (#416) ## Summary Phase 1.2+1.3 of the standards-sync audit: the watchdog caller gains the test-mode dispatch surface, three latent classifier defects are fixed, and the caller re-pins to v0.15.0 (the test-mode release). The full tracking-issue lifecycle proof ALREADY RAN against this branch — evidence below and in the plan. ## Fix - `classify-alert-failure`: job-name match by suffix (the jobs API returns reusable jobs prefixed `alert / …` — the exact match had never hit); job-level `actions: read` (the jobs API 404s under contents:read-only); step conclusions read from the jobs listing (the previously targeted `/actions/jobs/<id>/steps` endpoint does not exist). Each was latent — this job had never executed before the proof dispatches. - `workflow_dispatch` gains `test-mode` + `test-synthetic-candidates` (string; `'0'` survives the explicit empty-string fallback), passed with schedule-safe defaulted expressions; `concurrency` group added so a dispatched proof and the hourly poll cannot race the rolling issue. - Re-pin to `v0.15.0` (`01c3295…`); policy.json contract entry at the new SHA with the two new inputs (same-PR lockstep); runner-policy README rollout paragraph; stale rollout-window comment re-cut; Phase 1 plan + proof artifact ride this branch. ## Verification Pre-merge proof (branch-ref dispatches; full detail in `docs/topics/standards-sync-audit/PLAN.md` Phase 1.3): medley#1856 created (2 SYNTHETIC rows, run 32044893913) → updated (1 row, run 32045258184; deliberate failure classified `infrastructure-failure=false`, liveness SKIPPED) → closed `completed` (run 32045329964). `node --test components/runner-policy/runner-policy.test.mjs` 272/272; manifest validator green; lefthook green. The hourly cron shape is exercised by the next scheduled tick post-merge (expressions resolve to false/'1' on schedule events). ## Related Closes #415. Related: #406 (audit umbrella), melodic-software/ci-workflows#492 (the reusable's test mode). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_013NhxMDn7vZdbs7Cq32m56M --------- Co-authored-by: Claude Fable 5 <[email protected]>
Summary
Phase 1.1 of the standards-sync audit: the stuck-automerge watchdog's issue-write path has never executed (fleet disarmed → zero candidates), so the create/update/close/fail lifecycle that gates fleet re-arm is unproven. This adds a dispatchable proof path.
Fix
workflow_callinputs:test-mode(boolean, false) +test-synthetic-candidates(string,'1'— string so'0', the close-path proof, survives the caller's empty-string fallback).ALERT_MARKER/ALERT_ISSUE_TITLE) diverging under test-mode — a test issue in medley is invisible to the production lookup (same App authors both; identity alone cannot separate them). All five former literal sites read the env.Verification
node --test .github/scripts/standards-sync-stuck-automerge-alert.test.cjs→ 57/57 (9 new: synthetic counts 2/1/0, off-on-'false', off-on-absent, raw-YAML single-source pins for marker/title across all five consumer sites); full.github/scriptssweep 723/723;yqconfirms the input contract; job-name diff vs v0.14.2 empty.Related
Closes #491. Related: melodic-software/standards#406 (audit umbrella; Phase 1 plan in that repo's docs/topics/standards-sync-audit/PLAN.md).
🤖 Generated with Claude Code
https://claude.ai/code/session_013NhxMDn7vZdbs7Cq32m56M