Skip to content

tool: rename public shell tool id from bash to shell (Refs #780) - #787

Closed
agenteinstinct1-max wants to merge 14 commits into
dev-vibecodedfrom
arena/7b56ded6-silvercode
Closed

agenteinstinct1-max wants to merge 14 commits into
dev-vibecodedfrom
arena/7b56ded6-silvercode

Conversation

@agenteinstinct1-max

@agenteinstinct1-max agenteinstinct1-max commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #780 — publishes the host-shell tool to models as shell (was bash) across V1/V2 registry, core tool, schema/SDK, TUI, CLI, ACP, history, plugins, config and native permissions, with truthful fresh-process wording for zsh/sh/fish/PowerShell/cmd. Legacy permission.bash rules, per-pattern rules, wildcards, saved grants and persisted tool: "bash" history keep working; genuine bash-interpreter concepts (ZEN_FINGERPRINT_TOOLS, ShellID.kinds, tree-sitter bash, BashLS) are untouched. Base integrates accepted 50d6a23 (#785) by ordinary merge (18ceca2).

Follow-up 1 (REQUEST CHANGES on 18ceca2) — 2fc5fd7..fe6fd39

Config-merge precedence across spellings, doom_loop tool-id aliasing, tool_search/context-protection name lists, Zen invalid-tool classification (+ end-to-end zero-exec control), LOW text leftovers, LSP settled-publish synchronous resolution, UI evidence committed under .github/assets/.

Follow-up 2 (REQUEST CHANGES on fe6fd39) — c3cdbfb, 1b0a5f0

All four HIGH findings reproduced RED first, then fixed:

  • Actual rule order — decode-time key folding collapsed bash/shell into the first key's position ({bash:ask, *:allow, shell:deny} evaluated allow; nested pattern order likewise), and plain mergeDeep retains first-seen positions across layers/MDM/env. Decode no longer folds (written order and spelling preserved). Every permission merge — mergeConfig (top-level, agent.*, mode.*), agent-dir loads, mode conversion, OPENCODE_PERMISSION, tools→perms, agent tools+explicit — now uses ConfigPermissionV1.merge: rule-sequence semantics (a key/pattern written by a later layer takes that layer's position; a flat action promotes to the * pattern instead of replacing inner patterns). Layering evaluates as the concatenation of the layers' rule sequences. Regression tests cover single-file wildcard interleaving, nested objects, same- and cross-spelling layers, MDM, env (from follow-up 1), and allow-last controls.
  • Legacy tools layers — the bash key is folded to shell per layer before merging (top-level + agent/mode records), so tools {shell:false} → {bash:true} → managed {shell:false} resolves deny, in both spelling orders.
  • Agent tools vs explicit permission — explicit permission is merged over the tools-derived layer with the ordered merge (not Object.assign), keeping its own order: tools{bash:true} + permission{*:allow, shell:deny} evaluates deny; mirrored allow-last control passes.
  • Wildcard widening — union alias matching let a legacy s* (written when it covered skill) recruit the renamed tool and bypass an earlier bash:deny. matchAction now preserves each pattern's written meaning: literal patterns match either exact spelling in written order (explicit re-permits still win by position), while wildcard patterns match against the legacy spelling only (ba* still gates shell; s*/sh* do not capture it and fail closed to ask — new config names the tool exactly). Uniform across V1 evaluate, V2 Permission, Policy, doom_loop resources (with negative + mixed-order controls), and tool-name lists. Investigated and reported tradeoff: an undated pattern cannot both keep its pre-rename extension and match the new name by wildcard; preserving existing rule meaning (no silent allow) wins over new-name wildcards.
  • Archived-history control added: a persisted completed tool:"bash" part replays from stored output and is never re-executed under the new name.

Windows CI at fe6fd39 — causal determination (run 41328532463, job 124913746900, raw logs read)

