Skip to content

source-control:babysit-prs: babysit-readiness-gate.sh exits 4 without FETCH_COMMENTS_OWNER/FETCH_COMMENTS_REPO env vars, undocumented in worker contract #475

Description

@kyle-sexton

Lane

babysit (safe tier, /loop 15m /source-control:babysit-prs)

Triggering example

#452, quiet-recheck pass: worker ran babysit-readiness-gate.sh 452 (no other args, per the SKILL.md-documented invocation) and got exit 4, not READINESS_OK/READINESS_BLOCKED. Re-running with FETCH_COMMENTS_OWNER and FETCH_COMMENTS_REPO exported into the environment first returned the expected READINESS_OK findings=1 classified=5, exit 0.

Observed vs expected

Observed: the gate script internally shells out to fetch-all-pr-comments.sh, which apparently requires FETCH_COMMENTS_OWNER/FETCH_COMMENTS_REPO as environment variables rather than deriving them from the PR argument, the current repo context, or a --repo-style flag. Neither SKILL.md's documented invocation (babysit-readiness-gate.sh <N>, no env-var prerequisite mentioned) nor the worker contract in reference/orchestration.md mentions this requirement, so a fresh worker following the documented interface hits an undifferentiated exit 4 with no indication of what's missing, and has to discover the fix by trial and error.
Expected: either (a) the gate script derives owner/repo itself the same way pr_queue_snapshot.py and the other bare-wrapper scripts do (from the PR argument or gh repo view), removing the env-var dependency entirely, or (b) if the env vars are genuinely required, SKILL.md's per-PR checklist and the worker contract document them as prerequisites so a worker doesn't have to rediscover the requirement per PR.

Category

bug

Note

This is a different issue from #465 (finding-count over-counting) — that's about the gate's counting logic being wrong when it does run successfully; this is about the gate failing to run at all absent an undocumented environment setup step.

Metadata

Metadata

Assignees

Labels

priority: highSignificant impact, or blocks an imminent release; staff this cycle.status: readyTriaged, unblocked, and fully specified; eligible to pick up.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions