Skip to content

v0.1.3 — lint confidence honesty + approvals/ privacy default#3

Merged
mbachaud merged 1 commit into
masterfrom
fix/v0.1.3-lint-approvals
May 11, 2026
Merged

v0.1.3 — lint confidence honesty + approvals/ privacy default#3
mbachaud merged 1 commit into
masterfrom
fix/v0.1.3-lint-approvals

Conversation

@mbachaud
Copy link
Copy Markdown
Owner

Summary

Two dogfood findings shipped together.

Drift: honest lint confidence

Surfaced when Max ran /mek-drift init on helix-context and noticed lint_score reported confidence 1.0 while other dims correctly reported 0.0 for "didn't measure." Root cause: score_lint returned (0.99, 1.0) whenever ruff couldn't be launched, fabricating a high-confidence score from a regex-match fallthrough. Plus the invocation was bare "ruff" not sys.executable -m ruff — same PATH-resolution issue I fixed for the other scorers in v0.1.2.

Fix: return (0.0, 0.0) unmeasured sentinel when ruff didn't produce "All checks passed" or a "Found N error" line. sys.executable -m ruff for consistency. 4 new unit tests verify all the discriminator paths.

Compliance: approvals/ privacy default

HITL approval files frequently contain names, infrastructure details, and rationale you don't want in public git history — especially with repo_visibility_flip now flagged as risky.

  • /mek-init now drops compliance/.gitignore that ignores approvals/ by default. Opt specific (redacted) approvals into tracking via !approvals/<file> negations.
  • /mek-compliance-audit advisory warns on tracked approvals; --strict fails the audit.
  • docs/compliance.md documents static-block (mek.toml > [compliance.gates] > repo_visibility_flip = "block") and conditional-block (project-local hook) hardening patterns.

Bonus

  • .markdownlint.json with MD024 siblings_only=true so Keep-a-Changelog's repeated ### Added / ### Fixed headings stop firing lint warnings on every release.
  • docs/compliance.md updated to list all 6 risky-op categories (was still listing 5 — drift since v0.1.2 added repo_visibility_flip).
  • .mek/drift-baseline.json re-seeded with the corrected lint scorer behavior.

Local verification

  • pip install -e ".[dev]"
  • pytest: 97/97 passing (5 new since v0.1.2)
  • ruff: clean
  • bandit (medium+): clean

Test plan

  • Local sweep
  • CI green on ubuntu-latest × py3.11
  • CI green on ubuntu-latest × py3.12
  • CI green on windows-latest × py3.11
  • CI green on windows-latest × py3.12

🤖 Generated with Claude Code

…vacy default (v0.1.3)

drift:
- score_lint: switch to sys.executable -m ruff (PATH-resolution consistency
  with the other v0.1.2 scorers). Return (0.0, 0.0) unmeasured sentinel
  when ruff cannot be launched or its output is unparseable, instead of
  fabricating a 0.99/1.0 score.
- 4 new unit tests for the lint sentinel behavior.
- Re-seeded .mek/drift-baseline.json with the corrected lint score.

compliance:
- Scaffold compliance/.gitignore that ignores approvals/ by default —
  HITL records frequently contain names + infra details.
- /mek-compliance-audit now surfaces tracked files under approvals/ as a
  privacy warning; --strict fails the audit on any tracked approval.
- docs/compliance.md documents both the static-block (mek.toml gate=block)
  and conditional-block (project-local hook) hardening patterns.
- Updated docs/compliance.md to enumerate all 6 risky-op categories
  (was still listing 5 — drift since v0.1.2's repo_visibility_flip add).
- New integration test verifies the scaffold ships the .gitignore.

build:
- .markdownlint.json with MD024 siblings_only=true so Keep-a-Changelog
  '### Added' / '### Fixed' repetition across version sections stops
  firing lint warnings on every release.

All findings sourced from dogfood (lint asymmetry surfaced by Max
running /mek-drift init on helix-context; approvals privacy concern
flagged after the compliance subagent's verification pass).
@mbachaud mbachaud merged commit e5857fd into master May 11, 2026
4 checks passed
@mbachaud mbachaud deleted the fix/v0.1.3-lint-approvals branch May 11, 2026 17:00
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.

1 participant