Skip to content

shard(tick): 2026-05-16T02:10Z — Otto-CLI cold-boot cron-rearm + Lior-contention defer#3676

Merged
AceHack merged 2 commits into
mainfrom
shard/tick-0210z-otto-cli-2026-05-16
May 16, 2026
Merged

shard(tick): 2026-05-16T02:10Z — Otto-CLI cold-boot cron-rearm + Lior-contention defer#3676
AceHack merged 2 commits into
mainfrom
shard/tick-0210z-otto-cli-2026-05-16

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 16, 2026

Tick shard for the autonomous-loop cold-boot at 02:08Z.

Co-Authored-By: Claude noreply@anthropic.com

…-contention defer drift cleanup

PR #3673 (B-0540 N≥6 sharpening) merged at 01:55:43Z. Three non-required-check
drift signals remain on the rollup (BACKLOG.md generated-index, backlog ID
uniqueness, tsc tools). Lior active (3 processes incl. PID 27106 at 26+min
CPU); per the broken-commit canary rule, worktree creation deferred. Borrow
pattern used for shard write. Brief-ack #1; N=5 counter headroom intact.

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 16, 2026 02:12
@AceHack AceHack enabled auto-merge (squash) May 16, 2026 02:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new hygiene-history tick shard documenting the 2026-05-16T02:10Z Otto-CLI cold-boot state, cron re-arm, Lior contention, and deferred drift-cleanup candidates.

Changes:

  • Records tick-start state and prior PR context.
  • Documents why no code-substrate cleanup was attempted.
  • Captures borrow-pattern execution notes and next-tick candidates.
Comments suppressed due to low confidence (2)

docs/hygiene-history/ticks/2026/05/16/0210Z.md:32

  • P1: This rule-file link has the same five-level path bug: from docs/hygiene-history/ticks/YYYY/MM/DD/, ../../../../../.claude/... points under docs/ instead of the repository root. Add the missing parent segment so the cited rule is reachable.
But: **Lior is active right now** — three `gemini -p Act as Lior...` processes in `ps -A` (PIDs 26887, 26888, 27106 — the last at 26+ min CPU). Per [`.claude/rules/codeql-no-source-on-docs-only-pr-is-broken-commit-canary.md`](../../../../../.claude/rules/codeql-no-source-on-docs-only-pr-is-broken-commit-canary.md):

docs/hygiene-history/ticks/2026/05/16/0210Z.md:49

  • P1: This rule-file link also climbs only to docs/, leaving the claim-acquire-before-worktree-work.md reference broken. Use the six-level path to the repository-root .claude/rules directory.
Per [`.claude/rules/claim-acquire-before-worktree-work.md`](../../../../../.claude/rules/claim-acquire-before-worktree-work.md):

Comment thread docs/hygiene-history/ticks/2026/05/16/0210Z.md Outdated
Comment thread docs/hygiene-history/ticks/2026/05/16/0210Z.md Outdated
Tick shards live at `docs/hygiene-history/ticks/YYYY/MM/DD/HHMMZ.md`, 5
directories below `docs/`. `../../../../../` lands at `docs/`, not repo
root. `.claude/rules/...` and `docs/backlog/...` need 6 `..` segments
(`../../../../../../`) to resolve from repo root — matching the canonical
pattern in `docs/hygiene-history/ticks/2026/05/15/0025Z-pr3320.md`.

Mechanical fix: 4 `.claude/rules/...` links + 1 `docs/backlog/...` link
in `docs/hygiene-history/ticks/2026/05/16/0210Z.md`. All 5 target files
verified extant from repo root.

Co-Authored-By: Claude <noreply@anthropic.com>
@AceHack AceHack merged commit 7d19444 into main May 16, 2026
22 of 24 checks passed
@AceHack AceHack deleted the shard/tick-0210z-otto-cli-2026-05-16 branch May 16, 2026 02:22
AceHack added a commit that referenced this pull request May 16, 2026
…rge fix) (#3680)

Same Copilot P1 pattern flagged on PR #3676 (0210Z shard): tick shards live
5 directories below docs/, so `../../../../../` lands at `docs/` not repo
root. `.claude/rules/...` and `docs/backlog/...` need 6 `..` segments.

PR #3679 (0213Z) merged at 02:19:07Z before review caught these — fixing on
main: 2 broken links (1 .claude/rules, 1 docs/backlog) → correct 6-level
form. Both target files verified extant.

Co-authored-by: Claude <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 16, 2026
Copilot flagged MD032 (blank lines around lists) — the list of three
bullets starting at line 21 came immediately after the paragraph at
line 19. Add the missing blank.

Resolves Copilot review thread on PR #3681.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 16, 2026
…fixes (#3676 + #3680) (#3681)

* shard(tick): 2026-05-16T02:18Z — thread-investigation catch + 5→6 .. fixes (#3676 + #3680)

Tick 3 of post-cold-boot loop. PR #3676 unresolved threads surfaced a real
Copilot P1: tick-shard relative links use 5 .. (→ docs/) instead of 6 ..
(→ repo root). Fixed on PR #3676's branch; same bug landed on main via
PR #3679 race — PR #3680 fixes post-merge. Threads resolved via correct
GraphQL variable-binding form. This shard uses correct 6-level paths.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(md032): blank line before list under 'PR #3676 status at tick-start'

Copilot flagged MD032 (blank lines around lists) — the list of three
bullets starting at line 21 came immediately after the paragraph at
line 19. Add the missing blank.

Resolves Copilot review thread on PR #3681.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 16, 2026
…cleanup pending) (#3692)

* feat(hygiene): tick-shard relative-path audit (detect-only; baseline cleanup pending)

Bug class: tick shards live 5 directories below docs/, so the count-the-..
pattern is error-prone. Empirical evidence this session: PR #3676 + PR #3679
both shipped with 5-`..` paths that resolved to docs/ instead of repo root;
Copilot caught both via review threads, but the broken links landed on main
briefly (PR #3680 fixed post-merge).

This audit walks docs/hygiene-history/ticks/**/*.md, extracts every relative
markdown link target (skipping URLs/anchors/code-blocks/images), resolves
from the shard's directory, and reports missing-or-escaping targets.

Empirical baseline (run on origin/main at 2026-05-16T02:48Z):
  - 833 tick shards scanned
  - 17 broken relative-path links across multiple historical shards
  - Real bug classes detected: wrong-depth `..` (B-0442 link in 1436Z),
    malformed link syntax (`docs/api(v2`), missing-file refs

Detect-only initially. CI enforce wires in after baseline cleanup (same
pattern as §33 migration xrefs: PR #3513#3529#3548#3552 → enforce).

`bun --bun tsc --noEmit -p tsconfig.json` exit 0.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(audit): skip placeholder targets (..., parens, identifier-only)

First baseline showed 17 findings; ~7 were false positives where shard prose
contained inline `[label](path-shape)` constructs as pattern illustrations:
- `path` / `otto-kenji-...` / `.claude/...` / `docs/...` — placeholder names
- `docs/api(v2` — fragmentary malformed syntax
- `docs/research/...amara-...md` — ellipsis-marked example

Add `isPlaceholderTarget` filter:
- contains `...` → placeholder
- contains `(` or `)` → malformed/fragment
- no `/` AND no `.` → pure identifier (not a path)

Re-run: 17 → 10 findings. The 10 remaining are real broken links
(wrong-depth `..` in `1436Z.md`, `0329Z.md`, `0852Z.md`; one borderline
`docs/foo.md` example). Worth a separate baseline-cleanup PR.

`bun --bun tsc --noEmit -p tsconfig.json` exit 0.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(audit): 4 Copilot P1/P2 — sonarjs disable, main export, URI scheme, --files validation

PR #3692 review threads:

P1 (lint failure risk):
1. spawnSync("git", ...) at repoRoot() needs the standard repo-convention
   `// eslint-disable-next-line sonarjs/no-os-command-from-path` comment.
   Every sibling tool (check-tick-history-shard-schema.ts:23, etc.) uses it.
2. Top-level `process.exit(main(...))` blocks safe module-import for tests
   or composition. Switch to `export function main` + guarded
   `if (import.meta.main) { process.exit(main(...)); }` per the sibling
   audit-section-33-migration-xrefs.ts convention.

P2 (precision / brittleness):
3. isRelativeTarget only exempts http(s) + mailto. Replace with a generic
   `<scheme>:` regex (`/^[A-Za-z][A-Za-z0-9+.-]*:/`) so ftp:, file:, tel:,
   data:, etc. are properly classified as absolute.
4. --files inputs aren't validated; readFileSync throws on missing path.
   Add an explicit existence check at the args boundary; emit
   `input not found: <path>` and return exit 64.

Local verify:
- Baseline still 10 findings (no regression)
- `--files /tmp/does-not-exist` → exit 64 with structured message
- `bun --bun tsc --noEmit -p tsconfig.json` exit 0

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(audit): 2 Copilot fixups — directory inputs + Windows path separator

PR #3692 second-pass review threads:

P1 (line 244): --files validation only checked existsSync; a directory or
unreadable file passed the preflight, then `readFileSync` threw EISDIR/EACCES
inside extractLinks, bypassing the structured exit-64 contract. Tighten to
also require `statSync(abs).isFile()` and wrap stat in try/catch for
permission failures. Empirical verify:
- --files docs/hygiene-history/ → "input not a regular file" + exit 64
- --files /tmp/does-not-exist → "input not found" + exit 64

P2 (line 210): Repo-boundary check hardcoded "/" in `ROOT + "/"`. On Windows
`resolve()` returns paths with `\\` separators, so valid in-repo targets like
`C:\\repo\\docs\\...` would fail the `C:\\repo/` prefix test and be flagged
as `escapes-repo` — false positive that would break --enforce mode on
Windows CI. Replace with platform-correct `PATH_SEP` imported as
`sep as PATH_SEP` from node:path.

Local verify:
- Baseline still 10 findings (no regression)
- `bun --bun tsc --noEmit -p tsconfig.json` exit 0

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 16, 2026
…seline (#3708)

Adds the final step of the tick-shard-relative-path audit lifecycle:
discovery (#3676/#3679) → narrow fix (#3680) → scanner (#3692) → filter +
quality × 3 (#3692 fixups) → baseline mechanism (#3699) → THIS JOB.

The job runs `audit-tick-shard-relative-paths.ts --enforce --baseline
tools/hygiene/audit-tick-shard-relative-paths.baseline.json`, exiting 1
only on NEW findings (not in baseline). The 10 pre-existing findings
recorded in the baseline file stay grandfathered — same shape as Stryker
`--reset` or ESLint suppressions.

This is a NON-required check by default per gate.yml convention (only the
checks explicitly listed in branch-protection rules are required). The job
will surface as a status check on every PR; specific path-failure
detection prevents the wrong-depth-`..` bug class from recurring on new
shards.

Local verify on origin/main + new files:
- 842 shards scanned (was 833 in tick 7; +9 from this session's merges)
- 10 grandfathered (matches baseline)
- 0 NEW findings
- exit 0

Composes with: audit-section-33-migration-xrefs.ts (sibling gate, same
lifecycle pattern), blocked-green-ci-investigate-threads.md (the rule
this catch surface mechanizes for tick-shard navigation specifically).

Co-authored-by: Claude <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 16, 2026
…ate (#3710)

* docs(hygiene): land tools/hygiene/AUDIT-LIFECYCLE.md — reusable template

Promotes the audit-lifecycle pattern (discovery → narrow-fix → scanner →
quality iterations → baseline → CI enforce gate → maintenance) to a
canonical doc co-located with the hygiene-audit tooling.

Two worked examples documented:
1. §33 migration xrefs audit (PR #3513#3552 → enforce; ~4 weeks)
2. Tick-shard relative-path audit (PR #3676#3708; ~80 min single
   autonomous-loop session)

Captures the step-ordering rationale (why each step depends on the
previous), the mutable-vs-immutable surface distinction for baseline
strategy, and pre-emptive scanner-author findings worth implementing
in step 3 to shorten the quality iteration loop:
- sonarjs disable comment
- main export + import.meta.main guard
- generic URI scheme regex
- --files validation (existsSync + statSync.isFile)
- platform-correct PATH_SEP
- JSON output schema discipline
- baseline schema type guard

Local markdownlint clean.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(pr-3710): 2 Copilot threads — role-refs + §33 PR-attribution correction

Two real Copilot findings on the §33 worked-example table:

P2 (line 37): direct name attribution outside allowed roster surfaces.
"Codex P2 catch on Riven section-33 archive migration" used Zeta persona
names inline. Replace with role-ref: "Reviewer P2 catch on the section-33
archive-migration PR". (Copilot stays as-is — it's an external automated-
reviewer role-ref, accepted style per existing gate.yml comments.)

Line 44 (factual error): I'd attributed BOTH baseline cleanup AND CI
enforce to PR #3552. Verified via git log + gh api:
- PR #3552 (Slice A): "baseline cleanup — 10 dead xrefs → 0"
- PR #3555 (Slice B.3 + B.4): "--enforce flag + gate.yml wiring"

Split the row: PR #3552 = "Baseline (cleanup-to-zero)"; PR #3555 = "CI enforce"
with sub-slice attribution preserved. Calendar duration range extended to
PR #3513 → PR #3555.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
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