Skip to content

Automate manuals extraction in ABI fanout cycle#356

Merged
matheus1lva merged 1 commit intomainfrom
feat/automate-manuals
Mar 11, 2026
Merged

Automate manuals extraction in ABI fanout cycle#356
matheus1lva merged 1 commit intomainfrom
feat/automate-manuals

Conversation

@matheus1lva
Copy link
Collaborator

@matheus1lva matheus1lva commented Mar 6, 2026

Summary

Adds extract manuals to the ABI fanout cycle so vaults defined in config/manuals.yaml are automatically picked up every 15 minutes. Previously, adding manual entries required SSHing into the ingest shell and triggering extraction by hand — this removes that operational burden.

How to review

Two small changes:

  1. packages/ingest/fanout/abis.ts — single line added before the ABI loop to enqueue mq.job.extract.manuals. Review that it runs before the source/thing loop (manuals create things that the loop may need).
  2. docs/manuals.md — updated to reflect the new automatic flow, with manual trigger preserved as fallback.

Test plan

  • Start the dev environment
make dev
  • Create a config/manuals.local.yaml with a test entry (automatically preferred over manuals.yaml)
manuals:
  - chainId: 1
    address: '0x000000000000000000000000000000000000dEaD'
    label: test manual
    defaults:
      token: '0x000000000000000000000000000000000000dEaD'
      apiVersion: '3.0.0'
      inceptBlock: 20000000
  • Trigger ingestfanout abis from the terminal UI

  • Verify the test entry was inserted into the database

SELECT chain_id, address, label, defaults FROM thing
WHERE chain_id = 1 AND address = '0x000000000000000000000000000000000000dEaD';

Expected: one row with label = 'test manual' and defaults containing token, apiVersion, inceptBlock

  • Trigger fanout abis again and verify idempotency — no duplicate rows
SELECT count(*) FROM thing
WHERE chain_id = 1 AND address = '0x000000000000000000000000000000000000dEaD';

Expected: 1

  • Verify manual fallback still works: trigger ingestextract manuals independently from the terminal UI

  • Clean up: rm config/manuals.local.yaml and make down (or kill the tmux session)

Risk / impact

Minimal risk. upsertThing is idempotent (ON CONFLICT ... DO UPDATE with defaults merging), so repeated extraction every 15 minutes is safe. The manual terminal trigger remains available as a fallback. No schema changes, no new dependencies.

🤖 Generated with Claude Code

@vercel
Copy link

vercel bot commented Mar 6, 2026

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

Project Deployment Actions Updated (UTC)
kong Ready Ready Preview, Comment Mar 6, 2026 0:26am

Request Review

Copy link
Collaborator

@murderteeth murderteeth left a comment

Choose a reason for hiding this comment

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

lgtm

@matheus1lva matheus1lva merged commit 47fb644 into main Mar 11, 2026
3 checks passed
@murderteeth murderteeth deleted the feat/automate-manuals branch March 11, 2026 16:54
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.

2 participants