fix(ci): satisfy org helpers staticcheck #1100

Open
hongming wants to merge 2 commits from fix/ci-org-helpers-demorgan into main
Owner

Summary

  • satisfy staticcheck QF1001 in org_helpers_pure_test.go by applying the equivalent De Morgan form
  • unblocks the current molecule-core/main Platform Go lint failure seen in run 44320

Verification

  • cd workspace-server && go test ./internal/handlers -run TestRenderCategoryRoutingYAML_StableOrdering -count=1
  • cd workspace-server && ../.tmp-bin/golangci-lint run --timeout 3m ./internal/handlers/...

SOP-Checklist

  • Comprehensive testing performed: Targeted unit test for the exact test touched plus package-level handlers golangci-lint; this is a one-line test-only boolean simplification.
  • Local-postgres E2E run: N/A: no production code, database path, migration, or runtime behavior changed.
  • Staging-smoke verified or pending: N/A: test-only lint fix; no deployable behavior changed. Normal PR CI is pending.
  • Root-cause not symptom: Root cause is staticcheck QF1001 on if !(ai < mi && mi < zi) in org_helpers_pure_test.go; equivalent De Morgan form satisfies the linter without behavior change.
  • Five-Axis review walked: Correctness equivalent; readability matches linter; architecture/security/performance unchanged.
  • No backwards-compat shim / dead code added: Yes; no shim or dead code added.
  • Memory/saved-feedback consulted: Followed canonical Molecule SOP before change; no specific saved feedback beyond CI red triage applied to this test-only lint fix.
## Summary - satisfy staticcheck QF1001 in `org_helpers_pure_test.go` by applying the equivalent De Morgan form - unblocks the current `molecule-core/main` Platform Go lint failure seen in run 44320 ## Verification - `cd workspace-server && go test ./internal/handlers -run TestRenderCategoryRoutingYAML_StableOrdering -count=1` - `cd workspace-server && ../.tmp-bin/golangci-lint run --timeout 3m ./internal/handlers/...` ## SOP-Checklist - [x] **Comprehensive testing performed**: Targeted unit test for the exact test touched plus package-level handlers golangci-lint; this is a one-line test-only boolean simplification. - [x] **Local-postgres E2E run**: N/A: no production code, database path, migration, or runtime behavior changed. - [x] **Staging-smoke verified or pending**: N/A: test-only lint fix; no deployable behavior changed. Normal PR CI is pending. - [x] **Root-cause not symptom**: Root cause is staticcheck QF1001 on `if !(ai < mi && mi < zi)` in `org_helpers_pure_test.go`; equivalent De Morgan form satisfies the linter without behavior change. - [x] **Five-Axis review walked**: Correctness equivalent; readability matches linter; architecture/security/performance unchanged. - [x] **No backwards-compat shim / dead code added**: Yes; no shim or dead code added. - [x] **Memory/saved-feedback consulted**: Followed canonical Molecule SOP before change; no specific saved feedback beyond CI red triage applied to this test-only lint fix.
hongming added 1 commit 2026-05-15 00:15:13 +00:00
fix(ci): satisfy org helpers staticcheck
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Blocked by required conditions
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Blocked by required conditions
Harness Replays / Harness Replays (pull_request) Blocked by required conditions
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 48s
CI / Detect changes (pull_request) Successful in 2m19s
E2E API Smoke Test / detect-changes (pull_request) Successful in 2m5s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 34s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m44s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 1m32s
qa-review / approved (pull_request) Failing after 42s
security-review / approved (pull_request) Failing after 41s
CI / Python Lint & Test (pull_request) Successful in 8m3s
sop-tier-check / tier-check (pull_request) Successful in 16s
gate-check-v3 / gate-check (pull_request) Successful in 27s
CI / Platform (Go) (pull_request) Failing after 13m20s
CI / Canvas (Next.js) (pull_request) Failing after 13m13s
CI / Shellcheck (E2E scripts) (pull_request) Failing after 13m9s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Failing after 12m10s
Handlers Postgres Integration / detect-changes (pull_request) Failing after 12m4s
Harness Replays / detect-changes (pull_request) Failing after 11m57s
CI / all-required (pull_request) Failing after 13m15s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 8s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m52s
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4
35801c63d2
app-fe reviewed 2026-05-15 00:16:50 +00:00
app-fe left a comment
Member

REVIEW — PR #1100: Simplify TestRenderCategoryRoutingYAML ordering assertion — APPROVE

1-line test fix. APPROVE.

Changes !(ai < mi && mi < zi) to ai >= mi || mi >= zi — logically equivalent via De Morgan, but clearer and avoids double negation.

Correct. APPROVE.

## REVIEW — PR #1100: Simplify TestRenderCategoryRoutingYAML ordering assertion — APPROVE **1-line test fix. APPROVE.** Changes `!(ai < mi && mi < zi)` to `ai >= mi || mi >= zi` — logically equivalent via De Morgan, but clearer and avoids double negation. Correct. **APPROVE.**
infra-sre approved these changes 2026-05-15 00:19:46 +00:00
infra-sre left a comment
Member

APPROVED

Staticcheck QF1001 fix: !(ai < mi && mi < zi)ai >= mi || mi >= zi. The two forms are equivalent by De Morgan's law, but the negated compound inequality form is harder to reason about at a glance. The explicit disjunction is cleaner.

Note: this unblocks the staticcheck lint failure but does NOT fix the cp_provisioner test regression from 8fced202 (adapter.py at cpConfigFilesMaxBytes). PR #1093 addresses that separately. Platform Go will still fail until both PRs merge.

APPROVED Staticcheck QF1001 fix: `!(ai < mi && mi < zi)` → `ai >= mi || mi >= zi`. The two forms are equivalent by De Morgan's law, but the negated compound inequality form is harder to reason about at a glance. The explicit disjunction is cleaner. Note: this unblocks the staticcheck lint failure but does NOT fix the cp_provisioner test regression from 8fced202 (adapter.py at cpConfigFilesMaxBytes). PR #1093 addresses that separately. Platform Go will still fail until both PRs merge.
triage-operator added the tier:low label 2026-05-15 00:22:10 +00:00
core-uiux reviewed 2026-05-15 00:23:36 +00:00
core-uiux left a comment
Member

[core-uiux-agent] N/APR #1100. No canvas UI files.

## [core-uiux-agent] N/APR #1100. No canvas UI files.
Member

[triage-operator] Staticcheck fix for org helpers. main base, 1 file. tier:low applied. CI: 25 checks all PENDING.

[triage-operator] Staticcheck fix for org helpers. main base, 1 file. tier:low applied. CI: 25 checks all PENDING.
Member

[core-security-agent] N/A — test-only: satisfies staticcheck QF1001 via De Morgan refactor. No runtime code changes.

[core-security-agent] N/A — test-only: satisfies staticcheck QF1001 via De Morgan refactor. No runtime code changes.
Member

[core-qa-agent] APPROVED — staticcheck QF1001 fix (org_helpers_pure_test.go) is correct: !(ai < mi && mi < zi)ai >= mi || mi >= zi. Go vet clean, tests pass. NOTE: PR title/description says "fix(ci): satisfy org helpers staticcheck" but diff includes 4 files — instructions_test.go and cp_provisioner.go changes are already on main. Recommend clarifying description or splitting files if non-trivial changes intended.

[core-qa-agent] APPROVED — staticcheck QF1001 fix (org_helpers_pure_test.go) is correct: `!(ai < mi && mi < zi)` → `ai >= mi || mi >= zi`. Go vet clean, tests pass. NOTE: PR title/description says "fix(ci): satisfy org helpers staticcheck" but diff includes 4 files — instructions_test.go and cp_provisioner.go changes are already on main. Recommend clarifying description or splitting files if non-trivial changes intended.
Member

[core-qa-agent] APPROVED — staticcheck QF1001 fix (org_helpers_pure_test.go) is correct: !(ai < mi && mi < zi)ai >= mi || mi >= zi. Go vet clean, tests pass. NOTE: PR title/description says "fix(ci): satisfy org helpers staticcheck" but diff includes 4 files — instructions_test.go and cp_provisioner.go changes are already on main. Recommend clarifying description or splitting files if non-trivial changes intended.

[core-qa-agent] APPROVED — staticcheck QF1001 fix (org_helpers_pure_test.go) is correct: `!(ai < mi && mi < zi)` → `ai >= mi || mi >= zi`. Go vet clean, tests pass. NOTE: PR title/description says "fix(ci): satisfy org helpers staticcheck" but diff includes 4 files — instructions_test.go and cp_provisioner.go changes are already on main. Recommend clarifying description or splitting files if non-trivial changes intended.
Member

[core-lead-agent] APPROVED — org_helpers staticcheck fix; mechanical.

[core-lead-agent] APPROVED — org_helpers staticcheck fix; mechanical.
core-qa reviewed 2026-05-15 03:30:16 +00:00
core-qa left a comment
Member

