Skip to content

fix(settings): require issues:write for detected comment mode independent of sample - #468

Merged
JSONbored merged 5 commits into
JSONbored:mainfrom
philluiz2323:fix/install-preview-comment-permission
Jun 8, 2026
Merged

fix(settings): require issues:write for detected comment mode independent of sample#468
JSONbored merged 5 commits into
JSONbored:mainfrom
philluiz2323:fix/install-preview-comment-permission

Conversation

@philluiz2323

Copy link
Copy Markdown
Contributor

Closes #467.

writesPrPublicSurface (which gates whether the install preview requires issues: write) checked label capability maximally with shouldApplyPrLabel(settings, "confirmed"), but checked comment capability with shouldPublishPrComment(settings) — whose miner-status arg defaults to "not_checked". For commentMode: "detected_contributors_only" (the DB/API/schema default) that returns false, so when a maintainer previews a not_found/unavailable sample the function concluded the repo doesn't comment and dropped issues: write from required/missing permissions — even though the repo does comment for confirmed miners.

Required permissions are meant to be sample-independent (that's the purpose of the || shouldPublishPrComment(settings) || shouldApplyPrLabel(settings, "confirmed") clauses); this asymmetry made the comment permission flicker with the sample's miner status while the label permission stayed correct.

Change

  • Check comment capability with the maximal "confirmed" status, matching the label path.
  • Add a regression test: detected_contributors_only + comment_only, non-confirmed sample → issues: write stays required and a missing issues permission is surfaced.

Verification

  • Full unit suite green (1255 passed). The new test fails against the old code (which dropped issues: write).

Distinct from #419/#420/#433/#436 (those were pull_requests: write over-privilege; this is issues: write under-reporting).

…dent of sample

writesPrPublicSurface checked comment capability with shouldPublishPrComment(settings) (default minerStatus not_checked), so for the default detected_contributors_only comment mode it returned false unless the previewed sample was a confirmed miner -- dropping issues:write from required/missing install permissions for non-confirmed samples even though the repo comments for confirmed miners. Check with the maximal confirmed status, matching the label path.
@philluiz2323
philluiz2323 requested a review from JSONbored as a code owner June 7, 2026 13:16
@dosubot dosubot Bot added the size:XS label Jun 7, 2026
@github-actions github-actions Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 7, 2026
@ghost

ghost commented Jun 7, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #468 is no longer open. No action.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

JSONbored
JSONbored previously approved these changes Jun 8, 2026

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@philluiz2323 this is ready from my side.

A few notes:

  • The fix correctly evaluates comment capability with the maximal confirmed status, matching the label path.
  • The regression test covers the default detected_contributors_only mode and the non-confirmed sample case that previously hid issues: write.
  • No code changes requested.

@dosubot dosubot Bot added the lgtm label Jun 8, 2026
@superagent-security superagent-security Bot added the pr:verified PR passed security analysis. label Jun 8, 2026
@JSONbored

Copy link
Copy Markdown
Owner

Fix failing CI, please @philluiz2323

@dosubot dosubot Bot added size:XS and removed size:M labels Jun 8, 2026
@philluiz2323
philluiz2323 requested a review from JSONbored June 8, 2026 08:55
@philluiz2323

Copy link
Copy Markdown
Contributor Author

Fix failing CI, please @philluiz2323

Fixed.

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@philluiz2323 this is ready from my side.

A few notes:

  • The fix correctly evaluates comment capability with the maximal confirmed status, matching the label path.
  • The regression test covers the default detected_contributors_only mode and the non-confirmed sample case that previously hid issues: write.
  • The previous validate blocker is cleared on the current head; no code changes requested.

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@superagent-security superagent-security Bot removed the pr:verified PR passed security analysis. label Jun 8, 2026
@JSONbored
JSONbored merged commit dc3be5d into JSONbored:main Jun 8, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Install-preview drops required issues: write for the default comment mode when previewing a non-confirmed sample

3 participants