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
fix(review): explain-change artifact medium should look up repo visibility itself #6951
explain-change's publish gate for the hosted medium now resolves repository visibility itself (#6783, closing #6748): no model-supplied visibility reaches the hosted upload. The artifact medium still takes visibility from the model's own reading of the repository.
Problem
On the artifact path, a private repository can be treated as public when the model misreads its visibility. The worst case is a private claude.ai Artifact (default-private), so the leak risk is lower than the hosted case #6748 fixed, but the gate's input is still untrusted.
Proposed fix
Reuse the visibility lookup that publish-hosted.mjs gained in #6783 (gh repo view with the host check) for the artifact path's gate input, so both media gate on the same verified value.
Most of this issue was already fixed by #7026, which landed after the issue was filed: /source-control:pull-request view --out facts.json looks the visibility up over REST, and the artifact gate reads it with --publish-gate --facts. The PR closes the gap that remained. digest-policy.mjs --publish-gate no longer accepts a visibility typed on the command line, only --facts <facts.json>. Verified with the explain-change node suite (102 pass, 0 fail), a before/after run of the CLI, the affected-tests runner and the changelog fragment checks.
Left for a human: the PR does not copy publish-hosted.mjs's host check (gh auth status --hostname) into read-pr.sh's visibility lookup. It only matters for a non-github.com host reached through an enterprise env token, and read-pr.sh is being rewritten in #7081. The reasons are in the PR body.
The needs-human label is still on this issue; I left it for Kyle to clear.
Next step: Review the draft PR; decisions for Kyle are listed in its body. Mark it ready once Kyle agrees (that starts the CI test and review lanes), then drive CI green.
Where a branch is listed it is pushed, so it can be taken over as is. A draft PR shows a red ci-status by design until it is marked ready.
Wants the explain-change artifact gate to use a looked-up visibility, not the model's. #7026 (merged) did most of it, and draft #7087 removes the command-line visibility input; the gh host check for enterprise hosts is deferred until #7081 rewrites read-pr.sh.
Verified by an independent fresh-context check (confirmed, risk low): gh issue view 6951 + handoff comment 2026-10-11T16:20; PR #7087 OPEN draft, Refs: #6951, MERGEABLE, head c180932; body defers read-pr.sh host check to after #7081; PR #7081 OPEN draft (rewrites read-pr.sh), #7026 MERGED, #6783 MERGED; digest-policy.mjs:14 on origin/main still '--publish-gate |--facts'; publish-hosted.mjs:76 'gh auth status --hostname'; read-pr.sh:125 --hostname without auth status check
Admission to an agent lane stays with the work-class rules and owner ratification.
Reopened on the owner's decision (2026-10-17): the 2026-10-13 decision kept this open (Refs, not Closes) for the host check after #7081. Lane PR #7731 closed it with Closes; that lane bug is tracked in #7741 and fixed by #7762.
Default branch: e59e0be. #7087 (artifact gate takes visibility only from the view facts), #7081 (view reads over REST; the rewrite this item waited for) and #7731 are all merged. What the 2026-10-13 decision kept this open for is still missing:
plugins/source-control/skills/pull-request/scripts/read-pr.sh:207-214 looks visibility up with gh api --hostname "$host" "repos/$repo_path", where host comes from the PR URL, with no check that gh is logged in to that host.
The explain-change lookup does check it: plugins/review/skills/explain-change/scripts/repo-visibility.mjs:27-28 returns UNKNOWN when !ghLoggedIn(host).
read-pr.sh already does an auth status --hostname check for the API host (line 140), but not for the visibility lookup.
Open linked PRs: none.
Triage: briefed, delegable (Bug, priority: medium, work-class: scoped). The agent-ready admission from owner batch A1 stands; this pass adds the work class and the brief.
Agent Brief
Type: Bug Summary: The pull-request view's visibility lookup reports UNKNOWN for a host gh is not logged in to.
Current behavior:/source-control:pull-request view looks the repository's visibility up on the host named in the PR URL whether or not gh is logged in there. A host gh is not logged in to could be anyone's server and answer "public" for a private repository; that answer then feeds the explain-change artifact publish gate.
Desired behavior: The view's visibility lookup first confirms gh is logged in to the PR's host; when it is not, visibility is UNKNOWN and no request is sent to that host. github.com and logged-in hosts behave as today. This matches the explain-change visibility lookup.
Key interfaces:
pull-request view facts: the visibility field (PUBLIC, PRIVATE, INTERNAL, or UNKNOWN).
Acceptance criteria:
A test with a PR URL on a host the gh stub reports as not logged in yields visibility: UNKNOWN and records no api call to that host.
A test with a logged-in host still yields the looked-up visibility.
The existing read-pr tests pass.
Out of scope:
The explain-change publish gate and its hosted path.
Activity
github-actions commentedon Oct 11, 2026
Thanks for the report. Automated triage handed this issue to a maintainer.
Automated triage. A maintainer reviews it.
kyle-sexton commentedon Oct 11, 2026
Draft PR: #7087 (branch
fix/6951-artifact-visibility-lookup).Most of this issue was already fixed by #7026, which landed after the issue was filed:
/source-control:pull-request view --out facts.jsonlooks the visibility up over REST, and the artifact gate reads it with--publish-gate --facts. The PR closes the gap that remained.digest-policy.mjs --publish-gateno longer accepts a visibility typed on the command line, only--facts <facts.json>. Verified with the explain-change node suite (102 pass, 0 fail), a before/after run of the CLI, the affected-tests runner and the changelog fragment checks.Left for a human: the PR does not copy
publish-hosted.mjs's host check (gh auth status --hostname) intoread-pr.sh's visibility lookup. It only matters for a non-github.com host reached through an enterprise env token, andread-pr.shis being rewritten in #7081. The reasons are in the PR body.The
needs-humanlabel is still on this issue; I left it for Kyle to clear.Generated by Claude Code
kyle-sexton commentedon Oct 11, 2026
Handoff note for whoever picks this up next. The overnight Claude run has stopped, and Kyle is moving issue work to Cursor.
fix/6951-artifact-visibility-lookupWhere a branch is listed it is pushed, so it can be taken over as is. A draft PR shows a red
ci-statusby design until it is marked ready.Generated by Claude Code
kyle-sexton commentedon Oct 13, 2026
Decision recorded. The owner approved applying independently verified recommendations on 2026-10-12.
Basis: fix(review): explain-change artifact medium should look up repo visibility itself #6951 comment 2026-10-11T16:20 (handoff); plugins/source-control/skills/pull-request/scripts/read-pr.sh:125 has --hostname but no gh auth status check; plugins/review/skills/explain-change/scripts/publish-hosted.mjs:76 has it
Wants the explain-change artifact gate to use a looked-up visibility, not the model's. #7026 (merged) did most of it, and draft #7087 removes the command-line visibility input; the gh host check for enterprise hosts is deferred until #7081 rewrites read-pr.sh.
Verified by an independent fresh-context check (confirmed, risk low): gh issue view 6951 + handoff comment 2026-10-11T16:20; PR #7087 OPEN draft, Refs: #6951, MERGEABLE, head c180932; body defers read-pr.sh host check to after #7081; PR #7081 OPEN draft (rewrites read-pr.sh), #7026 MERGED, #6783 MERGED; digest-policy.mjs:14 on origin/main still '--publish-gate |--facts'; publish-hosted.mjs:76 'gh auth status --hostname'; read-pr.sh:125 --hostname without auth status check
Admission to an agent lane stays with the work-class rules and owner ratification.
kyle-sexton commentedon Oct 17, 2026
Admitted in owner batch A1 (mechanical).
kyle-sexton commentedon Oct 17, 2026
Reopened on the owner's decision (2026-10-17): the 2026-10-13 decision kept this open (Refs, not Closes) for the host check after #7081. Lane PR #7731 closed it with Closes; that lane bug is tracked in #7741 and fixed by #7762.
kyle-sexton commentedon Oct 18, 2026
This was generated by AI during triage.
Verified: the remaining gap still holds on main
Default branch: e59e0be. #7087 (artifact gate takes visibility only from the view facts), #7081 (view reads over REST; the rewrite this item waited for) and #7731 are all merged. What the 2026-10-13 decision kept this open for is still missing:
plugins/source-control/skills/pull-request/scripts/read-pr.sh:207-214looks visibility up withgh api --hostname "$host" "repos/$repo_path", wherehostcomes from the PR URL, with no check that gh is logged in to that host.plugins/review/skills/explain-change/scripts/repo-visibility.mjs:27-28returnsUNKNOWNwhen!ghLoggedIn(host).auth status --hostnamecheck for the API host (line 140), but not for the visibility lookup.Open linked PRs: none.
Triage: briefed, delegable (Bug, priority: medium, work-class: scoped). The
agent-readyadmission from owner batch A1 stands; this pass adds the work class and the brief.Agent Brief
Type: Bug
Summary: The pull-request view's visibility lookup reports
UNKNOWNfor a host gh is not logged in to.Current behavior:
/source-control:pull-request viewlooks the repository's visibility up on the host named in the PR URL whether or not gh is logged in there. A host gh is not logged in to could be anyone's server and answer "public" for a private repository; that answer then feeds the explain-change artifact publish gate.Desired behavior: The view's visibility lookup first confirms gh is logged in to the PR's host; when it is not, visibility is
UNKNOWNand no request is sent to that host. github.com and logged-in hosts behave as today. This matches the explain-change visibility lookup.Key interfaces:
visibilityfield (PUBLIC,PRIVATE,INTERNAL, orUNKNOWN).Acceptance criteria:
visibility: UNKNOWNand records noapicall to that host.Out of scope: