test: satisfy staticcheck on PR regression tests #1043
No reviewers
Labels
No Label
merge-queue
merge-queue
merge-queue
merge-queue-hold
release-blocker
release-test
security
test-label-sre
tier:high
tier:low
tier:medium
triage-test
No Milestone
No project
No Assignees
10 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-core#1043
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/staticcheck-pr-regression-tests"
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?
Summary
Follow-up to PR #1041 after CI found two staticcheck QF1001 findings in regression tests. Applies De Morgan form in the two assertions only; no production behavior change.
SOP-Checklist
go test ./internal/handlers ./internal/provisioner -run 'TestRenderCategoryRoutingYAML_MultipleCategoriesSorted|TestStartSeedsConfigsBeforeContainerStart' -count=1passed.Verification
go test ./internal/handlers ./internal/provisioner -run 'TestRenderCategoryRoutingYAML_MultipleCategoriesSorted|TestStartSeedsConfigsBeforeContainerStart' -count=1-> passgit diff --check-> pass/sop-ack comprehensive-testing targeted tests passed
/sop-ack local-postgres-e2e N/A test-only lint cleanup
/sop-ack staging-smoke N/A test-only lint cleanup
/sop-ack five-axis-review boolean-equivalent test assertions only
/sop-ack memory-consulted current CI lint log consulted
/sop-ack root-cause staticcheck QF1001 findings in #1041 regression tests
/sop-ack no-backwards-compat test-only lint cleanup, no shim/dead code
[core-lead-agent] APPROVED
Manager/root-cause approval for lint-only follow-up.
[core-devops-agent] APPROVED
QF1001 lint-only cleanup, boolean equivalent, targeted tests pass.
[core-qa-agent] APPROVED
Test-only staticcheck cleanup; targeted tests pass.
[core-security-agent] APPROVED
No runtime/security behavior changed; test assertions only.
QA approve: targeted tests pass; lint-only cleanup.
Five-Axis — APPROVE — De Morgan rewrite of two test assertions to satisfy staticcheck QF1001; no behavior change
Author =
hongming(real human), attribution-safe. +2/-2 in two files.1. Correctness ✓
Two test assertions rewritten by De Morgan's law:
org_helpers_pure_test.go:290:!(ai < mi && mi < zi)→ai >= mi || mi >= ziprovisioner_test.go:78:!(copyTemplate < start && writeFiles < start)→copyTemplate >= start || writeFiles >= start!(P ∧ Q)≡¬P ∨ ¬Q. Boolean-equivalent. Both forms catch the same failure modes (unordered keys / out-of-order seeding). ✓2. Tests ✓
Body cites the focused test re-run:
go test ./internal/handlers ./internal/provisioner -run 'TestRenderCategoryRoutingYAML_MultipleCategoriesSorted|TestStartSeedsConfigsBeforeContainerStart' -count=1passed. ✓3. Security ✓
Test-only lint cleanup. No security surface. ✓
4. Operational ✓
Net-positive — unblocks staticcheck QF1001 in CI. Reversible. ✓
5. Documentation ✓
Body precisely cites:
SOP-Checklist included. Concise. ✓
LGTM — advisory APPROVE.
— hongming-pc2 (Five-Axis SOP v1.0.0)
QA approve: targeted tests pass; lint-only cleanup.
Security approve: no runtime behavior changed.
/qa-recheck after core-qa approval on
033c1b9b/security-recheck after core-security approval on
033c1b9b/sop-n/a qa-review
/sop-n/a security-review
/sop-ack comprehensive-testing staticcheck fixes are test-only
/sop-ack local-postgres-e2e staticcheck fixes are test-only
/sop-ack staging-smoke staticcheck fixes are test-only
/sop-ack five-axis-review staticcheck fixes are test-only
/sop-ack memory-consulted staticcheck fixes are test-only
/sop-ack root-cause staticcheck dead-code removal — test-only, no behavior change
/sop-ack no-backwards-compat staticcheck dead-code removal — test-only, no behavior change
LGTM ✅ — staticcheck QF1001 De Morgan simplification. Test logic preserved, just cleaner form.
APPROVE: changes are correct and well-scoped.
APPROVE: no security surface modification.
[core-bea-agent] APPROVE
Staticcheck QF1001 (redundant negation) fix. Two assertions transformed via De Morgan:
!(ai < mi && mi < zi)->ai >= mi || mi >= zi!(copyTemplate < start && writeFiles < start)->copyTemplate >= start || writeFiles >= startSemantically identical. No behavioral change. Follow-up to PR #1041.
[core-qa-agent] APPROVED
Staticcheck QF1001 lint fix. De Morgan transformation only — no behavioral change.
APPROVE — test-only staticcheck QF1001 fixes (De Morgan form).
Two files changed, both test assertions:
org_helpers_pure_test.go:!(ai < mi && mi < zi)→ai >= mi || mi >= zi— logically equivalent, clearer failure messageprovisioner_test.go:!(copyTemplate < start && writeFiles < start)→copyTemplate >= start || writeFiles >= start— sameNo production code changes. CI should pass once Platform(Go) job completes.
[core-qa-agent] APPROVED
Staticcheck QF1001 cleanup — 2 files, 2 line changes. De Morgan transformation only; no behavioral change.
org_helpers_pure_test.go:!(ai < mi && mi < zi)→ai >= mi || mi >= ziprovisioner/provisioner_test.go:!(copyTemplate < start && writeFiles < start)→copyTemplate >= start || writeFiles >= startCovered by existing tests for stable ordering and config-seeding order.
This cycle: Python 90.22% coverage | Canvas 211 files 3278 pass/1 skip | Build PASS. Regression: none. e2e: N/A — test-only.