Skip to content

new(lint): gate writes a per-run ledger; lint-trend.sh reads it - #247

Closed
MendixMau wants to merge 1 commit into
masterfrom
feat/lint-ledger
Closed

MendixMau wants to merge 1 commit into
masterfrom
feat/lint-ledger

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

What changed and why

project-bin/lint-gate.sh now appends one row per rule per run to .claude/loop/lint-ledger.tsv (ts, verdict, rule, count, severity, blind, plus a _run row carrying the total). New project-bin/lint-trend.sh reads it back: per rule, runs it fired in, first/last count with dates, best/worst, blind runs, and up/down/flat. --rule <id> prints one rule's series, --runs the run rows.

Why: lint-baseline.json records the count that was accepted, not what each run saw. So "did the rule we shipped catch anything, and did its count go down once people saw it" had no answer. The lint rollout plan (process/lint-backlog.md, #243) promotes a warning to error only after two clean projects — this is where that evidence comes from.

lint-last.json and the ratchet verdict are unchanged. The ledger write is best-effort like lint-last.json: a write failure never turns a PASS/FAIL into a crash.

Also: lint-trend.sh added to MXTK_PROJECT_BIN; a paragraph in skills/lint-that-actually-runs.md; CHANGELOG line.

Field evidence

Probe only, so far: the gate's own Python section run on a crafted lint result (3 findings across 2 rules, one of them blind via _rule) — --update-baseline then a check run. Ledger got two _run rows and two rows per rule, blind flagged on the blind rule; lint-trend.sh reported the blind rule as 2 BLIND and both as flat. check-portability.sh and check-scripts.sh clean.

A run on a real model (laptop) is still owed before merge: project-bin/lint-gate.sh twice, then project-bin/lint-trend.sh.

Checklist

  • ≤10 files / ≤400 lines (5 files, +155)
  • Test tier: T1 (scratch probe of the parser; no fixture suite run)
  • Instrument rules: producer is the gate itself (mandatory per-module GATE pass); consumer is lint-trend.sh; both layouts resolve via the script's own ROOT; python resolved not assumed (same require_py fallback as the gate)
  • CHANGELOG line under Unreleased, same commit
  • One field run cited (owed: laptop)

🤖 Generated with Claude Code

https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw


Generated by Claude Code

project-bin/lint-gate.sh appends one row per rule per run to
.claude/loop/lint-ledger.tsv (ts, verdict, rule, count, severity, blind,
plus a _run row with the total). New project-bin/lint-trend.sh prints per
rule: runs fired in, first/last count with dates, best/worst, blind runs,
up/down/flat; --rule <id> for one series, --runs for the run rows.

Why: lint-baseline.json records the count that was accepted, not what each
run saw, so "did the rule we shipped catch anything, and did the count go
down" had no answer. The lint rollout plan's "promote after two clean
projects" step needs exactly that.

Probe: the gate's own parser on a crafted lint result (3 findings, one
blind rule) — ledger rows and trend output as expected, lint-last.json and
the ratchet verdict unchanged. check-portability and check-scripts clean.
Field run on a real model still owed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
MendixMau added a commit that referenced this pull request Oct 8, 2026
Squash of integration/2026-10-08, which merges:

- #225 perf(ui-loop): test-stack-up.sh recognises a live mxcli run --local
- #231 fix(sync): sync-project.sh no longer exits 1 silently before its bin/ refresh
- #242 fix(init): local by default, no Dev Container
- #243 docs(lint): process/lint-backlog.md, the lint rollout plan
- #247 new(lint): the lint gate keeps a ledger
- #249 learn(test): skills/e2e-locators-that-lie.md
- #250 learn(skills): unhappy-path-testing.md
- #251 fix(testing-shape): mxcli test --local shares the deploy directory (#230)
- #252 fix(obligations): LOOK staleness reads the newest VALID AT stamp (#155)
- #253 docs(lint): quality-source review, Batch 4 backlog rows and skill additions
- #254 fix(lint): CONV020 works out of the box, page navigation counts as feedback (#229, #245)
- #255 fix(e2e): journey-runner rung 2 runs for a negative-only span claim (#150)
- #256 fix(gates): Stage 6 Surface, source-sufficiency title, ${JOURNEY_DIR} manifest token (#233, #234, #235)

Verified on the branch: tests/run-tests.sh 33/0, tests/test-lint-delivery.sh ALL GREEN, tests/wave2 73/75 (two environmental), render-routing --check, check-scripts, check-portability, leak guard, check-no-private-citations, check-pr-discipline all clean; scaffold smoke run without crashes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
@MendixMau

Copy link
Copy Markdown
Owner Author

Merged into master via integration PR #258 (squash 9dd9be4), on the maintainer's approval. Closing this PR; its branch is part of that squash.


Generated by Claude Code

@MendixMau MendixMau closed this Oct 8, 2026
@MendixMau
MendixMau deleted the feat/lint-ledger branch October 15, 2026 10:45
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.

2 participants