Skip to content

fix(ci): unblock m1 CI — merge-base, cached packages, mint delegation, AA genesis - #387

Draft
ganymedio wants to merge 9 commits into
m1from
fix/ci-restore-followups
Draft

fix(ci): unblock m1 CI — merge-base, cached packages, mint delegation, AA genesis#387
ganymedio wants to merge 9 commits into
m1from
fix/ci-restore-followups

Conversation

@ganymedio

@ganymedio ganymedio commented Jul 1, 2026

Copy link
Copy Markdown

Summary

Fixes CI failures that appeared on m1 after #367 restored the build/lint/test workflows. The red checks are several independent problems; this PR fixes all the code-level ones. The one remaining failure (dead infra secret) is documented below.

Fixed here

1. rust-check-merge-base (+ rust-targeted-unit-tests) — two distinct bugs

  • Empty merge base on push. identify_merge_base() fell back to origin/main when GITHUB_BASE_REF was unset (push events). This fork's default is m1; the stale origin/main shares no common ancestor, so git merge-base returned "" and the check panicked (ParseError(TooShort)). Fixed by defaulting to m1.
  • Stale-base freshness failure on PRs. On pull_request events the merge base resolves fine, but the 7-day freshness check fails whenever the base tip itself is >7 days old. m1 is slow-moving, so every PR failed once m1 went a week without a commit — and rebasing can't help because the merge base is the m1 tip. Fixed by skipping the age check when the merge base equals the base tip (branch is not behind at all).

2. rust-build-cached-packages — stale generated artifacts

cargo build -p aptos-cached-packages produced an uncommitted diff. Regenerated:

3. rust-smoke-tests / test_mint_transfer — mint capability read from the wrong address

A prior commit (f23bc892bd) changed delegate_mint_capability / claim_mint_capability / find_delegation to assert @aptos_framework and read MintCapStore / Delegations from @aptos_framework. (That commit is a large 48-file sync; the address change is unrelated to its stated purpose and appears to have been swept in.) Genesis, however, stores both resources under @core_resources (configure_accounts_for_test) and destroys @aptos_framework's MintCapStore during genesis (destroy_mint_cap). On any running chain those reads hit an empty location, so delegate_mint_capability aborted with ENOT_APTOS_FRAMEWORK_ADDRESS. Restored the @core_resources target these functions previously used (they are test/testnet-only by design).

That same commit also added a test_destroy_mint_cap Move unit test (and an init_delegations helper) that set the resources up under @aptos_framework. With the functions reading @core_resources, that test aborted and failed the framework Move unit tests (rust-targeted-unit-tests). Those helpers were introduced by that commit and aren't used elsewhere; removed them to restore the consistent state (the delegate→claim flow is covered by the mint_transfer smoke test).

Verified locally: aptos::mint_transfer::test_mint_transfer passes (1 passed; 0 failed); framework Move unit tests pass (663 passed; 0 failed).

4. rust-smoke-tests / account-abstraction tests — marked #[ignore] (AA unsupported)

