Skip to content

Automation#202

Draft
sparrowDom wants to merge 20 commits intomainfrom
automation
Draft

Automation#202
sparrowDom wants to merge 20 commits intomainfrom
automation

Conversation

@sparrowDom
Copy link
Copy Markdown
Member

No description provided.

apexearth and others added 20 commits March 31, 2026 13:15
Rename 26 Defender action files from src/js/actions/*.js to
src/js/tasks/actions/*.ts in preparation for converting them
from OpenZeppelin Defender handlers to the action() builder pattern.
Both origin-dollar and arm-oeth cron containers use the same KMS signer,
risking nonce collisions when transactions are sent concurrently. This adds
a Postgres-backed nonce lock that wraps the signer transparently via
SELECT ... FOR UPDATE, holding the row lock for the full tx lifecycle.

- nonceQueue.ts: withNonceLock + wrapWithNonceQueue signer wrapper
- action.ts: conditionally wraps signer when DATABASE_URL is set
- docker-compose.yml: adds postgres service for local dev
- cron-supervisor.ts: pool cleanup on shutdown
- Includes integration tests verifying lock serialization
- Replace console logging with winston/Loki logger in supervisor
- Delete log-events.ts emit wrappers, inline structured logging in action.ts
- Extract HTTP API + run tracking into api.ts, slim supervisor to orchestrator
- Add action.start/action.success events to action framework
- Generate run_id (UUID) per action, remove AUTOMATON_RUN_ID env var
- Add real action.test.ts that exercises createActionHandler() with mock signer
- Delete stale test-action.ts, action-runner.test.ts, snapshot
# Conflicts:
#	cron/cron-supervisor.ts
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