fix(notifications): route Discord actions through audited webhooks#2881
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 8629c29 | Commit Preview URL Branch Preview URL |
Jul 04 2026, 04:50 AM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2881 +/- ##
==========================================
+ Coverage 96.03% 96.05% +0.02%
==========================================
Files 259 258 -1
Lines 28412 28415 +3
Branches 10339 10336 -3
==========================================
+ Hits 27285 27294 +9
+ Misses 491 489 -2
+ Partials 636 632 -4
🚀 New features to boost your workflow:
|
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - fixes requiredReview updated: 2026-07-04 04:28:27 UTC
🛑 Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
CI checks failing
Review context
Contributor next steps
Signal definitions
🟩 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.
|
0e73c7a to
e49f8d8
Compare
e49f8d8 to
e6eb4ec
Compare
e6eb4ec to
c0e4922
Compare
c0e4922 to
8629c29
Compare
…ument gate-check-publish audit decision (#2933) Two doc-only clarifications from a self-host observability audit: - src/selfhost/audit.ts's logAudit is a stdout-only logger for 4 queue- lifecycle events, not the durable audit_events DB writer -- a naming trap a future reader (including this repo's own prior audit) can easily fall into. Cross-references recordAuditEvent in db/repositories.ts. - The successful gate-check-run publish path writes to check_summaries but not audit_events. Documents this as an intentional design decision (check_summaries is the purpose-built canonical record for this high-frequency event; downstream merge/close/hold actions are already audited separately) rather than a gap needing a fix. No behavior change. The two other items originally flagged in this area are already resolved elsewhere: notification send/suppress/fail audit coverage was added by #2881 (notify-discord.ts's auditExternalNotification), and the observability exports flagged as possibly-dead (registerMetricMeta, DEFAULT_BUCKETS, resetMetrics, flushOpenTelemetry) turned out to all be legitimately in use (extensively by tests, or as internal defaults) or a standalone utility with a distinct purpose from shutdown -- none warrant removal.
Summary
DISCORD_REPO_WEBHOOKSfor exact per-repo channels and fail closed for mapped repos with missing or invalid repo webhooksWhat changed
src/selfhost/**, database, migration, container, Compose, and systemd surfaces to hard guardrails.Why
Duplicate notification producers caused repeated Discord embeds for the same PR. The legacy fallback path could also post first-party repo notifications to the global webhook when repo-specific secrets were unset. Self-host runtime paths should be held for manual review because they control the review stack itself.
Validation
npx vitest run test/unit/notify-discord.test.ts test/unit/outcomes-wire.test.ts test/unit/guardrail-config.test.ts test/unit/change-guardrail.test.ts test/unit/agent-actions.test.ts test/unit/selfhost-env-reference-script.test.tsnpm run typechecknpm run selfhost:env-reference:checkgit diff --checksrc/**files: 100% changed-line coverage and 100% changed-branch coverage