Skip to content

feat(driver): serve compact rule metadata in the lint result - #436

Open
e54-bot wants to merge 2 commits into
mainfrom
wright-431-lint-rule-metadata
Open

e54-bot wants to merge 2 commits into
mainfrom
wright-431-lint-rule-metadata

Conversation

@e54-bot

@e54-bot e54-bot commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements option C from #431: lint no longer inlines the full lintRules response.

  • wright lint --format json and the agent {"op":"lint"} result now carry rules as a compact [{"id", "effectiveSeverity"}] list — enough to interpret a finding's code and severity. Summary, rationale, documentation, known limits, evidence, and tags are served once by lintRules, which remains the authoritative full-metadata surface.
  • wright-agent/v1 schema: LintResult.rules items move from LintRule to a new LintRuleSummary definition; LintRulesResult keeps LintRule.
  • docs/cli/machine-contract.md gains the wright-result/v1 evolution policy the issue asked for (same additive-only rule as wright-agent/v1), with this reduction recorded as the approved exception ahead of the 1.0 freeze (Roadmap to v1.0: stable Workshop tooling platform #134).
  • docs/cli/lint.md, docs/cli/commands.md, docs/agent-contract.md, and SPEC-99 updated to match the shipped shape.

Measurement (issue fixture overpy-pixelart.ws, zero findings)

Field Before After
result.rules 7455 B (78%) 368 B
envelope total 9586 B 1912 B

Contract note

This is the owner-approved exception named by #431: a field reduction inside wright-result/v1 and the lint agent operation, deliberately made before the envelope freezes at 1.0 rather than via a wright-result/v2.

Test plan

  • cargo fmt --all -- --check, git diff --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --workspace --all-targets --all-features — all green, including agent_v1_schema_covers_every_advertised_request_and_response (schema-validates live lint/lintRules results)
  • wright lint --format json on tests/fixtures/workshop/real-world/overpy-pixelart.ws — rules block 7455→368 B, findings unchanged
  • New assertions pin the boundary: lint rules carry no prose fields; lintRules still serves summary et al.; --disable-rule still reported via config

Closes #431

Generated with Devin

Teakowa and others added 2 commits September 29, 2026 18:12
wright lint and the agent lint operation inlined the full lintRules response — roughly 7.5 KB of static rule prose on every call, 78% of a clean result — while lintRules already serves the same metadata on demand. The lint result now keeps only each rule's id and effectiveSeverity, enough to interpret a finding's code and severity; summary, rationale, documentation, known limits, evidence, and tags stay exclusive to lintRules.

This is a recorded exception to wright-result/v1, decided ahead of the 1.0 freeze; machine-contract.md now documents the envelope's evolution policy alongside the wright-agent/v1 rule.

Closes #431

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Assert compact lint rules carry exactly id and effectiveSeverity, and look up lintRules metadata by id instead of array position.

Refs #431

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Drop the inlined rule metadata from the lint result and define the wright-result/v1 evolution policy

2 participants