Skip to content

chore(python): enforce repository quality standards - #173

Merged
BjRo merged 2 commits into
mainfrom
chore/172-python-quality-standards
Sep 17, 2026
Merged

BjRo merged 2 commits into
mainfrom
chore/172-python-quality-standards

Conversation

@BjRo

@BjRo BjRo commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Why

Closes #172. The repository had no uniform Python formatting, lint, typing, coverage, package-inventory, or supported-platform CI contract, so new Python packages and untested branches could bypass review safeguards.

What changed

Adds the canonical Python quality specification, package inventory, aggregate local command, staged-file hook, and a Linux/macOS Python 3.10–3.13 workflow with a stable Python quality status. The observability backend now uses locked development dependencies, Ruff, strict mypy, deterministic Hypothesis properties, separate 95% line and branch gates, a fresh runtime-only install check, and measured incremental-I/O/batching performance checks. Production modules and tests were typed and decomposed to meet the complexity contract; the plugin version is 0.5.0, and its attribution guidance now states complete set/clear/auto precedence.

Verification

  • bun run check:python: 104 tests passed; line coverage 98.40%, branch coverage 95.07%; Ruff formatting/lint and strict mypy passed.
  • bun run check:python:inventory: the synthetic unregistered-package guard passed.
  • bun run check:python:performance: matched 200-turn control/candidate inputs; candidate read 219,543 bytes versus 22,123,095 and used 200 exporter requests versus 804, while reporting startup, steady-state, and peak-memory measurements.
  • Fresh runtime-only plugin installation passed with no development tools in the installed dependency tree.
  • Package and all hook tests passed with both bash and /bin/bash.
  • bun run lint, bun run lint:shell, bun run lint:ts, bun run typecheck, bun run check:decisions, and bun run check:docs passed.
  • Skill inspector passed. All eight observability eval cases passed 5/5 live Codex trials at the 80% threshold; the final work-item-precedence assertion was also regraded against a retained valid answer and an identifier-inventing counterexample before its fresh 5/5 run.

Review notes

The broadest review surface is the behavior-preserving decomposition of the observability backend needed for strict typing and the complexity ceiling. CI exercises every declared Python minor on Linux and macOS. The isolated live Langfuse ingestion procedure remains manual release evidence and was not rerun because this branch does not change the external ingestion protocol.

Checklist

  • I have read and followed CONTRIBUTING.md, including the contribution
    licensing terms.
  • I added or updated the applicable invariant before implementation, or
    this change does not affect a capability invariant.
  • I added or updated colocated evals, or this change does not affect skill
    behavior.
  • I confirmed that each changed plugin remains self-contained, or this
    change does not affect plugin content.
  • I ran bun run check:python, or this change does not affect registered
    Python packages or their repository quality infrastructure.

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.

Establish and enforce repository-wide Python quality standards

1 participant