Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/hygiene-history/ticks/2026/05/17/0221Z.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ counter: brief-ack #0 (concrete artifact this tick; no synonym chain)
| Stranded commit | `8392092` (memory: Aaron caught Standing-by pattern recurrence 14h after B-0540 filing) sits on the research branch as ahead-of-merge content; not addressed this tick (separate orchestration decision) |
| Open PRs (mine) | #4015 (B-0510 cloud routine), #4019 (Maji shadow archive), #4020 (B-0610 design pass), #4021 (B-0590 slice 5 OS options), #4022 (financial-substrate "binding" disambig per Amara's blade) |
| Cron | No sentinel at boot — armed `* * * * *` with `<<autonomous-loop>>` (job `d9819778`); catch-43 floor restored |
| Rate-limit | GraphQL 1083/5000 used 3917; cost-aware tier per [`refresh-world-model-poll-pr-gate.md`](../../../../../.claude/rules/refresh-world-model-poll-pr-gate.md) operational tiers |
| Rate-limit | GraphQL 1083/5000 used 3917; cost-aware tier per [`refresh-world-model-poll-pr-gate.md`](../../../../../../.claude/rules/refresh-world-model-poll-pr-gate.md) operational tiers |
| Lior | Active (PIDs 28468 lior-loop, 28503/30722 gemini Maji); CodeQL-canary risk class engaged; primary worktree mine and stable; no `git worktree add` attempted this tick |
| Peer Otto-CLI processes | 5+ `claude-code` PIDs including Otto-Desktop resume-session 51194/51195 with `--add-dir` set for `/private/tmp/zeta-otto-comms` + `zeta-otto-desktop` + `zeta-otto-id-alloc` worktrees; shared `.git/objects/` contention possible |
| Local mods on switch | `bun.lock` + `package.json` carried via `git switch` (peer-owned state from other-branch worktree activity); NOT committed (explicit-path `git add` discipline) |
| Untracked | `amazon-hardware-titles-page1.txt`, `amazon-orders-2025-full.json`, `zeta-hardware-extract-page1.txt` (belong to `feat/b0610-amazon-orders-extract-v3-design-pass-2026-05-16` worktree at `/private/tmp/zeta-b0610`; not touched) |
| HEAD tree size | 52 root entries — healthy (canary check vs broken-commit class per [`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)) |
| HEAD tree size | 52 root entries — healthy (canary check vs broken-commit class per [`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)) |

## Why no substantive PR this tick

Expand All @@ -56,9 +56,9 @@ Three composing factors, none individually decisive but jointly substrate-honest

## Composes with

- [`.claude/rules/tick-must-never-stop.md`](../../../../../.claude/rules/tick-must-never-stop.md) — sentinel arming is the catch-43 floor; ran first
- [`.claude/rules/holding-without-named-dependency-is-standing-by-failure.md`](../../../../../.claude/rules/holding-without-named-dependency-is-standing-by-failure.md) — concrete-artifact shard satisfies counter reset #3 even though no substantive PR opened
- [`.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) — Lior-active window observed; `git ls-tree HEAD` canary check ran clean
- [`.claude/rules/refresh-world-model-poll-pr-gate.md`](../../../../../.claude/rules/refresh-world-model-poll-pr-gate.md) — cost-aware tier discipline applied (no `--all-open` batch poll; per-PR queries only)
- [`.claude/rules/claim-acquire-before-worktree-work.md`](../../../../../.claude/rules/claim-acquire-before-worktree-work.md) — no `claim acquire` because no backlog row picked this tick (orientation + shard only)
- [`.claude/rules/tick-must-never-stop.md`](../../../../../../.claude/rules/tick-must-never-stop.md) — sentinel arming is the catch-43 floor; ran first
- [`.claude/rules/holding-without-named-dependency-is-standing-by-failure.md`](../../../../../../.claude/rules/holding-without-named-dependency-is-standing-by-failure.md) — concrete-artifact shard satisfies counter reset #3 even though no substantive PR opened
- [`.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) — Lior-active window observed; `git ls-tree HEAD` canary check ran clean
- [`.claude/rules/refresh-world-model-poll-pr-gate.md`](../../../../../../.claude/rules/refresh-world-model-poll-pr-gate.md) — cost-aware tier discipline applied (no `--all-open` batch poll; per-PR queries only)
- [`.claude/rules/claim-acquire-before-worktree-work.md`](../../../../../../.claude/rules/claim-acquire-before-worktree-work.md) — no `claim acquire` because no backlog row picked this tick (orientation + shard only)
- PR #4004 (hybrid shard format endorsed; this shard follows pipe-row + H1 body shape)
31 changes: 28 additions & 3 deletions tools/inventory/amazon-orders-extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,35 @@ interface Partial {
items: Item[];
}

interface PlaywrightRuntime {
chromium: {
launch(options: { headless: boolean }): Promise<{
close(): Promise<void>;
newContext(options?: { storageState?: string }): Promise<{
storageState(options: { path: string }): Promise<void>;
newPage(): Promise<{
goto(url: string): Promise<unknown>;
waitForLoadState(state: string, options: { timeout: number }): Promise<void>;
waitForTimeout(ms: number): Promise<void>;
evaluate<T, A>(fn: (arg: A) => T | Promise<T>, arg: A): Promise<T>;
evaluate<T>(fn: () => T | Promise<T>): Promise<T>;
}>;
}>;
}>;
};
}

async function ensureModule(name: string): Promise<boolean> {
try { await import(name); return true; } catch { return false; }
}

async function loadPlaywright(): Promise<PlaywrightRuntime> {
const runtimeImport = new Function("name", "return import(name)") as (
name: string,
) => Promise<PlaywrightRuntime>;
return runtimeImport("playwright");
}

async function installIfMissing(): Promise<void> {
if (!(await ensureModule("playwright"))) {
console.log("Installing playwright (first-run setup)...");
Expand All @@ -83,7 +108,7 @@ async function installIfMissing(): Promise<void> {
}

async function ensureChromium(): Promise<void> {
const { chromium } = await import("playwright");
const { chromium } = await loadPlaywright();
try {
const b = await chromium.launch({ headless: true });
await b.close();
Expand Down Expand Up @@ -142,7 +167,7 @@ async function main(): Promise<void> {
await ensureChromium();
mkdirSync(YEAR_DIR, { recursive: true });

const { chromium } = await import("playwright");
const { chromium } = await loadPlaywright();
console.log(`Extracting Amazon orders for year ${YEAR}${RESTART ? " (--restart)" : ""}...`);
console.log(`Output directory: ${YEAR_DIR}`);

Expand Down Expand Up @@ -208,7 +233,7 @@ async function main(): Promise<void> {
const href = link.href ?? "";
if (title.length < 5 || title.length > 300) return;
if (HARDCODED.test(title)) return;
const dedup = href.split("?")[0];
const dedup = href.split("?")[0] ?? href;
if (seen.has(dedup)) return;
seen.add(dedup);
let date: string | null = null;
Expand Down
Loading