fix(run): stop per-pass advisory churn on large catalogs - #334
Merged
schickling-assistant merged 2 commits intoAug 25, 2026
Conversation
schickling-assistant
marked this pull request as ready for review
August 24, 2026 21:18
Contributor
Author
|
@codex Please review this PR. Posted on behalf of @schickling
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 422b574aa7
ℹ️ 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".
Two reconcile-pass costs repeat every pass even when nothing changed: - git-exclude spawned `git rev-parse` per op per pass and failed for workspaces that are plain directories (28 agents on dev3 → ~28 spawns plus captured git stderr every pass). Probe for a `.git` marker up the ancestor chain first — the same probe is_git_tracked already uses — and answer "not a Git worktree" without a process spawn. - print_report re-printed identical warnings every pass (~7k lines in hours on dev3). The supervisor loop now deduplicates warnings that persist across passes while still re-surfacing one that clears and returns; applied to both the catalog and spec loops. Part of #314. Co-authored-by: schickling-assistant <schickling-assistant@users.noreply.github.com> agent-identity: unknown agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.3 agent-runtime: OMP 18.0.3 tooling-profile: dotfiles@f33cd9c-dirty
Rewiring the spec loop's warning filter dropped the one-shot crash-loop surface: the GAVE UP diagnostic and the bus notification to the agent's supervisor never fired for spec-based teams even though the report still listed the task as flapping. Restore the deduplicated surfacing block alongside the warning filter. Co-authored-by: schickling-assistant <schickling-assistant@users.noreply.github.com> agent-identity: unknown agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.3 agent-runtime: OMP 18.0.3 tooling-profile: dotfiles@f33cd9c-dirty
schickling-assistant
force-pushed
the
schickling-assistant/2026-08-24-2026-08-24-issue314-pr1
branch
from
August 25, 2026 06:28
422b574 to
49c5c93
Compare
schickling-assistant
deleted the
schickling-assistant/2026-08-24-2026-08-24-issue314-pr1
branch
August 25, 2026 07:33
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.
Problem
Even with a correct watch, each reconcile pass on large catalogs repeated identical advisory work: for every agent workspace that is not inside a Git repository, materialization spawned
git rev-parse(plus captured stderr) only to fail, andprint_reportre-printed the identical warning every pass. Measured live on an oversized production catalog: ~28 failed spawns per pass at a spun-up cadence, 7,028 duplicate warning lines in hours.Goal
A persistent advisory failure costs one spawn-free answer and one diagnostic line — not per-pass churn.
Decisions
git_excludenow checks for a.gitentry up the ancestor chain (the exact probeis_git_trackedalready uses) and answers "not a Git worktree" without a process..gitmay be a directory or file (linked worktrees);existscovers both. If a workspace later becomes a repo, the probe succeeds again and the real git path resumes — no cache to invalidate.up_loop_until) and the spec loop (up_loop_specs). This mirrors the existingreported_flappingpattern.Verification
git_excludeon markerless workspace fails with "no .git marker" without touching git; a.gitdirectory above re-enables the git path.up_loop_untilover a catalog whose agent declaresrender { git-exclude }with a non-Git workspace: several passes run, exactly one warning is delivered.Complexity
One helper function plus a two-method dedup struct. No new dependencies.
Concerns
References
Part of the #314 stack. Base: #318 (sidecar watches).
Posted on behalf of @schickling
agent_identityagent_personaagent_supervisoragent_toolagent_tool_versionagent_runtimetooling_profile