Skip to content

feat(commands): add @gittensory configuration effective-config command (#2168)#3983

Merged
JSONbored merged 2 commits into
JSONbored:mainfrom
real-venus:feat/gittensory-configuration-command
Jul 7, 2026
Merged

feat(commands): add @gittensory configuration effective-config command (#2168)#3983
JSONbored merged 2 commits into
JSONbored:mainfrom
real-venus:feat/gittensory-configuration-command

Conversation

@real-venus

Copy link
Copy Markdown
Contributor

Summary

Closes #2168

Wires the @gittensory configuration command (#2168): when a maintainer comments @gittensory configuration on a PR or issue, the bot replies with the effective resolved review config (the yml > DB > defaults result of resolveRepositorySettings) as a public-safe comment — so maintainers can see what's actually in force without the dashboard.

The command id already existed in the catalog but had no dispatch handler; this adds the two missing deliverables plus the wiring.

  • summarizeEffectiveConfig(settings, executionMode) (src/settings/effective-config-summary.ts) — a PURE, public-safe summarizer of a safe subset: agent execution mode, per-action-class autonomy (via resolveAutonomy, unset → observe), the slop-gate minimum score, the blacklist label (configured / default / disabled), and the command-authorization overview (reusing the existing summarizeCommandAuthorizationPolicy). It omits every secret / wallet / hotkey / coldkey / raw-trust / reward field by construction.
  • classifyConfigurationCommandRequest (src/github/configuration-command.ts) — a PURE classifier holding every eligibility guard (wrong action, bot author, missing repo/issue/installation/actor), mirroring the planner's classifier so the guards are exhaustively unit-tested and the processor carries a single ok branch.
  • maybeProcessConfigurationCommand (src/queue/processors.ts) — classify → evaluateCommandAuthorization("configuration") over the REAL repo permission (never the spoofable comment author_association) → resolveRepositorySettingssummarizeEffectiveConfig → post via sanitizePublicComment + gittensoryFooter, then audit. Wired into the issue_comment command-dispatch chain.

Read-only: it never mutates the PR, so unlike gate-override it always answers a maintainer's direct query (the displayed execution mode still reflects a pause). Non-configuration comments return false and fall through to the other handlers.

Scope

Validation

  • git diff --check
  • npm run typecheck — exit 0.
  • npm run test:coverage — all suites relevant to this change pass; the new tests pass. (The only failures in the local run are pre-existing, Windows-only environmental cases: spawn claude/codex/docker ENOENT in mcp-cli-* / miner-* / selfhost-* / *-script tests that shell out to binaries not installed on the dev box — untouched by this change and green on Linux CI.)
  • codecov/patch: every added line and branch is covered — verified against the coverage JSON, uncovered stmts = none, uncovered-branch lines = none for effective-config-summary.ts, configuration-command.ts, and the added processors.ts region.
  • New tests: 6 for the summarizer (every field + a public-safe banned-keys assertion), 7 for the classifier (every guard branch), and 4 integration tests through processJob (authorized→posts, non-maintainer→skip, non-command→declines, bot→skip).
  • Rebased on the latest main — no conflict.

Safety

  • No secrets, wallets, hotkeys, coldkeys, PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed — the summarizer renders only non-sensitive operational config, and a test asserts none of a banned key set appears in the output.
  • Public output goes through sanitizePublicComment + gittensoryFooter.
  • Command authorization is enforced over the REAL repo permission (resolveRealRepoPermissionAssociation), not the spoofable comment author_association, honoring the per-repo commandAuthorization policy for configuration.
  • No auth/cookie/CORS/GitHub App/Cloudflare/session changes.
  • No API/OpenAPI/MCP behavior change.
  • No UI or docs/changelog changes.

Notes

  • The displayed execution mode reflects the env pause + per-repo config; the DB emergency global-freeze is a separate kill-switch and is not surfaced in a read-only config summary.

@real-venus
real-venus requested a review from JSONbored as a code owner July 7, 2026 08:36
@superagent-security

Copy link
Copy Markdown
Contributor

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

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

loopover-orb Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - fixes required

Review updated: 2026-07-07 09:08:15 UTC

6 files · no blockers · readiness 100/100 · CI failing · blocked

🛑 Suggested Action - Fix Blockers

CI checks failing

  • validate
  • validate-code
Signal Result Evidence
Code review ✅ No blockers No AI review summary
Linked issue ✅ Linked #2168
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: 109 registered-repo PR(s), 65 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor real-venus; Gittensor profile; 109 PR(s), 0 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: real-venus
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript, JavaScript, MDX, Rust, Svelte, Swift
  • Official Gittensor activity: 109 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.

🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
11111 1 11110 7
View the top 1 failed test(s) by shortest run time
test/unit/queue.test.ts > queue processors > a #1960 action-command verb with no dispatch handler wired yet (e.g. pause) is bailed out of the Q&A answer-card path, not misrendered as help (#2160)
Stack Traces | 0.787s run time
AssertionError: expected 1 to be +0 // Object.is equality

- Expected
+ Received

- 0
+ 1

 ❯ test/unit/queue.test.ts:22807:28

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Signed-off-by: venus <153379385+real-venus@users.noreply.github.com>
@loopover-orb

loopover-orb Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Gittensory is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-code)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 7, 2026
@JSONbored JSONbored reopened this Jul 7, 2026
@JSONbored
JSONbored merged commit b82369e into JSONbored:main Jul 7, 2026
6 of 8 checks passed
JSONbored added a commit that referenced this pull request Jul 7, 2026
…ill has none (#3996)

A test asserting "@gittensory configuration" has no dispatch handler
went stale once #3983 wired one up. Swapped to "pause", which still
has none, matching the test's own stated title/intent -- unaffected
by (and not duplicating) the moderation-decay-days clamp fix another
concurrent PR already shipped.
@real-venus
real-venus deleted the feat/gittensory-configuration-command branch July 7, 2026 13:51
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. manual-review Gittensor contributor context

Development

Successfully merging this pull request may close these issues.

feat(commands): @gittensory configuration command — post effective resolved review config as a public-safe summary

2 participants