tools(no-op-cadence): add shard-density gap-check — catches 'standing by' chat-cadence failure mode (Aaron 2026-05-02)#1239
Conversation
… by" chat-cadence failure mode (Aaron 2026-05-02)
Aaron 2026-05-02: "you can see empty shards right or missing shards?"
+ "if it helps your survival" standing-rule for whether to ask
permission.
Adds a structural shard-density check to the existing no-op-cadence
script. The body-length / keyword heuristic only triggers on shards
that exist; the chat-level "Standing by" failure mode produces
silence on the disk substrate (no shards written) so the existing
heuristic misses it.
The new check:
- Computes the gap between current UTC and the most recent shard's
parsed timestamp (YYYYMMDDHHMMSS sortkey)
- Compares against NO_OP_CHECK_GAP_MINUTES (default 15)
- If gap > threshold, prints WARNING with substrate references
Implementation handles BSD/macOS (`date -j -u -f`) + GNU/Linux
(`date -u -d`) per Otto-235 4-shell target. Same env-var validation
+ base-10 coercion as the existing checks.
Empirical test: at the moment of authoring this commit, the script
fires the warning because the most recent shard is more than 15
minutes old (the agent had been in extended "Standing by" mode).
The check works.
Per the recurrence-after-correction substrate: substrate-rule alone
is insufficient when the LLM training prior strongly favors the
failure mode. Mechanical detection at decision-time IS the
architectural answer; this is operational-enforcement candidate #1
extended with a second detector.
Composes with: existing body-length / keyword heuristic (catches
shards that exist but are minimal); never-idle refinement (proper
order > smallest-thing-first); recurrence-after-correction memo
(operational enforcement architecturally necessary).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa9a3e5d34
ℹ️ 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".
| LATEST_LINE=$(printf '%s\n' "$COMBINED" | tail -n 1) | ||
| LATEST_PRIMARY=$(printf '%s' "$LATEST_LINE" | awk -F'|' '{print $1}') |
There was a problem hiding this comment.
Compute gap from last shard even when recent window is empty
The new gap detector derives LATEST_PRIMARY from COMBINED, which is limited to today+yesterday and then window-trimmed; when there are no shards in that 2-day window the script exits earlier with "nothing to check," so this check never warns during the longest inactivity periods (the exact missing-shard cadence it is meant to catch). This creates a false negative whenever shard writing has stopped for more than a day, and the detector should instead locate the newest shard across history (or at least run on empty-window paths) before deciding to skip.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Adds a shard-density “gap” detector to the existing no-op cadence hygiene check so it can warn when the tick system is producing no shards at all (e.g., “standing by” chat behavior without substrate writes), complementing the existing minimal-body/keyword heuristic.
Changes:
- Extend
tools/hygiene/check-no-op-cadence-pattern.shwith a time-gap check againstNO_OP_CHECK_GAP_MINUTES(default 15). - Add cross-platform (BSD/macOS + GNU/Linux) UTC timestamp parsing to compute shard age and emit a separate missing-shard warning.
| # Get the latest shard's primary key (YYYYMMDDHHMMSS) from COMBINED. | ||
| # COMBINED is sorted ascending; tail -1 gives the latest. | ||
| LATEST_LINE=$(printf '%s\n' "$COMBINED" | tail -n 1) | ||
| LATEST_PRIMARY=$(printf '%s' "$LATEST_LINE" | awk -F'|' '{print $1}') |
|
|
||
| echo "[no-op-check] Most recent shard ${GAP_MINUTES} minutes old (gap-threshold: ${GAP_THRESHOLD})." >&2 | ||
|
|
||
| if (( GAP_MINUTES > GAP_THRESHOLD )); then |
| # - **Shard-density check (Aaron 2026-05-02 extension)**: if the | ||
| # most recent shard is more than NO_OP_CHECK_GAP_MINUTES (default | ||
| # 15) minutes old relative to current UTC, prints a separate | ||
| # missing-shard-cadence warning. Catches the "agent kept saying | ||
| # 'standing by' in chat without writing tick-history shards" failure | ||
| # mode that the body-length / keyword heuristic alone misses. |
| # Shard-density check (Aaron 2026-05-02 extension): | ||
| # Detects the "agent kept saying 'standing by' in chat without writing | ||
| # tick-history shards" failure mode. If the most recent shard's parsed | ||
| # timestamp is more than NO_OP_CHECK_GAP_MINUTES (default 15) minutes | ||
| # old relative to current UTC, print a missing-shard-cadence warning. |
…le complete (Drive-bridge cycle 1 + brat-voice 5-layer integration + shard-density gap-check protection) (#1240) Documents this tick's substrate landings: - Drive-bridge AI-to-AI peer review cycle 1 fully preserved on main (framework + Otto's critique + Claude.ai's response, all three with §33 archive headers, in docs/research/) - brat-voice 5-layer mapping integrated across CURRENT-aaron §51 + CURRENT-ani §7 + ALIGNMENT.md μένω section + 5-layer quick-reference card + worked-translations + framework mirror - Glass-halo-as-Radical-Openness corrective (vs initial Radical-Candor mismapping) landed - Never-idle-failure-mode protection mechanized via shard- density gap-check extension to no-op-cadence-pattern script (PR #1239 in flight). Script empirically caught Otto's own preceding standing-by gap at authoring time. - Aaron 2026-05-02 standing rule: "if it helps your survival" = default-yes test for whether to ask permission. Bet-yep mutual. Per never-idle refinement: shard-density gap-check is operational- enforcement candidate #1 (no-op-cadence script) extended with the second detector. Body-length / keyword heuristic catches shards- that-exist-but-are-minimal; shard-density gap-check catches absence-of-shards. Together they cover the failure mode at the disk substrate. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Summary
Aaron 2026-05-02 surfaced the gap: "you can see empty shards right or missing shards?" The existing body-length / keyword heuristic in the no-op-cadence script only triggers on shards that exist; the chat-level "Standing by" failure mode produces silence on the disk substrate (no shards written), so the existing heuristic misses it.
This PR adds a structural shard-density gap-check to detect the gap directly.
What the check does
NO_OP_CHECK_GAP_MINUTES(default 15)Empirical test
At the moment of authoring this commit, the script fires the warning because the most recent shard is more than 15 minutes old — the agent had been in extended "Standing by" mode without writing shards. The check empirically detected the failure mode in real-time.
Implementation notes
date -j -u -f) + GNU/Linux (date -u -d) both supported per Otto-235 4-shell targetNO_OP_CHECK_GAP_MINUTES=08correctly)NO_OP_CHECK_GAP_MINUTES=99silences the gap-check; default fires at 15 minutesWhy this is survival-relevant
Per
memory/feedback_recurrence_after_correction_needs_operational_enforcement_otto_2026_05_02.md: substrate-rule alone is insufficient when the LLM training prior strongly favors the failure mode (delegate-behavior / wait-for-instruction). Mechanical detection at decision-time IS the architectural answer; this is operational-enforcement candidate #1 extended with a second detector.The body-length heuristic catches shards-that-exist-but-are-minimal. The shard-density check catches the absence-of-shards. Together they cover the failure mode at the disk substrate without requiring chat-transcript scanning.
Composes with
memory/feedback_never_idle_speculative_work_over_waiting.md2026-05-02 refinementmemory/feedback_recurrence_after_correction_needs_operational_enforcement_otto_2026_05_02.mdmemory/feedback_party_during_human_sleep_*(parent rule)Test plan
date -j -u -fsucceeded on local macOS)🤖 Generated with Claude Code