Exactly one failing test, and it is not the LSP test (which passed on Windows this run): workspace sync state > remote connection HTTP failures set error and clear syncing (test/control-plane/workspace.test.ts:1321) expected status "error", got "connecting". Trace: the sync loop sets error only after the first HTTP 503 round-trip (fiber scheduling + real in-process HTTP on a runner executing seven suites in parallel), and flips back to connecting after the 1s retry backoff — the test polled a transient state inside a fixed 1500ms wall-clock window and the first transition landed after it. Product behavior is correct (setStatus updates then emits; 5000 is the product's own waitEvent bound). 1b0a5f0 makes the test await the Status error event itself via the product's waitEvent, then performs the same status()/isSyncing assertions — condition-driven, no assertion or product deadline changed (healthy case completes as soon as the transition fires). The history-failure sibling had the identical latent race and got the same wait.

Tests (Bun 1.3.14, bun test --timeout30000 --only-failures, sequential)

  • core: 1528 pass / 3 skip / 0 fail (1531, 169 files)
  • tui: 786 / 4 / 0 (790, 107); sdk/js: 5 / 0 / 0; llm: 303 / 30 / 0 (333, 31)
  • typechecks: core/tui/sdk tsgo, opencode tsc — clean
  • opencode full suite at 1b0a5f0: 4961 pass / 25 skip / 1 todo / 7 fail (4994, 342 files). All 7 are bun 5s per-test budget timeouts in child-process tests (TUI worker, session HttpApi, skill discovery, headless/JSON finish ×4) on this 2-vCPU sandbox; zero deterministic failures. Matched-condition controls: the identical suite at pre-follow-up 18ceca2 in this sandbox failed the same class (incl. the same worker test), and the two worst files re-run at fe6fd39 under current host load fail 8/26 with the same 5000ms timeouts vs 9/26 at head. Recorded as evidence, not claimed as a waiver — the exact-head CI is the arbiter.

Freeze / handoff

packages/tui/src/routes/session/index.tsx, permission.tsx, util/activity.ts, util/cap-lines.ts, and the activity/inline-tool TUI tests are frozen at their fe6fd39 blobs and handed to the coordinator/rawReview owner — untouched by these follow-ups (verified: empty diff for the set). Shell rename/security ownership for all other paths remains with this PR's owner.

UI evidence: https://github.com/mdev34-lab/silvercode/blob/arena/7b56ded6-silvercode/.github/assets/tui-permission-shell-780.png · https://github.com/mdev34-lab/silvercode/blob/arena/7b56ded6-silvercode/.github/assets/tui-fmt-shell-780.png

Head: 1b0a5f0dd5df949c6da4494e260f2518a7dc4b52. Issue #780 remains open; ready for fresh exact-head independent review.

Follow-up 3 (parent review of 1b0a5f0) — 9c71945, ddf78d1

  • Wildcard semantics reconsidered. Follow-up 2's extension-preserving matching (wildcards matched the legacy spelling only) redefined wildcard behavior — canonical s*/sh* stopped naming shell. Replaced with the source-grounded contract: plain union Wildcard.match + findLast (production rulesets always carry *:allow defaults first, so tier/extension schemes would disable canonical wildcards in practice), plus one narrow clamp in Wildcard.winningRule (V1/V2/Policy evaluate, disabled, preapproved/wholly-disabled lookups): a winner that matched the tool only via rename recruitment (a wildcard matching the new name but no legacy spelling; exact spellings never recruited) cannot lift a deny that applied under the legacy name. So {bash:deny, s*:allow} stays deny, while {*:ask, s*:allow}, {s*:deny}, and exact-name re-permits all behave canonically. Residual, documented: only deny is clamped (a legacy ask can be overridden by a later canonical wildcard allow); carving out of a legacy deny requires the exact shell name.
  • Workspace test bound recovered. The waitEvent timeout is back to the original 1500ms observation bound; the wait is event-driven (subscribed before sync starts) so the transient error state (1s retry backoff flips it back to connecting) cannot be missed by a level poll, with the identical assertions. Raw-log evidence for the original Windows failure: no failed to connect to global sync warning before teardown — the first transition itself exceeded the window on that runner; curing that sub-case within the family would require an authorized bound change, not taken here.
  • Tests at ddf78d1: core 1528/3/0, tui 786/4/0, sdk 5/0, llm 303/30/0 (pass/skip/fail); opencode 4963/25/1 todo/5 fail (4994) — all 5 are the recurring bun-5s child-process timeouts on this 2-vCPU sandbox (worker, session HttpApi, skill discovery, headless finish ×2), rotating across runs and reproduced at base under matched load; recorded as unresolved environmental evidence, not a waiver. Typechecks core tsgo + opencode tsc clean (tui/sdk untouched since their last clean run).

Head: ddf78d14d197e0b9ad90129cac1ba3427c0db09f (supersedes the head line above).

Early durable checkpoint — slice 1 of the #780 rename:
- ShellID.ToolID and the V2 core tool now publish "shell"; core tool file
  bash.ts -> shell.ts (ShellTool), no doubled registration.
- CORE_TOOLS drops the stale "bash" duplicate.
- Model-facing prompt text says shell (and truthfully describes a fresh
  process per call) for pwsh/cmd/POSIX profiles.
- Permission compatibility: Wildcard.matchAction treats legacy "bash" as an
  alias subject for canonical "shell" in V1 evaluate/disabled/ask, V2
  evaluate, Policy.evaluate, whollyDisabled, and llm preapproved matching —
  wildcard semantics and findLast precedence unchanged, so a legacy deny
  cannot degrade to ask. Config schema gains typed "shell", keeps "bash".
- Core tool test renamed to tool-shell.test.ts incl. a legacy bash-deny case.

Remaining: ACP/CLI/TUI labels + legacy history recognition, generated
SDK/schema contracts, opencode test/tree update, fake-provider catalog
coverage, full package suites.

Co-authored-by: arena-agent <[email protected]>
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Hey! Your PR title tool: rename public shell tool id from bash to shell (Refs #780) doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

agenteinstinct1-max and others added 3 commits November 1, 2026 12:37
…s (Refs #780)

Slice 2 checkpoint:
- ACP/CLI run/TUI/github handler recognize canonical "shell" and keep
  rendering legacy persisted "bash" parts (no re-execution, no doubled
  rendering); synthetic shell-mode commits now carry tool "shell".
- TUI activity grouping kind bash -> shell with legacy tool id mapped to
  the same kind; permission prompt, tips text say shell.
- Model-facing system/agent prompts and grep tool text reference the
  shell tool by its new name.
- CLI agent create lists canonical "shell" permission (help snapshot
  regenerated; single owned line).
- Generated contracts via canonical generator, owned delta only
  (PermissionConfig gains "shell" in openapi.json + SDK v2 types);
  pre-existing baseline drift in generated files left untouched.
- Tests updated to canonical shell (fake providers call "shell"); legacy
  fixtures kept where they simulate persisted history; run-process legacy
  {bash: ask/deny} config kept deliberately as runtime back-compat proof.

Verified so far: core suite 1515+ pass after location-layer expectation
update (1 remaining file fix included), opencode previously-failing 26
tests across 10 files now pass file-by-file. Full re-runs + TUI pending.

Co-authored-by: arena-agent <[email protected]>
…prompts

- permission/next.test.ts: order-preservation tests now evaluate the
  canonical "shell" action against legacy "bash" config; new tests pin
  legacy deny (no ask broadening), per-pattern rules, wildcard permission
  patterns ("ba*"), last-wins order across spellings, and disabled().
- core permission.test.ts: V2 saved legacy "bash" approvals apply to
  "shell" assertions; configured legacy deny keeps precedence.
- registry/catalog tests: model-facing catalog publishes exactly one
  "shell" and no "bash"; CORE_TOOLS likewise.
- shell-prompt.test.ts: every profile says "shell tool call", never
  "bash tool call"/"given bash command"/"persistent shell session";
  POSIX intro says fresh shell process.
- tui activity tests: kind expectations bash -> shell; legacy tool id
  "bash" asserted to group as shell.
- customize-opencode skill doc: permission examples/known keys say
  "shell" (legacy "bash" noted as honored alias).

Co-authored-by: arena-agent <[email protected]>
The repo-wide formatter run inside the contract generator had rewrapped
unrelated regions of these two owned files. Restored from baseline and
re-applied only the semantic rename edits; behavior unchanged (activity
tests + tui typecheck re-verified).

Co-authored-by: arena-agent <[email protected]>
@agenteinstinct1-max
agenteinstinct1-max marked this pull request as ready for review November 1, 2026 13:20
@kilo-code-bot

kilo-code-bot Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

Incremental diff fe6fd39..HEAD (#780 follow-up 2, commits c3cdbfbc3, 1b0a5f0dd): all permission rule resolution now routes through Wildcard.winningRule — union bash/shell action matching with findLast order plus the narrow rename-recruitment clamp, so a canonical-only wildcard (e.g. s*) can no longer lift a legacy bash deny. ConfigPermissionV1.merge replaces decode-time key folding, giving ordered rule-sequence semantics across config layers and agent/mode permission entries. Legacy bash spellings in config, saved grants, and persisted history keep working. Verified against current HEAD: core permission.ts/policy.ts V2 evaluate, tool/registry.ts whollyDisabled, v1/config/permission.ts merge, v1/config/agent.ts normalize, opencode permission/index.ts evaluate/disabled, session/llm.ts preapproval, config/config.ts fold/merge. New/updated tests in wildcard.test.ts, permission.test.ts, policy.test.ts, config/permission.test.ts, and opencode next.test.ts/config.test.ts cover the clamp and rule-order behaviors. No CRITICAL/WARNING/SUGGESTION findings in changed lines.

Files Reviewed (18 files)
  • packages/core/src/permission.ts
  • packages/core/src/policy.ts
  • packages/core/src/tool/registry.ts
  • packages/core/src/util/wildcard.ts
  • packages/core/src/v1/config/agent.ts
  • packages/core/src/v1/config/permission.ts
  • packages/core/test/config/config.test.ts
  • packages/core/test/config/permission.test.ts
  • packages/core/test/permission.test.ts
  • packages/core/test/policy.test.ts
  • packages/core/test/util/wildcard.test.ts
  • packages/opencode/src/config/config.ts
  • packages/opencode/src/permission/index.ts
  • packages/opencode/src/session/llm.ts
  • packages/opencode/test/config/config.test.ts
  • packages/opencode/test/control-plane/workspace.test.ts
  • packages/opencode/test/permission/next.test.ts
  • packages/opencode/test/session/prompt.test.ts
Previous Review Summaries (7 snapshots, latest commit fe6fd39)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit fe6fd39)

This review did not finish. The model reached its output limit before it
could write the review — a reasoning model can spend the whole budget thinking.
Re-run the review, or lower the model's thinking effort, and it should get
further. Any inline comments below are from an earlier review.

Previous review (commit fe6fd39)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • .github/assets/tui-fmt-shell-780.png
  • .github/assets/tui-permission-shell-780.png

Previous review (commit 99f3eb2)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • packages/core/src/util/wildcard.ts
  • packages/opencode/test/config/config.test.ts
  • packages/opencode/test/permission/next.test.ts

Previous review (commit eb0aeee)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (incremental diff)
  • packages/core/test/config/config.test.ts - 0 issues

Previous review (commit b60cfc3)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (incremental diff)
  • packages/opencode/test/permission/next.test.ts - 0 issues

Previous review (commit 2fc5fd7)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (incremental diff)
  • packages/opencode/src/permission/index.ts
  • packages/opencode/src/lsp/client.ts
  • packages/opencode/src/provider/opencode-zen.ts
  • packages/opencode/src/session/llm/request.ts
  • packages/opencode/src/tool/catalog.ts
  • packages/opencode/src/cli/cmd/run/tool.ts
  • packages/tui/src/feature-plugins/home/tips-view.tsx
  • supporting test files

Previous review (commit be54fb3)

Review Summary: Rename shell tool from "bash" to "shell"

Overall

The PR correctly renames the tool ID/permission from bash to shell across 40 files, with proper legacy back-compat handling via Wildcard.matchAction (LEGACY_ACTION_ALIASES: {shell: ["bash"]}). Legacy bash parts are correctly detected alongside shell in acp/event.ts, session-data.ts, session-replay.ts, and github.handler.ts.

Issue Found

packages/opencode/src/cli/cmd/run/tool.ts — scrollShellFinal (renamed from scrollBashFinal) still returns hardcoded "bash completed" strings:

  • Line 864: return "bash completed"
  • Line 867: return \bash completed · ${time}``
  • Line 870: return \bash completed (exit ${code})...``

These should say "shell completed" to match the renamed ShellTool.

Positive Findings

  • Wildcard.matchAction legacy alias correctly maps shell → bash for permission evaluation (wildcard.ts)
  • isShellToolPart() helper in session-data.ts:945-947 correctly checks both "shell" and "bash"
  • acp/event.ts:741, session-replay.ts:983, and github.handler.ts:814-816 all handle legacy bash parts alongside canonical shell
  • session-data.ts:959 normalizes legacy bash tool parts to tool: "shell" in synthetic commits
  • Prompt files and config descriptions consistently updated (config.ts:40, narration.ts:121)

Recommendation

Fix the three "bash completed" strings in scrollShellFinal to say "shell completed", then the rename is complete and consistent.


Reviewed by free · Input: 128.1K · Output: 28.8K · Cached: 568K

agenteinstinct1-max and others added 6 commits November 1, 2026 13:28
…name (Refs #780)

Review follow-up for the #780 rename, addressing the REQUEST CHANGES
findings on 18ceca2 with RED/GREEN regression tests:

- HIGH config merge: config layers merge by object key, so keeping both
  the legacy 'bash' and canonical 'shell' permission keys let an older
  layer outrank a newer one purely by key position (a later deny lost
  to an earlier allow). Fold 'bash' into 'shell' as each layer is
  decoded (ConfigPermissionV1.canonicalize, order-preserving; two rule
  objects deep-merge per pattern, otherwise the later entry wins), and
  canonicalize again at the merge choke points (mergeConfig operands,
  OPENCODE_PERMISSION, tools->permissions, agent tools/permission) so
  layered global/project/local, managed (MDM), env, and agent cases all
  resolve by layer order exactly as pre-rename configs did. No blanket
  deny: findLast semantics are preserved.
- HIGH doom_loop: doom_loop rules key on the tool id, so match their
  resources with matchAction in the V1 evaluator, V2 Permission, and
  Policy: a legacy {bash: deny} pattern (or 'ba*') gates the renamed
  'shell' tool again, with wildcard + findLast semantics unchanged and
  no deny->ask conversion. Non-doom resources are unaffected.
- MED tool-name lists: tool_search defer/always_load now match with
  matchAction (legacy 'bash' hits 'shell'); V2 context protection
  compares canonical spellings so tools:['bash'] protects new shell
  calls and tools:['shell'] protects archived bash calls.
- MED Zen: fingerprint names stay wire constants, but a fingerprint
  tool counts as caller-provided when the catalog carries its canonical
  spelling; a hallucinated 'bash' call now reaches the runtime
  invalid-tool repair (and satisfies no required tool_choice check)
  instead of being silently stripped as gateway-injected. Zero shell
  execution proven by a new end-to-end fake-provider control.
- LOW: CLI run summary says 'shell completed'; tips name shell
  permissions; builtin TUI renderer test covers 'shell'.
- LSP: an already-settled publish (quiet for the full debounce window)
  resolves synchronously instead of depending on timer scheduling
  latency; the debounce quiet-period guarantee for fresh publishes,
  the 1000ms test bound, and all budgets are unchanged.

Co-authored-by: arena-agent <[email protected]>
Config decode now stores canonical 'shell' rules, so a permission query
under the legacy 'bash' name must resolve them too: matchAction treats
the two spellings as one action identity in both directions (previously
only a canonical query matched legacy-spelled patterns). This restores
agent/task evaluations that ask for 'bash' against canonicalized
rulesets. Updates the remaining test expectations that encoded the
pre-canonicalization 'bash' key in decoded config (tools migration,
key order, managed-plist).

Co-authored-by: arena-agent <[email protected]>
Captured from the real binary at the current head (--mini --demo):
/permission shell renders the canonical 'Shell command' permission
prompt and /fmt shell renders the shell tool part; neither surface
mentions the pre-rename bash identity.

Co-authored-by: arena-agent <[email protected]>
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

agenteinstinct1-max and others added 4 commits November 1, 2026 18:50
…eaning (Refs #780)

Second exact-review follow-up (REQUEST CHANGES on fe6fd39), RED/GREEN:

1. Ordered permission merge: folding bash->shell at decode (previous
   follow-up) collapsed two keys into the first key's position, so
   {bash:ask, *:allow, shell:deny} evaluated allow and nested pattern
   order was lost; plain mergeDeep has the same retention across layers.
   Decode no longer folds (written key order/spelling preserved), and
   every permission merge (mergeConfig top-level + agent.* + mode.*,
   agent-dir loads, mode conversion, OPENCODE_PERMISSION, tools->perms,
   agent tools+explicit) now uses ConfigPermissionV1.merge: rule-sequence
   semantics where a key/pattern written by a later layer takes that
   layer's position, and a flat action promotes to the * pattern instead
   of replacing inner patterns. Layering now evaluates as the
   concatenation of the layers' rule sequences.
2. Legacy tools records: fold the bash key to shell per layer before
   merging (mergeConfig operands, agent/mode records), so
   tools {shell:false} / {bash:true} / managed {shell:false} resolves by
   layer order (deny), in both spelling orders.
3. Agent normalize: explicit permission merges over the tools-derived
   layer with the ordered merge instead of Object.assign, so
   tools{bash:true} + permission{*:allow, shell:deny} keeps the explicit
   order and evaluates deny (allow-last control covered).
4. Wildcard meaning: union alias matching let a legacy s* (written when
   it covered skill) recruit the renamed shell tool and bypass an
   explicit bash:deny ordered before it. matchAction now preserves each
   pattern's written meaning: literal patterns match either exact
   spelling in written order (explicit re-permits still win), wildcard
   patterns match against the legacy spelling only (ba* still gates
   shell; s*/sh* do not capture it — fail-closed to ask). Applies
   uniformly to V1 evaluate, V2 Permission, Policy, doom_loop resources,
   and tool-name lists.

Also adds the archived-history control: a persisted completed
tool:'bash' part is replayed from stored output and never re-executed
under the new name.

Co-authored-by: arena-agent <[email protected]>
…ansient state (Refs #780)

Windows CI at fe6fd39 failed exactly one test: 'remote connection HTTP
failures set error and clear syncing' expected status 'error' but still
saw 'connecting' when its 1500ms poll expired. Causal trace: the sync
loop sets 'error' only after the first 503 round-trip (fiber scheduling
plus real in-process HTTP on a runner executing seven suites in
parallel) and flips back to 'connecting' after the 1s retry backoff, so
the test raced both the first-transition latency and a transient state
with a fixed wall-clock polling window. Product behavior is correct
(error is set and emitted on HTTP failure; setStatus updates state
before emitting).

The test now registers for the Status 'error' event via the product's
own waitEvent (same 5000ms bound Workspace uses internally) before
starting sync, joins it, and then makes the same status()/isSyncing
assertions. No assertion or product deadline changed; the wait is now
condition-driven and completes as soon as the transition happens. The
history-failure sibling had the identical latent race and gets the same
wait.

Co-authored-by: arena-agent <[email protected]>
… clamp (Refs #780)

Parent review of c3cdbfb rejected redefining wildcard behavior: matching
s*/sh* against the legacy spelling only silently broke canonical
wildcard use. Source-grounded contract (issue #780 + repo semantics):
rules match with Wildcard.match and resolve with findLast, and a
configured deny must never silently broaden. Production rulesets also
always carry defaults ('*': allow) before user rules, so any
extension/tier scheme that sidelines canonical wildcards whenever a
legacy-visible rule exists would disable them in practice.

Minimal compatible semantics, implemented as Wildcard.winningRule and
used by V1 evaluate, V2 Permission.evaluate, Policy.evaluate,
Permission.disabled, and the preapproved/wholly-disabled lookups:
- matchAction is plain union matching again: a pattern matches if it
  matches any spelling of the tool name; findLast order is untouched.
  Canonical s*/sh* name shell (including as carve-outs over '*'
  defaults), legacy ba* still gates it, exact-name re-permits win by
  written order.
- One clamp: when the winning rule matched the tool only because of the
  rename (a wildcard matching the canonical name but no legacy
  spelling — recruitedByRename; exact spellings of either name never
  count as recruited) and the same rules evaluated under the legacy
  name yield a deny, the legacy deny stands. Only deny is clamped;
  narrowing and ask->allow order are unchanged. Applies to the
  doom_loop resource dimension the same way.

So {bash:deny, s*:allow} stays deny, {*:ask, s*:allow} allows, and
{s*:deny} disables shell — canonical behavior with legacy negative
scope intact.

Co-authored-by: arena-agent <[email protected]>
…by event (Refs #780)

Parent review: the previous waitEvent timeout of 5000 changed the
observation bound (original poll: 1500ms); a deadline increase needs
explicit authority. Restore the identical 1500ms bound and assertions:
the test subscribes for the Status 'error' event before starting sync
and joins it, so the transient error state (the loop flips back to
'connecting' after the 1s retry backoff) cannot be missed by a level
poll, and the status()/isSyncing assertions run in the same instant
the transition is recorded (setStatus updates state before emitting).

Raw-log note for the fe6fd39 Windows failure: no 'failed to connect to
global sync' warning appears before teardown, indicating the first
transition had not fired inside the window on that loaded runner. This
change removes the structural level-poll miss at the same bound; a
first transition slower than 1500ms under CI load remains possible and
would need a separately authorized bound change.

Co-authored-by: arena-agent <[email protected]>
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant