Repository navigation
fix(review): take the artifact gate's visibility only from the view facts - #7087
Conversation
…acts digest-policy.mjs --publish-gate accepted a typed visibility as its first argument beside --facts. The artifact medium now gates only on the visibility /source-control:pull-request view looked up and wrote to facts.json, as the hosted medium already looks it up itself. Closes #6951 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8KdG7fWg2YrErVYWtohmR
|
The lanes run once the PR is marked ready. That flip waits for Kyle, because it also starts the review lanes. Until then, the local runs listed under Verification in the PR body are the signal. Generated by Claude Code |
|
PR body contract — issue linkage This PR body conforms to the issue-linkage contract. Nothing to do. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 2m 16s —— View job Review:
|
|
Claude finished @kyle-sexton's task in 1m 27s —— View job Security review complete
No security issues found. This PR closes a real gap: I traced where the trusted value actually originates: Other checks:
No instruction-surface deletions in this diff (no rule or guardrail was removed, only an unsafe input path to an existing gate). Verified independently of the author's own write-up in the PR body. claude-lane-summary: lane=claude-security-review sha=1821a9f84e053d6cf84800896337b4dcfbeda5f8 run=38343088171 |
|
claude-security-review has reviewed this pull request through 1821a9f; a later push is reviewed from there. |
|
claude-review has reviewed this pull request through 1821a9f; a later push is reviewed from there. |
Requested by Kyle · project thread
Refs: #6951
The read-pr.sh host check the issue names is not done here; it is a follow-up after #7081 lands.
Summary
Before: most of what the issue asked for already landed in #7026, after the issue was filed.
/source-control:pull-request view --out facts.jsonlooks the repository's visibility up over REST and writes it into the facts, and SKILL.md runs the artifact gate asdigest-policy.mjs --publish-gate --facts <dir>/facts.json. One gap was left: the gate still accepted a visibility typed as its first argument (--publish-gate PUBLIC). A model that skipped--factscould still feed the gate its own reading of the repository.After:
--publish-gateaccepts only--facts <facts.json> [--explicit]. Any typed visibility exits 2 with the usage line and no result. The artifact medium now gates only on the value the source-control owner looked up, just as the hosted medium only gates on the valuepublish-hosted.mjslooks up itself.Fix
digest-policy.mjs:gateMainrequires--facts <file>and takes the visibility fromfactsVisibility(file). A missing, unreadable or empty value still gates asUNKNOWN, which goes tofile. The usage line and header comment changed to match.SKILL.mdstep 4: one clause saying the gate takes no visibility argument and reads the value theviewaction looked up.public,PUBLIC,PUBLIC --explicit,PUBLIC --facts,--explicitand no arguments each exit 2 with empty stdout. The--factscase adds a lowercase value, a PRIVATE value without--explicit, and an unknown trailing flag.review(patch, Security).ghcommand. Visibility comes from the/source-control:pull-request viewaction, so no owner-side addition was needed.Where the issue left a detail open: I did not copy
publish-hosted.mjs's host check (gh auth status --hostname, ignoring enterprise env tokens) intoread-pr.sh. The host the view action's visibility lookup asks comes from the PR URL thatgh pr viewalready fetched from that host. The check would only matter for a non-github.com host reached through an enterprise env token. Adding it means editingread-pr.sh, which open draft #7081 is rewriting. It suits a small follow-up after #7081 lands, if wanted.Verification
node --test plugins/review/tests/explain-change.test.mjs: 103 tests, 102 pass, 1 skipped (existing platform skip), 0 fail.echo diff | node <main's digest-policy.mjs> --publish-gate PUBLICprintedmedium: artifact, exit 0. The new script prints the usage line, exit 2.scripts/affected-tests.sh --base origin/main --run: 2 shell suites pass. It selectsexplain-change.test.mjsbut does not run it (a node lane, exit 3 for that reason). I ran that suite directly, above.scripts/check-changelog-fragments.sh --checkand--check-required origin/main: pass.scripts/check-changelog-parity.sh --check: pass.markdownlint-cli2on SKILL.md and the fragment: 0 issues.biome checkon the two .mjs files reports 4 findings, all on lines this PR does not touch.Related
/source-control:pull-request view. That covered the issue's main ask.viewto REST. This PR does not depend on it and does not touchread-pr.sh. With fix(source-control): read pull-request facts and diffs over REST in view #7081,facts.jsoncan also be produced in cloud sessions where GraphQL returns 403.🤖 Generated with Claude Code
https://claude.ai/code/session_01L8KdG7fWg2YrErVYWtohmR
Generated by Claude Code
Generated by Claude Code