Repository navigation
Conversation
Records the set of untracked files that exist before an orchestrate run starts (NUL-safe, tied to the state file's started_at), so a later dispatch-codex-review.sh run can tell pre-existing clutter apart from this run's new files. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XtkZ8b2yn9FPXZtzwsQYaR
dispatch-codex-review.sh now reads the untracked-file baseline written by snapshot-untracked.sh and skips files that already existed before this run (counted, not listed), falling back to today's behavior with a warn: line when no baseline exists or it is stale. Also extends the artifact exclusion list (tmp/, .aider*, *-results.json, patch/diff leftovers, doc-site/coverage build output, .senku/, logs, DBs) and adds a secret-basename guard using the same set as hooks/scripts/validate-changes.sh. Adds a new informational codex_untracked stdout key and an AGENT_FLOW_CODEX_INLINE_UNTRACKED=0 kill switch for the no-baseline fallback. No existing codex_* key changes. Adds dispatcher Tests 7-11 covering the baseline hit/miss/stale paths, the extended exclusions, and the secret guard. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XtkZ8b2yn9FPXZtzwsQYaR
Dispatches a small snapshot-untracked.sh task before the first Loid pass whenever Codex co-review is enabled and this isn't a start_round>0 relaunch, so the baseline reflects the tree before this run's edits. The snapshot never blocks: a failure only logs a fallback notice. Also plumbs the new codex_untracked value through CODEX_SCHEMA for logging. Fixes the workflow test mock, which classified every agent call without agentType as Codex, to recognize the new Snapshot task by its label. Adds 4 scenarios covering the snapshot dispatch, its absence when Codex is off, non-blocking failure, and relaunch skipping a second snapshot. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XtkZ8b2yn9FPXZtzwsQYaR
Documents scripts/snapshot-untracked.sh, the untracked-file precedence order, the new codex_untracked stdout key, and the AGENT_FLOW_CODEX_INLINE_UNTRACKED kill switch across commands/orchestrate.md (manual Phase 3), the codex-co-review skill reference, the Codex co-review guide (data boundary, prompt/scope guards, context list), the commands reference (sequence diagram + env var table), and a new state-files.md section for review-baseline-untracked.local.txt. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XtkZ8b2yn9FPXZtzwsQYaR
Curates the generated CHANGELOG section (Fixed: the untracked-diff-scope incident and its baseline/exclusion/secret-guard fix; Added: the new script, output key, and kill switch) and keeps [Unreleased] at the top. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XtkZ8b2yn9FPXZtzwsQYaR
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dispatch-codex-review.shinlined every untracked file in the working tree into the diff sent to Codex. In a real/orchestraterun the task's tracked diff was ~32 KB, but the review diff reached ~270 KB because ~240 KB of pre-existing scratch files (an aider chat/cache,complexipy-results.json, a doc-site HTML export, another ticket'stmp/drafts, a stray.patch) were inlined too. That both buries the real change and sends unrelated repo content to an external vendor. The dispatcher also had no secret-filename guard.Changes
scripts/snapshot-untracked.sh(new): records the untracked-file set (NUL-safe, idempotent) before Phase 3, stamped with the run'sstarted_at, to.claude/review-baseline-untracked.local.txt(already gitignored).scripts/dispatch-codex-review.sh: inlines only untracked files that are not in the snapshot, or were modified after it. A missing/stale snapshot falls back to the old behavior with awarn:line. Adds the extended artifact exclusions (tmp/,.aider*,*-results.json, patch/diff leftovers,_site/,_build/,htmlcov/,.senku/, logs, DBs) and a secret-basename guard (same set asvalidate-changes.sh). Newcodex_untracked:stdout key with counts; existingcodex_*keys unchanged.AGENT_FLOW_CODEX_INLINE_UNTRACKED=0disables untracked inlining in the fallback path.workflows/implement-review-verify.js: runs the snapshot task before the first Loid dispatch when Codex is on (non-blocking on failure); the test mock now distinguishes the snapshot task from Codex.commands/orchestrate.md: manual Phase 3 runs the snapshot in the same Bash block asREVIEW_BASE.using-codex-review.md,codex-co-review.md,state-files.md,commands.md.Tests
bash scripts/test-dispatch-codex-review.sh— 11/11 (Tests 7–11 new: baseline hit / pre-existing skipped / stale & missing fallback / kill switch / extended exclusions / secret guard), also run under/bin/bash3.2 with BSD tools.node scripts/test-implement-review-verify.js— 21/21 (4 new snapshot scenarios).bash scripts/validate-plugin.sh— all suites pass;claude plugin validate --strictpasses;mkdocs build --strictpasses.Reviewed by Lawliet (APPROVED, 3 INFO nits) and verified by Alphonse; the Codex co-review did not run (workspace out of credits).
Follow-up
The JEV branch (
worktree-feat-jev-integration) copies the same diff-building logic indispatch-jev-review.sh; it will rebase onto this fix and adopt the shared guards.🤖 Generated with Claude Code
https://claude.ai/code/session_01XtkZ8b2yn9FPXZtzwsQYaR