test_ethereum_derivable_account / test_solana_derivable_account aborted because the ethereum/solana derivable authenticators are never registered at genesis: initialize_account_abstraction is intentionally gated off for Movement (see #238), which does not currently support account abstraction. Rather than enable an unsupported feature to satisfy these inherited upstream tests, they're marked #[ignore] (nextest skips ignored tests under the smoke-test profile). Re-enable if/when AA is supported.

Known inconsistency (out of scope): ACCOUNT_ABSTRACTION / DERIVABLE_ACCOUNT_ABSTRACTION are still in default_features(), so the on-chain flags advertise AA as enabled even though genesis never initializes it. Reconciling that (removing them from default_features) is a separate on-chain decision.

Still outstanding (not in this PR)

  • Container builds (aptos-node, aptos-debugger, aptos-faucet-service) — binaries compile fine; they fail at docker login ghcr.io with denied: denied. The INFRA_GH_PAT secret (user sre-movement) is expired/invalid or lacks write:packages. Fix is a secret rotation in repo settings — no code change makes this pass.

Test plan

  • cargo build -p aptos-cargo-cli compiles the merge-base changes
  • cargo build -p aptos-cached-packages yields a clean tree after regen
  • cargo build -p aptos-vm-genesis compiles the genesis change
  • test_mint_transfer passes locally with the framework fix
  • framework Move unit tests pass locally (663 passed; 0 failed)
  • derivable AA smoke tests marked #[ignore] (AA unsupported); nextest skips them under the smoke-test profile
  • CI: rust-check-merge-base, rust-targeted-unit-tests, rust-build-cached-packages, and rust-smoke-tests green

ganymedio added 5 commits July 1, 2026 05:55
On push events GITHUB_BASE_REF is unset, so identify_merge_base fell back
to origin/main. This fork's default branch is m1 and the stale origin/main
shares no common ancestor, so git merge-base returned an empty string and
check_merge_base panicked (ParseError(TooShort)). This broke the required
rust-check-merge-base and rust-targeted-unit-tests jobs on every push to m1.
Regenerated via 'cargo build -p aptos-cached-packages'. staking_contract.md
was stale after #380 (beneficiary @vm_reserved check) and features.md after
#382 (NATIVE_BRIDGE deprecation note), failing rust-build-cached-packages.
The move2 upgrade changed delegate_mint_capability/claim_mint_capability/
find_delegation to assert @aptos_framework and read MintCapStore/Delegations
from @aptos_framework, but genesis stores both under @core_resources
(configure_accounts_for_test) and destroys @aptos_framework's MintCapStore
during genesis (destroy_mint_cap). On any running chain those reads hit an
empty location, so delegate_mint_capability aborted with
ENOT_APTOS_FRAMEWORK_ADDRESS, breaking the mint_transfer smoke test. Restore
the pre-upgrade @core_resources target; these functions are test/testnet-only.

Verified: aptos::mint_transfer::test_mint_transfer passes locally.
On pull_request events the merge base resolves correctly, but the 7-day
freshness check fails whenever the base tip itself is older than 7 days.
m1 is slow-moving, so every PR failed once m1 went a week without a commit,
and rebasing can't help because the merge base IS the m1 tip. Skip the age
check when the merge base equals the base branch tip (branch not behind).
…bled

initialize_account_abstraction (which registers the ethereum/solana
derivable authenticators) was gated on initial_features_override being
Some AND enabling AA. With no override -- the default for local swarms --
the guard was false, so AA was never initialized even though the effective
feature set (default_features) enables ACCOUNT_ABSTRACTION and
DERIVABLE_ACCOUNT_ABSTRACTION. The on-chain flags said AA was on while the
modules were uninitialized, so derivable-AA txns aborted, failing the
account_abstraction smoke tests. Derive AA-enablement from the effective
feature set, mirroring initialize_features.

Regression from #238; upstream (AIP-113) called this unconditionally.
@blacksmith-sh

This comment has been minimized.

test_destroy_mint_cap (and its init_delegations helper) set up
MintCapStore/Delegations under @aptos_framework, matching the move2-era
variant of delegate/claim_mint_capability. Now that those functions read
from @core_resources (matching genesis), this unit test aborted, failing
the framework move unit tests (rust-targeted-unit-tests). These helpers did
not exist pre-move2; remove them to restore the consistent @core_resources
state. The delegate->claim flow is covered by the mint_transfer smoke test.

Verified: framework move unit tests pass (663 passed; 0 failed).
@ganymedio ganymedio changed the title fix(ci): unblock merge-base check and cached-package docs on m1 fix(ci): unblock m1 CI — merge-base, cached packages, mint delegation, AA genesis Jul 1, 2026
@blacksmith-sh

This comment has been minimized.

ganymedio added 2 commits July 1, 2026 08:46
Account abstraction is not supported on Movement -- genesis AA initialization
is intentionally gated off (see #238), so the ethereum/solana derivable
authenticators are never registered and these tests cannot pass. Mark them
#[ignore] (nextest skips ignored tests under the smoke-test profile) rather
than enabling an unsupported feature. Re-enable if/when AA is supported.
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