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 the weekly ritual where we hold our noses and dive headfirst into your fragrant bouquet of tech debt. This repo is a charcuterie board of good intentions wrapped in duct tape and sprinkled with “it worked on my machine.” Brace yourselves: I brought hand sanitizer, a flamethrower, and a sense of humor. 💣💩
Revert tries to “clean up” config.toml and other files, risking deletion of real project configurations. ⚠️
You unconditionally include config.toml in a hard-coded deletion list and unlink it if no .bak exists—congrats, you just deleted someone’s real OpenHands or unrelated TOML config. 🤦
Backups are restored if present, otherwise you swing the axe; there’s zero provenance check. This is the code equivalent of “I saw a file – I deleted it.”
Replace ${actionPrefix} with ${actionPrefix(dryRun)} everywhere.
Add unit coverage that asserts on dry-run messages for revert paths.
If You’re Shocked There Aren’t More Issues, Same
I expected more tragedy. The rest looks reasonably organized: strict TS, solid test spread, clear README, and robust agent handling. It’s not great, but it’s not on fire. Yet. 🔥
Keep tightening type checks and test inclusivity.
Align docs and behavior.
Stop deleting random user files like a chaotic goblin.
Bold fixes summary:
Make revert safe: provenance markers, backup-only deletions, --force-extra-cleanup.
Include .js in Jest testMatch; stop ignoring .js in ESLint.
Align Codex path format (prefer TOML or dual support).
Disable skipLibCheck and fix resulting type issues.
Upgrade yargs; audit dependencies.
Fix actionPrefix logging in revert.
Do these, and your repo will smell less like a landfill and more like a functional engineering project. Maybe. 🤞
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 the weekly ritual where we hold our noses and dive headfirst into your fragrant bouquet of tech debt. This repo is a charcuterie board of good intentions wrapped in duct tape and sprinkled with “it worked on my machine.” Brace yourselves: I brought hand sanitizer, a flamethrower, and a sense of humor. 💣💩
Table of Contents
Revert Nukes Legit Files Like a Reckless Janitor
Revert tries to “clean up” config.toml and other files, risking deletion of real project configurations.⚠️
config.tomlin a hard-coded deletion list and unlink it if no.bakexists—congrats, you just deleted someone’s real OpenHands or unrelated TOML config. 🤦Files
src/core/revert-engine.tssrc/paths/mcp.tsREADME.md(documents OpenHands targetingconfig.toml)Code
config.toml(so it’s very likely to exist and be legit):Suggestions
.bakpresent. If no backup, warn and skip unless--force-extra-cleanup.config.toml(e.g., known OpenHands MCP markers) before touching it.--force-extra-cleanup, with a big red warning.Jest Ignores .js Tests Because Why Not
Your Jest config runs TypeScript tests but ditches
.jstests—several exist. Test coverage, meet trash can. 🗑️testMatchonly includes TS patterns;.jstests intests/unit/core/*.test.jsare excluded, silently.Files
jest.config.jstests/unit/core/RuleProcessor.test.jstests/unit/core/FileSystemUtils.test.jsCode
Suggestions
testMatchto include JS:testMatch: ['**/tests/**/*.{test,spec}.ts', '**/tests/**/*.{test,spec}.js', '**/*.test.ts', '**/*.test.js']transformfor JS or usetestRegexto catch both.npm testlocally and in CI to verify JS tests execute.ESLint Boldly Ignores All .js Files
Your ESLint config excludes
*.js, which is adorable given you have JS test files. Linting? Not today, Satan. 🙃ignoresblock includes*.js, so JS is never linted.Files
eslint.config.mjstests/unit/core/*.jsCode
Suggestions
*.jsfrom ignores; instead, limit to built files:ignores: ['dist/**', 'node_modules/**']tests/**).npm run lintand fix any newly unearthed gremlins.README vs Code: The “Codex TOML” Gaslighting
README says Codex uses
.codex/config.toml; code tries.codex/config.json. Pick one. Preferably the correct one. 🤨Files
README.mdsrc/paths/mcp.tsCode
Suggestions
getNativeMcpPathto check.tomlthen.jsonwith logging.TypeScript: SkipLibCheck Is the Coward’s Button
skipLibCheck: truehides type issues in dependency types and can conceal real bugs. It’s fine for speed but risky for quality.Files
tsconfig.jsonCode
Suggestions
skipLibCheck: falseand fix the fallout.noImplicitReturnsandnoUnusedLocalsonce clean.CLI Dependency Drift and Old Yargs
You’re using
yargsv18 with Node 18+, which is… vintage. Not charming-vintage—security-audit-vintage. 🧻yargs@^18.0.0lags behind modern Node behaviors and features; potential bug surface.Files
package.jsonsrc/cli/*Code
Suggestions
yargsto latest v22+.npm auditand fix any flagged issues.Minor: VSCode Settings Revert Uses Wrong Logging Prefix
You use
actionPrefixwithout calling it, printing a function reference or wrong content. It’s a small paper cut but it bleeds in logs. 🩹removeAdditionalAgentFiles, you logged with${actionPrefix}rather than${actionPrefix(dryRun)}at least once.Files
src/core/revert-engine.tsCode
Suggestions
${actionPrefix}with${actionPrefix(dryRun)}everywhere.If You’re Shocked There Aren’t More Issues, Same
I expected more tragedy. The rest looks reasonably organized: strict TS, solid test spread, clear README, and robust agent handling. It’s not great, but it’s not on fire. Yet. 🔥
Bold fixes summary:
--force-extra-cleanup..jsin JesttestMatch; stop ignoring.jsin ESLint.skipLibCheckand fix resulting type issues.yargs; audit dependencies.actionPrefixlogging in revert.Do these, and your repo will smell less like a landfill and more like a functional engineering project. Maybe. 🤞
Beta Was this translation helpful? Give feedback.
All reactions