Skip to content

fix(ci): repair sync-amendments workflow and create missing script - #26

Closed
shichengripple001 wants to merge 1 commit into
mainfrom
fix/sync-amendments-workflow
Closed

fix(ci): repair sync-amendments workflow and create missing script#26
shichengripple001 wants to merge 1 commit into
mainfrom
fix/sync-amendments-workflow

Conversation

@shichengripple001

Copy link
Copy Markdown
Contributor

Summary

The sync-amendments.yml workflow has been broken since creation:

  • YAML syntax error on line 110 — multi-line --body content dropped to zero indentation, breaking the YAML literal block
  • Dead CLI commandsnode --local --persist --detach no longer exists (now start --detach)
  • Missing scriptscripts/update-genesis-amendments.ts was never created

This PR fixes all three:

  • Fix YAML by using a heredoc (<<'BODY') for the PR body, avoiding shell/YAML escaping issues
  • Replace node --local --persist --detach with start --detach
  • Add stop cleanup step with if: always() so Docker containers don't leak
  • Create scripts/update-genesis-amendments.ts which:
    1. Connects to mainnet (wss://xrplcluster.com) and calls feature RPC for all enabled amendments
    2. Connects to local rippled (ws://localhost:6006) and calls feature RPC for supported amendments
    3. Filters to amendments enabled on mainnet AND supported locally
    4. Appends new entries to the [amendments] block in src/core/compose.ts before # sync:end
    5. Logs skipped amendments (enabled on mainnet but not supported by local binary)

Test plan

  • Trigger workflow manually via workflow_dispatch and verify it runs without YAML errors
  • Verify the script connects to mainnet and local rippled successfully
  • Confirm no new amendments are appended (list should already be current)
  • Force-test by temporarily removing an amendment from compose.ts, running the workflow, and verifying it gets re-added

🤖 Generated with Claude Code

- Fix YAML syntax error (unindented multi-line --body broke the literal block)
- Replace dead CLI command (`node --local --persist --detach` → `start --detach`)
- Add `stop` cleanup step with `if: always()`
- Use heredoc for PR body to avoid YAML/shell escaping issues
- Create scripts/update-genesis-amendments.ts: queries mainnet for enabled
  amendments, filters to those supported by local rippled, appends new
  entries to [amendments] block in src/core/compose.ts before # sync:end

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant