docs(cir): Phase 0 design lock — Cron Incident Review - #53219
laulopezreal wants to merge 1 commit into
Conversation
6d4e1e9 to
52c4886
Compare
|
RSA evidence — Phase 0 CIR design lock Head: Reviewer + simplifier + final critic completed. Resolved findings:
Verification:
Final critic summary: all six hard gates are satisfied; no new blocking issues were introduced. |
Field data — 2026-07-09 incident reviewFor the CIR Phase 1 design, here's a concrete case to add to the failure taxonomy. Observable
Root-cause class — overlaps three known lanes
Cross-reference: this is the 4th state case for 3 states ( What we did locally (workaround, not upstream claim):
The CIR frame I think this fits under: artifact-existence-as-invariant, independent of marker schemes. Possibly listed under the existing failure-taxonomy entry for #36845 (LLM-fallback-masks-failure) as the no-marker sibling. Cross-posting to #56790, #48072, #36845 with the same incident summary so the upstream view is consistent. Happy to be a test case if a |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the detailed Phase 0 investigation. Before this can serve as a design lock, the current-main map and scope need updating.
Problems
docs/cron-incident-review-design.md:67uses obsolete scheduler anchors. Current main runsrun_jobatcron/scheduler.py:3452, delivery at3511-3516, andmark_job_runat3532; a hook must be after delivery to classifydelivery_error.docs/cron-incident-review-design.md:428/:450assigns roothermes cronwork tohermes_cli/commands.py, but the current parser ishermes_cli/subcommands/cron.py:15-163and dispatch ishermes_cli/main.py:4263.- The 2026-07-09 field-data comment reports a successful, delivered run with missing required artifacts. The taxonomy at
:147-163and tests at:456-479lack thatdata_missing/artifact-invariant case.
Suggested changes
- Re-trace the current pipeline and CLI surfaces, then update the slices and test matrix.
- Add an explicit design decision and coverage for artifact verification before calling this a lock.
Automated hermes-sweeper review.
| - Returns `(success, full_output_doc, final_response, error_message)` | ||
| - `full_output_doc` is what gets stored; `final_response` is what gets delivered | ||
|
|
||
| `_process_job(job)` (line 2907) is only a thin wrapper that calls `run_one_job(job)`. `run_one_job(job)` (line 2748) owns the execute → save → deliver → mark pipeline: it calls `run_job()` (line 2764), `save_job_output()`, `_deliver_result()`, and `mark_job_run()` (line 2803). CIR hooks in `run_one_job()` **after** `run_job()` returns and **before** `mark_job_run()` persists state, so it can see both job execution errors and delivery errors. |
There was a problem hiding this comment.
This needs re-tracing against current main. run_one_job now calls run_job at cron/scheduler.py:3452, then _deliver_result at 3511-3516, then mark_job_run at 3532; a hook immediately after run_job cannot observe delivery_error. Specify the post-delivery, pre-mark location.
|
|
||
| ## 3. Failure Taxonomy and Stage Mapping | ||
|
|
||
| | Stage | Trigger | `success` | CIR Class | Source | |
There was a problem hiding this comment.
Please add the artifact-existence failure case from the 2026-07-09 field-data comment. A run can be marked ok and delivered while its required Markdown/HTML artifacts are absent, so this taxonomy and the test matrix need an explicit data_missing/required-artifact design decision.
| | **dv9.4** | Scheduler integration — capture hook | `cron/scheduler.py`: hook in `run_one_job()` after `run_job()` returns and before `mark_job_run()` | Integration: fake-job run that fails → incident written; `[SILENT]` runs → no incident; `no_agent=True` failures → incident with correct stage | | ||
| | **dv9.5** | ActionToken generation + validation | `cron/action_token.py` (new) | Unit: token roundtrip; expired token rejected; wrong action rejected; replayed nonce rejected; forged HMAC rejected | | ||
| | **dv9.6** | Owner-agent review session | `cron/review_agent.py` (new); subprocess launch | Integration: `HERMES_CIR_REVIEW=1` blocks recursive CIR; subprocess env isolation; `CronReviewRequest` schema validation | | ||
| | **dv9.7** | CLI surface — `hermes cron incidents` | `hermes_cli/commands.py` + new subcommand | CLI: `incidents list`, `incidents show <id>`, `cron-review <token>` command; token redemption flow | |
There was a problem hiding this comment.
The root hermes cron parser is currently hermes_cli/subcommands/cron.py:15-163, dispatched by hermes_cli/main.py:4263; hermes_cli/commands.py is only the interactive slash-command registry. Update this slice to cover the actual CLI surface and separately identify any gateway/TUI fallback routing.
…ata_missing case, mark NousResearch#94692 landed Address maintainer review on PR NousResearch#53219: 1. Refresh scheduler/CLI/Discord anchors to current main: - run_job 1962 -> 5063, run_one_job 2748 -> 6663, _run_one_job_body 6726, _process_job 2907 -> 7463, _deliver_result 1060 -> 2856, tick 2830 -> 7263, SILENT_MARKER 244 -> 554 (cron/scheduler.py) - jobs.py anchors refreshed (mark_job_run 1173 -> 2552, etc.) - hermes_cli/commands.py -> hermes_cli/subcommands/cron.py (build_cron_parser at :15; dispatch via hermes_cli/main.py:13033) - Discord adapter anchors refreshed (ExecApprovalView 5797 -> 8787, etc.) 2. Add data_missing / artifact-invariant failure class to the taxonomy (post-run stage, success=True but required artifacts absent) plus DV-ARTIFACT design decision in 3.1 and a test-matrix case (dv9.10). 3. Mark Slice 1 (durable incidents, signature dedup, ack, hermes cron incidents CLI) as landed in PR NousResearch#94692 (open); restructure section 8 into landed vs remaining roadmap; slices/files/tables now build on the existing cron/incidents.py and incidents CLI. Docs-only change.
1ab0a17 to
fe75643
Compare
|
Refreshed the design doc to address the maintainer review: re-traced all scheduler/CLI/Discord anchors to current main, added the data_missing / artifact-invariant failure class (field-report case), fixed the CLI references to hermes_cli/subcommands/cron.py, and marked slice 1 (incident store, dedup, ack, |
|
cc @teknium1, this addresses your July 15 review asks (stale anchors re-traced to current main, the data_missing / artifact-invariant failure case added, CLI refs moved to hermes_cli/subcommands/cron.py) and marks slice 1 as landed in PR #94692. Would appreciate a re-look whenever you have a moment. |
|
Thanks for the refresh — the re-traced anchors, the Resolving this PR now: the design has done its job. Slice 1 (incident store, signature dedup, ack, We're not merging the design document into the tree — long-range multi-phase design docs go stale against a fast-moving main faster than they pay rent, and this PR remains the durable reference for the roadmap. For the remaining slices, focused PRs against the landed
Reference this design doc from each slice PR so the context follows the code. Appreciate the sustained, well-structured work on this — the Phase 0 → landed-slice arc is exactly how we like big features to arrive. |
Summary
docs/cron-incident-review-design.md— Phase 0 discovery/design artifact for Hermes Cron Incident Review (CIR), grounded in exact code paths fromcron/jobs.py,cron/scheduler.py,plugins/platforms/discord/adapter.py, andagent/redact.py.Key Design Decisions
_process_job()afterrun_job()returns, beforemark_job_run()persists state — minimal diff to scheduler.ExecApprovalView/send_exec_approval()pattern (adapter.py:4497, 5459).send_cron_review()+CronReviewViewis a ~80-line addition./cron-review <token>) for all non-Discord platforms.hmac,hashlib,uuid,json,fcntlonly.Bead
hermes-agent-dv9.1
Test plan
git diff --checkpassed (no whitespace errors)🤖 Generated with Claude Code