Repository navigation
feat: move AI workflows to Worker with durable bot relay - #68
Merged
Merged
Conversation
Verify bridge records against shared Worker protocol fixtures
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move AI workflows out of the bot process into the independent Worker while keeping platform adapters in HuaJiBot.NET. The bridge provides signed HTTPS admission, a durable SQLite outbox, thread mapping, Queue pull delivery, retry handling, and a persistent delivery ledger. Ordinary messages archive without invoking a model; prompted image turns include image URLs. Scheduled summaries use validated date anchors.
The Worker handles text/vision conversations, image follow-ups, authenticated MCP search/weather, D1 history, and durable daily summaries. Its source is https://github.com/Yuna-Celisse/huaji-agent; engineering improvements and the image fallback recovery fix are in https://github.com/Yuna-Celisse/huaji-agent/pull/1. Shared C#/Worker fixture tests are stacked in #70.
Deployment preserves existing adapter credentials and unrelated services, retains configuration/data backups, and includes startup rollback. Original history and delivery receipts remain available for recovery. Production identifiers and credentials belong in private configuration.
Validation: focused bridge tests, formatting checks, Worker tests, type checks, and builds pass. Production weather and manual-summary conversations were confirmed through real platform history. An image request exposed a malformed reply-tool history error during model fallback; the Worker fix is deployed, with renewed real-image acceptance pending. The diagnostic probe now explicitly requires TLS 1.2 or newer for WSS connections, addressing the CodeQL finding.
Adapter acceptance before receipt persistence still has a duplicate-delivery crash window. Platform events never delivered during downtime require backfill; old AIChat image threads are not automatically recreated. Platform failure/restart/DLQ acceptance remains pending.
Refs #64.