From 5bfa9c13f53f0201516aa8275aff8fa9c3356bd8 Mon Sep 17 00:00:00 2001 From: "h.nejati" Date: Sat, 10 Oct 2026 17:48:49 +0330 Subject: [PATCH 1/4] fix: hide Behave logs for passing scenarios (0.19.1) Drop logging.basicConfig from the scaffold-bdd template, document capture_log + logging_clear_handlers, and make archipy-reviewer flag basicConfig/stderr handlers in features/ as Must fix. Co-Authored-By: Claude Sonnet 5.5 --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .cursor-plugin/marketplace.json | 2 +- .cursor-plugin/plugin.json | 2 +- CHANGELOG.md | 10 ++++++++++ agents/archipy-reviewer.md | 3 +++ rules/testing-bdd-for-apps.mdc | 6 ++++++ skills/scaffold-bdd/SKILL.md | 15 +++++++++++++++ skills/scaffold-bdd/reference/environment.py | 2 +- 9 files changed, 39 insertions(+), 5 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index baffc37..4885bf0 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -8,7 +8,7 @@ "name": "archipy", "source": ".", "description": "Cursor and Claude Code plugin: rules, skills, agents, and hooks for building apps with ArchiPy", - "version": "0.19.0" + "version": "0.19.1" } ] } diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 836a0ca..c328c27 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "archipy", - "version": "0.19.0", + "version": "0.19.1", "description": "Cursor and Claude Code plugin: rules, skills, agents, and hooks for building apps with ArchiPy", "author": { "name": "SyntaxArc" diff --git a/.cursor-plugin/marketplace.json b/.cursor-plugin/marketplace.json index baffc37..4885bf0 100644 --- a/.cursor-plugin/marketplace.json +++ b/.cursor-plugin/marketplace.json @@ -8,7 +8,7 @@ "name": "archipy", "source": ".", "description": "Cursor and Claude Code plugin: rules, skills, agents, and hooks for building apps with ArchiPy", - "version": "0.19.0" + "version": "0.19.1" } ] } diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json index 3434ab2..bb7a4dd 100644 --- a/.cursor-plugin/plugin.json +++ b/.cursor-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "archipy", - "version": "0.19.0", + "version": "0.19.1", "description": "Cursor and Claude Code plugin: rules, skills, agents, and hooks for building apps with ArchiPy", "author": { "name": "SyntaxArc" diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c2016d..914497c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.19.1] - 2026-10-10 + +### Fixed + +- `scaffold-bdd` template `environment.py` no longer calls `logging.basicConfig`, which bypassed Behave's log capture + and printed warnings/errors for passing scenarios; the skill and `testing-bdd-for-apps.mdc` now set + `capture_log` + `logging_clear_handlers` under `[tool.behave]` +- `archipy-reviewer` flags `logging.basicConfig` / stderr handlers in `features/` as **Must fix**, and missing log-capture + settings in `[tool.behave]` as **Should fix** + ## [0.19.0] - 2026-10-04 ### Added diff --git a/agents/archipy-reviewer.md b/agents/archipy-reviewer.md index 4a275c8..5bf8a1b 100644 --- a/agents/archipy-reviewer.md +++ b/agents/archipy-reviewer.md @@ -140,6 +140,9 @@ makes it worse. - Infrastructure the app owns (databases, caches, queues, Temporal, object storage) runs in testcontainers via `@needs-*` tags; mocking it is a finding. Only third-party APIs with no container may be faked at the adapter port. - Containers start before the app is built and are not restarted per feature; `reset_state()` isolates scenarios. +- `logging.basicConfig(...)` or a stderr `StreamHandler` in `features/` (e.g. `environment.py` `before_all`) is a + **Must fix**: it bypasses Behave's log capture, so warnings/errors print for passing scenarios. Also flag a + `[tool.behave]` in `pyproject.toml` missing `capture_log = true` / `logging_clear_handlers = true` as a **Should fix**. **DTO field types** (`models/dtos/`, changed lines only) diff --git a/rules/testing-bdd-for-apps.mdc b/rules/testing-bdd-for-apps.mdc index 645b5cd..eab2145 100644 --- a/rules/testing-bdd-for-apps.mdc +++ b/rules/testing-bdd-for-apps.mdc @@ -135,6 +135,12 @@ The only allowed substitute is at the adapter port: override that one adapter pr fake that implements the same port (or run a stub HTTP server in a generic `DockerContainer`). Everything the app owns — databases, caches, queues, Temporal, object storage, identity — runs in a real container. +## Log Output + +Passing scenarios print no logs. Set `capture_log = true` and `logging_clear_handlers = true` under `[tool.behave]` in +`pyproject.toml`, and never call `logging.basicConfig` or attach a stderr handler in `features/` (it bypasses Behave's +capture). Captured logs appear only for failed scenarios. + ## Async Steps Behave 1.3.3 supports native `async def` steps. Await async APIs directly; never call `asyncio.run()` inside a step. diff --git a/skills/scaffold-bdd/SKILL.md b/skills/scaffold-bdd/SKILL.md index 8c5e00a..1cf90b4 100644 --- a/skills/scaffold-bdd/SKILL.md +++ b/skills/scaffold-bdd/SKILL.md @@ -71,6 +71,20 @@ Fill every `ADAPT` hook; import app modules inside the hooks, never at module to Return `None` from a hook the app does not need. Set `from configs.app_config import AppConfig` in `environment.py` to the app's config class. +### Log capture (`pyproject.toml`) + +Merge into `[tool.behave]` (keep existing keys) so logs print only for failed scenarios: + +```toml +[tool.behave] +capture = true +capture_log = true +logging_clear_handlers = true +``` + +Never call `logging.basicConfig` or add a stderr `StreamHandler` in `features/`: it bypasses Behave's capture and prints +warnings/errors for passing scenarios. Remove one if the app already has it. + ### Containers (`features/test_containers.py`) The template registers Postgres, MySQL, Redis, Kafka, Temporal, MinIO, Elasticsearch, Keycloak, Vault, and ScyllaDB @@ -89,6 +103,7 @@ Pin images in `.env.test` when the app needs versions other than the defaults in ## Do not - Behave only (not pytest) as primary style. +- No `logging.basicConfig` / stderr handlers in `features/`; rely on Behave log capture. - Steps never call repositories, adapters, or DI providers directly. Logics are reachable only in process/task projects (no services layer), through `process_logic`; apps with a services layer go through REST/gRPC for every scenario. - Never create the test app without `AppUtils`, and never use `grpc_testing` or direct servicer calls. diff --git a/skills/scaffold-bdd/reference/environment.py b/skills/scaffold-bdd/reference/environment.py index 2674ddb..8a92903 100644 --- a/skills/scaffold-bdd/reference/environment.py +++ b/skills/scaffold-bdd/reference/environment.py @@ -51,7 +51,7 @@ def _needed_containers(context: Context) -> set[str]: def before_all(context: Context) -> None: - logging.basicConfig(level=logging.INFO) + # No logging.basicConfig: its stderr handler bypasses Behave's log capture and prints logs for passing scenarios. context.logger = logging.getLogger("behave.tests") context.scenario_context_pool = ScenarioContextPoolManager() # Start every tagged container before the app exists: engines and clients bind to endpoints at construction, From 753f586bcaff2eb75691288365cf7174f03a8517 Mon Sep 17 00:00:00 2001 From: "h.nejati" Date: Sat, 10 Oct 2026 17:51:37 +0330 Subject: [PATCH 2/4] ci: retry transient GitHub 5xx in link check Co-Authored-By: Claude Sonnet 5.5 --- lychee.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lychee.toml b/lychee.toml index b602972..ba72c9c 100644 --- a/lychee.toml +++ b/lychee.toml @@ -3,3 +3,7 @@ include_mail = false # Treat GitHub API rate-limit as soft-OK so CI is not flaky unauthenticated. accept = ["200..=299", "429"] + +# GitHub intermittently answers 5xx for repo pages; retry instead of failing on the first transient error. +max_retries = 5 +retry_wait_time = 10 From 74af3b9c07f48269d0fb930e873cd487035b211c Mon Sep 17 00:00:00 2001 From: "h.nejati" Date: Sat, 10 Oct 2026 17:56:46 +0330 Subject: [PATCH 3/4] ci: authenticate link check against GitHub Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb63d12..dea3bc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,3 +48,6 @@ jobs: agents rules fail: true + env: + # Authenticated GitHub requests avoid 503s from unauthenticated runner traffic. + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From cb6beace154fbb0b0dc2026c4a8d9f0815d83f8e Mon Sep 17 00:00:00 2001 From: "h.nejati" Date: Sat, 10 Oct 2026 17:58:10 +0330 Subject: [PATCH 4/4] docs: link ArchiPy contributing guide on the docs site The GitHub blob page returns 503 to the CI link check; the docs page is stable. Co-Authored-By: Claude Sonnet 5.5 --- CONTRIBUTING.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c3ce131..78f5a72 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ Consumer plugin for apps that depend on PyPI [`archipy`](https://pypi.org/projec maintaining the ArchiPy library itself. For ArchiPy core changes, use the -[ArchiPy CONTRIBUTING](https://github.com/SyntaxArc/ArchiPy/blob/master/CONTRIBUTING.md) guide. +[ArchiPy CONTRIBUTING](https://syntaxarc.github.io/ArchiPy/community/contributing/) guide. ## Local setup diff --git a/README.md b/README.md index acb9afc..cf7a1aa 100644 --- a/README.md +++ b/README.md @@ -417,5 +417,5 @@ See [CHANGELOG.md](CHANGELOG.md). - [ArchiPy library](https://github.com/SyntaxArc/ArchiPy) — Python package (Apache-2.0) - [ArchiPy documentation](https://syntaxarc.github.io/ArchiPy/) - Contributing to **ArchiPy core** → use - the [ArchiPy CONTRIBUTING](https://github.com/SyntaxArc/ArchiPy/blob/master/CONTRIBUTING.md) guide + the [ArchiPy CONTRIBUTING](https://syntaxarc.github.io/ArchiPy/community/contributing/) guide - Contributing to **this plugin** → [CONTRIBUTING.md](CONTRIBUTING.md)