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 to another thrilling episode of “Why Is My Terminal Screaming?” Today’s guest: your repo. It’s got heart, ambition, and a charming habit of deleting real files like it’s cleaning its room by throwing everything out the window. Let’s fix the chaos before it starts converting your config.toml into abstract art. Buckle up. 💥🤡
⚠️ Revert happily unlinks generic config.toml even without provenance.
The revert cleaner has a hard-coded hitlist including the very generic config.toml. That’s a real file in many projects. You’re one ruler revert away from “fun”.
The logic “if no .bak → must be generated” is a lovely fantasy. In the actual universe, it’s called data loss. 💣
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 delete files that:
Have a Ruler provenance marker written on apply, or
Have a .bak, or
Are referenced in a generated manifest recorded during apply.
Gate config.toml deletion: remove only if it contains known OpenHands MCP sections or a .bak is present.
Add --force-extra-cleanup to explicitly permit nuking generic files.
Dry‑Run Logging Bug in Revert
Dry-run logs show a function, not a prefix. Yes, really. 🤦
You’re interpolating actionPrefix the function instead of its return value. The log reads like a JS stack trace had a baby with string coercion. Cute, not helpful.
Write a signed provenance marker (e.g., <!-- Ruler: {hash-of-sources} -->) that you can verify deterministically.
Record a manifest on apply so revert/merge logic uses facts, not vibes.
.gitignore Block Loses State
The Ruler block is regenerated with only “new paths” from this run, silently dropping previously managed paths not present this time. Prepare for flip-flopping ignored files. 🧠🪣
You filter out paths already present outside the block, then replace the first Ruler block entirely with just the new ones.
If you apply a subset of agents later, older ignored files vanish from the Ruler block, potentially becoming tracked again.
Maintain a manifest of generated outputs per apply invocation and merge that into the Ruler block; don’t drop previous managed entries unless explicitly removed.
Or persist the full set of known generated paths under .ruler/.manifest.json and use it to reconcile.
Noisy Global Config Error Logging
An ignorable “can’t stat global config path” becomes a stderr error log. Why are we yelling? 📣
Checking the global config dir is routine; not finding it isn’t an error, it’s expected.
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 to another thrilling episode of “Why Is My Terminal Screaming?” Today’s guest: your repo. It’s got heart, ambition, and a charming habit of deleting real files like it’s cleaning its room by throwing everything out the window. Let’s fix the chaos before it starts converting your
config.toml
into abstract art. Buckle up. 💥🤡Table of Contents
Overzealous Revert Deletes Real Files
config.toml
even without provenance.config.toml
. That’s a real file in many projects. You’re oneruler revert
away from “fun”.Files
src/core/revert-engine.ts
src/paths/mcp.ts
Code
config.toml
:config.toml
:Suggestions
.bak
, orconfig.toml
deletion: remove only if it contains known OpenHands MCP sections or a.bak
is present.--force-extra-cleanup
to explicitly permit nuking generic files.Dry‑Run Logging Bug in Revert
Dry-run logs show a function, not a prefix. Yes, really. 🤦
actionPrefix
the function instead of its return value. The log reads like a JS stack trace had a baby with string coercion. Cute, not helpful.Files
src/core/revert-engine.ts
Code
Suggestions
${actionPrefix}
with${actionPrefix(dryRun)}
in both spots.Verbose Logging Sent To Stderr
“Info/verbose go to stdout” says the doc. “Nah,” says the code.
logVerbose
prints to stderr, contradicting your own comment. Your CI and users will love noisy stderr pretending to be warnings. 🔊Files
src/constants.ts
Code
Suggestions
console.log
) to match the documented contract.Recursive Scans Dive Into node_modules
Your recursive “find all .ruler dirs” joyride visits the entire tree except hidden dirs. “Entire tree” includes
node_modules
. 🤮Files
src/core/FileSystemUtils.ts
Code
node_modules
,dist
, etc.:Suggestions
node_modules
,.git
,dist
,build
,out
,.next
,.turbo
, etc.--include-dirs
/--exclude-dirs
CLI flag for explicit control..ruler
unless--deep
is set.mcp-remote@latest Is A Supply-Chain Footgun
“latest” is for candy bars and regrets, not production config. 🍭🔓
npx mcp-remote@latest
— perfect for a surprise upgrade mid-run.Files
src/mcp/capabilities.ts
Code
Suggestions
mcp_remote_version = "0.2.x"
).ruler.toml
; default to a known-good version.latest
is used.Concatenation Marker Docs Drift
Docs say the concatenation marker is
--- Source: file ---
. Code says it’s an HTML comment. Pick a side. 🧻Files
README.md
src/core/RuleProcessor.ts
Code
Suggestions
Fragile AGENTS.md Heuristics
Your “is this generated?” test for root
AGENTS.md
is guessy and can misclassify legit files. 🔮Files
src/core/FileSystemUtils.ts
Code
Suggestions
<!-- Ruler: {hash-of-sources} -->
) that you can verify deterministically..gitignore Block Loses State
The Ruler block is regenerated with only “new paths” from this run, silently dropping previously managed paths not present this time. Prepare for flip-flopping ignored files. 🧠🪣
Files
src/core/GitignoreUtils.ts
src/core/apply-engine.ts
Code
Suggestions
.ruler/.manifest.json
and use it to reconcile.Noisy Global Config Error Logging
An ignorable “can’t stat global config path” becomes a stderr error log. Why are we yelling? 📣
Files
src/core/FileSystemUtils.ts
Code
Suggestions
logVerbose
.If you can only fix a few things this week, prioritize:
config.toml
from accidental deletion.node_modules
.mcp-remote
versions.You’ll save users’ files, their time, your CI, and at least three keyboards. 💾🧯
Beta Was this translation helpful? Give feedback.
All reactions