Skip to content

Normalize executable names in shared command policies (T42) #199

Closed

Description

@erickb336

Sage task T42. This is the shared executable-name part of #97, required by Codex policy parity under #88. Risk: auth; two clean code, security, and QA review cycles are required.

The shared push policy misses uppercase and .exe Git names. Shared expansion checks also miss uppercase and .exe Git and GitHub CLI names. On platforms that run these spellings, protected branch writes and expanded subcommands can escape recognition.

Normalize executable names only: directory separators, letter case, and a trailing .exe. Reuse one normalizer in shared push/API recognition and command expansion checks. Preserve argument case and the exact permitted PR merge form.

Scope: packages/sage-core/command-policy.mjs, packages/sage-core/push-policy.mjs, isolated provider tests, and generated copies. No Claude-owned hook or shared state changes.

Acceptance:

  • Mixed-case and .exe Git commands receive the same push refusals as lowercase Git.
  • Mixed-case and .exe Git/GitHub CLI subcommand expansion is refused.
  • Ordinary arguments, safe task-branch pushes, and reads retain their behavior.
  • Tests cover both isolated bundles and fail on detached main.
  • Build, check, full tests, exact-head CI, and both review cycles pass.

The remaining agent-specific and PowerShell parts of #97 stay open. This does not enable installed automatic Sage.

Activity

  1. added
    codex
    on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    codex

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions