Skip to content

Adapt debugger CLI/session for covenant declarations #64

@michaelsutton

Description

@michaelsutton

This follows #63. Once the debugger can parse and lower State / State[] arguments correctly, it still needs covenant-declaration-specific call construction and presentation.

Debugger support for covenant declarations is currently incomplete.

Covenant declarations are source-level functions, but the debugger currently operates only on the generated ABI entrypoints. In practice this means it does not understand covenant declarations as declarations; it only sees their lowered wrapper functions.

That leaves two gaps.

  1. Call construction is not covenant-aware
    The debugger CLI builds calls through CompiledContract::build_sig_script using a selected ABI function name. It does not route covenant declaration calls through build_sig_script_for_covenant_decl, so it does not model:
  • auth vs cov generated entrypoints
  • leader vs delegate selection for cov declarations
  1. Debugger presentation is not covenant-aware
    Even when execution works, the debugger surface is still expressed in terms of generated wrapper functions and generated locals. That is not the source model the user wrote. For covenant declarations, users should be able to reason in terms of the declaration and its policy function, not the lowered wrapper plumbing.

Requested behavior:

  • allow selecting a covenant declaration by its source-level name
  • for binding = cov, allow choosing leader vs delegate mode
  • build covenant calls through build_sig_script_for_covenant_decl
  • present covenant debugging in source-level terms as much as possible, rather than exposing generated wrapper names and temporaries as the primary interface

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions