Quota fallback of a writer inherits the first worker's worktree state; agent-run inspect - #8
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a8c11a8f00
ℹ️ 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".
| if (!g) return { cwd, git: false, base: null, commits: [], dirty: [], partial: false, note: null }; | ||
| let base = null; try { base = fs.readFileSync(path.join(g, "delegate-kit.base"), "utf8").trim() || null; } catch {} | ||
| const commits = base ? (sh("git", ["log", "--format=%h%x09%s", `${base}..HEAD`], { cwd }).stdout || "").split("\n").filter(Boolean).map((l) => { const [sha, ...rest] = l.split("\t"); return { sha, subject: rest.join("\t") }; }) : []; | ||
| const dirty = (sh("git", ["status", "--porcelain"], { cwd }).stdout || "").split("\n").filter(Boolean).map((l) => ({ status: l.slice(0, 2).trim(), path: l.slice(3) })); |
There was a problem hiding this comment.
Enumerate files inside untracked directories
When the interrupted writer creates files beneath a new directory, this default porcelain invocation collapses them into one entry such as ?? src/new/, so dirty, the reported file count, and the fallback note omit every actual file. I confirmed this behavior locally; git status -h documents the --untracked-files=all mode, which reports each nested file individually. This matters because the note directs the fallback worker to inspect git diff, which also omits untracked contents, allowing substantial partial work to remain effectively invisible; request all untracked files when building the snapshot.
Useful? React with 👍 / 👎.
…а inspect Quota fallback перезапускал тот же бриф в том же worktree вслепую, хотя лимит мог сработать после коммитов и правок первого воркера. Теперь перезапуск писателя получает в начале брифа PREVIOUS ATTEMPT: коммиты после базы (delegate-kit.base от agent-wt create) и незакоммиченные файлы — с указанием прочитать и продолжить, а не переделывать. `ultra` при переезде на Claude становится xhigh вместо отказа валидации. `agent-run inspect <worktree>` печатает тот же снимок — команда под давнее «read the worktree before rerunning» из документации. tests/inspect.sh — 12 проверок, шаг в CI. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2450580 to
345beb6
Compare
a8c11a8 to
5c832e5
Compare
По ревью PR #8 (Codex P2): --porcelain без --untracked-files=all давал одну запись «?? dir/», и заметка fallback-воркеру скрывала всю работу в новом каталоге. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Stacked on #7.
Problem
On a usage limit
agent-runreran the same brief on the other family in the same worktree. A limit that hits mid-write leaves commits and uncommitted edits behind, and the second worker started blind — redoing or breaking finished work.--effort ultra(Codex only) also failed validation when the rerun landed on Claude.Change
PREVIOUS ATTEMPTnote at the top of the brief: commits since base (delegate-kit.basewritten byagent-wt create) and uncommitted files, with the instruction to read and continue rather than restart.ultramaps toxhighon Claude.agent-run inspect [<worktree>]prints the same snapshot (base,commits,dirty,partial,note) — the command behind the long-standing "read the worktree before rerunning" advice inexternal.md.tests/inspect.sh: 12 checks (clean worktree, commit + dirty file, missing base, non-git dir). CI step added.Checks
inspect.sh12/12,gate.sh24/24,route.sh48/48,caps.sh43/43,delivery.sh25/25,node --check.Not verified
The fallback path itself needs a real quota error from a CLI; the note builder it calls is what
inspectexercises.🤖 Generated with Claude Code