You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cat /tmp/cortex-gh-uninstall.XXXXXX/.github/workflows/ci.yml
name: CI
on: [push]
# notify cortex team on failure
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: echo unrelated
$ cortex github uninstall --path /tmp/cortex-gh-uninstall.XXXXXX --workflow-name ci --force
# file is deleted even though it was not generated by Cortex
System Information
cortex 0.0.7 (7954d02 2026-04-03)
macOS 26.1 (25B78)
Darwin 25.1.0 arm64
CPU: Apple M2
RAM: 8 GB
Screenshots
repro.mp4
Steps to Reproduce
Create a temporary directory with .github/workflows/ci.yml.
Put an unrelated workflow in that file, but include the word cortex somewhere in the contents.
Run cortex github uninstall --path <dir> --workflow-name ci --force.
Check whether the original file still exists.
Expected Behavior
github uninstall should only remove workflows that were actually generated by Cortex, not arbitrary workflows whose contents happen to mention the word cortex.
Actual Behavior
The command treats any matching file as a Cortex workflow if its contents contain Cortex or cortex, then deletes it.
Additional Context
Code path: /Users/odeili/Projects/platform/cortex/src/cortex-cli/src/github_cmd.rs. run_uninstall() verifies the target file using a loose content.contains("Cortex") || content.contains("cortex") check before removal. Duplicate check on April 5, 2026: searched github uninstall deletes unrelated workflow containing cortex string, github uninstall false positive removes non cortex workflow, and cortex github uninstall removes unrelated workflow containing cortex; I did not find a matching Cortex issue.
Project
cortex
Description
cortex github uninstallcan delete an unrelated workflow file if the file merely contains the wordcortex.repro.mp4
Error Message
$ cortex github uninstall --path /tmp/cortex-gh-uninstall.XXXXXX --workflow-name ci --force Cortex workflow removed successfully! Removed: /tmp/cortex-gh-uninstall.XXXXXX/.github/workflows/ci.yml exists_after=noDebug Logs
System Information
Screenshots
repro.mp4
Steps to Reproduce
.github/workflows/ci.yml.cortexsomewhere in the contents.cortex github uninstall --path <dir> --workflow-name ci --force.Expected Behavior
github uninstallshould only remove workflows that were actually generated by Cortex, not arbitrary workflows whose contents happen to mention the wordcortex.Actual Behavior
The command treats any matching file as a Cortex workflow if its contents contain
Cortexorcortex, then deletes it.Additional Context
Code path:
/Users/odeili/Projects/platform/cortex/src/cortex-cli/src/github_cmd.rs.run_uninstall()verifies the target file using a loosecontent.contains("Cortex") || content.contains("cortex")check before removal. Duplicate check on April 5, 2026: searchedgithub uninstall deletes unrelated workflow containing cortex string,github uninstall false positive removes non cortex workflow, andcortex github uninstall removes unrelated workflow containing cortex; I did not find a matching Cortex issue.