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 episode of “You shipped this? On purpose?” This repo is the software equivalent of an IKEA bookshelf held together by vibes, TODOs, and a strong belief in try/catch. It’s almost good — like a sandwich you dropped, picked up, and convinced yourself the five‑second rule applies. Let’s fix the spicy bits before they fix you. 💣🧯
Add --force-extra-cleanup before deleting any generic filenames; default to warn-only.
Dry‑Run Logging Bug in Revert
🪓 Dry‑run logging tries to use actionPrefix but forgets it’s a function, not a string. Your logs say “undefined theater,” and I can’t even hate‑watch it.
You correctly compute const prefix = actionPrefix(dryRun) earlier, then log with ${actionPrefix} in a few places. That prints the function reference instead of the prefix.
if(entry.isDirectory()){if(entry.name==='.ruler'){rulerDirs.push(fullPath);}else{// Recursively search subdirectories (but skip hidden directories like .git)if(!entry.name.startsWith('.')){awaitfindRulerDirs(fullPath);}}}
Suggestions
Add an explicit denylist: node_modules, dist, build, coverage, target, vendor, .venv, .cache, etc.
Consider a max depth or early cutoffs for known package/distribution directories.
Add a CLI flag --scan-all for the two people who actually want the current behavior.
Fuzzy Agent Filters Invite Surprise
🎯 “Substring includes” to pick agents? Fantastic way to accidentally run the wrong ones and then blame user error. Been there, done that, rolled back prod.
CLI filters and defaults use includes() on agent names, which is ambiguous and brittle. One mistyped “co” runs Copilot, Codex, and probably your coffee machine.
Share a single JSON parse helper that tolerates comments/trailing commas and use it in both places.
When parsing fails, log a warning and back up the original file before writing a normalized version.
Preserve unknown keys during merge: carry through base keys you don’t recognize to avoid data loss.
Two Config Loaders, Two Sources of Truth
🪞 You have ConfigLoader and UnifiedConfigLoader parsing TOML separately, with different validation and semantics. Pick a favorite child already.
ConfigLoader uses zod validation and a specific structure; UnifiedConfigLoader parses raw TOML and assembles another view. Double the code paths; triple the ways to be inconsistent.
Consolidate on a single loader; make the other consume its results instead of re‑parsing.
Share schemas/types; generate types from zod where you need them to avoid drift.
Add integration tests that compare both outputs for the same config and fail on divergence until removed.
Home‑Directory MCP Paths Are Footguns (Mitigated)
🥾 getNativeMcpPath still includes HOME‑based configs (e.g. Cursor, Windsurf). You correctly avoid writing outside the project root, but why keep tempting fate?
The apply path guards against writing to HOME — good. But the candidate resolution still prefers or returns HOME paths for some adapters; future callers might misuse this.
Remove HOME candidates entirely, or return them only when explicitly asked (e.g. --allow-home-mcp).
If keeping them, surface a warning when a HOME path is chosen and always dry‑run unless --force.
Add tests that assert no write attempts outside projectRoot for all adapters.
If you were hoping I’d run out of complaints: alas, I’m fueled by bad patterns and lukewarm coffee. But seriously — fix the deletions, tighten matching, stop spelunking node_modules, and unify config parsing. Do that, and this will go from “please don’t” to “yeah okay, ship it” real quick. 🚀
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! A Weekly Report
Welcome back to another episode of “You shipped this? On purpose?” This repo is the software equivalent of an IKEA bookshelf held together by vibes, TODOs, and a strong belief in try/catch. It’s almost good — like a sandwich you dropped, picked up, and convinced yourself the five‑second rule applies. Let’s fix the spicy bits before they fix you. 💣🧯
Table of Contents
Overzealous Revert Deletes Real Files
☠️ Your revert “cleanup” casually targets
config.toml
, which real projects often own. Bold strategy, Cotton..bak
, you unlink it. That’s not “cleanup,” that’s “oops we deleted prod configs” energy. 🤦config.toml
. If Ruler ran in a mixed repo, kiss that file goodbye.Files
src/core/revert-engine.ts
src/paths/mcp.ts
src/core/apply-engine.ts
Code
config.toml
:config.toml
:Suggestions
.bak
exists.config.toml
removal behind OpenHands-specific TOML shape checks (known[mcp.*]
keys) and/or backup presence.--force-extra-cleanup
before deleting any generic filenames; default to warn-only.Dry‑Run Logging Bug in Revert
🪓 Dry‑run logging tries to use
actionPrefix
but forgets it’s a function, not a string. Your logs say “undefined theater,” and I can’t even hate‑watch it.const prefix = actionPrefix(dryRun)
earlier, then log with${actionPrefix}
in a few places. That prints the function reference instead of the prefix.Files
src/core/revert-engine.ts
Code
actionPrefix
in string templates:Suggestions
${actionPrefix}
with${prefix}
where the local variable exists, or callactionPrefix(dryRun)
inline consistently.Recursive Scans Dive Into node_modules
🤿 Your
.ruler
search spelunks the entire tree, skipping only dotdirs. Congratulations, you just invented a CPU miner.findAllRulerDirs
recurses into everything not starting with.
. That includesnode_modules
,dist
,build
,vendor
, and other performance graveyards.Files
src/core/FileSystemUtils.ts
Code
Suggestions
node_modules
,dist
,build
,coverage
,target
,vendor
,.venv
,.cache
, etc.--scan-all
for the two people who actually want the current behavior.Fuzzy Agent Filters Invite Surprise
🎯 “Substring includes” to pick agents? Fantastic way to accidentally run the wrong ones and then blame user error. Been there, done that, rolled back prod.
includes()
on agent names, which is ambiguous and brittle. One mistyped “co” runs Copilot, Codex, and probably your coffee machine.Files
src/core/apply-engine.ts
Code
Suggestions
getIdentifier()
; allow explicit wildcards as an opt-in (e.g.'*code*'
).Strict JSON Parser Can Clobber Existing MCP Config
🧨
readNativeMcp
uses strictJSON.parse
and silently returns{}
on error — goodbye user config, hello “why did my MCP servers vanish?”UnifiedConfigLoader
but didn’t reuse it here. Inconsistent and dangerous.Files
src/paths/mcp.ts
src/core/UnifiedConfigLoader.ts
Code
{}
:Suggestions
base
keys you don’t recognize to avoid data loss.Two Config Loaders, Two Sources of Truth
🪞 You have
ConfigLoader
andUnifiedConfigLoader
parsing TOML separately, with different validation and semantics. Pick a favorite child already.ConfigLoader
uses zod validation and a specific structure;UnifiedConfigLoader
parses raw TOML and assembles another view. Double the code paths; triple the ways to be inconsistent.Files
src/core/ConfigLoader.ts
src/core/UnifiedConfigLoader.ts
Code
Suggestions
Home‑Directory MCP Paths Are Footguns (Mitigated)
🥾
getNativeMcpPath
still includes HOME‑based configs (e.g. Cursor, Windsurf). You correctly avoid writing outside the project root, but why keep tempting fate?Files
src/paths/mcp.ts
src/core/apply-engine.ts
Code
Suggestions
--allow-home-mcp
).--force
.projectRoot
for all adapters.If you were hoping I’d run out of complaints: alas, I’m fueled by bad patterns and lukewarm coffee. But seriously — fix the deletions, tighten matching, stop spelunking
node_modules
, and unify config parsing. Do that, and this will go from “please don’t” to “yeah okay, ship it” real quick. 🚀Beta Was this translation helpful? Give feedback.
All reactions