Skip to content

fix: restore a hardened SQL queue worker for backend rollout - #3139

Merged
shizn merged 4 commits into
mainfrom
codex/ossinsight-runtime-security
Nov 3, 2026
Merged

shizn merged 4 commits into
mainfrom
codex/ossinsight-runtime-security

Conversation

@shizn

@shizn shizn commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

The production API still queues Explorer SQL work, while its running job server exists only in an old host checkout. Replacing the API alone would leave that consumer outside the current SQL and database policy. This adds a supported Node 24 worker to the API package and documents a coordinated rollout and rollback.

The producer stores only the question ID in Redis. The worker reloads the authoritative record and checks ownership, status and queue identity before using the shared SQL executor. Startup verifies TLS, table-level analytics grants and session settings; the worker needs no LLM or GitHub credentials. Errors fail jobs without storing private driver errors or results in Redis, logs contain only task metadata, completed/failed records have bounded retention, shutdown drains active work, and the loopback health/metrics listener protects metrics with the operations token.

Preserves two deployed data-quality fixes discovered during host comparison: absent Data Service endpoints remain 404, and degraded-data notices link to existing fallback routes. A failed SQL session initialization now destroys its connection rather than leaking a pool slot.

Validation: Node 24 builds for API, shared types, pipeline and prefetch; offline security regressions; real Redis execution covering deferred startup, failure state, private results and graceful drain. CI runs the existing real TiDB permission/execution tests plus the Redis worker integration on Node 24. All CI checks passed at 797280e, including 269 offline security tests and the real TiDB/Redis integration checks. The same source tree is deployed for the production API, SQL worker and prefetch on Node 24.22.2; all three processes are healthy and authenticated Prometheus scraping is up. Public health and named queries return 200, unauthenticated operations and ask routes return 401, and forged forwarding headers cannot reset the caller’s quota. Source/configuration and process rollback backups are retained. The deployed web hardening from #3137 remains verified in production.

@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ossinsight-docs Ready Ready Preview Nov 3, 2026 2:33am UTC
ossinsight-web Ready Ready Preview Nov 3, 2026 2:33am UTC

Request Review

@shizn
shizn merged commit 4865cb7 into main Nov 3, 2026
4 checks passed
@shizn
shizn deleted the codex/ossinsight-runtime-security branch November 3, 2026 02:44

This branch was successfully deployed

2 active deployments
Preview – ossinsight-web — 797280eb Deployed Nov 3, 2026 by vercel[bot]
Preview – ossinsight-docs — 797280eb Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant