The moment it felt done
On August 1, 2026, I reorganized my scattered project folders. The rule was simple: web apps go under ~/Documents/webApps, and the Instagram publishing bot goes under ~/Documents/publishBots/instagram. The fortune web app moved to ~/Documents/webApps/unse.
Moving a folder doesn't feel like editing code. Not one character inside the files changes, and everything looks the same when you open it in the editor. So it's easy to think the cleanup is finished.
But the publishing bot wasn't separate from the fortune app. Three bot scripts referenced the fortune app's folder directly by path.
How many of your automation scripts have another project's folder location hardcoded as a string?
Where the paths lived
Here's what the commit changed:
- In
generate.py, theFORTUNEpath now points to~/Documents/webApps/unse - In
insta_crosspost.py, theUNSE_PUBLICpath now points to the same place - In
post_daily.py, theUNSE_PUBLICpath now points to the same place
In the diff, generate.py changed 2 lines, insta_crosspost.py 4, and post_daily.py 4, with 5 deletions in total. The same commit also added two templates: assets/card_unse.html (45 lines) and assets/reel_unse.html (43 lines).
The variable names show the dependency. FORTUNE is where the generating side reads fortune data. UNSE_PUBLIC is where the publishing side reads the web app's public folder. The bot looked like a standalone program, but it depended on another project's directory layout.
Why this is a trap
A path like this doesn't fail the way a broken import does. It's just a string, so nothing happens when you move the folder. The problem only shows up when the script runs and tries to read that path.
For a bot that runs on a schedule, that moment isn't when you move the folder. It's the next scheduled run. Because the cleanup and the failure happen at different times, it's hard to connect one to the other.
What would you do?
Right after moving a folder, you have a choice. Do you search every other project for the old folder name, or do you wait for the next run to tell you?
What I actually did
I updated the path references to the new location, and that was it. The commit doesn't move paths into a config file or environment variables. The only changes were the path strings in three files.
It was a cheap fix. The real cost wasn't the fix, though. It was knowing where to look, because the project that moved (the web app) and the project that needed fixing (the bot) were different projects.
Self-check
- Before you move a folder, do you search all your other projects for its name?
- Do you know how many absolute path constants like
~/Documents/...your automation scripts contain? - Do you run the scripts that reference a path once, by hand, right after you move the folder?
The honest part
The commit doesn't say what actually broke before I fixed the paths. From the record alone, I can't tell whether the bot failed or whether I caught this before it ran. The commit message doesn't say what the old path was either. It also doesn't explain how the two HTML templates in the same commit relate to the path fix. And the paths are still hardcoded, so the next time I move a folder I'll have to do this again.