Skip to content

feat(contracts): DRY refactoring of availableExpectations versus predefinedExpectations #305

Description

@guzmud

Backstory

The implementation for availableExpectations and predefinedExpectations defined in #304 , mirroring the implementation from OpenAEV-Platform/openaev#5148 and OpenAEV-Platform/openaev#5554, leads to maintaining two lists in each injectors that need to be synchronized (although the content will vary depending on the wanted user-experience).

This goes against the DRY principle and leads to an eventual desynchronisation between the two lists. Merging both variable to create a single availableExpectations list with a predefined flag per Expectation will provide the same feature while reducing the risk of desynchronisation and minimizing the codebase.

Current workaround

Maintain two fields in pyoaev for two lists inside each injectors.

Proposed solution

Add a predefined field to the Expectation object and merge both lists into a single one.

Edit (2026-17-07)

Expectation needs to be updated with two new booleans:

  • expectation_is_predefined
  • expectation_is_multi-selectable

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageNeeds triage from the Filigran product team.solvedResolved (should be linked to the solving PR).technical improvementTechnical refactor or improvement is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions