Re-enable commented-out integration test matrix entries in tests.yml #1945 - #1953
Draft
adecaro wants to merge 11 commits into
Draft
Re-enable commented-out integration test matrix entries in tests.yml #1945#1953adecaro wants to merge 11 commits into
adecaro wants to merge 11 commits into
Conversation
adecaro
marked this pull request as draft
July 19, 2026 15:13
adecaro
force-pushed
the
1942-policy-based-identity-tests-are-not-enabled
branch
from
July 26, 2026 18:35
ae4d48b to
f4c10fa
Compare
adecaro
marked this pull request as ready for review
July 27, 2026 11:40
adecaro
marked this pull request as draft
July 27, 2026 12:22
adecaro
force-pushed
the
1942-policy-based-identity-tests-are-not-enabled
branch
from
July 28, 2026 07:00
823dcf0 to
6132b54
Compare
adecaro
added a commit
that referenced
this pull request
Jul 28, 2026
prepareDistributionList unwrapped a policy identity's components unconditionally, while requestSignatures already filtered them through policyCollectIDs. When an OR-policy spend restricts signing to a subset of co-owners via WithPolicySigners, the excluded co-owner still received the assembled transaction even though it never opened a session expecting one, causing RespondRequestRecipientIdentityView to panic with "expected recipient_req, got transaction". This was the root cause of the dlog-fabric-t14/fabricx-dlog-t14 integration test failures confirmed on PR #1953 CI (6/6 spec variants across both drivers and all transports). Extract the unwrap loop into unwrapDistributionIDs and filter policy components through policyCollectIDs, mirroring requestSignatures. Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
The finality view's context was rooted in the P2P stream that delivered the message that created it. That stream can be closed for reasons unrelated to the finality wait (refcount hitting zero, an unrelated read error, session teardown), which cancels the context and surfaces as a false "finality timeout" well before the real deadline. Detach with context.WithoutCancel and rely solely on the explicit timeout. Fixes fabricx-dlog-t2 and fabricx-dlog-t2.1. Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
The wait for issuer/auditor public-params propagation used a 30s timeout with 15s polling (i.e. only 1-2 attempts), too tight for the update to land reliably. Widen to 60s timeout with 5s polling. Fixes fabricx-dlog-t7. Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
MaliciousTransferView reuses the same computed tx_id across two separate CollectEndorsementsView calls, each triggering an independent AddValidationRecord insert on the endorser. The second insert violated the tx_id PRIMARY KEY constraint. Add ON CONFLICT DO NOTHING so a duplicate validation record for an already-seen tx_id is a no-op instead of an error, and add a regression test covering it. Fixes fabricx-dlog-t9. Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
CheckCoOwnedBalanceForTMSID performed a single synchronous check, unlike its sibling CheckBalanceForTMSID which polls with gomega.Eventually. After a multisig lock finalizes, co-owners' own view of their new co-ownership can lag slightly behind, causing a flaky one-shot check. Wrap it in the same eventual polling pattern. Fixes fabricx-dlog-t12. Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
extractIssueOutputs/extractTransferOutputs treated every recipient in a multi-recipient owner identity as an independent output owner and fanned out one Output per co-owner. For a composite identity (multisig/ policy) the recipients are co-owners of a single output, not separate owners each entitled to the full quantity. Emit one Output for the composite owner instead, after validating each co-owner's recipient metadata. Fixes dlog-fabric-t14 and fabricx-dlog-t14. Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
extractIssueOutputs/extractTransferOutputs now emit a single output owned by the composite multisig/policy identity when a token has multiple recipients, but AcceptCashView still checked outputs.ByRecipient(id) against each responder's individual identity. The strict equality check never matched the composite owner, so the existence assertion panicked on bob's/charlie's node and the per-type balance check was silently skipped, breaking dlog-fabric-t12 (EndToEnd Multisig) across all three P2P transports. Add OutputStream.ByRecipientOrMember, mirroring the membership check already used in AssertTokens, and use it in AcceptCashView so a responder recognizes outputs owned by a composite identity she is a member of. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
…checks policyCollectIDs only matched WithPolicySigners entries by exact identity bytes, but dlog/zkatdlog owner wallets record a pseudonymous component identity in the PolicyIdentity that differs from the raw network identity callers pass to WithPolicySigners. This left collectIDs empty for OR-policy spends, so the policy signature verified as unsatisfied even though the intended signer had signed. Fall back to SigService().IsMe when the exact match fails, mirroring the membership check already used for composite owners elsewhere. CheckPolicyOwnedBalanceForTMSID read the balance once with no retry, unlike its sibling Eventually-wrapped balance checks in the same file, making it racy against eventual consistency after a policy spend commits. Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
prepareDistributionList unwrapped a policy identity's components unconditionally, while requestSignatures already filtered them through policyCollectIDs. When an OR-policy spend restricts signing to a subset of co-owners via WithPolicySigners, the excluded co-owner still received the assembled transaction even though it never opened a session expecting one, causing RespondRequestRecipientIdentityView to panic with "expected recipient_req, got transaction". This was the root cause of the dlog-fabric-t14/fabricx-dlog-t14 integration test failures confirmed on PR #1953 CI (6/6 spec variants across both drivers and all transports). Extract the unwrap loop into unwrapDistributionIDs and filter policy components through policyCollectIDs, mirroring requestSignatures. Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
…Update TestPublicParamsUpdate updates public parameters and waited for the issuer/auditor nodes to observe them, but never waited for FSC endorser nodes (present under FSCBasedEndorsement, e.g. fabricx). The endorser validates auditor signatures against its own locally cached public params, so a subsequent issue with the new auditor/issuer could race ahead of the endorser's update and fail with "auditor [...] is not in auditors". Mirrors the existing wait pattern already used in TestAll. Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
adecaro
force-pushed
the
1942-policy-based-identity-tests-are-not-enabled
branch
from
July 29, 2026 06:35
88b7be0 to
a1f5301
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-enables the commented-out
itestmatrix entries in.github/workflows/tests.yml(dlog-fabric-t14,fabricx-dlog-t2,fabricx-dlog-t2.1,fabricx-dlog-t7,fabricx-dlog-t9,fabricx-dlog-t12,fabricx-dlog-t14) and fixes the underlying bugs that were causing each of them to fail, rather than re-disabling them:context.WithoutCancel.MaliciousTransferViewdeliberately reuses the same computedtx_idacross two separateCollectEndorsementsViewcalls, each independently inserting a validation record on the endorser side. The second insert violated thetx_idprimary key. AddedON CONFLICT DO NOTHINGso a duplicate validation record for an already-seentx_idis a no-op, plus a regression test.CheckCoOwnedBalanceForTMSIDdid a single synchronous balance check, unlike its siblingCheckBalanceForTMSIDwhich polls withgomega.Eventually. After a multisig lock finalizes, a co-owner's own view of the new co-ownership can lag slightly, causing a flaky one-shot check. Wrapped it in the same eventual-polling pattern.extractIssueOutputs/extractTransferOutputstreated every recipient of a multi-recipient owner identity (e.g. multisig/policy) as an independent output owner and fanned out oneOutputper co-owner, each showing the full quantity. For a composite identity, the recipients are co-owners of a single output. Now emits oneOutputfor the composite owner after validating each co-owner's recipient metadata.Fixes #1945
Test plan
make checksmake lint-auto-fixgo test ./token/...EDuplicateValidationRecord(sqlite + memory drivers),TestAWAddValidationRecordEndorser(sqlite + postgres)ci/scripts/get-pr-failed-logs.sh), diagnosed one by one