./iw ./test is green on code the pre-push hook rejects #466
Labels
No labels
agent-ready
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-human
needs-input
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli#466
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found triaging IW-437.
.iw/commands/test.scala runs core.test, dashboard.test and the BATS suites. It never runs scalafix. The pre-push hook does run scalafix over core/, tests included, and .scalafix.conf enables DisableSyntax with noVars.
So both ./mill core.test and ./iw ./test can be fully green on code that cannot be pushed. The phase workflow's verification step calls only those two, which means the failure surfaces at the push - the point where the least context is available and the output is worst (see #465).
OBSERVED. IW-437 phase 1 reached the push gate with two
var committedBeforeMergedeclarations in PhasePrHarnessTest.scala and a private var in FakeCommandEnv.scala. Every test command was green. The push was blocked.PROPOSED FIX. Add scalafix to the ./test command so the pre-PR check matches the push gate and green means pushable.
NOTE. This is deliberately a project-level fix, not a change to any shared review guide. Lint configuration differs between projects, and
varis not forbidden here in principle - it can be used where it is safe and convenient, either by rewriting or by annotating the use so scalafix accepts it. A shared guide should not carry this project's rules.Fixed in PR #501 (merge
d1eba9c4)../iw ./test lintruns the exact scalafix command the pre-push hook runs, and is part of the default all-run. It hard-fails when scalafix is absent rather than skipping, because a skip re-creates the false green this issue is about. Green now means pushable.