Skip to content

Extract shared executeWithGuards helper across spark types #18

@UniquePixels

Description

@UniquePixels

Context

Audit ID: ARCH-5

All four spark types follow the same guards / attempt / log pattern with minor signature variations. A shared `executeWithGuards()` helper would reduce maintenance, especially if more spark types are added.

Approach

Design a generic helper that handles guard execution, attempt wrapping, and error logging. Adapt each spark type's `execute()` to use it. Low priority but should be done before adding new spark types.

Files

  • `src/core/sparks/command.ts`
  • `src/core/sparks/component.ts`
  • `src/core/sparks/event.ts`
  • `src/core/sparks/scheduled-event.ts`

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorCode refactoring and simplification

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions