feat: test(exit-certificate): add E2E harness, bridge/status scripts and CI workflow#1655
Conversation
… workflow Add the exit-certificate E2E test harness under test/e2e-exit_certificate/ that spins up a Kurtosis CDK network, prepares a settled certificate and runs the exit_certificate tool. Add supporting scripts (L2->L1 bridge, agglayer certificate status, kurtosis env export, agglayer_status helper) and a CI workflow that runs the E2E test on PRs touching tools/exit_certificate/**. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Claude finished @joanestebanr's task in 2m 32s —— View job 🔍 PR Review CompletePR #1655: E2E test harness for exit-certificate tool 🚀 What's NewThis PR introduces a comprehensive E2E test harness for the exit-certificate tool that:
🐛 Bug FixesNone. 📋 Config UpdatesNone.
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e5274301b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // No open pending certificate: whatever was submitted has settled. | ||
| fmt.Printf("No pending certificate — latest is settled. (%s elapsed)\n", elapsed) | ||
| printStatus(ctx, client, netID) | ||
| return nil |
There was a problem hiding this comment.
Wait for the first certificate before stopping aggsender
When prepare_network.sh calls this helper immediately after the L2→L1 bridge, there is a window before aggsender has submitted any pending certificate. In that state GetNetworkInfo can return LatestPendingStatus == nil and no settled height/LER yet, but this branch still returns success; the next step stops aggkit-001, leaving the E2E with no settled certificate and causing the exit tool to build against a zero previous LER or fail the LER check. Keep polling until a certificate is actually observed as settled, e.g. require a settled height/LER or first observe a pending certificate before treating “no pending” as success.
Useful? React with 👍 / 👎.
…yer_status Drop the GetNetworkInfo summary helper and its call sites; the certificate header is the primary output and the settled/pending summary was redundant. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Cover latestHeader, printStatus, waitForSettled (polling, settled, in-error, timeout, RPC failure) and the formatting helpers using the existing AgglayerClientMock. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
run_network.sh stop now uses `kurtosis clean --all` instead of removing a single named enclave. bridge_l1_to_l2.sh dumps the full `cast run` execution trace before filtering for the revert reason. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|


🔄 Changes Summary
test/e2e-exit_certificate/: spins up a Kurtosis CDK network (run_network.sh), prepares a settled certificate (prepare_network.sh), and runs theexit_certificatetool (run_exit_tool.sh), orchestrated byrun_e2e_test.sh(+helper.sh,single_op_pessimistic_args.json,README.md).tools/exit_certificate/scripts/:bridge_l2_to_l1.sh— L2→L1 bridge to produce a certificate.agglayer_certificate_status.sh— poll/wait for certificate settlement.export_kurtosis_env.sh— export Kurtosis env vars for the scripts.agglayer_status/main.go— agglayer status helper.bridge_l1_to_l2.sh..github/workflows/test-e2e-exit_cenrtificate_tool.ymlthat runs the E2E test on PRs touchingtools/exit_certificate/**(alsoworkflow_dispatch).📋 Config Updates
✅ Testing
test/e2e-exit_certificate/run_e2e_test.shon PRs that modifytools/exit_certificate/**(Kurtosis CDK network → settled certificate → exit_certificate tool)../test/e2e-exit_certificate/run_e2e_test.shlocally (requires Docker, Kurtosis CLI, Foundrycast, Go).🐞 Issues
🔗 Related PRs
📝 Notes
aggkitenclave; the workflow stops the enclave on completion.