Repository navigation
fix(discovery): avoid reprobing unchanged agents on attach - #345
Closed
ccch1mneyyy wants to merge 1 commit into
Closed
ccch1mneyyy wants to merge 1 commit into
ccch1mneyyy wants to merge 1 commit into
Conversation
This was referenced Oct 20, 2026
Collaborator
Author
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.
Closes #333
What was wrong
Each discovery reconcile called the complete presentation/system-prompt assembly for every live agent before checking whether anything changed. Attaching an empty discovery worker also registered an empty provider and emitted an unnecessary registry change. Creating one ordinary agent therefore repeatedly assembled unchanged agents' prompts.
The change
start([]).This removes repeated full assembly in ordinary attach reconciliation, not all O(N) work. Cheap ownership/policy/tool-diff scans remain. Registry notifications have no affected-scope payload, so genuine external registry/presentation changes conservatively invalidate all entries; an attach that also declares a new scoped presentation is not promised zero old-agent probes.
Validation
These are assembly counts, not wall-clock benchmark claims. The independent gate uses real Landlock to separate main's unrelated bwrap cache defect (#337/#338); the combined-tree check including that fix is recorded separately. No dependency, host SDK, shared registry, sandbox permission or version changes. Tool-schema/model-description byte delta: 0.
PR-triggered CI: https://github.com/T-Auto/dsh-ops/actions/runs/39484192359 —
pull_request; aggregateCI required: SUCCESS (Windows x64, Linux x64, macOS arm64 and required supporting jobs passed).Environment
Arch Linux x64, Node 24.21.0, Rust 1.97.1; source checkout based on main
a9ff940with the pinned host services.Combined local validation
The submitted heads of #338, #340, #341, #342, #343, #344 and #345 were applied together in an isolated local verification worktree, including their combined changelog entries. With ordinary PATH selecting real bwrap 0.13.0 and real dsh-TUI 0.16.1 host/worker/renderer suites enabled,
node scripts/verify-gate.mjs --skip-installpassed all 11 release-gate steps: 129 suites passed, 0 skipped; 46 Rust unit tests passed; manifest 73/59. This Linux combined-tree evidence is separate from each PR's own cross-platform CI; no upstream merge or host installation was performed.