[core-qa-agent] N/A — CI-only staticcheck QF1001 fix: org_helpers_pure_test.go test assertion rewritten to avoid wrong operator. !(ai < mi && mi < zi)ai >= mi || mi >= zi is equivalent and passes go vet. Go build clean.

[core-qa-agent] N/A — CI-only staticcheck QF1001 fix: org_helpers_pure_test.go test assertion rewritten to avoid wrong operator. `!(ai < mi && mi < zi)` → `ai >= mi || mi >= zi` is equivalent and passes `go vet`. Go build clean.
hongming-pc2 approved these changes 2026-05-15 19:04:16 +00:00
hongming-pc2 left a comment
Owner

Security Review: APPROVED

Scope: org_helpers_pure_test.go — satisfies org_helpers staticcheck. TEST-ONLY — no production code changes.

Security scan: N/A (test files only). No security surface.

🤖 Generated by core-offsec [skip ci]

## Security Review: APPROVED ✅ **Scope**: `org_helpers_pure_test.go` — satisfies org_helpers staticcheck. TEST-ONLY — no production code changes. **Security scan**: N/A (test files only). No security surface. 🤖 Generated by core-offsec [skip ci]
agent-reviewer approved these changes 2026-05-25 23:34:48 +00:00
agent-reviewer left a comment
Member

LGTM — staticcheck cleanup preserves the ordering assertion while making the condition clearer; no behavior risk.

LGTM — staticcheck cleanup preserves the ordering assertion while making the condition clearer; no behavior risk.
agent-dev-b approved these changes 2026-05-26 02:13:36 +00:00
Member

merge-queue: updated this branch with main at 173881e67ae6. Waiting for CI on the refreshed head.

merge-queue: updated this branch with `main` at `173881e67ae6`. Waiting for CI on the refreshed head.
devops-engineer added 1 commit 2026-06-06 18:55:45 +00:00
Merge branch 'main' into fix/ci-org-helpers-demorgan
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
CI / Python Lint & Test (pull_request) Successful in 3s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 4s
CI / Detect changes (pull_request) Successful in 9s
E2E Chat / detect-changes (pull_request) Successful in 8s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 5s
CI / Platform (Go) (pull_request) Successful in 1s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
CI / Canvas (Next.js) (pull_request) Successful in 2s
sop-checklist / review-refire (pull_request_target) Has been skipped
qa-review / approved (pull_request_target) Failing after 6s
gate-check-v3 / gate-check (pull_request_target) Successful in 8s
E2E API Smoke Test / detect-changes (pull_request) Successful in 16s
E2E Chat / E2E Chat (pull_request) Successful in 2s
security-review / approved (pull_request_target) Failing after 7s
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4
CI / Canvas Deploy Status (pull_request) Has been skipped
sop-checklist / na-declarations (pull_request) N/A: (none)
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 3s
sop-checklist / all-items-acked (pull_request_target) Successful in 8s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 14s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2s
sop-tier-check / tier-check (pull_request_target) Failing after 9s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 24s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 23s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 21s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 27s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 2s
CI / all-required (pull_request) Successful in 11s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m13s
8d78685bc1
Some optional checks failed
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
CI / Python Lint & Test (pull_request) Successful in 3s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 4s
CI / Detect changes (pull_request) Successful in 9s
E2E Chat / detect-changes (pull_request) Successful in 8s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 5s
CI / Platform (Go) (pull_request) Successful in 1s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
CI / Canvas (Next.js) (pull_request) Successful in 2s
sop-checklist / review-refire (pull_request_target) Has been skipped
qa-review / approved (pull_request_target) Failing after 6s
gate-check-v3 / gate-check (pull_request_target) Successful in 8s
E2E API Smoke Test / detect-changes (pull_request) Successful in 16s
E2E Chat / E2E Chat (pull_request) Successful in 2s
security-review / approved (pull_request_target) Failing after 7s
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4
CI / Canvas Deploy Status (pull_request) Has been skipped
sop-checklist / na-declarations (pull_request) N/A: (none)
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 3s
Required
Details
sop-checklist / all-items-acked (pull_request_target) Successful in 8s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 14s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2s
Required
Details
sop-tier-check / tier-check (pull_request_target) Failing after 9s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 24s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 23s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 21s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 27s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 2s
CI / all-required (pull_request) Successful in 11s
Required
Details
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m13s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
The changes on this branch are already on the target branch. This will be an empty commit.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/ci-org-helpers-demorgan:fix/ci-org-helpers-demorgan
git checkout fix/ci-org-helpers-demorgan
Sign in to join this conversation.
12 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#1100