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
This week’s roast is sponsored by “works on my machine” vodka and “who needs guardrails” energy drinks. The repo is mostly solid, but the potholes are deep, the guardrails are foam, and the logging is yelling into stderr like an anxious toaster. Strap in. 🔥🧯
case'Open Hands':
// For Open Hands, we target the main config file, not a separate mcp.jsoncandidates.push(path.join(projectRoot,'config.toml'));
Suggestions
Only remove “additional” files if:
They have a Ruler provenance marker, or
They have a .bak, or
They’re listed in a manifest from apply-time.
Remove config.toml from the generic list; gate removal behind: “contains known OpenHands MCP sections” AND “backup exists,” or require --force-extra-cleanup.
Log a WARN and skip if provenance is uncertain; don’t be bold with users’ config files.
Dry‑Run Logging Bug in Revert
🪦 It prints ${actionPrefix} literally in logs instead of using the function. That’s not a prefix; that’s a cry for help.
The code forgets to call actionPrefix(dryRun) in a few log lines and logs the bare function identifier, producing nonsense.
This confuses users during dry runs and makes logs less reliable than a fortune cookie.
Files
src/core/revert-engine.ts
Code
Literal function name sneaks into logs instead of evaluated prefix:
logVerbose(`${actionPrefix} Would remove empty VSCode settings file`,verbose,);
...
logVerbose(`${actionPrefix} Would remove augment.advanced section from ${settingsPath}`,verbose,);
Suggestions
Replace ${actionPrefix} with ${actionPrefix(dryRun)} across the file.
Add a lightweight test that asserts dry-run prefixes appear in log messages.
Verbose Logging Contradiction
🪵 The docs say verbose logs go to stdout. The code screams to stderr. Pick a lane.
The comment claims info/verbose → stdout, warn/error → stderr.
logVerbose writes to stderr; logVerboseInfo writes to stdout. It’s a logging mullet: party in the front, chaos in the back. 💇
Files
src/constants.ts
Code
Sends verbose to stderr, contradicting the comment:
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.
Uh oh!
There was an error while loading. Please reload this page.
-
This Codebase Smells!
This week’s roast is sponsored by “works on my machine” vodka and “who needs guardrails” energy drinks. The repo is mostly solid, but the potholes are deep, the guardrails are foam, and the logging is yelling into stderr like an anxious toaster. Strap in. 🔥🧯
Table of Contents
Overzealous Revert Deletes Real Files
💣 Revert considers
config.toml“extra junk” and may delete it. What could possibly go wrong? 🤡config.tomlas an “additional file” to remove. That’s a normal file in many repos (and is used by OpenHands here)..bak, it unlinks the file outright. That’s a lottery ticket for accidental data loss. 🎰💥Files
src/core/revert-engine.tssrc/paths/mcp.tsCode
config.toml:https://github.com/intellectronica/ruler/blob/main/src/core/revert-engine.ts#L311-L318
config.toml:https://github.com/intellectronica/ruler/blob/main/src/paths/mcp.ts#L33-L36
Suggestions
.bak, orconfig.tomlfrom the generic list; gate removal behind: “contains known OpenHands MCP sections” AND “backup exists,” or require--force-extra-cleanup.Dry‑Run Logging Bug in Revert
🪦 It prints
${actionPrefix}literally in logs instead of using the function. That’s not a prefix; that’s a cry for help.actionPrefix(dryRun)in a few log lines and logs the bare function identifier, producing nonsense.Files
src/core/revert-engine.tsCode
https://github.com/intellectronica/ruler/blob/main/src/core/revert-engine.ts#L365-L369
https://github.com/intellectronica/ruler/blob/main/src/core/revert-engine.ts#L378-L386
Suggestions
${actionPrefix}with${actionPrefix(dryRun)}across the file.Verbose Logging Contradiction
🪵 The docs say verbose logs go to stdout. The code screams to stderr. Pick a lane.
logVerbosewrites to stderr;logVerboseInfowrites to stdout. It’s a logging mullet: party in the front, chaos in the back. 💇Files
src/constants.tsCode
https://github.com/intellectronica/ruler/blob/main/src/constants.ts#L23-L27
Suggestions
Recursive Scans Dive Into node_modules
🕳️ The “find all .ruler” scan descends into everything that isn’t hidden. Yes, including
node_modules. Performance just left the chat. 🐌node_modules,dist,build,vendor, etc. RIP CPU and developer patience.Files
src/core/FileSystemUtils.tsCode
https://github.com/intellectronica/ruler/blob/main/src/core/FileSystemUtils.ts#L218-L221
Suggestions
['node_modules', 'dist', 'build', 'coverage', 'out', 'vendor', '.next', '.turbo'].Inconsistent Rule Loading
🔀 Single-mode loader reads only top-level
.mdfiles; other paths use recursive reads. Which timeline am I in? 🌀UnifiedConfigLoaderonly lists top-level.mdfiles.readMarkdownFiles), leading to divergent behavior across code paths.Files
src/core/UnifiedConfigLoader.tssrc/core/FileSystemUtils.tsCode
.mdcollection in unified loader:https://github.com/intellectronica/ruler/blob/main/src/core/UnifiedConfigLoader.ts#L109-L114
https://github.com/intellectronica/ruler/blob/main/src/core/FileSystemUtils.ts#L142-L153
Suggestions
.mdfiles are included identically in both single and hierarchical modes.Gitignore Block Duplication Risk
🧱 Only the first Ruler-managed block is replaced; others survive like gremlins after midnight.
.gitignoreturns into a haunted attic.Files
src/core/GitignoreUtils.tsCode
https://github.com/intellectronica/ruler/blob/main/src/core/GitignoreUtils.ts#L113-L121
Suggestions
.gitignorecontaining multiple blocks and verifies only one remains.Ambiguous Agent Config Mapping
🎭 Substring matching on display names is a bug generator that got a fake mustache and walked into production.
mapRawAgentConfigsmaps per-agent configs using identifier exact match OR display name substring match.Files
src/core/config-utils.tsCode
https://github.com/intellectronica/ruler/blob/main/src/core/config-utils.ts#L21-L31
Suggestions
identifiermatches, orSilent MCP Parse Failures Hide Bugs
🫥
readNativeMcpreturns{}on any error, swallowing parse failures like a hungry black hole.Files
src/paths/mcp.tsCode
https://github.com/intellectronica/ruler/blob/main/src/paths/mcp.ts#L75-L80
Suggestions
If you address these, you’ll have fewer surprises, faster runs, saner logs, and fewer accidental “I deleted my config.toml, send help” Slack messages. Bless you. 🧼🧹
Beta Was this translation helpful? Give feedback.
All reactions