Skip to content

fix(review): let a reward mapping opt into maintainer-authored-issue trust#4422

Merged
JSONbored merged 1 commit into
mainfrom
claude/fix-priority-reward-maintainer-trust
Jul 9, 2026
Merged

fix(review): let a reward mapping opt into maintainer-authored-issue trust#4422
JSONbored merged 1 commit into
mainfrom
claude/fix-priority-reward-maintainer-trust

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • gittensor:priority propagation required the PR author to be the linked issue's own author or a GitHub assignee of it, with no relaxation available — unlike gittensor:bug/gittensor:feature, which already trust a maintainer-authored issue without requiring formal assignment (trustMaintainerAuthoredIssue). But GitHub silently refuses to assign a contributor lacking push/triage access to the repo (ensurePullRequestAssignee's own doc comment), and our issues are almost always maintainer-authored for open pickup, rarely formally assigned to a specific person. That combination meant the reward label could structurally never reach the external contributors it exists to reward, no matter how correctly the rest of the propagation pipeline behaved.
  • Confirmed live: metagraphed PR fix(db): renumber impact-map-query-cache migration to resolve 0131 collision #4554 links issue fix(review): keep missing required CI pending #3947, which carries both gittensor:bug and gittensor:priority. Only gittensor:bug ever propagated, across two separate evaluations, even after an earlier same-day fix (exclusive/additive composition) had already deployed. Traced via agent.action.assign's own audit event: the assign action was correctly configured, but even once it runs successfully it only ever assigns the contributor to the PR, never the linked issue — and for a genuinely external, non-collaborator contributor, GitHub would refuse that issue-level assignment anyway.
  • Adds a new, distinctly-named, opt-in LinkedIssueLabelPropagationMapping flag: trustMaintainerAuthoredIssueForReward. A repo whose priority label is meant to incentivize open pickup (the maintainer's hand-picking already happened when the issue was labeled gittensor:priority, not gated on which contributor later closes it) can extend the SAME maintainer-authored-issue relaxation bug/feature already use to its reward mapping. A repo that wants the strict author-or-assignee bar preserved for its reward label keeps that behavior completely unchanged by default — this is a pure opt-in, not a loosening of the existing check.
  • Enabled the new flag for gittensor:priority in this repo's own config (.gittensory.yml + the bundled fallback it must stay byte-synced with), matching the standing "enrichment issues are open-pickup, priority-as-incentive" policy this label already implements for metagraphed.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused on one concern (the reward-label ownership check), including the config change that actually turns it on for this repo.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves — owner-authored PR fixing a live-confirmed, repeatedly-reported bug; no separate issue was filed for this follow-up fix.

Validation

  • npm run typecheck
  • npm run manifest:drift-check / npm run docs:drift-check — both clean.
  • npm run ui:openapi (regenerated) / npm run ui:openapi:check / npm run ui:openapi:settings-parity — all clean.
  • npx vitest run test/unit/linked-issue-label-propagation.test.ts test/unit/linked-issue-label-propagation-engine.test.ts test/unit/linked-issue-label-propagation-fetch.test.ts test/contract/engine-parity.test.ts — 71/71 pass, including new tests for both the normalizer (parse/warn/default for the new flag, mirrored in both the main and engine-package copies) and the actual fetch/ownership behavior (a regression test reproducing the exact PR fix(db): renumber impact-map-query-cache migration to resolve 0131 collision #4554/issue fix(review): keep missing required CI pending #3947 shape: both labels now propagate).
  • npx vitest run test/unit/queue.test.ts test/unit/pr-type-label.test.ts test/unit/pr-type-label-engine.test.ts — 828/828 pass (full integration coverage of the changed config, unaffected since the existing test's PR/issue author match via the direct-ownership path, not the new relaxation).

If any required check was skipped, explain why:

  • This is a backend-only logic + config fix (no UI surface); the full npm run test:ci gate is left to CI per the repo's own established practice for this size of change.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests. — N/A, no auth/session surface touched.
  • API/OpenAPI/MCP behavior is updated and tested where needed — the new field was added to RepositorySettingsSchema and the OpenAPI spec regenerated + parity-checked.
  • UI changes use live API data or real empty/error/loading states. — N/A, no UI changes.
  • Visible UI changes include a UI Evidence section. — N/A, no UI changes.
  • Public docs/changelogs are updated where needed — both public .gittensory.yml example templates document the new flag alongside the code fix.

Notes

  • Root-caused live via agent.action.assign's own audit trail on the exact reported PR, then confirmed the deeper structural gap (GitHub's own assignment-permission model) via a dedicated background investigation before choosing this fix over a narrower reordering-only patch, which would only have helped the minority of contributors GitHub happens to permit as assignees.

…trust

gittensor:priority propagation required the PR author to be the linked issue's
own author or a GitHub assignee of it, with no relaxation -- unlike bug/feature,
which already trust a maintainer-authored issue without formal assignment
(trustMaintainerAuthoredIssue). But GitHub silently refuses to assign a
contributor lacking push/triage access to the repo, and our issues are almost
always maintainer-authored for open pickup, rarely formally assigned to a
specific person. That combination meant the reward label could structurally
never reach the external contributors it exists to reward, no matter how
correctly the rest of the propagation pipeline behaved -- confirmed live on
metagraphed PR #4554 (issue #3947 carried both gittensor:bug and
gittensor:priority; only bug ever propagated).

Adds a new, distinctly-named, opt-in LinkedIssueLabelPropagationMapping flag,
trustMaintainerAuthoredIssueForReward, so a repo whose priority label is meant
to incentivize open pickup (the maintainer's hand-picking already happened when
the issue was labeled, not gated on which contributor later closes it) can
extend the SAME maintainer-authored-issue relaxation to its reward mapping,
while a repo that wants the strict author-or-assignee bar preserved for its
reward label keeps that behavior unchanged by default. Enabled it for
gittensor:priority in this repo's own config, matching the enrichment-issue
open-pickup policy this label already implements for metagraphed.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 304e88c Commit Preview URL

Branch Preview URL
Jul 09 2026, 12:46 PM

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.98%. Comparing base (6f40ce1) to head (304e88c).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4422   +/-   ##
=======================================
  Coverage   93.98%   93.98%           
=======================================
  Files         406      406           
  Lines       36993    37001    +8     
  Branches    13521    13525    +4     
=======================================
+ Hits        34767    34775    +8     
  Misses       1570     1570           
  Partials      656      656           
Files with missing lines Coverage Δ
...ngine/src/review/linked-issue-label-propagation.ts 100.00% <100.00%> (ø)
src/config/gittensory-repo-focus-manifest.ts 100.00% <ø> (ø)
src/openapi/schemas.ts 100.00% <ø> (ø)
src/review/linked-issue-label-propagation-fetch.ts 100.00% <100.00%> (ø)
src/review/linked-issue-label-propagation.ts 100.00% <100.00%> (ø)
src/types.ts 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit f13706f into main Jul 9, 2026
14 of 16 checks passed
@JSONbored
JSONbored deleted the claude/fix-priority-reward-maintainer-trust branch July 9, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant