Skip to content

fix(review): rename ev: log keys to event: for Loki/Sentry visibility - #4037

Merged
JSONbored merged 1 commit into
mainfrom
fix/log-key-rename-ev-to-event
Jul 7, 2026
Merged

fix(review): rename ev: log keys to event: for Loki/Sentry visibility#4037
JSONbored merged 1 commit into
mainfrom
fix/log-key-rename-ev-to-event

Conversation

@JSONbored

@JSONbored JSONbored commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #4001.

  • The structured-logging convention expects an event: key so log lines are queryable in Loki and forwarded correctly by the Sentry forwarder.
  • ~60 sites across src/review, src/services, src/db, and src/queue used the shorthand ev: instead, making them invisible to both.
  • A handful of sites already had a distinct event: key in the same object literal; those got a semantically specific name (errorType:, auditEventType:) instead of a colliding rename — except sites where event: and ev: both already coexisted deliberately (e.g. src/review/rag.ts's error logs, which keep a distinct ev: sub-code alongside the pre-existing event: classification for log continuity), which were left untouched.

Test plan

  • npm run typecheck — clean
  • npx vitest run test/unit/queue.test.ts — 671/671 passed
  • npx vitest run across all 17 touched files' corresponding test files — 475/475 passed
  • Repo-wide grep confirms zero remaining ev: log-key sites that needed renaming

@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.58%. Comparing base (bb7f8ed) to head (5fde4de).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/review/visual/preview-url.ts 0.00% 4 Missing ⚠️
src/review/visual/shot.ts 86.66% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4037   +/-   ##
=======================================
  Coverage   93.58%   93.58%           
=======================================
  Files         382      382           
  Lines       35532    35532           
  Branches    13028    13028           
=======================================
  Hits        33251    33251           
  Misses       1618     1618           
  Partials      663      663           
Files with missing lines Coverage Δ
src/db/repositories.ts 96.62% <100.00%> (ø)
src/queue/processors.ts 94.86% <ø> (ø)
src/review/alerts.ts 100.00% <100.00%> (ø)
src/review/auto-apply.ts 98.19% <100.00%> (ø)
src/review/auto-tune.ts 100.00% <100.00%> (ø)
src/review/linked-issue-label-propagation-fetch.ts 100.00% <ø> (ø)
src/review/outcomes-wire.ts 88.80% <100.00%> (ø)
src/review/parity-wire.ts 96.29% <100.00%> (ø)
src/review/prompt-injection.ts 100.00% <100.00%> (ø)
src/review/rag-index.ts 93.46% <100.00%> (ø)
... and 7 more
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x 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 12:54:33 UTC

17 files · 2 blockers · readiness 93/100 · CI failing · unstable

🛑 Suggested Action - Manual Review

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.
Nits — 1 non-blocking
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.

Why this is blocked

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.

CI checks failing

  • codecov/patch — 85.71% of diff hit (target 99.00%)
Signal Result Evidence
Code review ❌ 2 blockers No AI review summary
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
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 (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 51 registered-repo PR(s), 43 merged, 570 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 51 PR(s), 570 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, JavaScript, Ruby, Go, Kotlin, MDX, Shell
  • Official Gittensor activity: 51 PR(s), 570 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Explain no-issue PR.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
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

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 7, 2026
The structured-logging convention expects an "event:" key so log lines are
queryable in Loki and forwarded correctly by the Sentry forwarder. ~60 sites
across src/review, src/services, src/db, and src/queue used the shorthand
"ev:" instead, making them invisible to both. A handful of sites already had
a distinct "event:" key in the same object literal; those got a semantically
specific name ("errorType:", "auditEventType:") instead of a colliding rename.
@JSONbored
JSONbored force-pushed the fix/log-key-rename-ev-to-event branch from bc6a495 to 5fde4de Compare July 7, 2026 12:45
@JSONbored
JSONbored merged commit c899c3c into main Jul 7, 2026
9 of 10 checks passed
@JSONbored
JSONbored deleted the fix/log-key-rename-ev-to-event branch July 7, 2026 12:54
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. manual-review Gittensor contributor context

Development

Successfully merging this pull request may close these issues.

fix(observability): rename ev: log keys to event: across src/

1 participant