fix: notify lighthouse from backfill loop when new subgraph data is found#617
Merged
liu-zhipeng merged 1 commit intomainnet-stagingfrom Mar 25, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds event-driven Lighthouse notifications from Cartographer’s backfill maintenance cycle by having core backfill operations report which Lighthouse queues should be triggered, and centralizes LIGHTHOUSE_QUEUES in @chimera-monorepo/utils.
Changes:
- Introduce
LIGHTHOUSE_QUEUESin@chimera-monorepo/utilsand re-export it from@chimera-monorepo/mqclient. - Update Cartographer core backfill operations (intents/invoices) to return
Set<string>queue names indicating which Lighthouse workers to trigger. - Update Cartographer handler backfill loop to aggregate/deduplicate returned queues and notify Lighthouse; adjust tests and sinon usage accordingly.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/utils/src/constants/queue.ts | Adds centralized LIGHTHOUSE_QUEUES constants. |
| packages/utils/src/constants/index.ts | Exports the new queue constants module. |
| packages/adapters/mqclient/src/index.ts | Re-exports LIGHTHOUSE_QUEUES from utils (removes local definition). |
| packages/agents/lighthouse/src/server.ts | Updates imports to source LIGHTHOUSE_QUEUES from utils. |
| packages/agents/cartographer/core/src/operations/intents.ts | Changes backfill intent operations to return Set<string> queues for notification. |
| packages/agents/cartographer/core/src/operations/invoices.ts | Changes invoice/deposit backfill operations to return Set<string> queues for notification. |
| packages/agents/cartographer/handler/src/maintenance/backfill.ts | Aggregates queue notifications from backfill ops and triggers Lighthouse once per queue. |
| packages/agents/cartographer/handler/src/mockable.ts | Adds stubbable re-exports of core operations for handler backfill tests. |
| packages/agents/cartographer/handler/src/processors/monitorProcessor.ts | Removes Lighthouse notifications on hub/spoke message processing. |
| packages/agents/cartographer/handler/src/processors/intentProcessor.ts | Updates LIGHTHOUSE_QUEUES import source to utils. |
| packages/agents/cartographer/handler/src/processors/invoiceProcessor.ts | Updates LIGHTHOUSE_QUEUES import source to utils. |
| packages/agents/cartographer/handler/src/processors/tronLogProcessor.ts | Updates LIGHTHOUSE_QUEUES import source to utils. |
| packages/agents/cartographer/handler/src/processors/solanaInstructionProcessor.ts | Updates LIGHTHOUSE_QUEUES import source to utils. |
| packages/agents/cartographer/handler/src/notify.ts | Updates LIGHTHOUSE_QUEUES import source to utils. |
| packages/agents/cartographer/handler/test/maintenance/backfill.spec.ts | Adds coverage for backfill-triggered Lighthouse notifications and deduplication. |
| packages/agents/cartographer/handler/test/processors/tronLogProcessor.spec.ts | Updates sinon typing import usage. |
| packages/agents/cartographer/handler/test/processors/solanaInstructionProcessor.spec.ts | Updates sinon typing import usage. |
| packages/agents/cartographer/handler/test/processors/intentProcessor.spec.ts | Removes unused import. |
| packages/agents/cartographer/handler/test/globalTestHook.ts | Removes global sinon hooks. |
| packages/agents/cartographer/handler/package.json | Stops requiring the removed global test hook in test:unit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
liu-zhipeng
approved these changes
Mar 25, 2026
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.
🤖 Linear
Closes CONG-XXX