Skip to content

fix(tests): isolate pytest from global config and cover both discover… - #324

Merged
rosspeili merged 1 commit into
ARPAHLS:mainfrom
rosspeili:rosspeili/fix-302-isolate-pytest-config
Sep 1, 2026
Merged

fix(tests): isolate pytest from global config and cover both discover…#324
rosspeili merged 1 commit into
ARPAHLS:mainfrom
rosspeili:rosspeili/fix-302-isolate-pytest-config

Conversation

@rosspeili

Copy link
Copy Markdown
Contributor

Fixes #302.

Local pytest tests/ could fail after normal CLI setup (e.g. skillware mail signature init) when a global config.yaml exists. CI stayed green on a clean home directory; two discovery/loader tests only asserted legacy resolution order.

Changes:

  • Autouse SKILLWARE_CONFIG_DIR isolation in tests/conftest.py
  • Rename legacy-order tests and add configured-mode coverage (project → external → bundled)
  • Document operator-config behavior in docs/TESTING.md and docs/contributing/ai_native_workflow.md

Test/docs only — no runtime or semver behavior change.

Type of Change

  • Bug Fix — incorrect runtime or framework behavior (test isolation)
  • Documentation — docs, README, CONTRIBUTING only

Checklist (all PRs)

  • Linked GitHub issue (Fixes #302)
  • Scope matches the issue — no unrelated refactors
  • python -m black --check . and flake8 pass locally (or CI-equivalent subset)
  • pytest skills/ and pytest tests/ pass locally when relevant (518 passed)
  • CHANGELOG.md updated under [Unreleased] when user-visible behavior changes
  • examples/README.md updated if this PR adds, renames, or removes a runnable script (N/A)
  • Ran pytest tests/test_registry_docs.py when skills, examples index, or agent-loops matrix changed (N/A)

Related Issues

Fixes #302 — supersedes stalled community attempts in #303 and #311.

…y modes

Add autouse SKILLWARE_CONFIG_DIR isolation in tests/conftest.py so local pytest matches CI after operator mail/config init. Rename legacy-order tests and add configured-mode coverage for project -> external -> bundled resolution.

Fixes ARPAHLS#302
@rosspeili
rosspeili merged commit 5216d92 into ARPAHLS:main Sep 1, 2026
6 checks passed
@rosspeili
rosspeili deleted the rosspeili/fix-302-isolate-pytest-config branch September 1, 2026 10:01
mrmasa88 added a commit to 0x-AO-Protocol/skillware that referenced this pull request Sep 1, 2026
Adds the monitoring_kpi_gate row and monitoring category entry to
docs/usage/install_extras.md, fills the local-execute column of the
agent-loops matrix with the demo script, adds the Runnable examples
subsection to the catalog page, and switches the demo to the
bundle-class instantiation used by the catalog snippets. Rebased onto
current main (ARPAHLS#324); the Unreleased changelog keeps every main-side
entry with only the kpi_gate line added. Refs ARPAHLS#317
rosspeili pushed a commit that referenced this pull request Sep 1, 2026
…interface (#318)

* Add the monitoring/kpi_gate skill bundle implementing the issue #317 interface.

The bundle evaluates a metrics snapshot against an operator-maintained policy charter and optional versioned benchmark data, returning error, warning, and insufficient_data findings with fail-closed contract errors from a closed registry. Validation follows the four-stage order frozen in issue #317, uses stdlib checks only (requirements stay empty), and ships the three reference JSON Schemas, demo benchmark data, end-to-end and fail-closed fixtures, 28 offline bundle tests, and the card UI schema fixture. Refs #317

* Document the monitoring/kpi_gate skill across the catalog and registry indexes.

Adds the catalog page with version metadata, the closed error registry, usage examples for all five providers, and an initial skill history row; adds the index row in docs/skills/README.md, the reference-scripts matrix row in docs/usage/agent_loops.md, the CHANGELOG entry under Unreleased, and the generated monitoring_kpi_gate extras line from scripts/sync_extras.py. Refs #317

* Address the review feedback on the monitoring/kpi_gate bundle.

Rewrites the instructions.md opening to the skill-context style used by the
other monitoring skills (registry ID, deterministic contract, limits) instead
of a persona-style opener; exports KpiGateSkill from the package __init__;
adds the offline local-execute demo examples/kpi_gate_demo.py with its CI
smoke row and examples index entry. Repo-wide black and flake8 pass with no
changes outside the bundle. Refs #317

* Address the second review round on the monitoring/kpi_gate bundle.

Adds the monitoring_kpi_gate row and monitoring category entry to
docs/usage/install_extras.md, fills the local-execute column of the
agent-loops matrix with the demo script, adds the Runnable examples
subsection to the catalog page, and switches the demo to the
bundle-class instantiation used by the catalog snippets. Rebased onto
current main (#324); the Unreleased changelog keeps every main-side
entry with only the kpi_gate line added. Refs #317
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Discovery tests fail when global config.yaml exists — isolate pytest from merged config

1 participant