You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
babysit gate reads trusted actors and admission rules by branch name, not a resolved commit #10648
babysit_verify_evidence.py:1465 reads ADMISSION_RULES_PATH with ?ref={default}.
GitHub resolves a ref that names both a branch and a tag in a way this code does not control (UNVERIFIED which wins for the contents API). If a tag named like the default branch can be created, it could stand in for the branch and supply a different trusted-actor list or admission rules. #10596 closed the same class in the approval-carry and cost-carry compares by resolving the base once to its tip SHA (baseTip / base_tip); these reads were outside that PR.
Fix
Resolve the default branch to its tip SHA once (GET /repos/{repo}/git/ref/heads/{branch}, require a 40-hex object.sha, fail closed otherwise) and read both files at that SHA. Reuse base_tip from babysit_merge_policy.py rather than adding a second resolver.
Optional hardening, a settings change for the owner: a tag ruleset that blocks tags named like protected branches would close this class repository-wide.
Acceptance
Both reads name a 40-hex SHA, never a branch name; a test asserts the request paths.
An unreadable or non-commit ref fails closed (no trusted actors, admission refused), with a test.
Proposed work class: work-class: scoped
Basis: automated intake triage; the lanes App applied this class.
Size: Small
Complexity: Low
Uncertainty: Known
Flags: none
Blocked by: none
Understood: the babysit gate reads the trusted-actors file and the admission rules by branch name. You want it to resolve the default branch to its tip SHA once, reusing base_tip, and read both files at that SHA. An unresolvable ref should fail closed. Acceptance is tests that assert the request paths and the fail-closed behavior. The tag-ruleset hardening is a separate owner settings decision and isn't part of this change. I found no likely duplicate among the open issues.
Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).
melodic-automation-lanes commented on Oct 28, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: Both babysit_verify_evidence.py reads (trusted actors, admission rules) name a 40-hex tip SHA resolved via git/ref/heads, failing closed when it cannot be resolved.
Which resolver should be reused? The issue names base_tip in babysit_merge_policy.py, but no such function exists there.
RECOMMENDED: Add one small tip resolver in babysit_merge_policy.py, modeled on PostMerge._branch_tip, that uses git/ref/heads, requires a 40-hex object.sha and raises PolicyReadError. Call it from babysit_verify_evidence.py. Do not reuse _default_branch_head, which reads commits/{branch} (still by name). Basis: plugins/source-control/skills/babysit-prs/scripts/babysit_merge_policy.py:4100 and babysit_postmerge.py:1752
Should the trusted-actors read use the default branch or the Reader's branch? The issue says default branch, but line 1400 reads self.branch, which comes from --branch (default main).
RECOMMENDED: Resolve self.branch to its tip for the trusted-actors read, and the default branch via merge_policy._default_branch for the admission-rules read. Keep each at its current branch semantics. Basis: plugins/source-control/skills/babysit-prs/scripts/babysit_verify_evidence.py:1400, 1450-1465, 2949
The run cache keys trusted-humans, trusted-logins and task-list by repo@branch. Should keys change to the SHA?
RECOMMENDED: Keep the branch-name keys, since entries only live for run_cache.MAX_AGE. Resolve the SHA only on a cache miss, and test that a cache hit makes no extra request. Basis: plugins/source-control/skills/babysit-prs/scripts/babysit_verify_evidence.py:1392, 1431, 1453
plugins/source-control/skills/babysit-prs/scripts/babysit_merge_policy.py:4100: _default_branch_head reads commits/{branch}; no base_tip function found
plugins/source-control/skills/babysit-prs/scripts/babysit_postmerge.py:1752: _branch_tip resolves git/ref/heads and requires a 40-hex sha
To answer, post a comment that starts with this line:
**Decision recorded.** <answer>
Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.
Activity
github-actions commentedon Oct 28, 2026
Proposed work class: work-class: scoped
Basis: automated intake triage; the lanes App applied this class.
Size: Small
Complexity: Low
Uncertainty: Known
Flags: none
Blocked by: none
Understood: the babysit gate reads the trusted-actors file and the admission rules by branch name. You want it to resolve the default branch to its tip SHA once, reusing
base_tip, and read both files at that SHA. An unresolvable ref should fail closed. Acceptance is tests that assert the request paths and the fail-closed behavior. The tag-ruleset hardening is a separate owner settings decision and isn't part of this change. I found no likely duplicate among the open issues.Automated triage, applied by the lanes App.
melodic-automation-lanes commentedon Oct 28, 2026
Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed
- [ ]criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).melodic-automation-lanes commentedon Oct 28, 2026
The latest triage verdict holds nothing: admission moved the issue to
status: confirmed; its comment says why.melodic-automation-lanes commentedon Oct 28, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: Both babysit_verify_evidence.py reads (trusted actors, admission rules) name a 40-hex tip SHA resolved via git/ref/heads, failing closed when it cannot be resolved.
Related work
Open questions
RECOMMENDED: Add one small tip resolver in babysit_merge_policy.py, modeled on PostMerge._branch_tip, that uses git/ref/heads, requires a 40-hex object.sha and raises PolicyReadError. Call it from babysit_verify_evidence.py. Do not reuse _default_branch_head, which reads commits/{branch} (still by name). Basis: plugins/source-control/skills/babysit-prs/scripts/babysit_merge_policy.py:4100 and babysit_postmerge.py:1752
RECOMMENDED: Resolve self.branch to its tip for the trusted-actors read, and the default branch via merge_policy._default_branch for the admission-rules read. Keep each at its current branch semantics. Basis: plugins/source-control/skills/babysit-prs/scripts/babysit_verify_evidence.py:1400, 1450-1465, 2949
RECOMMENDED: Keep the branch-name keys, since entries only live for run_cache.MAX_AGE. Resolve the SHA only on a cache miss, and test that a cache hit makes no extra request. Basis: plugins/source-control/skills/babysit-prs/scripts/babysit_verify_evidence.py:1392, 1431, 1453
Sources read
To answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.