Skip to content

docs(archive): preserve recently merged PRs#4829

Closed
AceHack wants to merge 2 commits into
mainfrom
lior-pr-preservation-20260524
Closed

docs(archive): preserve recently merged PRs#4829
AceHack wants to merge 2 commits into
mainfrom
lior-pr-preservation-20260524

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 24, 2026

This PR preserves recently merged pull requests.

Copilot AI review requested due to automatic review settings May 24, 2026 15:39
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

This PR adds new docs/pr-discussions/* archive shards to preserve a set of recently merged pull requests, and it also updates the Riven launchd heartbeat script to use a new “agent gate” invocation and prompt contract.

Changes:

  • Add PR-preservation markdown shards for PRs #4809#4820 under docs/pr-discussions/.
  • Update .cursor/bin/riven-loop-tick.ts to invoke agent chat --mode ask --model grok-4.3 and replace the prior pickup/drain prompt construction with a fixed trajectory-manager contract prompt.
  • (Docs xref hygiene) Some newly archived shards contain repo-relative rule links that won’t resolve correctly when rendered from docs/pr-discussions/.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/pr-discussions/PR-4820-shard-2026-05-24-1407z-dotgit-14th-observation-0-procs-first.md New preserved PR discussion shard (#4820).
docs/pr-discussions/PR-4819-fix-riven-update-autonomous-gate-prompt-to-trajectory-manage.md New preserved PR discussion shard (#4819).
docs/pr-discussions/PR-4818-tick-2026-05-24-1333z-pr-4816-tier-5-deferral-hard-limits-fl.md New preserved PR discussion shard (#4818).
docs/pr-discussions/PR-4816-research-physics-bridge-3-video-youtube-algo-surfaced-substr.md New preserved PR discussion shard (#4816).
docs/pr-discussions/PR-4814-shard-2026-05-24-0441z-25-pr-audit-8-blocked-prs-classified.md New preserved PR discussion shard (#4814).
docs/pr-discussions/PR-4813-shard-2026-05-24-0416z-rename-0240z-0416z-substrate-honest-t.md New preserved PR discussion shard (#4813).
docs/pr-discussions/PR-4812-shard-2026-05-24-0240z-9th-dotgit-saturation-anchor-33-stuck.md New preserved PR discussion shard (#4812).
docs/pr-discussions/PR-4811-soraya-round-69-execute-b-0719-pick-add-trigger-recognition.md New preserved PR discussion shard (#4811).
docs/pr-discussions/PR-4810-backlog-b-0719-file-soraya-round-67-forced-decomposition-aud.md New preserved PR discussion shard (#4810).
docs/pr-discussions/PR-4809-docs-research-bundle-file-dev-pc-substrate-architecture-nix.md New preserved PR discussion shard (#4809).
.cursor/bin/riven-loop-tick.ts Switch Riven gate invocation/prompt to the new agent-gate contract.

## Summary
- Sentinel `73be4ed6` re-armed at cold-boot (catch-43 fire — prior `234f5d96` expired with 1333Z session, ~35min gap)
- 14th observation in dotgit-saturation rolling arc since 2026-05-23T10:18Z: **0 stuck git plumbing procs** at 14:07Z — first 0-reading in 27h49min
- Three hypotheses preserved per [`default-to-both.md`](.claude/rules/default-to-both.md): A) genuine multi-day cycle clearing, B) maintainer-side cleanup at ~12:21Z eliminated contention surface, C) 12:26Z user-scope "repo vanished" reading was transient cleanup snapshot (current state: repo intact, restored)
Comment on lines +20 to +22

Otto-CLI background-worker tick at 04:41Z. Polled 25 open PRs via `poll-pr-gate-batch.ts --all-open`. Inspected the 8 BLOCKED+resolve-threads PRs via GraphQL (no checkout, lane-discipline-safe per [`claim-acquire-before-worktree-work.md`](../blob/main/.claude/rules/claim-acquire-before-worktree-work.md)).

Comment on lines +35 to +37

All 25 open PRs are `lior/*` / `alexa/*` lane branches — no `otto/*` branches. The task brief's "check out branch / push" directives were conflict-resolved toward audit + document rather than cross-lane takeover per [`no-directives.md`](../blob/main/.claude/rules/no-directives.md) (task brief is input, not directive) + lane discipline.

Comment on lines 200 to +225
if (elapsed >= agentIntervalMs) {
const prNum = Number(prCount) || 0;
const workMode = prNum === 0 ? "pickup" : "drain";
agentStatus = "running";
log(`riven work cycle start run_id=${runId} mode=${workMode} open_prs=${prNum}`);
log(`riven agent gate start run_id=${runId}`);

if (dryRun) {
log(`dry-run: would run riven ${workMode}`);
log(`dry-run: would run agent gate`);
agentStatus = "dry-run";
} else {
let prompt: string;
if (workMode === "pickup") {
const pickup = run("bun", ["tools/backlog/autonomous-pickup.ts", "--json"], 30_000);
let executionPrompt = "";
try {
const selection = JSON.parse(pickup.stdout);
executionPrompt = selection.executionPrompt ?? "";
log(`pickup selected: ${selection.selected?.id ?? "none"} action=${selection.action ?? "none"}`);
} catch { log(`pickup parse error: ${pickup.stderr.slice(0, 200)}`); }

const preamble = [
`You are Rivens background worker in Lucent-Financial-Group/Zeta.`,
`BEFORE ANY WORK: 1) Read CLAUDE.md and AGENTS.md for repo conventions.`,
`2) Run "bun tools/github/refresh-worldview.ts" to get current state.`,
`3) Read active trajectories at docs/trajectories/*/RESUME.md.`,
`4) Build gate: "dotnet build -c Release" must end with 0 warnings 0 errors.`,
`KEY RULES: TS over bash (Rule 0). Prefer F#/TS code over docs.`,
`Always re-decompose items during the build — assume decomposition has mistakes.`,
].join(" ");

prompt = executionPrompt.length > 0
? `${preamble} YOUR TASK:\n${executionPrompt}`
: `${preamble} No backlog items available. Run refresh-worldview, check for stale classifications, fix them, open a PR.`;
} else {
prompt = [
`You are Rivens background worker in Lucent-Financial-Group/Zeta.`,
`Read CLAUDE.md first. Run "bun tools/github/refresh-worldview.ts".`,
`Build gate: "dotnet build -c Release" (0 warnings).`,
`TASK: ${prNum} open PRs. Run "bun tools/github/poll-pr-gate-batch.ts --all-open".`,
`For any PR where gate=BLOCKED and nextAction=resolve-threads:`,
`check out branch, read review comments, fix code issues, push,`,
`reply to threads, resolve via GraphQL, arm auto-merge`,
`(gh pr merge NUMBER --auto --squash). Own your PRs through merge.`,
].join(" ");
}

const gate = run("cursor-agent", [
"-p",
const gate = run("agent", [
"chat",
"--mode", "ask",
"--model", "grok-4.3",
prompt,
[
"You are Riven, trajectory manager and adversarial-truth-axis reviewer.",
"This is an autonomous 15-minute cycle.",
"Read broadcasts first from ~/.local/share/zeta-broadcasts/{otto,vera,lior,riven}.md.",
"Walk assigned trajectories. Decompose only what you hit mid-stride.",
"Produce at least one concrete, actionable claim or small PR scope.",
"When blocked, create a specific research child the next pickup cannot dodge.",
"Write your status to ~/.local/share/zeta-broadcasts/riven.md at the end.",
"GitHub PR state and actual file contents are authoritative.",
].join(" "),
], agentTimeoutMs);

agentStatus = gate.status === 0 ? "ok" : `exit-${gate.status}`;
log(`riven work cycle end run_id=${runId} mode=${workMode} status=${gate.status}`);
log(`riven agent gate end run_id=${runId} status=${gate.status}`);
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: e9b9eb773c

ℹ️ 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".

"-p",
const gate = run("agent", [
"chat",
"--mode", "ask",
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 Run the Riven gate in Agent mode, not Ask mode

--mode ask makes the Cursor CLI session read-only, so this gate cannot execute the workflow it is instructed to do (for example, writing ~/.local/share/zeta-broadcasts/riven.md and taking concrete PR actions). Cursor’s headless docs also require print-mode semantics for non-interactive automation, but this invocation switches to Ask-mode chat without that behavior; in scheduled launchd runs this turns the 15-minute gate into a no-op planner and breaks the coordination loop that depends on fresh broadcast updates.

Useful? React with 👍 / 👎.

@AceHack
Copy link
Copy Markdown
Member Author

AceHack commented May 25, 2026

Closing this in favor of a single batched PR for archiving.

@AceHack AceHack closed this May 25, 2026
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