feat(common): add ABI compatibility checks and reorganize CI scripts#2182
feat(common): add ABI compatibility checks and reorganize CI scripts#2182mergify[bot] merged 26 commits intomainfrom
Conversation
Used by both abi-compat and upgrade-check subsystems.
Mirrors the ci/abi-compat/ structure: check.ts (CI entrypoint), lib.ts (core logic), list.ts (local multi-package report), hints.ts (domain config).
Capture exec errors with truncated output instead of swallowing them. Clean up worktrees explicitly on failure instead of relying on prune. Matches the pattern established in abi-compat/list.ts.
- Remove --force flag from forge inspect in abi-compat/lib.ts to avoid redundant recompilation (4x per side per package). - Simplify printPackageReport return in abi-compat/list.ts. - Derive valid package names from PACKAGE_CONFIG in upgrade-check parseArgs instead of hardcoding strings.
Without --force, a prior failed compilation (e.g. before address constants are generated) leaves error artifacts in forge's cache. Subsequent runs reuse the cached failure even after the source files are fixed. Reproduced by: forge clean, attempt compilation without addresses (fails), generate addresses, run check — forge returns the cached error for Decryption while other contracts work.
Forge may prepend compilation progress text to stdout on the first invocation in a clean directory. This caused Decryption (the first contract checked) to fail JSON.parse in CI while subsequent contracts succeeded from cache. Extract the JSON array from the output instead of parsing the whole string, matching the approach used by the upgrade-check bytecode extraction.
|
@claude /pr-review |
|
Claude timed out while processing the request. — View run |
There was a problem hiding this comment.
[AUTOMATED]
Code Review
Overall this is a well-structured PR that adds ABI compatibility checking and cleanly reorganizes the CI scripts. The code is well-architected with good separation of concerns (config, lib, check, list), proper error handling improvements in list.ts, and solid worktree cleanup logic.
Summary
- Bugs: No runtime bugs found. Two independent opus-model bug hunting passes confirmed the code is correct.
- Guidelines: No enforced violations found. (CI scripts are not subject to prettier enforcement in this repo.)
- Error Handling: One validated issue found — see inline comment.
The error handling improvements to upgrade-check/list.ts (adding formatExecError, wrapping execSync in try/catch, individual worktree cleanup) are excellent and address real pain points from the original code.
Positive highlights
- Clean extraction of shared config into
config.tsfiles for both subsystems - Exception-based ABI delta allowlisting (
exceptions.ts) is a good pattern for managing known-breaking changes - Proper GitHub Actions annotations (
::error::,::group::) for CI visibility - Minimal permissions in the workflow file with inline comments explaining each scope
- Good use of
persist-credentials: falseand pinned action SHAs
tawadaa
left a comment
There was a problem hiding this comment.
LGTM, excellent work, thanks 🙏🏼
|
@Mergifyio queue |
Merge Queue Status
This pull request spent 1 hour 49 minutes 34 seconds in the queue, including 1 hour 40 minutes 17 seconds running CI. Required conditions to merge
|
Summary
ci/into subsystem folders:abi-compat/,upgrade-check/,shared/repoRootcomputationHCULimitandCiphertextCommitsin ABI compatibility checks while ignoring executor-onlyHCULimitentrypointsStructure
Both subsystems follow the same pattern:
check.ts— CI entrypoint (single package, GitHub Actions annotations)lib.ts— core comparison logiclist.ts— local multi-package report (creates worktrees, installs deps, runs comparison)config.ts— package names, contract lists, build depsWhat ABI compat checks
HCULimitexecutor-onlycheckHCUFor*entrypoints from the stable ABI surfaceLocal usage
Validation
bun ci/abi-compat/list.ts --from v0.11.1 --package host-contractsbun ci/abi-compat/list.ts --from v0.11.1 --package gateway-contracts