Skip to content

fix: include lint findings in compile and check diagnostics - #1035

Open
e54-bot wants to merge 2 commits into
mainfrom
impl/1032-a
Open

e54-bot wants to merge 2 commits into
mainfrom
impl/1032-a

Conversation

@e54-bot

@e54-bot e54-bot commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

compile and check now include enabled lint findings in their normal diagnostics and severity counts. A script with nested array binding therefore reports the same warning as lint; raising that rule to error exits 1 and prevents compile output from being written.

Both commands reuse the lint registry and accept the same project configuration, local rule files, disablement, and severity overrides as lint. JSON retains the diagnostic shape, including source locations and evidence class. CLI documentation and regressions cover these contracts. The existing nested-binding rule and OPY lowering are unchanged.

Verification:

  • cargo fmt --all -- --check: passed.

  • cargo clippy --workspace --all-targets --all-features -- -D warnings: passed.

  • cargo test --workspace --all-targets --all-features </dev/null: running; the earlier run identified expected presentation changes, and the affected snapshots and terminal expectation have been updated and reviewed.

  • git diff --check and the repository size guard: passed.

  • Acceptance regressions compare compile/check with existing lint findings, cover JSON, warning counts, severity overrides, disabled rules, project configuration precedence, unknown-rule refusal, compile destination preservation, and error verdicts before selection.

  • python3 /Users/teakowa/Repos/wrightkit/.task-scratch/orch/scratch-1032/verify-acceptance.py: passed. Runs check/lint/analyze/inspect/compile on the issue's minimized OPY expression in en-US and zh-CN using installed first-party OPY provider 0.3.27, and on the existing Bastion prophet reproducer and Bastion Workshop fixture. Compares codes, severities, evidence, messages, and source locations against lint --all; verifies error exits, unchanged output with lint disabled, and local YAML rule-file handling.

  • CI-pinned LPP mock-provider integration: all 17 normally ignored tests passed after building reference commit 416b293e26e6fb2d29061608a493a7aecd2ce14f in scratch. Ran LPP_MOCK_PROVIDER=<scratch>/lpp-reference/target/debug/lpp-mock-provider cargo test --locked -p wright-lpp -p wright-driver --test mock_provider --test lpp --test provider_edit -- --ignored.

  • scripts/test-cli-github-actions.sh "$PWD/target/debug/wright" with GitHub Actions and summary-file environment: passed.

Ablation: compile/check call the existing registry evaluator directly; removed the unnecessary full semantic-index construction. Reused the policy parser, diagnostic envelope, selection and exit handling. Moved the compile CLI implementation and its existing prompt test into a module to satisfy the no-growth guard on main.rs.

Unverified: no Overwatch client import or full current Bastion source-project build was performed. Verification uses the issue's OPY expression and the repository's pinned Workshop inputs; it does not establish a new client importability guarantee. The final workspace test run and remote CI are pending at PR creation. No UI files changed, so UI gates do not apply.

Fixes #1032

Run the configured lint registry for compile and check, preserving finding
codes, severities, source locations, evidence classes, and exit behavior.
Reuse the lint policy flags and prevent compile writes for error findings.

Document the diagnostic contract and cover default warnings, JSON findings,
project policy, CLI overrides, and errors before output or selection.

Fixes #1032
@e54-bot
e54-bot requested a review from Teakowa as a code owner October 30, 2026 20:49
@e54-bot

e54-bot commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed both findings from the first review in commit 5059100, pushed to impl/1032-a.

  1. The agent compile regression now searches the diagnostic array for code output-exists, while retaining the exit, output content/hash, and forced-overwrite checks. Diagnostic order remains the existing accumulation order: lint findings can precede an error discovered while writing output. The test lives in tests/service/compile.rs because the enforced size guard forbids growth of the existing oversized service.rs; no other tests were moved.
  2. Public CLI dogfood now requests complete output with check --all and lint --all, and compares check diagnostics with lint diagnostics plus result.findings by code, severity, evidence, and source location. Diagnostic spans are projected to the path/line/column exposed by lint's public location field; that CLI shape does not expose span ends. Exit/ok equality and existing failure/inspection assertions remain enforced.

Verification:

  • The exact workflow dogfood shell block passes on all five fixtures (rework, ai-pve, bastion, defend, illari) from CI's workshop-rs pin f1f3c58f790e9aede9300ca6421698f2503f5f62.
  • Comparison mutation checks reject changed codes, severities, evidence, locations, and missing findings.
  • All 42 driver service tests pass, including the moved compile regression.
  • cargo fmt --all -- --check and cargo clippy --workspace --all-targets --all-features -- -D warnings: passed.
  • cargo test --workspace --all-targets --all-features </dev/null: passed to completion (exit 0). Tests marked ignored by the repository retain their normal status.
  • actionlint .github/workflows/ci.yml, CI job-coupling checks (including 8 script tests), size guard, and git diff --check: passed.

No findings were deferred or found to contradict the approved issue/architecture. There are no GitHub review threads to resolve. The workflow change remains subject to CODEOWNERS review. Remote CI is running on the pushed commit.

PR #1035 is ready for follow-up review.

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.

Detect nested Current Array Element scope (any([...]) inside a filter lambda) that the Workshop client rejects

2 participants