Skip to content

docs(selfhost): fill config/env doc gaps and reconcile checkRunDetailLevel default mismatch - #2926

Merged
JSONbored merged 1 commit into
mainfrom
claude/selfhost-config-docs-2907
Jul 4, 2026
Merged

docs(selfhost): fill config/env doc gaps and reconcile checkRunDetailLevel default mismatch#2926
JSONbored merged 1 commit into
mainfrom
claude/selfhost-config-docs-2907

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • Fixes checkRunDetailLevel's default mismatch: the repository_settings DB column defaults to "minimal", but the internal full-replace settings route's Zod schema defaulted to "standard" for the same field — an omitted value resolved differently depending on which write path created the row. Aligned the route to "minimal", matching the Context check's own documented "public output is intentionally minimal" design intent. Added a regression test.
  • Fixes a real detection gap in gen-selfhost-env-reference.mjs: its isEnvContainer AST check didn't unwrap parenthesized/as-cast expressions, so it silently missed (env as unknown as Record<string, unknown>).SLACK_WEBHOOK_URL in notify-discord.ts — meaning SLACK_WEBHOOK_URL never showed up in the generated self-host env reference at all. Fixed the AST check (with a new test fixture case) and regenerated the output file, which picked up SLACK_WEBHOOK_URL plus re-synced drifted line numbers for everything else.
  • Documents 8 previously-undiscoverable env vars in .env.example: SLACK_WEBHOOK_URL, AI_EMBED_BASE_URL/AI_EMBED_API_KEY, BACKUP_ACKNOWLEDGED, ORB_COLLECTOR_TOKEN, ORB_RELAY_MODE, REVIEW_AUDIT_DIR, SETUP_OUTPUT_PATH — all real, working, already-implemented knobs that had no mention in the sample env file.
  • Documents closeOwnerAuthors, features:, and contentLane: in .gittensory.yml.example — real, consumed top-level/settings fields that were entirely absent from the example (not even a commented-out stub). Deliberately left contributorBlacklist and the moderation-rules block undocumented, since those carry moderation/banned-username-adjacent semantics that may be intentionally kept out of the public example.
  • Adds a README section disambiguating the three independent check-run/comment surfacesGittensory Orb Review Agent (the gate verdict), Gittensory Context (a separate, advisory, minimal-by-default check run), and inline review comments (the actual reply-able CodeRabbit-style threads). This directly resolves a live point of confusion: the Context check is easy to mistake for the inline-comment feature, but they're unrelated and independently gated.

Resolves #2907. Part of the #1667 self-host review-stack roadmap (follow-up to #2912, #2906).

Scope

