Skip to content

fix(qoder): honor QODER_CONFIG_DIR for mode state - #1057

Merged
DietrichGebert merged 2 commits into
DietrichGebert:mainfrom
Vaishnavi220506:Vaishnavi220506/fix-qoder-config-dir
Oct 13, 2026
Merged

DietrichGebert merged 2 commits into
DietrichGebert:mainfrom
Vaishnavi220506:Vaishnavi220506/fix-qoder-config-dir

Conversation

@Vaishnavi220506

Copy link
Copy Markdown
Contributor

Summary

Honor Qoder's QODER_CONFIG_DIR when Ponytail stores, reads, and removes its mode flag. This keeps mode switching and subagent injection in Qoder's selected user directory and lets uninstall clean the same flag.

Problem and cause

With QODER_SESSION_ID and QODER_CONFIG_DIR=<custom> set, /ponytail ultra writes ~/.qoder/.ponytail-active; <custom>/.ponytail-active is absent. The runtime and uninstaller both hardcode ~/.qoder even though Qoder supports the directory override. An isolated probe reproduced this on main at 552acd5. Fixes #1056.

Changes

  • Resolve the Qoder directory once, using QODER_CONFIG_DIR with the current ~/.qoder fallback.
  • Use it in the hooks and uninstall script.
  • Cover mode switching, subagent readback, isolation from the default directory, and cleanup of a custom directory.

Testing

  • New isolated hook probe on base: failed (<custom> flag missing; default flag written). New uninstall assertion on base: failed (custom flag remained).
  • npm test on this HEAD (764720f) under Ubuntu/Node 22 with the repository's documented pandas dependency: passed (127 root tests and 28 Pi tests).
  • node tests/uninstall.test.js on Windows: passed.
  • node scripts/check-rule-copies.js, node scripts/check-versions.js, git diff --check: passed.
  • Windows tests/hooks.test.js stops at the pre-existing path assertion tracked by test: compare the statusline copy path JSON-escaped in hooks.test.js #1046 before reaching the new Qoder case; the Qoder hook tests passed under Ubuntu.

No ruleset text changed, so the three-arm ruleset benchmark is not applicable under CONTRIBUTING.

@6639835 6639835 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed Qoder resolution across config, runtime state and uninstall at 764720f. The shared resolver honors QODER_CONFIG_DIR and preserves the default; reads, writes and uninstall derive from that location. Tests cover custom mode/subagent tracking and default/custom uninstall isolation. No actionable issue found in this static scope. Node hook/uninstall suites were not run.

@DietrichGebert
DietrichGebert merged commit fa36f34 into DietrichGebert:main Oct 13, 2026
1 check passed
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.

Qoder mode state ignores QODER_CONFIG_DIR

3 participants