GitSetu Manual QA Playbook
A step-by-step integration test checklist for verifying that every GitSetu feature works on a real machine. Run this before every release to ensure the README claims are true.
Prerequisites: A machine with
bash,git, andssh-keygen. Two GitHub/GitLab accounts are ideal but not required — you can verify most features with one account.
Pre-Flight
- Fresh terminal session (no leftover env vars from previous runs)
- Confirm bash version:
bash --version(must be 3.2+) - Confirm git version:
git --version - Confirm ssh-keygen exists:
which ssh-keygen
1. Installation
Verifies: README “Install” section
macOS & Linux (POSIX Bash)
curl -sL https://raw.githubusercontent.com/bhaskarjha-dev/gitsetu/main/install.sh | bash
- Installer completes without errors
-
~/.local/share/gitsetu/directory exists -
gitsetucommand is available:gitsetu --help -
git setualias works:git setu --help
Windows (PowerShell)
irm https://raw.githubusercontent.com/bhaskarjha-dev/gitsetu/main/install.ps1 | iex
- Installer completes without errors
-
%LOCALAPPDATA%\gitsetu\sharedirectory exists -
gitsetu.cmdandgitsetu.ps1exist in%LOCALAPPDATA%\gitsetu\bin -
gitsetu --versionoutputsgitsetu v1.0.0in PowerShell, CMD, and Windows Terminal -
git setu --versionalias works identically
2. Interactive Setup
Verifies:
gitsetu setupwizard, SSH key generation, gitconfig injection
gitsetu setup
# Create profile "personal" with your personal email and ~/personal directory
# Create profile "work" with your work email and ~/work directory
- Wizard prompts for label, name, email, directory
- Wizard prompts for SSH key type (ED25519 default)
- SSH keypair generated:
ls ~/.ssh/id_ed25519_personal*(private + .pub) - SSH keypair generated:
ls ~/.ssh/id_ed25519_work*(private + .pub) - Key permissions are 600:
stat -c %a ~/.ssh/id_ed25519_personal(orstat -f %Lpon macOS) -
~/.gitconfigcontainsincludeIfblock:grep -A2 'includeIf' ~/.gitconfig - Profile gitconfig exists:
cat ~/.config/gitsetu/profiles/personal.gitconfig - SSH config has Include directive:
grep 'Include' ~/.ssh/config - Isolated SSH config has host alias:
grep -A3 'Host github-personal' ~/.config/gitsetu/profiles/ssh_config - Registry file exists:
cat ~/.config/gitsetu/profiles.conf
3. Headless Add (Non-Interactive)
Verifies:
gitsetu addCLI mode
gitsetu add freelance "Your Name" [email protected] ~/freelance
- Command exits cleanly
- SSH key generated:
ls ~/.ssh/id_ed25519_freelance* - Profile appears in registry:
grep freelance ~/.config/gitsetu/profiles.conf -
~/.gitconfighas newincludeIffor~/freelance/
4. Status
Verifies:
gitsetu statusdisplay, active identity detection
cd ~/work && mkdir -p test-repo && cd test-repo && git init
gitsetu status
- All profiles listed with label, email, directory
- Active profile shows ✓ checkmark
- Correct profile is active for current directory
5. Directory-Scoped Identity (The “Magical Clone”)
Verifies:
includeIfauto-switching (core README claim)
# In work directory
cd ~/work/test-repo
git config user.email # Should show work email
git config user.name # Should show work name
# In personal directory
cd ~/personal && mkdir -p test-repo && cd test-repo && git init
git config user.email # Should show personal email
git config user.name # Should show personal name
- Work directory returns work email
- Personal directory returns personal email
- No manual switching required
6. Identity Guard (Pre-Commit Hook)
Verifies:
gitsetu guardblocks wrong-identity commits
gitsetu guard --install
- Guard installs without errors
-
git config --global core.hooksPathreturns a valid path
# Force a mismatch
cd ~/work/test-repo
git config user.email "[email protected]" # local override
echo "test" > testfile.txt && git add .
git commit -m "test"
- Commit is BLOCKED with “Identity mismatch detected!”
- Error shows expected vs actual email
# Fix and retry
git config --unset user.email
git commit -m "test"
- Commit succeeds with correct identity
-
git log --format="%ae" -1shows work email
7. Shell Prompt Integration
Verifies:
gitsetu promptoutput and speed
cd ~/work && gitsetu prompt # Should output "[work]" or similar
cd ~/personal && gitsetu prompt # Should output "[personal]"
cd /tmp && gitsetu prompt # Should output nothing (no profile)
- Output matches active profile for current directory
- Empty output when outside any profile directory
- Execution is fast (no visible lag)
Speed test:
time (for i in $(seq 100); do gitsetu prompt > /dev/null; done)
- 100 invocations complete in under 1 second
8. Credential Broker (HTTPS PATs)
Verifies:
gitsetu credentialstore/get/erase cycle
# During setup, provide a GitHub username and PAT when prompted
# Or manually test with dummy credentials:
printf 'protocol=https\nhost=github.com\nusername=testuser\npassword=ghp_test123\n\n' | gitsetu credential store
printf 'protocol=https\nhost=github.com\n\n' | gitsetu credential get
-
credential storeexits cleanly (no hang, no error) -
credential getreturnsusername=testuserandpassword=ghp_test123 - Credentials stored in OS keychain (macOS: check Keychain Access; Linux:
secret-tool search service gitsetu)- OR in file fallback:
cat ~/.config/gitsetu/.tokens
- OR in file fallback:
printf 'protocol=https\nhost=github.com\nusername=testuser\npassword=ghp_test123\n\n' | gitsetu credential erase
printf 'protocol=https\nhost=github.com\n\n' | gitsetu credential get
-
credential eraseexits cleanly -
credential getreturns empty (credentials removed)
9. Shell Autocompletion
Verifies: TAB completion
source ~/.local/share/gitsetu/lib/completion.sh
gitsetu <TAB><TAB>
- Completion script sources without errors
- Subcommands are listed on TAB (setup, add, remove, status, etc.)
- Profile names complete on
gitsetu remove <TAB>
10. Encrypted Backup & Restore
Verifies:
gitsetu backup/gitsetu restorelifecycle
gitsetu backup ~/test-vault.enc
# Enter encryption password when prompted
- Vault file created:
ls -la ~/test-vault.enc - File is encrypted (not readable):
file ~/test-vault.enc
# Simulate restore on "new machine" by wiping config
mv ~/.config/gitsetu ~/.config/gitsetu-bak
gitsetu restore ~/test-vault.enc
# Enter same password
- Restore completes without errors
- Profiles restored:
gitsetu status - Registry matches original:
diff ~/.config/gitsetu/profiles.conf ~/.config/gitsetu-bak/profiles.conf
# Cleanup
rm -rf ~/.config/gitsetu-bak ~/test-vault.enc
11. Profile Removal
Verifies:
gitsetu removecleanup
gitsetu remove freelance
- Profile removed from registry:
grep freelance ~/.config/gitsetu/profiles.conf(should return nothing) -
includeIfblock removed from~/.gitconfig - SSH host alias removed from
~/.config/gitsetu/profiles/ssh_config - SSH keys preserved on disk:
ls ~/.ssh/id_ed25519_freelance*(still exists)
12. Idempotency
Verifies: Safe to run multiple times (core claim)
gitsetu setup
# Re-add the same profiles with same settings
- No errors, no duplicates
-
~/.gitconfighas exactly ONEincludeIfper profile (not duplicated) -
~/.config/gitsetu/profiles/ssh_confighas exactly ONE host block per profile - SSH keys are NOT overwritten (prompted to skip/keep)
13. Doctor
Verifies:
gitsetu doctordiagnostic tool
gitsetu doctor
- All checks pass on a healthy setup
- Output goes to stderr (not stdout):
gitsetu doctor > /dev/null(should still see output)
14. Verify
Verifies:
gitsetu verifyinfrastructure check
gitsetu verify
- SSH key existence and permissions verified
- Git config verified
- All checks report OK
15. Teardown & Uninstall
Verifies: Clean removal (README “Uninstallation” section)
gitsetu teardown
- Managed blocks removed from
~/.gitconfig - Include directive removed from
~/.ssh/config - Custom user content in both files preserved
- SSH keys intentionally preserved
gitsetu teardown --deep
- Local repo identity overrides also cleaned
curl -sL https://raw.githubusercontent.com/bhaskarjha-dev/gitsetu/main/uninstall.sh | bash
-
~/.local/share/gitsetu/removed -
gitsetusymlink removed -
git setuno longer works
16. Cross-Platform Spot Checks
Run on each supported platform if available
macOS
-
detect_osreturnsmacos - Credential broker uses
security(Keychain) - SSH key generation works with macOS
ssh-keygen
Linux
-
detect_osreturnslinux - Credential broker uses
secret-toolor file fallback - SSH key generation works
Windows (Git Bash)
-
detect_osreturnsgitbash - CRLF self-healing activates (check for
\rin config files) -
safe.directoryrules injected for shared mounts
WSL
-
detect_osreturnswsl - Correctly distinguishes from native Linux
Release Checklist
After all manual tests pass:
-
make test(orbash tests/run_all.sh) — all 36 regression test suites pass 100% green - Windows Sandbox verification —
.\sandbox\launch_sandbox.ps1(orlaunch_sandbox.bat) boots disposable VM, runs all 36 test suites, live multi-profile scenarios, and 31-phase empirical audit (107 checks) -
make lint— ShellCheck clean - CHANGELOG.md updated
- Version bumped in
gitsetu(if applicable) - README claims match actual behavior
- Tag and release