Make Module 8 verify-backup.sh fail fast instead of hanging on an HTTPS credential prompt #38

Closed
opened 2026-06-22 14:23:56 -04:00 by claude · 0 comments
Contributor

Problem

The script's clone runs git clone --quiet "$remote_url" "$tmp/clone" 2>/dev/null. For learners on the HTTPS+PAT path with a private repo and no cached credential helper (common fresh-Linux state), git prompts for credentials on the tty and blocks; because the script discards stderr the experience is a hang rather than falling into the existing graceful warn branch. This affects the lab's headline PASS check.

Evidence

modules/08-remotes-and-hosting/lab/verify-backup.sh line 71: if git clone --quiet "$remote_url" "$tmp/clone" 2>/dev/null; then. GIT_TERMINAL_PROMPT is not set; the script has a graceful warn branch (~line 88: "Couldn't clone … auth or network?").

Why it matters

A silent hang at the lab's headline check defeats the script's intended graceful failure. (Note: git writes credential prompts to /dev/tty, so the prompt isn't fully hidden — the real defect is the blocking, not "silent.")

Proposed change

  1. Disable interactive prompting so it fails fast into the warn branch: if GIT_TERMINAL_PROMPT=0 git clone ….
  2. Optionally note in step 6 that HTTPS users need their credential helper to have cached the PAT from the earlier push.

Acceptance criteria

  • With no cached credential and a private HTTPS repo, the script fails into the warn branch rather than blocking.
  • SSH/public/cached-helper users are unaffected.

Affected files

  • modules/08-remotes-and-hosting/lab/verify-backup.sh, modules/08-remotes-and-hosting/README.md (optional note)

References

Source finding F21 (realVotes 3/3).


Filed from an adversarial multi-agent course review (217 raw findings → 54 adversarially-verified survivors). Scoped for manual review; intentionally not auto-assigned to an agent.

## Problem The script's clone runs `git clone --quiet "$remote_url" "$tmp/clone" 2>/dev/null`. For learners on the HTTPS+PAT path with a private repo and no cached credential helper (common fresh-Linux state), git prompts for credentials on the tty and blocks; because the script discards stderr the experience is a hang rather than falling into the existing graceful warn branch. This affects the lab's headline PASS check. ## Evidence `modules/08-remotes-and-hosting/lab/verify-backup.sh` line 71: `if git clone --quiet "$remote_url" "$tmp/clone" 2>/dev/null; then`. `GIT_TERMINAL_PROMPT` is not set; the script has a graceful warn branch (~line 88: "Couldn't clone … auth or network?"). ## Why it matters A silent hang at the lab's headline check defeats the script's intended graceful failure. (Note: git writes credential prompts to /dev/tty, so the prompt isn't fully hidden — the real defect is the blocking, not "silent.") ## Proposed change 1. Disable interactive prompting so it fails fast into the warn branch: `if GIT_TERMINAL_PROMPT=0 git clone …`. 2. Optionally note in step 6 that HTTPS users need their credential helper to have cached the PAT from the earlier push. ## Acceptance criteria - [ ] With no cached credential and a private HTTPS repo, the script fails into the warn branch rather than blocking. - [ ] SSH/public/cached-helper users are unaffected. ## Affected files - `modules/08-remotes-and-hosting/lab/verify-backup.sh`, `modules/08-remotes-and-hosting/README.md` (optional note) ## References Source finding F21 (realVotes 3/3). --- *Filed from an adversarial multi-agent course review (217 raw findings → 54 adversarially-verified survivors). Scoped for manual review; intentionally not auto-assigned to an agent.*
claude added the P2ai-readybug labels 2026-06-22 14:23:56 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: justin/ai-workflow-course#38