Agent skill
troubleshooting-deployment
Stars
126
Forks
16
Install this agent skill to your Project
npx add-skill https://github.com/BA-CalderonMorales/terminal-jarvis/tree/main/.github/skills/troubleshooting-deployment
SKILL.md
Troubleshooting Deployment & CI/CD
A guide to diagnosing and fixing complex deployment failures in the Terminal Jarvis ecosystem.
Case Study: Homebrew Tap Synchronization (v0.0.75 Release)
This case study documents a multi-stage failure in the Homebrew deployment pipeline and the systematic fixes applied.
1. The "Double-V" Version Error
Symptom:
text
Using specified version: vv0.0.75
ERROR: Version vv0.0.75 does not exist in releases
Root Cause:
local-cd.shor the GitHub Workflow was passingv0.0.75(tag name) to a downstream script.- The downstream script (in the Tap repo) or the formula generator automatically prepended
v. - Result:
v+v0.0.75=vv0.0.75.
Fix:
- Updated
.github/workflows/cd-multiplatform.ymlto strip thevprefix before passing the version to the commit message. - Updated
scripts/cicd/local-cd.shto use${VERSION_NUM}(raw number) instead of${VERSION}(tag).
2. The "Missing Formula Template" (404 Error)
Symptom:
text
Fetching latest formula from main repository...
ERROR: Failed to download formula from main repository
URL: https://.../main/homebrew/Formula/terminal-jarvis.rb
404 Not Found
Root Cause:
- The Tap's update script attempts to fetch a "source of truth" Formula from the
mainbranch of the source repository (terminal-jarvis). - This file (
homebrew/Formula/terminal-jarvis.rb) did not exist inmain.
Fix:
- Created the missing file in
develop. - Cherry-picked/Hotfixed the file directly into
mainto unblock the pipeline immediately.
3. The "Premature Deletion" Logic Bug
Symptom:
text
Formula is already up to date (v0.0.75)
Formula versions match but content differs, updating...
...
cp: cannot stat '/tmp/tmp.hZCAfLq6Jh': No such file or directory
Root Cause:
In scripts/update-formula.sh (in the Tap repo):
bash
if [ "$CURRENT_VERSION" = "$NEW_VERSION" ]; then
rm "$TEMP_FORMULA" # <--- File deleted here
if diff -q ...; then
exit 0
else
echo "updating..."
# Execution continues, but file is gone
fi
fi
# ...
cp "$TEMP_FORMULA" "$FORMULA_FILE" # <--- Fails here
Fix:
- Modify the script to strictly manage the temporary file lifecycle.
- Ensure
rm "$TEMP_FORMULA"is only called when the file is truly no longer needed (e.g., in anEXITtrap or strictly after the copy operation).
General Troubleshooting Strategy
- Isolate the Component: Identify if the error is in the Source Repo (CI/CD scripts) or the Target Repo (Tap scripts).
- Check Inputs: Verify exactly what string is being passed between steps (e.g., "0.0.75" vs "v0.0.75").
- Verify External State: Check if referenced URLs (raw.githubusercontent.com) actually exist.
- Audit Logic Flow: Trace execution paths, especially around file operations and exit conditions.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
versioning
126
16
Explore
release
126
16
Explore
multi-repo
126
16
Explore
tool-config
126
16
Explore
testing
126
16
Explore
token-budget
126
16
Explore
Didn't find tool you were looking for?