docs(shadow): Lior logs stale git locks#4677
Conversation
- Switch model to grok-4.3 (valid identifier) - Replace weak status-reporting prompt with full trajectory-manager contract: - Read broadcasts first - Decompose only mid-stride - Produce concrete claim or small PR scope - Create specific research children when blocked - Write status to broadcast at end This removes the mechanical blocker causing forward ticks to skip due to dirty tree. Co-Authored-By: Grok <noreply@x.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33f1125ef9
ℹ️ 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 prNum = Number(prCount) || 0; | ||
| const workMode = prNum === 0 ? "pickup" : "drain"; |
There was a problem hiding this comment.
Treat unknown PR count as blocked instead of pickup
When gh pr list fails or returns non-numeric output, prCount becomes "?", so Number(prCount) || 0 forces prNum to 0 and switches the loop into pickup mode. In that failure mode, the runner can start new backlog work instead of draining existing open PRs/review threads, which can strand blocked PRs and regress the loop’s ownership-through-merge behavior. Gate mode selection should check prs.status (and numeric parse success) and fail closed rather than defaulting to zero.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Adds a new shadow lesson log entry capturing a stale Git lock incident, and updates the Cursor-based Riven loop tick script to run different agent work cycles based on the open PR queue.
Changes:
- Add
docs/research/shadow-lesson-log-20260522-stale-locks.mddocumenting the stale lock event, analysis, lessons, and action items. - Update
.cursor/bin/riven-loop-tick.tsto choose between “pickup” vs “drain” modes and construct a mode-specific prompt before invokingcursor-agent.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| docs/research/shadow-lesson-log-20260522-stale-locks.md | New shadow lesson log entry for the stale git lock incident. |
| .cursor/bin/riven-loop-tick.ts | Adjusts Riven’s scheduled work cycle logic and swaps the agent invocation/prompt structure. |
| const prNum = Number(prCount) || 0; | ||
| const workMode = prNum === 0 ? "pickup" : "drain"; | ||
| agentStatus = "running"; |
| "-p", | ||
| "--model", "grok-4.3", |
| const prNum = Number(prCount) || 0; | ||
| const workMode = prNum === 0 ? "pickup" : "drain"; | ||
| agentStatus = "running"; | ||
| log(`riven agent gate start run_id=${runId}`); | ||
| log(`riven work cycle start run_id=${runId} mode=${workMode} open_prs=${prNum}`); | ||
|
|
|
|
||
| ## Event | ||
|
|
||
| During a routine antigravity check, Lior detected a stale git index lock and an orphan agent lockfile in the `zeta-lior-decompose-4044` worktree. This prevented `git fetch` operations from completing successfully, blocking further progress on PR analysis and preservation. |
* docs(shadow): Lior logs stale git locks (decomposed from #4677) * fix(shadow): MD030 list-marker-space (PR #4684) Fix 6 markdownlint MD030 errors (3 spaces -> 1 space) in docs/research/shadow-lesson-log-20260522-stale-locks.md. Lines 17,18,19,25,26,27 had "* " (3 spaces) — must be "* " (1 space) per markdownlint-cli2 default config. * docs(shadow): rename to hyphenated-date convention (PR #4684) Per Copilot review thread: filename used compact form 20260522; renamed to 2026-05-22-shadow-lesson-log-stale-locks.md to match the predominant convention in docs/research/ (YYYY-MM-DD-prefix).
This is a decomposed PR from #4674. It contains only the shadow log changes.