Skip to content

fail_closed config field is read nowhere #103

Open

Description

@chiruu12

GuardConfig.fail_closed is defined at sdk/src/unplug/config/guard.py:99 and never read anywhere in the SDK. Errors always fail closed regardless of what it is set to, so the field does nothing.

Three places write or carry it:

  • sdk/src/unplug/guard.py:126, from the deprecated fail_mode argument
  • sdk/src/unplug/config/loader.py:290-291, from [guard] in unplug.toml

The deprecation warning at loader.py:368 reads the raw config dict rather than the model, so it keeps working after the field is gone. That means existing fail_closed = false config files still explain themselves instead of erroring.

Where to start: sdk/src/unplug/config/guard.py. Run uv run pytest tests/unit/config before and after, and check the warning still fires for a config that sets fail_closed = false.

Comment here to claim it and a maintainer will assign it to you.

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

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions