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
Welcome back to another thrilling episode of “What Fresh Technical Compost Is This?” 🍿 This repo is a Rube Goldberg machine of config slingers duct‑taped to recursion, sprinkled with cheerful deletion of user files like it’s spring cleaning in /, and finished with a garnish of duplicated logic pretending to be abstraction. I laughed. I wept. I drafted a will. Let’s exhume the bodies. 🔥🤡
Nuclear Revert Deletes Legitimate config.toml (Data Loss Footgun)
Revert unconditionally targets a generic config.toml and removes it if no backup exists — even if it never created it. 💣
This is a catastrophe for projects (Rust, Go, OpenHands + custom content, infra stacks) that happen to have a real config.toml in root; a test drive of ruler revert can vaporize it with zero provenance check. 🤦♂️
Files
src/core/revert-engine.ts
src/paths/mcp.ts
README.md (documents Open Hands using config.toml)
case'Open Hands':
// For Open Hands, we target the main config file ...candidates.push(path.join(projectRoot,'config.toml'));
Suggestions
Track provenance: write a JSON/TOML manifest of created/modified files; only delete if listed or has .bak.
Gate deletion of config.toml behind: has ruler marker comment / section OR .bak exists OR explicit --danger-remove-root-config flag.
Replace hard-coded array with strategy object: [{path, requiresBackup?:true, requiresMarker?:true}].
Add dry-run warning summarizing “Skipping generic config.toml (not created by Ruler)” when unsafe.
Add regression test: create foreign config.toml → apply (without touching it) → revert must NOT delete.
Blind Directory Purge Targets .github Etc. Like a Hungry Roomba
Your “empty dir cleanup” gleefully removes structurally meaningful empty directories (.github, .vscode, etc.) just because they’re temporarily empty. 🪓
Teams often stage workflow dirs or editor settings incrementally; tooling shouldn’t rip scaffolding out from under them.
Gitignore Logic Writes Leading Slashes; Docs Lie To Your Face
Implementation forces leading / (anchored) entries while README example omits them — confusion, inconsistent patterns, potential unintended negation semantics. 🤥
Anchoring may change ignore behavior in nested scenarios; mismatch erodes trust.
Allow override via CLI: --scan-include / --scan-exclude.
Use BFS with depth guard or async pool to avoid deep stack / thrash.
Add benchmark test: create fake large node_modules tree; assert traversal count shrinks after change.
Duplicated Skillz MCP Injection Logic (Two Code Paths Diverged in a Dumb Wood)
Skillz server injection is performed once pre-agent loop and again inside handleMcpConfiguration with similar logic — divergence risk & double-maintenance hell. 🪞🪞
Future changes (naming, filtering, env enrichment) will desync the two implementations producing inconsistent MCP bundles per agent.
Require opt-in via ruler.toml allow_global_fallback = true for security-sensitive environments.
Test: absence of local config triggers log (assert captured stdout).
Explosive .gitignore Bloat from Per‑File Backups
You eagerly add every generatedPath plus its .bak variant, potentially doubling entries and churning the block for ephemeral backups. 💾💥
Scaling across dozens of agents multiplies noise; a single pattern (*.bak) inside the block would suffice (intentional decision note contradicts practicality).
Expand test coverage for destructive behaviors (revert edge cases, overwrite semantics).
If you fix even half of this flaming circus, the next audit might only smell like mild compost instead of a landfill fire. 🔥🧯
You’re welcome. Now go refactor before this thing gains sentience.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
This Codebase Smells!
Welcome back to another thrilling episode of “What Fresh Technical Compost Is This?” 🍿 This repo is a Rube Goldberg machine of config slingers duct‑taped to recursion, sprinkled with cheerful deletion of user files like it’s spring cleaning in /, and finished with a garnish of duplicated logic pretending to be abstraction. I laughed. I wept. I drafted a will. Let’s exhume the bodies. 🔥🤡
Table of Contents
Nuclear Revert Deletes Legitimate config.toml (Data Loss Footgun)
Revert unconditionally targets a generic config.toml and removes it if no backup exists — even if it never created it. 💣
This is a catastrophe for projects (Rust, Go, OpenHands + custom content, infra stacks) that happen to have a real config.toml in root; a test drive of ruler revert can vaporize it with zero provenance check. 🤦♂️
Files
Code
Lines 311–318: https://github.com/intellectronica/ruler/blob/main/src/core/revert-engine.ts#L311-L318
Lines 33–36: https://github.com/intellectronica/ruler/blob/main/src/paths/mcp.ts#L33-L36
Suggestions
Blind Directory Purge Targets .github Etc. Like a Hungry Roomba
Your “empty dir cleanup” gleefully removes structurally meaningful empty directories (.github, .vscode, etc.) just because they’re temporarily empty. 🪓
Teams often stage workflow dirs or editor settings incrementally; tooling shouldn’t rip scaffolding out from under them.
Files
Code
Lines 269–280: https://github.com/intellectronica/ruler/blob/main/src/core/revert-engine.ts#L269-L280
Suggestions
Gitignore Logic Writes Leading Slashes; Docs Lie To Your Face
Implementation forces leading / (anchored) entries while README example omits them — confusion, inconsistent patterns, potential unintended negation semantics. 🤥
Anchoring may change ignore behavior in nested scenarios; mismatch erodes trust.
Files
Code
Lines 57–61: https://github.com/intellectronica/ruler/blob/main/src/core/GitignoreUtils.ts#L57-L61
Lines 705–717: https://github.com/intellectronica/ruler/blob/main/README.md#L705-L717
Suggestions
Full-Tree Recursive Scan Invades node_modules (Performance Slow Roast)
findAllRulerDirs traverses entire tree except dot-prefixed dirs; node_modules, dist, build, vendor all fair game. 🔥🐢
On large monorepos this becomes an accidental recursive furnace — wasted syscalls and latency for every apply with nested enabled.
Files
Code
Lines 205–243: https://github.com/intellectronica/ruler/blob/main/src/core/FileSystemUtils.ts#L205-L243
Suggestions
Duplicated Skillz MCP Injection Logic (Two Code Paths Diverged in a Dumb Wood)
Skillz server injection is performed once pre-agent loop and again inside handleMcpConfiguration with similar logic — divergence risk & double-maintenance hell. 🪞🪞
Future changes (naming, filtering, env enrichment) will desync the two implementations producing inconsistent MCP bundles per agent.
Files
Code
Lines 480–491: https://github.com/intellectronica/ruler/blob/main/src/core/apply-engine.ts#L480-L491
Lines 612–642: https://github.com/intellectronica/ruler/blob/main/src/core/apply-engine.ts#L612-L642
Suggestions
MCP Overwrite Strategy Obliterates Unrelated Keys (Collateral Damage)
mergeMcp in overwrite mode nukes entire base object except servers, discarding other root-level keys critical to native configs. 🧨
Agents might store settings beyond server listings (e.g., feature toggles); your implementation is an indiscriminate schema lobotomy.
Files
Code
Lines 17–27: https://github.com/intellectronica/ruler/blob/main/src/mcp/merge.ts#L17-L27
Suggestions
Naive SSE Detection for Claude MCP Servers (Regex Astrology)
SSE vs HTTP server type inference just checks /sse substring; fragile & misclassifies structured endpoints or query params. 🔮
Edge: https://api.example.com/v1/sse-notify vs /stream/sseChannel or SSE negotiated via headers — all mishandled.
Files
Code
Lines 823–828: https://github.com/intellectronica/ruler/blob/main/src/core/apply-engine.ts#L823-L828
Suggestions
Silent Global Config Fallback (Spooky Action at a Distance)
If local .ruler/ruler.toml missing, loader silently yanks a global config — user might think project is clean while phantom global rules apply. 🫥
Implicit cross-project leakage is a maintainability + security hazard (e.g., secret-bearing MCP servers reused unexpectedly).
Files
Code
Lines 138–147: https://github.com/intellectronica/ruler/blob/main/src/core/ConfigLoader.ts#L138-L147
Lines 170–171: https://github.com/intellectronica/ruler/blob/main/src/core/ConfigLoader.ts#L170-L171
Suggestions
Explosive .gitignore Bloat from Per‑File Backups
You eagerly add every generatedPath plus its .bak variant, potentially doubling entries and churning the block for ephemeral backups. 💾💥
Scaling across dozens of agents multiplies noise; a single pattern (*.bak) inside the block would suffice (intentional decision note contradicts practicality).
Files
Code
Lines 507–510: https://github.com/intellectronica/ruler/blob/main/src/core/apply-engine.ts#L507-L510
Suggestions
Revert Counts “Restored” Files as “Removed” (Statistical Gaslighting)
In removeAdditionalAgentFiles, restoring from backup still increments filesRemoved (semantic mismatch). 📊🤯
Metrics become misleading: “Removed” might actually mean “Restored” — complicating UX analytics and scripting.
Files
Code
Lines 332–337: https://github.com/intellectronica/ruler/blob/main/src/core/revert-engine.ts#L332-L337
Suggestions
Bonus Mini-Nits (Because Why Stop Now?)
General Improvement Themes
If you fix even half of this flaming circus, the next audit might only smell like mild compost instead of a landfill fire. 🔥🧯
You’re welcome. Now go refactor before this thing gains sentience.
Beta Was this translation helpful? Give feedback.
All reactions