Closed
Copy link
Labels
p2Normal planned workNormal planned work
Description
Problem
Wright has two command pipelines:
- The CLI calls
CompilerSessiondirectly and appliesessential::*per command (crates/wright-cli/src/main.rs). - MCP and
servego throughToolService(crates/wright-driver/src/service/), which applies its own projections inservice/refusal.rs.
Lint exists in both pipelines, and the two verdicts differ:
ToolService::lint(service/mod.rs) setsok: falseandexit: 1when any finding haserrorseverity.CompilerSession::lint(session/semantic.rs) derives the verdict only from envelope diagnostics.
The --fail-on gate also lives in CLI presentation (present.rs, gate). So embedding and MCP callers cannot apply it, and it is a third place that decides exit.
Scope
- Give each operation one implementation and one projection that the CLI,
serve, MCP and embedding all use. - Move the
--fail-ondecision into the driver so that every surface produces the same verdict.
Non-goals
- Changing human-readable CLI wording.
- New commands or flags.
Needs decision
Which lint verdict is the contract, given that the two pipelines disagree on error-severity findings? Record that verdict in docs/agent-contract.md and docs/cli.md before implementation.
Acceptance criteria
- For one input and one lint configuration,
wright lint --format jsonand thelinttool request return the sameokandexit, enforced by a sibling-agreement test. --fail-onis applied in the driver, and the agent contract exposes the equivalent behavior or documents its absence.- No lint verdict logic remains in
wright-cli.
Dependencies
Blocked by the typed-results sub-issue, because the driver-side gate needs typed severities.
Metadata
Metadata
Assignees
Labels
p2Normal planned workNormal planned work
Type
Projects
- StatusShow more project fieldsIn Progress
Activity
e54-bot commentedon Oct 27, 2026
Owner decision (2026-10-27): the lint verdict contract is that any
error-severity finding yieldsok: falseandexit: 1(theToolServicebehavior).--fail-onmoves into the driver.The owner does not trust the correctness of every lint rule (false positives, implementation errors), so the error policy is audited before implementation. Order: typed-results sub-issue (#1001) and the error-severity audit, then this issue. Record the verdict in
docs/agent-contract.mdanddocs/cli.mdwhen implementing.feat: run lint through one driver pipeline and move --fail-on into th…