Skip to content

Conversation

@kentbull
Copy link
Contributor

@kentbull kentbull commented Jan 9, 2026

This commit contains one big thing and a few small things, with heavy use of Claude Opus 4.5:

Big thing

  • Core multisig delegation escrow fix in eventing.py: added type guard if serder.ilk in (Ilks.dip, Ilks.drt) to ensure interaction events are not sent for approval and only dip and drt events are.
    • Tests for this:
      • tests/app/test_grouping.py - Updated with test_multisig_delegate() which covers the full end-to-end workflow:
      • tests/app/app_helpers.py - Contains:
        • EscrowDoer - Fast escrow processing for tests
        • openWit() / openCtrlWited() - Context managers for witness and controller setup
        • HabHelpers - OOBI resolution, witness receipts, and delegation seals
        • MultisigInceptLeader / MultisigInceptFollower - DoDoers for multisig inception coordination
        • MultisigDelegationApprover - DoDoer for delegation approval workflow
        • KeystateQueryDoer - Keystate discovery for anchor completion

The test is the majority of the PR as the fix was relatively small, just the type guard. This test is a new kind of test for the KERIpy codebase, one that operates at the level of Doers rather than using the internals of Parser, event handlers like Kevery, Tevery, and escrow processing. It uses the code similar to how the KLI does.

The multisig delegation test includes:

  • one witness to use to transmit messages back and forth
  • Delegator multisig formation
  • Delegate participants setup
  • OOBI exchanges
  • Delegation approval by both delegator participants
  • Keystate queries to discover the approval anchor
  • OOBI resolution of the delegate by delegator
  • Final verification assertions

Medium things

  • In core/eventing.py this adds a delegation seal check prior to escrowing a dip or drt to cover the case of a delegator OOBIing with the delegate AFTER approving the delegate's dip or drt.
    • What was happening was that even AFTER approving the delegation the dip was ending up back on the .delegables escrow following an OOBI resolution of the delegate by the delegator even though the delegator had already approved the dip. Looking up the seal again here is necessary to avoid re-escrowing an already approved dip or drt event.
    • This prepares the codebase for the delegatee KEL sharing mechanism Phil mentions in Have to share delegated AID with delegator after completion #307.
  • kli multisig join fix with if "di" in ked else None to if "di" in oicp.ked else None

Small Things

  • pass cf through in habbing.py so that temp=True works in tests.
  • delegables.rem() fix in delegate/confirm.py

- Add tests/app/app_helpers.py with context managers and orchestration Doers:
  - EscrowDoer for fast escrow processing in tests
  - openWit/openCtrlWited context managers for witness and controller setup
  - HabHelpers for OOBI resolution, witness receipts, and delegation seals
  - MultisigInceptLeader/Follower DoDoers for multisig inception coordination
  - MultisigDelegationApprover DoDoer for delegation approval workflow
  - KeystateQueryDoer for keystate discovery
- Add tests/app/cli/cli_helpers.py with console and prompt_toolkit Doers
- Add test_multisig_delegate() end-to-end test covering full multisig delegation workflow
resolveOobi only waits for the HTTP response and parsing to start.
For delegated identifiers, the KEL goes through escrow processing
before appearing in kevers. Added loop to wait for processing.
… limitation

The delegator can't resolve the delegate's OOBI after delegation because
the dip event goes into delegables escrow again (without seal attached).
This is a known limitation in eventing.py line 2400-2413 where events are
escrowed BEFORE checking if the delegation anchor exists.

The core delegation workflow test passes - delegate successfully completes
and delegator has the anchor event.
@kentbull kentbull marked this pull request as draft January 15, 2026 15:34
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