Validation

  • git diff --check
  • npm run typecheck
  • Targeted vitest run across all 8 affected test files — 329 tests passed
  • npm run test:changed — 30 files / 547 tests passed, 0 failed
  • Manually confirmed .gittensory.yml.example still parses with zero warnings (the existing test/unit/focus-manifest.test.ts "doc must match parser exactly" test), and dogfooded the new npm run selfhost:config-lint -- .gittensory.yml.example CLI (from chore(selfhost): wire up or retire the unwired config-lint.ts manifest validator #2906) against it directly
  • npm run actionlint / npm run test:workers / npm run build:mcp / npm run test:mcp-pack / npm audit / ui:lint / ui:typecheck / ui:build — not run locally; no workflow, worker-pool, MCP-package changes, and the one apps/gittensory-ui file touched is a regenerated data-only constants file with no UI/component logic. CI runs the full gate.

If any required check was skipped, explain why:

  • test:coverage/test:ci not run locally — the only behavior change (the checkRunDetailLevel default) is covered by a new regression test in the targeted run above; everything else is documentation (.env.example, .gittensory.yml.example, README.md) or a regenerated data file. CI runs the full gate.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed. (Deliberately did NOT document contributorBlacklist/moderation fields in the public .gittensory.yml.example for this reason.)
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests. (N/A.)
  • API/OpenAPI/MCP behavior is updated and tested where needed. (The one behavior change — checkRunDetailLevel's default — is an internal settings-route default value, not a schema/OpenAPI shape change; no ui:openapi regen needed.)
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks. (N/A — the one apps/gittensory-ui file touched is a generated data constants file, not a component.)
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs. (This PR IS the docs update; no changelog edit.)

…Level default mismatch

- Fixes checkRunDetailLevel's default: the DB schema column defaults to
  "minimal" but the internal full-replace settings route's Zod schema
  defaulted to "standard" for the same field, so an omitted value resolved
  differently depending on which write path created the row. Aligned the
  route to "minimal", matching the Context check's own "public output is
  intentionally minimal" design intent, with a regression test.
- Fixes gen-selfhost-env-reference.mjs's isEnvContainer AST check to unwrap
  parenthesized/`as`-cast expressions (e.g. `(env as unknown as
  Record<string, unknown>).X`), which was silently hiding SLACK_WEBHOOK_URL
  from the generated reference. Regenerated the output file.
- Documents 8 previously-undiscoverable-from-docs env vars in .env.example:
  SLACK_WEBHOOK_URL, AI_EMBED_BASE_URL/AI_EMBED_API_KEY,
  BACKUP_ACKNOWLEDGED, ORB_COLLECTOR_TOKEN, ORB_RELAY_MODE,
  REVIEW_AUDIT_DIR, SETUP_OUTPUT_PATH.
- Documents closeOwnerAuthors, the features: block, and the contentLane:
  block in .gittensory.yml.example (contributorBlacklist/moderation fields
  stay undocumented in the public example, as they carry
  moderation-sensitive semantics).
- Adds a README section disambiguating the three independent check-run/
  comment surfaces (Gittensory Orb Review Agent, Gittensory Context, inline
  review comments), since the Context check is easy to mistake for the
  separately-gated inline-comment feature.
@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 6fb6b98 Commit Preview URL

Branch Preview URL
Jul 04 2026, 05:45 AM

@JSONbored JSONbored self-assigned this Jul 4, 2026
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 4, 2026
@loopover-orb

loopover-orb Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-04 05:44:44 UTC

8 files · 1 AI reviewer · no blockers · readiness 100/100 · CI pending · blocked

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review

Review summary
The change correctly aligns the internal repository-settings default for `checkRunDetailLevel` with the persisted DB default and adds a focused regression test for the omitted-field path. The env-reference generator fix is narrowly scoped and covers the real casted `env` access shape that was previously missed, with generated output updated to include `SLACK_WEBHOOK_URL`. The rest is documentation/example expansion; I do not see a diff-visible correctness break.

Nits — 6 non-blocking
  • nit: `.env.example:260` has the `BACKUP_ACKNOWLEDGED` continuation comments indented before `#`, unlike the surrounding sample env entries; keep `#` in column 1 for consistency and safer copy/paste behavior.
  • nit: `README.md:43` says "off by both by default"; tighten that to "off by default in both places" or similar.
  • In `.env.example:260`, align the continuation lines with the existing comment style so this block matches the rest of the file.
  • In `README.md:43`, clean up the small wording glitch while this section is being added.
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2907
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: 60 registered-repo PR(s), 51 merged, 437 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 60 PR(s), 437 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 60 PR(s), 437 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • No action.
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 4, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2926   +/-   ##
=======================================
  Coverage   96.05%   96.05%           
=======================================
  Files         259      259           
  Lines       28460    28460           
  Branches    10350    10350           
=======================================
  Hits        27338    27338           
  Misses        489      489           
  Partials      633      633           
Files with missing lines Coverage Δ
src/api/routes.ts 94.53% <ø> (ø)
🚀 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 95179d8 into main Jul 4, 2026
14 checks passed
@JSONbored
JSONbored deleted the claude/selfhost-config-docs-2907 branch July 4, 2026 05:50
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

None yet

Development

Successfully merging this pull request may close these issues.

docs(selfhost): fill config/env doc gaps and reconcile checkRunDetailLevel default mismatch

1 participant