Skip to content

test(presets): 18 unhandled UserWarnings in composition tests #2363

Description

@mnriem

Problem

Running the full test suite produces 18 identical UserWarning messages:

tests/test_presets.py: 18 warnings
  src/specify_cli/presets.py:1576: UserWarning: Cannot compose command 'speckit.wrap-test': no base layer. Stale command files may remain.
    self._reconcile_composed_commands(cmd_names)

These come from preset composition tests that exercise wrap-mode commands without providing the base-layer preset that wrap composition requires. The warning fires in _reconcile_composed_commands() when resolver.resolve_content() returns None.

Expected behavior

Tests should either:

  1. Provide a base layer so wrap composition succeeds cleanly, or
  2. Assert the warning with pytest.warns(UserWarning, match="no base layer") to document that the missing-base-layer scenario is intentionally tested

Unacknowledged warnings are test noise that can mask real issues.

Location

  • Warning source: src/specify_cli/presets.py line ~787
  • Triggered during: PresetManager._reconcile_composed_commands()resolver.resolve_content(cmd_name, "command") returns None
  • Affected tests: 18 tests in tests/test_presets.py (wrap/composition strategy tests)

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions