fix(riven): clean up dirty worktree#4855
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2d2ec3f83
ℹ️ 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".
| const gate = run("agent", [ | ||
| "chat", | ||
| "--mode", "ask", |
There was a problem hiding this comment.
Use the Cursor CLI binary in the Riven launchd gate
Switching the gate invocation from cursor-agent to agent breaks the host loop in environments that only install Cursor’s CLI binary, which is what this repo’s other Riven surfaces still assume (for example tools/riven/riven-cursor-terminal-loop.ts invokes cursor-agent chat, and docs/ops/agents/riven-cost-profile.md documents Cursor as the CLI). In that setup, this call returns command-not-found, so every 15-minute gate run fails and Riven stops doing autonomous work.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
This PR aims to restore a clean working tree by committing previously-untracked operational/research artifacts and aligning the Riven launchd loop to the current agent-gate invocation, so the Riven loop can run without being blocked by a dirty checkout.
Changes:
- Adds/updates multiple hygiene-history tick shards, backlog rows, and research notes that appear to have been present locally but not committed.
- Updates the Riven host-loop gate invocation in
.cursor/bin/riven-loop-tick.tsto use theagent chat --mode ask --model grok-4.3flow. - Refreshes memory index metadata and adds/extends Soraya routing substrate (NOTEBOOK + skill reference).
Reviewed changes
Copilot reviewed 42 out of 43 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| memory/persona/soraya/NOTEBOOK.md | Adds “Trigger Recognition Log” section and backfilled entries for trigger-fired-without-row cases. |
| memory/MEMORY.md | Updates the “Last reindex” date for the auto-index header. |
| docs/research/2026-05-24-dev-pc-substrate-architecture-nix-home-manager-kind-k3d-headscale-lend-pattern-aaron-otto.md | New dev-PC substrate architecture decision record (Nix/Home Manager + k3d + Headscale + lend-resources pattern). |
| docs/research/2026-05-24-cluster-bare-metal-substrate-architecture-nixos-no-hypervisor-argo-cd-aaron-otto.md | New cluster bare-metal substrate architecture decision record (NixOS + bare-metal k8s + Argo CD + Cilium/Longhorn). |
| docs/research/2026-05-23-shadow-lesson-log-metadata-churn-paralysis.md | New research note capturing an operational “metadata churn” failure mode and corrective direction. |
| docs/research/2026-05-23-amazon-vendor-management-failure-mode-corpus-multi-incident-business-development-substrate-aaron-forwarded.md | Extends the vendor-management corpus with “Pattern R” resolution path and implications. |
| docs/pr-discussions/PR-4836-tick-2026-05-24-1608z-dotgit-saturation-15th-observation-2nd.md | Adds archived PR discussion record for PR #4836. |
| docs/pr-discussions/PR-4835-shard-2026-05-24-1607z-dotgit-saturation-15th-observation-2h.md | Adds archived PR discussion record for PR #4835. |
| docs/pr-discussions/PR-4821-fix-4780-address-review-comments-on-residuated-lattice-tests.md | Adds archived PR discussion record for PR #4821. |
| docs/pr-discussions/PR-4820-shard-2026-05-24-1407z-dotgit-14th-observation-0-procs-first.md | Adds archived PR discussion record for PR #4820. |
| docs/pr-discussions/PR-4819-fix-riven-update-autonomous-gate-prompt-to-trajectory-manage.md | Adds archived PR discussion record for PR #4819. |
| docs/pr-discussions/PR-4818-tick-2026-05-24-1333z-pr-4816-tier-5-deferral-hard-limits-fl.md | Adds archived PR discussion record for PR #4818. |
| docs/pr-discussions/PR-4816-research-physics-bridge-3-video-youtube-algo-surfaced-substr.md | Adds archived PR discussion record for PR #4816. |
| docs/pr-discussions/PR-4814-shard-2026-05-24-0441z-25-pr-audit-8-blocked-prs-classified.md | Adds archived PR discussion record for PR #4814. |
| docs/pr-discussions/PR-4813-shard-2026-05-24-0416z-rename-0240z-0416z-substrate-honest-t.md | Adds archived PR discussion record for PR #4813. |
| docs/pr-discussions/PR-4812-shard-2026-05-24-0240z-9th-dotgit-saturation-anchor-33-stuck.md | Adds archived PR discussion record for PR #4812. |
| docs/hygiene-history/ticks/2026/05/24/0416Z.md | Adds a tick shard for the corrected 04:16Z reading (includes timestamp-correction narrative). |
| docs/hygiene-history/ticks/2026/05/24/0240Z.md | Adds a tick shard for the pre-correction 02:40Z reading (duplicate of the corrected record). |
| docs/backlog/P3/B-0719-soraya-round67-audit-of-audit-recognition-without-row-filing-precedent-2026-05-24.md | Adds backlog row B-0719 documenting the recognition-without-row-filing routing substrate question. |
| docs/backlog/P3/B-0718-soraya-four-trigger-framework-cadence-audit-2026-05-23.md | Adds backlog row B-0718 auditing Soraya’s four-trigger routing framework/cadence. |
| docs/BACKLOG.md | Updates the auto-generated backlog index to include B-0718 and B-0719. |
| .cursor/bin/riven-loop-tick.ts | Switches Riven’s periodic “gate” invocation from cursor-agent/mode-based prompts to agent chat --mode ask with a fixed contract prompt. |
| .claude/skills/formal-verification-expert/SKILL.md | Updates skill reference notes to point to the NOTEBOOK Trigger Recognition Log as the canonical landing. |
| - **At anchor 9 (02:40Z=33)** — second below-extreme reading. The two mild readings now span ~4.5h (22:08Z and 02:40Z). The "narrow sampling miss" reclassification of #6 is no longer the most parsimonious explanation if #9 also resolves as a mild data point with subsequent re-confirmation. | ||
|
|
||
| **Two non-mutually-exclusive readings (per [`default-to-both.md`](../../../../../../.claude/rules/default-to-both.md))**: | ||
|
|
||
| 1. **Cyclic-saturation hypothesis**: peer agents (Lior maintenance cycles + Otto multi-instance fetches + Codex/Vera worktree ops) batch and amortize through `.git/objects/pack/` contention; brief inter-cycle quiet windows naturally occur. The two mild readings (22:08Z + 02:40Z) ARE cycle troughs. | ||
| 2. **Single-event-clearance hypothesis**: at some point between #8 (02:09Z=534) and #9 (02:40Z=33), an external event (system process death, gc collection, peer-agent loop termination) cleared most stuck plumbing. Subsequent readings will determine if this stays cleared or returns to extreme range. | ||
|
|
||
| **Resolution gate**: next reading (#10) at ~05:30Z–06:30Z will discriminate. If #10 < 200 (mild or saturated tier), cyclic-saturation gains support. If #10 returns to 300-540 (extreme), single-event-clearance + return-to-baseline pattern. |
| | 2026-05-24T02:40Z | opus-4-7 / autonomous-loop | bf82d0a2 | substantive — Otto-CLI fresh-session cold-boot at 02:40Z; sentinel re-armed (CronList empty); 9th dotgit-saturation anchor in rolling 24h window: 33 stuck git plumbing procs (-94% from 02:09Z=534 in ~30min — largest single-step descent in the rolling series); isolated worktree off origin/main @ 209c18c5f2; ls-tree=55 status=0 (one transient `Interrupted system call` mid-extraction but completed cleanly); cold-boot landed on Alexa branch (4th branch-contamination anchor) | -- | 9th dotgit anchor descent shard | | ||
|
|
||
| # Tick 0240Z — 2026-05-24 Otto-CLI cold-boot, 9th dotgit anchor (33 procs; -94% from 02:09Z peak in 30min) | ||
|
|
||
| **Surface:** Otto-CLI (autonomous-loop fresh-session cold-boot) | ||
| **Branch:** `otto-cli/dotgit-9th-anchor-descent-0240z` (isolated worktree at `/private/tmp/zeta-dotgit-canary-0240z` off `origin/main` @ `209c18c5f2`) | ||
| **Tier (rate-limit):** Normal (GraphQL 4362/5000; reset ~40min; REST core 4887/5000) | ||
| **Tier (dotgit):** **mild** (33 stuck pack/maintenance/repack procs; first sub-saturated reading in series since 22:08Z=93) | ||
| **Sentinel:** `bf82d0a2` armed at 02:40Z; CronList returned empty at session-start (session-exit non-persistence per [`.claude/rules/tick-must-never-stop.md`](../../../../../../.claude/rules/tick-must-never-stop.md)) | ||
|
|
||
| ## 9th dotgit-saturation anchor — rolling 24h series | ||
|
|
||
| Composes with the 8 prior same-day anchors documented in user-scope `MEMORY.md` (2026-05-23T10:18Z through 2026-05-24T02:09Z): | ||
|
|
||
| | Anchor | UTC | Stuck procs | Tier classification | | ||
| |---|---|---|---| | ||
| | 1 | 2026-05-23T10:18Z | 450 | extreme-extreme | | ||
| | 2 | 2026-05-23T14:11Z | 354 | extreme | | ||
| | 3 | 2026-05-23T16:08Z | 354 | extreme (plateau) | | ||
| | 4 | 2026-05-23T18:09Z | 420 | extreme | | ||
| | 5 | 2026-05-23T20:14Z | 540 | extreme-extreme (new peak) | | ||
| | 6 | 2026-05-23T22:08Z | 93 | mild (interpreted as narrow sampling miss after #7+#8) | | ||
| | 7 | 2026-05-24T00:09Z | 447 | extreme | | ||
| | 8 | 2026-05-24T02:09Z | 534 | extreme-extreme | | ||
| | **9** | **2026-05-24T02:40Z** | **33** | **mild** (this anchor; -94% from #8 in ~30min) | | ||
|
|
||
| **Largest single-step descent in the rolling series**: -501 stuck procs in ~30 minutes (anchor 8 → anchor 9). | ||
|
|
||
| ## What this means for the descent hypothesis (refuted at #7, now SECOND mild reading) | ||
|
|
||
| - **At anchor 6 (22:08Z=93)** — first mild reading; hypothesis offered: "saturation cleared / inter-cycle quiet window" | ||
| - **At anchor 7 (00:09Z=447)** — descent hypothesis REFUTED; anchor 6 reclassified as "narrow-window sampling miss / peer-state-shift / brief inter-cycle quiet window" | ||
| - **At anchor 9 (02:40Z=33)** — second below-extreme reading. The two mild readings now span ~4.5h (22:08Z and 02:40Z). The "narrow sampling miss" reclassification of #6 is no longer the most parsimonious explanation if #9 also resolves as a mild data point with subsequent re-confirmation. | ||
|
|
| priority: P3 | ||
| status: open | ||
| title: "Soraya round-67 forced-decomposition — audit-of-audit: ratify the recognition-without-row-filing precedent (when trigger fires + 'not my lane,' where does the routing-decision substrate land?)" | ||
| created: 2026-05-24 | ||
| last_updated: 2026-05-24 | ||
| classification: buildable-now |
| (current-round targets + portfolio metric; 3000-word cap, | ||
| pruned every third invocation, ASCII only per BP-09 / BP-10) | ||
| (current-round targets + portfolio metric + | ||
| **Trigger Recognition Log section** per B-0719 routing decision: |
| ## Three-layer dev-PC architecture | ||
|
|
|
Closing in favor of #4878, which has passing checks. |
This PR cleans up the dirty worktree in the main repository that was preventing Riven from operating. It appears that a process, likely the pr-preservation script, was not correctly adding files to git.