Skip to content

improve: avoid merging unrelated settings for agent directory lookups - #206489

Merged
vincentkoc merged 1 commit into
mainfrom
perf/read-effective-agent-dir-20261127
Nov 27, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
perf/read-effective-agent-dir-20261127

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Looking up an agent directory constructed the agent’s full merged configuration just to read one path. The workspace provisioning checks did the same to inspect the authored runtime and workspace. These calls read unrelated defaults even when the roster already held the selected agent.

User Impact

Directory lookup and workspace provisioning do less work. Agent selection, path expansion, fallback directories and the decision to scaffold an ACP workspace follow the existing rules. No configuration changes are required.

Why This Change Was Made

The roster reader already owns agent selection and supports published snapshots, mutable configuration and legacy lists. All three consumers need fields from the selected entry. They can ask that reader directly. Its existing first-match behavior, including on mutable keyed entries, is preserved.

Evidence

  • The new test calls the effective agent directory resolver and both workspace provisioning checks. It verifies the trimmed directory for an uppercase agent ID and the expected ACP decisions. On the base revision an unrelated default was read three times. On this change it was read zero times.
  • The agent scope and duplicate-directory suites passed 70 tests on macOS arm64. One Linux-only test was skipped locally. Formatting and independent source review passed.
  • Local text-model acquisition calls the effective agent directory resolver when an explicit agent is supplied without a directory override. The workspace checks are separate callers. No end-to-end latency was measured.
  • Local ClawSweeper reviewed the signed range and found no correctness or security issues. Its suggested base/head regression and existing provisioning suites ran as described above. In a separate in-memory replay of the base and candidate directory functions with the same already-selected stripped agent row, the directory call went from 38 selected-entry property reads and seven default reads to one entry read and zero default reads. This isolates projection work and does not establish a user-visible speedup.

@vincentkoc vincentkoc self-assigned this Nov 27, 2026
@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Nov 27, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:other This issue has meaningful maintainer-visible impact outside the owned taxonomy. labels Nov 27, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 27, 2026 07:53
@vincentkoc
vincentkoc enabled auto-merge (squash) November 27, 2026 07:58
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 27, 2026
@vincentkoc
vincentkoc merged commit 347b487 into main Nov 27, 2026
212 of 213 checks passed
@vincentkoc
vincentkoc deleted the perf/read-effective-agent-dir-20261127 branch November 27, 2026 08:06
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

vincentkoc added a commit that referenced this pull request Nov 27, 2026
* commit 'fd681ab8786e062045fa5ec6261b1b06f60832eb': (2115 commits)
  fix: keep doctor --fix pending checks from creating SQLite sidecars (#206485)
  fix(ci): update iOS screenshot reducer gate (#206497)
  fix: keep chat photo previews sharp within their byte limits (#206461)
  fix: let agents use short Workboard card IDs
  fix(tui): run provider sign-in in the local TUI (#200605)
  improve(config): reduce repeated directory checks for larger agent rosters (#206494)
  perf(test): reuse the Periphery producer workflow snapshot (#189681)
  fix(ci): keep locale assets within the installed package budget (#206492)
  fix: preserve failed Apple chat messages across partial history pages (#205404)
  improve: avoid merging unrelated settings for agent directory lookups (#206489)
  fix: show typing while a queued follow-up turn runs (#201920)
  fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341)
  refactor(codex): centralize native completion delivery (#206447)
  fix(subagents): finish claimed stops after session rotation (#206405)
  fix: let owners fork a chat with exec after a subagent or exec completion (#206483)
  test(cli): gate agent --local cold-start processes and workers (#206466)
  perf(ci): skip baseline inventory when line-cap debt is empty (#189909)
  refactor(test): share core process-result fixtures (#174149)
  refactor(ci): reuse canonical budget flag parsing (#189480)
  fix: recover Codex chats after oversized requests (#206475)
  ...
vincentkoc added a commit that referenced this pull request Nov 27, 2026
* commit 'fd681ab8786e062045fa5ec6261b1b06f60832eb': (923 commits)
  fix: keep doctor --fix pending checks from creating SQLite sidecars (#206485)
  fix(ci): update iOS screenshot reducer gate (#206497)
  fix: keep chat photo previews sharp within their byte limits (#206461)
  fix: let agents use short Workboard card IDs
  fix(tui): run provider sign-in in the local TUI (#200605)
  improve(config): reduce repeated directory checks for larger agent rosters (#206494)
  perf(test): reuse the Periphery producer workflow snapshot (#189681)
  fix(ci): keep locale assets within the installed package budget (#206492)
  fix: preserve failed Apple chat messages across partial history pages (#205404)
  improve: avoid merging unrelated settings for agent directory lookups (#206489)
  fix: show typing while a queued follow-up turn runs (#201920)
  fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341)
  refactor(codex): centralize native completion delivery (#206447)
  fix(subagents): finish claimed stops after session rotation (#206405)
  fix: let owners fork a chat with exec after a subagent or exec completion (#206483)
  test(cli): gate agent --local cold-start processes and workers (#206466)
  perf(ci): skip baseline inventory when line-cap debt is empty (#189909)
  refactor(test): share core process-result fixtures (#174149)
  refactor(ci): reuse canonical budget flag parsing (#189480)
  fix: recover Codex chats after oversized requests (#206475)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. impact:other This issue has meaningful maintainer-visible impact outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant