@@ -99,8 +99,11 @@ steps:
9999 if [ -d /tmp/gh-aw/repo-memory/autoloop/.git ]; then
100100 echo "repo-memory/autoloop already cloned; skipping"
101101 else
102- git clone --depth=1 --branch memory/autoloop \
103- "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" \
102+ # Pass the token via an http.extraHeader rather than embedding it in the
103+ # URL — keeps it out of process listings and any logged remote URLs.
104+ AUTH_HEADER="Authorization: Basic $(printf 'x-access-token:%s' "${GITHUB_TOKEN}" | base64 -w0)"
105+ git -c "http.extraHeader=${AUTH_HEADER}" clone --depth=1 --branch memory/autoloop \
106+ "https://github.com/${GITHUB_REPOSITORY}.git" \
104107 /tmp/gh-aw/repo-memory/autoloop \
105108 || {
106109 echo "memory/autoloop branch not found (first run); creating empty dir"
@@ -451,8 +454,9 @@ steps:
451454 # Tiebreaker rationale: programs that have never run (no last_run) take
452455 # priority over ever-run programs; among never-run programs, prefer the
453456 # shortest schedule (so "every 30m" beats "every 6h"), then alphabetical
454- # by name. This avoids permanent starvation when state is missing — see
455- # issue: "Autoloop pre-step can't read state files".
457+ # by name. Programs with no parseable schedule sort last among never-run
458+ # programs (float('inf')). This avoids permanent starvation when state
459+ # is missing — see issue: "Autoloop pre-step can't read state files".
456460 def _due_sort_key(p):
457461 if p["last_run"]:
458462 return (1, p["last_run"], p["name"])
0 commit comments