Skip to content

fix: bump acp core to fix policy marshaling non-determinism#112

Open
Lodek wants to merge 2 commits into
devfrom
fix/nondet-acp
Open

fix: bump acp core to fix policy marshaling non-determinism#112
Lodek wants to merge 2 commits into
devfrom
fix/nondet-acp

Conversation

@Lodek

@Lodek Lodek commented May 15, 2026

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR updates dependencies on ACP and RaccoonDB modules and introduces an integration test validating determinism of ACP policy creation. The test repeatedly initializes commit multistores and verifies that calling CreatePolicy produces consistent policy IDs and root hashes across independent store instances.

Changes

Policy Determinism Validation

Layer / File(s) Summary
Dependency Updates
go.mod
Direct dependencies acp_core and raccoondb are updated to newer revisions; indirect dependency zanzi is also updated.
Policy Determinism Test and Store Setup
tests/integration/acp/suite/policy/policy_creation_store_determinism_test.go
New integration test TestCreatePolicyCommittedRootHashIsDeterministicAcrossStores calls CreatePolicy in three separate stores and asserts pairwise equality of policy IDs and commit root hashes. Helper function setupACPCommitStore initializes an in-memory commit multistore with ACP and capability keeper infrastructure using a fixed secp256k1 key for deterministic account creation.

🎯 2 (Simple) | ⏱️ ~10 minutes


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@tests/integration/acp/suite/policy/policy_creation_store_determinism_test.go`:
- Line 78: The capability memory store is created and mounted with the wrong
types: replace the call to storetypes.NewKVStoreKey("capkeepermem") with
storetypes.NewMemoryStoreKey("capkeepermem") (symbol: capabilityMemStoreKey) and
when mounting the store (where StoreTypeDB and db are currently used) change to
storetypes.StoreTypeMemory and nil so the memory store uses the correct
in-memory mount; update the mount call that references capKeeperMem/key to use
StoreTypeMemory,nil accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c9092ee8-8ae1-4b16-b5ea-67bb6e384190

📥 Commits

Reviewing files that changed from the base of the PR and between d8986dd and 6bc0502.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • go.mod
  • tests/integration/acp/suite/policy/policy_creation_store_determinism_test.go
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test
🔇 Additional comments (2)
tests/integration/acp/suite/policy/policy_creation_store_determinism_test.go (1)

29-71: LGTM!

go.mod (1)

50-51: Dependency versions are valid and resolvable.

The updated pseudo-versions for acp_core and raccoondb point to legitimate commits and resolve without errors. While these are very recent pseudo-versions, they follow proper Go conventions and pass module validation. For additional security assurance, consider running govulncheck as part of pre-merge checks if not already in your CI pipeline.

@Lodek Lodek self-assigned this Jun 10, 2026
@Lodek Lodek requested a review from iverc June 10, 2026 18:45
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