Skip to content

Recognize executable spellings in shared command checks (T42) - #200

Merged
erickb336 merged 1 commit into
mainfrom
codex/t42-program-names
Oct 13, 2026
Merged

erickb336 merged 1 commit into
mainfrom
codex/t42-program-names

Conversation

@erickb336

@erickb336 erickb336 commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Closes #199
Sage task T42

Shared push and expansion checks now recognize mixed-case executable names and the .exe suffix. A command such as uppercase Git uploading main receives the same refusal as lowercase Git. The executable-name comparison handles both path separators. Arguments retain their case and meaning; the exact permitted PR merge form stays unchanged.

This is the shared-policy part of #97, not its complete repair. Claude's agent-specific executable checks and PowerShell forms remain open. No Claude hook source or PR #140 files change. Source edits are in packages/sage-core/command-policy.mjs and packages/sage-core/push-policy.mjs; both plugins contain regenerated copies.

Validation:

  • npm run build: passed.
  • npm run check: all checks pass (3 timing bounds carry a timing-ok annotation).
  • node --test --test-name-pattern='T42|T41|shared merge and push extraction' scripts/providers.test.mjs: 6 passed, 0 failed.
  • Detached main 29af916 with only the new test file: 0 passed, 2 failed. The push test receives no refusal for uppercase Git uploading main. The expansion test receives no refusal for an expanded Git subcommand. These are behavioral failures, not missing imports.

All tests put fake ps, pgrep, and kill first on PATH. Attack text reaches parsers or hook handlers only. Positive controls cover safe topic pushes, reads, ordinary glob arguments, and repository templates. The existing exact merge form remains the only recognized merge candidate.

Head 26b89da passed two clean code, security, and QA review cycles. The full local command npm test -- --test-concurrency=1 passed: 1,160 tests, 1,160 passed, 0 failed, 0 skipped. Exact-head CI run 38450290370 also passed: 1,160 tests, 1,160 passed, 0 failed, 0 skipped. All owned local test and review processes finished. No live Git push or API attack, native automatic activation, or real-model pilot ran. The command spelling checks are parser and handler evidence, not a Windows execution test.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalize executable names in shared command policies (T42)

1 participant