Skip to content

refactor: shrink fallback, merge email benchmarks, dedupe bool prefs - #771

Open
qasimsethi-code wants to merge 1 commit into
DietrichGebert:mainfrom
qasimsethi-code:refactor/audit-cuts
Open

refactor: shrink fallback, merge email benchmarks, dedupe bool prefs#771
qasimsethi-code wants to merge 1 commit into
DietrichGebert:mainfrom
qasimsethi-code:refactor/audit-cuts

Conversation

@qasimsethi-code

@qasimsethi-code qasimsethi-code commented Aug 29, 2026

Copy link
Copy Markdown

Ran /ponytail-audit on the repo and applied the surviving findings. Net −41 lines, no behavior changes except one deliberate fix (last bullet).

  • getFallbackInstructions: condensed the 31-line hand-maintained SKILL.md mirror to paragraph form — the same shape _fallback_instructions in the Hermes port already uses. It only runs when SKILL.md (shipped in the same package) is unreadable; the full mirror was sync debt with no payoff.
  • benchmarks/email-rate.js replaces claude-email.js + model-email.js: same harness loop existed twice differing only in the call() and env names. One file, two-entry provider table. Env contract: PROVIDER=claude|openai, N, MODELS (was CE_*/ME_*).
  • .env parsing: hand-rolled kv parser (duplicated in both email scripts) → util.parseEnv (Node ≥20.12).
  • boolPref(envVar, configKey) in ponytail-config folds the twin getQuietStartup/getHideStatus resolvers; exports and env→config→default semantics unchanged.
  • Hermes port fix: _filter_skill_body_for_mode's example regex was missing the " quote guard the JS version added deliberately — a prose bullet starting with a mode word was silently dropped in every other mode. Now mirrors hooks/ponytail-instructions.js.

Audit also flagged the root plugin.json as unreferenced — wrong, it's the Grok adapter manifest (tests/grok-plugin.test.js caught it); left untouched.

Tests: root 83/84 (the one failure is csv: correct pandas one-liner passes, environmental — no pandas on this machine, fails on a pristine checkout too), hermes 8/8, pi-extension 23/23, ponytail-mcp 3/3.

🤖 Generated with Claude Code

Fixes #772.

- condense getFallbackInstructions from a 31-line SKILL.md mirror to the
  paragraph form the Hermes port already proved sufficient
- merge claude-email.js + model-email.js into email-rate.js with a
  provider table; hand-rolled .env parsing -> util.parseEnv (Node >=20.12)
- fold getQuietStartup/getHideStatus into one boolPref resolver,
  behavior and exports unchanged
- fix Hermes example filter to require a quoted value, mirroring the JS
  guard: prose bullets starting with a mode word survive mode filtering

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@qasimsethi-code

Copy link
Copy Markdown
Author

Friendly triage note, no rush at all: this is primarily a bugfix for #772 (the Hermes port silently drops prose bullets that start with a mode word), with the audit cleanups riding along. Since first-contribution CI needs maintainer approval here, I ran the identical test workflow on a temporary mirror — passed clean on ubuntu-latest / Node 22 / Python 3.12 (84/84 across all four suites). Happy to split the bugfix into its own minimal PR if that's easier to take.

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.

Hermes port: mode filter silently drops prose bullets that start with a mode word

1 participant