Skip to content

docs(shadow): Lior logs stale git locks#4677

Closed
AceHack wants to merge 3 commits into
mainfrom
lior-shadow-log-4674
Closed

docs(shadow): Lior logs stale git locks#4677
AceHack wants to merge 3 commits into
mainfrom
lior-shadow-log-4674

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 22, 2026

This is a decomposed PR from #4674. It contains only the shadow log changes.

AceHack and others added 3 commits May 21, 2026 18:23
- 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>
Copilot AI review requested due to automatic review settings May 22, 2026 21:16
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +201 to +202
const prNum = Number(prCount) || 0;
const workMode = prNum === 0 ? "pickup" : "drain";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

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 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.md documenting the stale lock event, analysis, lessons, and action items.
  • Update .cursor/bin/riven-loop-tick.ts to choose between “pickup” vs “drain” modes and construct a mode-specific prompt before invoking cursor-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.

Comment on lines +201 to 203
const prNum = Number(prCount) || 0;
const workMode = prNum === 0 ? "pickup" : "drain";
agentStatus = "running";
Comment on lines +247 to +248
"-p",
"--model", "grok-4.3",
Comment on lines +201 to 205
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.
@AceHack
Copy link
Copy Markdown
Member Author

AceHack commented May 22, 2026

This PR is a blob, mixing a shadow log with code changes. I have decomposed it into two separate PRs: #4684 (docs) and #4685 (code). Closing this PR in favor of the new ones.

@AceHack AceHack closed this May 22, 2026
AceHack added a commit that referenced this pull request May 23, 2026
* 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).
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