Skip to content
This repository was archived by the owner on Dec 7, 2025. It is now read-only.

Align worker with Drizzle events schema, simplify to events-only processing#2

Draft
Copilot wants to merge 4 commits intomasterfrom
copilot/sub-pr-1
Draft

Align worker with Drizzle events schema, simplify to events-only processing#2
Copilot wants to merge 4 commits intomasterfrom
copilot/sub-pr-1

Conversation

Copy link

Copilot AI commented Nov 30, 2025

Worker schema was out of sync with the Drizzle ORM events table definition. Simplified worker to only process events (as requested), matching the flattened schema structure.

Schema Changes

Updated events to use flattened fields instead of nested JSONB:

// Before: nested data blob
"data": map[string]interface{}{...}

// After: flattened fields matching Drizzle schema
"actorId", "channelId", "targetId", "messageId", 
"reason", "duration", "oldValue", "newValue", "url"

Architecture Simplification

  • Removed guardian_logs and join_logs processing — worker now only handles logs:events queue
  • Removed table auto-creation (schema managed by Drizzle migrations)
  • Removed ON CONFLICT (id) clause since UUIDs are auto-generated

PR Review Fixes

  • JSON marshaling errors now logged instead of silently ignored with _
  • Removed redundant TLS config check
  • Removed unused db parameter from FlushLogs
  • Fixed Go version: go.mod now uses go 1.23 (was invalid 1.25.3)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits November 30, 2025 18:04
Co-authored-by: ryzmae <114670723+ryzmae@users.noreply.github.com>
Co-authored-by: ryzmae <114670723+ryzmae@users.noreply.github.com>
Co-authored-by: ryzmae <114670723+ryzmae@users.noreply.github.com>
Copy link
Author

Copilot AI commented Nov 30, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /update-job-proxy /update-job-proxy (dns block)
  • go.googlesource.com
    • Triggering command: /update-job-proxy /update-job-proxy (dns block)
  • gopkg.in
    • Triggering command: /update-job-proxy /update-job-proxy (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Rewrite worker service from Rust to Go Align worker with Drizzle events schema, simplify to events-only processing Nov 30, 2025
Copilot AI requested a review from ryzmae November 30, 2025 18:09
Base automatically changed from go-rewrite to master November 30, 2025 18:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants