Skip to content

fix(orb): emit allowedRoles on explain/generate-tests denial usage and record configuration command usage - #8705

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-8688
Jul 26, 2026
Merged

fix(orb): emit allowedRoles on explain/generate-tests denial usage and record configuration command usage#8705
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-8688

Conversation

@bitfathers94

Copy link
Copy Markdown
Contributor

fix(orb): emit allowedRoles on explain/generate-tests denial usage and record configuration command usage

The explain and generate-tests denial handlers recorded their
recordGithubProductUsage events without allowedRoles, even though the
paired recordAuditEvent calls (and every sibling command — gate-override,
resolve, pause, resume) include it. Add allowedRoles to the product-usage
metadata for both the mention and PR-panel generate-tests denial paths so the
telemetry matches the audit trail.

maybeProcessConfigurationCommand/recordConfigurationSkip never emitted any
product-usage event, leaving @loopover configuration invocations invisible in
usage reporting. Record configuration_posted on a successful post and
configuration_skipped on a skip/denial, mirroring how every other command
handler records usage.

Instrumentation only — no functional or authorization behavior changes.

Closes #8688

…d record configuration command usage

The `explain` and `generate-tests` denial handlers recorded their
`recordGithubProductUsage` events without `allowedRoles`, even though the
paired `recordAuditEvent` calls (and every sibling command — gate-override,
resolve, pause, resume) include it. Add `allowedRoles` to the product-usage
metadata for both the mention and PR-panel generate-tests denial paths so the
telemetry matches the audit trail.

`maybeProcessConfigurationCommand`/`recordConfigurationSkip` never emitted any
product-usage event, leaving `@loopover configuration` invocations invisible in
usage reporting. Record `configuration_posted` on a successful post and
`configuration_skipped` on a skip/denial, mirroring how every other command
handler records usage.

Instrumentation only — no functional or authorization behavior changes.

Closes JSONbored#8688
@bitfathers94
bitfathers94 requested a review from JSONbored as a code owner July 25, 2026 23:55
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.19%. Comparing base (b83b78c) to head (85930c8).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8705      +/-   ##
==========================================
+ Coverage   90.56%   91.19%   +0.63%     
==========================================
  Files          96       97       +1     
  Lines       22490    25672    +3182     
  Branches     3884     5014    +1130     
==========================================
+ Hits        20367    23411    +3044     
- Misses       1945     1993      +48     
- Partials      178      268      +90     
Flag Coverage Δ
backend 95.66% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/queue/processors.ts 95.66% <100.00%> (ø)

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 26, 2026
@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-26 00:01:57 UTC

3 files · 1 AI reviewer · no blockers · readiness 98/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR adds the missing `allowedRoles` metadata to product-usage telemetry for the explain/generate-tests denial paths (matching the paired `recordAuditEvent` calls) and adds previously-missing `configuration_posted`/`configuration_skipped` product-usage events for `@​loopover configuration`. The diff is instrumentation-only, correctly mirrors existing sibling-command patterns (e.g. `commandAuthorizationAllowedRoles` calls already used in the paired audit events), and is backed by four new tests that assert against the actual `product_usage_events` table rather than fabricated payloads. Both `maybeProcessConfigurationCommand` and `recordConfigurationSkip` call sites are correctly instrumented at their real success/skip points.

Nits — 3 non-blocking

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8688
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 40 registered-repo PR(s), 25 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bitfathers94; Gittensor profile; 40 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The diff adds allowedRoles to the recordGithubProductUsage metadata for both explain and generate-tests denials, and adds recordGithubProductUsage calls for both the successful configuration post and the recordConfigurationSkip path, matching all five deliverables including new tests asserting allowedRoles and a configuration usage row.

Review context
  • Author: bitfathers94
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript
  • Official Gittensor activity: 40 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

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

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 58684b8 into JSONbored:main Jul 26, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(orb): explain/generate-tests denial telemetry drops allowedRoles, and @loopover configuration never emits usage events

1 participant