Conversation
…-05-03 'not ts file?') Per DST-justifies-TS-quality-over-bash discipline (CLAUDE.md) + B-0156 TypeScript standardization for non-install scripts. The .sh version was the only existing implementation; Aaron flagged the gap. TS port preserves all behavior: - WINDOW_SIZE=7 / THRESHOLD=5 / GAP_THRESHOLD=15 env-var config - today + yesterday UTC shard collection - HHMMZ.md / HHMMZ-<hex>.md / HHMMSSZ-<hex>.md filename patterns - primary-key + disambiguator sort - minimal-observation heuristic: body < 600 chars OR observation-class regex - shard-density gap check - exit 0 always (informational only) Verified parity: both scripts produce identical "1 match (threshold 5); 5 minutes old (gap-threshold 15)" output on current main state. Bash version retained for cross-shell compatibility on environments without bun. Both kept in sync going forward.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7fb32ae877
ℹ️ 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".
There was a problem hiding this comment.
Pull request overview
Adds a TypeScript/Bun implementation of the existing hygiene check that detects “no-op cadence” and shard-density gaps by scanning recent tick-history shard files under docs/hygiene-history/ticks/.
Changes:
- Introduces
tools/hygiene/check-no-op-cadence-pattern.tsas a TS port of the existing bash script. - Implements shard collection/sorting for today+yesterday (UTC) and applies the minimal-observation + shard-gap heuristics.
- Emits warnings to stderr while preserving the “informational only (exit 0)” contract.
…REPO_ROOT + strict env validation + try-catch readdir + regex parity
6 substantive review findings absorbed:
P0 (line 46): REPO_ROOT walked upward until "/" → infinite loop on
Windows drive roots. Replaced with `git rev-parse --show-toplevel`
fallback to cwd, per repo-scripting.md convention.
P1 (line 5): Repo scripting convention requires `main` function +
named exports + `if (import.meta.main) { process.exit(main(...)) }`
guard. Restructured: collectShards / parsePositiveInt / runCheck /
isMinimalObservation now exported; main() function + entrypoint
guard at bottom.
P1 (line 108): readdirSync without try/catch threw on
exists-but-unreadable directories. Wrapped in try/catch returning
empty array.
P1 (line 154): `\s` differs between JS regex and grep -E semantics.
Replaced with explicit `[ \t]` for parity.
P1 (line 196): Warning message text didn't match bash version.
Restored "just-landed substrate" wording + matched bash gap-warning
text exactly.
P2 (line 50): parseInt accepted "7abc" → 7 (loose validation).
Added strict `^[0-9]+$` full-string check before parseInt.
Verified parity: both scripts produce identical output on current
main state ("1 match (threshold 5); 16 minutes old (gap-threshold
15)" — gap warning fires from both).
AceHack
added a commit
that referenced
this pull request
May 3, 2026
…xplicit 'tick shards X + Y, plus PR #1366'
AceHack
added a commit
that referenced
this pull request
May 3, 2026
…t tick-start (Aaron 'important to survival') (#1367) * docs(AUTONOMOUS-LOOP): land Check 0a no-op-cadence mechanical-check at tick-start (Aaron 2026-05-03 'important to survival') Aaron 2026-05-03: "i'd remember this now if i were you, sounds importatant to survival" — pointing at the tick-start mechanical- check discipline (bun tools/hygiene/check-no-op-cadence-pattern.ts). Existing tool catches the failure mode at decision-time: - ≥5 minimal-observation in last 7 shards OR - Most recent shard >15 min old Without it, agent drift into ~20-tick-acknowledgment-only patterns goes unnoticed until human maintainer surfaces manually (per the corrective lineage at 0913Z + 0918Z + #1366 shards earlier today). Step 0 split: 0a no-op-cadence mechanical check; 0b cadence-tracker grep (existing). Both run at tick-open before priority-ladder. Future-Otto reads docs/AUTONOMOUS-LOOP.md at session-start via CLAUDE.md tick-must-never-stop bullet's pointer; the discipline is now discoverable as carved-sentence-plus-index Layer-3 substrate. * fix(#1367 carved-sentence compression per Aaron 2026-05-03): Step 0 from ~50 lines verbose prose → ~22 lines dense operational form * fix(#1367 review): clarify lineage prose — '1366 shard' ambiguity → explicit 'tick shards X + Y, plus PR #1366'
AceHack
added a commit
that referenced
this pull request
May 3, 2026
…ath; Aaron 2026-05-03 'fully converted' directive) (#1371) Aaron 2026-05-03 directive: "we should clean up oh sh and any oh sh wehre we have the ts i thought we were fully converted" + carve-out "we need install graph sh files don't forget to go to the devloper where they live but after install it's ts was have a common base". This PR removes 13 zero-ref .sh files in tools/hygiene/ where .ts equivalents exist. All are post-install (run by tick discipline, hygiene checks, etc. — bun is available). Install-graph .sh files under tools/setup/ stay (pre-bun chicken-and-egg). Removed (13): - append-tick-history-row.sh - audit-agencysignature-main-tip.sh - audit-cross-platform-parity.sh - audit-git-hotspots.sh - audit-machine-specific-content.sh - audit-md032-plus-linestart.sh - audit-missing-prevention-layers.sh - audit-post-setup-script-stack.sh - audit-tick-history-bounded-growth.sh - capture-tick-snapshot.sh - check-no-op-cadence-pattern.sh (just-merged sibling per #1366) - counterweight-audit.sh - validate-agencysignature-pr-body.sh Deferred (4 referenced .sh): - audit-memory-index-duplicates.sh (4 refs) - audit-memory-references.sh (4 refs) - check-archive-header-section33.sh (1 ref) - check-no-conflict-markers.sh (1 ref) - check-tick-history-order.sh (1 ref) These need reference updates first before the .sh can safely be removed. Also: AUTONOMOUS-LOOP.md Step 0a — removed "Bash sibling .sh" carve-out text since the no-op-cadence-pattern.sh is now removed; Step 0a is .ts-only. Reference: any future scripts/CI/hooks that need to invoke these should call the .ts version directly via bun.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per DST-justifies-TS-quality-over-bash + B-0156 TS standardization. Aaron 2026-05-03 flagged the bash-only state as a gap. TS port preserves all behavior; verified parity with bash version (both produce identical output on current main state). Bash version retained for cross-shell compatibility on environments without bun.