Skip to content

fix: notify lighthouse from backfill loop when new subgraph data is found#617

Merged
liu-zhipeng merged 1 commit intomainnet-stagingfrom
fix/carto-notify-from-backfill
Mar 25, 2026
Merged

fix: notify lighthouse from backfill loop when new subgraph data is found#617
liu-zhipeng merged 1 commit intomainnet-stagingfrom
fix/carto-notify-from-backfill

Conversation

@otsybizov
Copy link
Contributor

🤖 Linear

Closes CONG-XXX

Copilot AI review requested due to automatic review settings March 25, 2026 06:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_QUEUES in @chimera-monorepo/utils and 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 liu-zhipeng merged commit 8caa226 into mainnet-staging Mar 25, 2026
27 checks passed
@liu-zhipeng liu-zhipeng deleted the fix/carto-notify-from-backfill branch March 25, 2026 06:42
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.

3 participants