Add IDE and exclusion pack rules (#1)#475
Merged
garysheng merged 1 commit intoPeonPing:mainfrom Apr 19, 2026
Merged
Conversation
|
@kibermaks is attempting to deploy a commit to the Gary Sheng's projects Team on Vercel. A member of the Team first needs to authorize it. |
This was referenced Apr 19, 2026
garysheng
added a commit
that referenced
this pull request
Apr 19, 2026
garysheng
added a commit
that referenced
this pull request
Apr 19, 2026
This was referenced Apr 20, 2026
muunkky
added a commit
to muunkky/peon-ping
that referenced
this pull request
Apr 22, 2026
Five pre-existing Pester failures on main (and PR 487) from PR PeonPing#475 trailed the install.ps1 refactor that replaced raw `-like` matching with the Test-PathRuleMatch helper. - adapters-windows.Tests.ps1 (3x "bindings marks active rule with asterisk"): regex updated from '\$marker.*-like.*\$rule\.pattern' to match the Test-PathRuleMatch call site. - adapters-windows.Tests.ps1 ("evaluates path_rules against event cwd"): regex updated from 'cwd.*-like.*\$pattern' to the Test-PathRuleMatch call form. - peon-packs.Tests.ps1 ("ide_rules evaluation runs after path_rules and before rotation"): IndexOf('\$config.pack_rotation') was matching the earlier '\$config.pack_rotation_mode' substring, making rotIdx smaller than ideIdx. Anchored on 'elseif (\$config.pack_rotation' which only appears at the rotation fallback site. The 6th CI-only failure ("status --verbose shows IDE rule and excluded path context") passes locally on Windows but fails on GH Windows runner, likely due to short-path (RUNNER~1) vs long-path resolution in Test-PathRuleMatch when comparing \$PWD.Path to a config value. Left for a separate investigation.
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
This PR makes pack selection work the way users actually reason about it: not only by filesystem path, but also by which IDE/agent is generating the session.
Problem
Today,
path_rulesare the only structured way to steer pack selection before rotation/default fallback. That works for simple “one repo, one tool” setups, but it breaks in multi-agent and multi-IDE workflows where different tools share the same workspace tree or create short-lived session directories under a common root.In practice, that means users cannot reliably isolate one agent or IDE from another if both happen to run under the same folder pattern. A path match wins too early, and there is no supported way to say “ignore path routing here, then choose by IDE instead.”
User impact
This is especially noisy in setups like Conductor or CodexBar, where one project path may contain multiple start/stop cycles, delegated runs, or cross-tool session handoffs in a single round. Instead of hearing signals that reflect which tool is active, the user hears whichever pack was selected by the broadest matching path rule.
That makes notification behavior harder to trust, harder to tune, and harder to interpret.
Expected outcome
Users should be able to:
path_ruleswhere directory-based routing is the right modelAfter this change, selection behaves as:
session_override -> path_rules -> ide_rules -> pack_rotation -> default_pack -> peonIf the current working directory matches
exclude_dirs, thepath_ruleslayer is skipped for that invocation, allowingide_rulesto take over.What this PR changes
exclude_dirsfor glob- or directory-based path exclusionside_rulesfor pack selection by IDE/sourcesourceids so IDE routing is based on actual adapter metadataWhy this should hold up
The implementation is covered at the points where the feature can regress:
path_rulesstill beatide_rules, and thatexclude_dirscorrectly skip path routingValidation
bash -npassed for modified shell scriptsgit diff --checkpassedbats tests/peon.batspassed379/380tests after installingbats-coreexclude_dirs/ide_rulescoverage passedKnown limitation
One pre-existing BATS test still fails in this environment:
PRD-002: missing audio backend on linux logs play errorThat failure is outside the new pack-selection logic introduced here.