fix(clean): fix 3 bugs causing clean command to silently fail#4
Open
jestersimpps wants to merge 12 commits intomainfrom
Open
fix(clean): fix 3 bugs causing clean command to silently fail#4jestersimpps wants to merge 12 commits intomainfrom
jestersimpps wants to merge 12 commits intomainfrom
Conversation
…ty tool Remove approval flow — OBOL has full autonomy over its own personality files. Direct write + reload, logged to personality/edits/ for audit trail.
#1 tools/personality.js: context.reloadPersonality -> context._reloadPersonality #2 journal.js + 006_obol_journal.sql: add user_id column, filter by user_id #3 tool-registry.js: propose_personality_edit -> edit_personality in INPUT_SUMMARIES #4 db/migrate.js: add obol_journal table with user_id to migration statements #5 curiosity.js: cap handoff notes to last 3 entries (prune older ones) #6 curiosity.js: skip handoff/journal entries when no items were stored (count === 0) #7 chat.js: reloadPersonality passes PERSONALITY_DIR as sharedDir to loadPersonality #8 evolve.js: personalityDir -> userPersonalityDir in saveTraits call #9 tenant.js: personalityDir -> path.join(userDir, personality) in statSync call
- credentials.js: add OBOL_NO_PASS=1 env var to force JSON fallback mode
(vi.mock('child_process') cannot intercept CJS require() in vitest)
- credentials.js: add OBOL_USERS_DIR env var to redirect secrets.json path
(getUserDir() caches homedir at load time; process.env.HOME trick doesn't work)
- credentials.test.js: use OBOL_NO_PASS + OBOL_USERS_DIR instead of broken
child_process mock; clean each test's secrets.json in afterEach to prevent
state bleed between tests
- post-setup.test.js: mock process.platform via Object.defineProperty to
simulate non-linux for the 'skips on non-linux' test (we run on Linux)
- Remove 'library' from ALLOWED_DIRS (was silently ignored, never flagged) - Remove traits.json from MD_DIR_EXCEPTIONS (was whitelisted, never flagged) - Fix .cache deletion failure in sandbox: rmSync blocked, fall back to renaming into apps/ - Remove .cache from TEMP_DOTDIRS so it is treated as a regular unknown dir
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What broke
The
/cleancommand was detecting issues but not fixing them. Three root causes:1.
libraryin ALLOWED_DIRSlibrary/was explicitly whitelisted, so it was never reported as an unknown directory and never moved toapps/.2.
traits.jsonin MD_DIR_EXCEPTIONSpersonality/traits.jsonwas hardcoded as an exception, so it was never flagged as a non-.md file in a md-only directory.3.
.cachedeletion blocked in sandbox.cachewas inTEMP_DOTDIRSwhich triedrmSync(recursive delete). The sandbox blocksrm -rfstyle operations, causing a silent failure. Fixed by catching the error and falling back to renaming intoapps/.Changes
libraryfromALLOWED_DIRStraits.jsonfromMD_DIR_EXCEPTIONS(empty the map).cachefromTEMP_DOTDIRSso it is treated as a regular unknown dirapplyIssues: ifrmSyncfails, rename toapps/instead