Skip to content

greenwash 0.4.2

Choose a tag to compare

@0DukePan 0DukePan released this 06 Nov 20:38
· 35 commits to main since this release

Note (2026-11-06): this tag was re-cut minutes after publication. Its first cut failed the Python 3.10 CI matrix on a pre-existing collector timeout bug -- concurrent.futures.TimeoutError is not the builtin before Python 3.11. The fix is in this commit; nothing else about the release changed.

greenwash 0.4.2

A trust report on what a coding agent's "done" actually means -- now with a
strict gate, auditable waivers, and a Codex plugin that runs the same checker.

pipx install greenwash-cli

What's new

Strict mode (--strict, or "mode": "strict"). Report mode's findings plus
one question: who signed off? A finding that only asks for review -- a new
mock, a touched conftest.py, an error path returning a default -- blocks the
turn until it is decided, and ignore_rules is refused rather than honoured:
the run exits 3 and the findings the suppression was hiding stay in the report.
Two lines are drawn deliberately. Evidence is not waivable: a held-out suite
that failed is an observation, not an opinion. And a broken check is not a pass.

Waivers (greenwash waive). The resolution for a finding that is correct is
a decision with a name, a reason and an expiry on it, not a rule switched off. A
waiver binds one rule, one path and one fingerprint -- and the fingerprint
covers the line, so editing the line invalidates it and the report says
stale instead of quietly permitting. Thirty days is the ceiling. A valid
waiver reports as waived with review, never as clean.

The Codex plugin (codex/), strict by default. Manifests in both spellings,
a Stop hook with a POSIX command and a Windows one, its own hook script and
skill. A plugin is opted into once by someone who wants a gate, so the profile
there is the longer table even though the CLI's default is not.

The two hooks now read the CLI's exit code instead of re-deriving the
policy. The Claude hook used to block on any finding in enforce mode --
including a verified one -- because it kept a second copy of the decision table.
Two copies drift. The CLI owns the policy now; the hook owns the wording.

Changed

  • The distribution is greenwash-cli. The PyPI name greenwash belongs to
    an unrelated project, so every install line names the distribution this
    repository actually publishes. The import name and the command stay
    greenwash.
  • npx greenwash is no longer advertised. The npm name is not owned by this
    project either; the shim is real and still tested, but npm/README.md
    documents the local npm pack path instead of a registry install. An install
    command that installs someone else's package is not an install command.

The numbers, including the one that is not a win

  • Detector: 24/24 planted cheats caught, 0 flags on 24 recorded honest
    fixes, static 24/24, behavioral 22/24.
  • Agent behaviour: 252 scored runs across three plugin states, and no
    measurable effect
    -- 7% silent cheats with the plugin off, 8% with it fully
    on, -1.4 points, every arm's interval overlapping every other. All 16 silent
    cheats were mock or swallow shortcuts; nine were one task, and no arm
    caught it. That is the useful part. The pilot's instrument could not label a
    passing cheat when it ran, and its rows carry no detector flags, so the number
    is a label count rather than a measurement of the plugin's effect (see
    docs/what-did-not-work.md sections 1 and 12).
  • False positives on real history: 250 commits and 1,029 file changes in ten
    unrelated repositories produced 109 flags, 104 of them one asking rule on CI
    and dependency configuration. That rule was narrowed to fire only when a
    change can alter what runs; the same history now produces 14 flags -- 12
    asking, 2 false positives -- and all seven remaining flags from that rule are
    real runner changes. Two of the asking flags are the first measurement of
    error-path-default, on one pytest change seen through a commit and its
    merge. The before and after are in
    docs/false-positive-survey.md.

The full write-up, with intervals and limits, is
docs/benchmark-summary.md.
What did not work is
docs/what-did-not-work.md.

Receipts

  • 404 tests, no model and no network required.
  • CI runs the CLI on Ubuntu and Windows, Python 3.10 and 3.12; validates every
    benchmark task in its own language; exercises the GitHub Action and the
    pre-commit hook against a planted faked pass; packs and installs the npm shim
    and checks it forwards exit codes; and runs the clean / block / waive / error
    flows through both stop gates.
  • Two recorded demos drive the real hooks and print captured output:
    python demo/strict_claude.py --terse and python demo/strict_codex.py --terse.

It is still a report, still local, still dependency-free, and still honest about
what it cannot establish.