Compare commits

...

2 Commits

Author SHA1 Message Date
Molecule AI Dev Engineer A (Kimi) 85cfefcc1d ci: fix lint and test regressions from PR content
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 10s
Harness Replays / detect-changes (pull_request) Successful in 8s
E2E API Smoke Test / detect-changes (pull_request) Successful in 10s
CI / Detect changes (pull_request) Successful in 11s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 12s
qa-review / approved (pull_request_target) Successful in 21s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 24s
gate-check-v3 / gate-check (pull_request_target) Successful in 23s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 25s
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, local-postgres-e2
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-tier-check / tier-check (pull_request_target) Successful in 8s
security-review / approved (pull_request_target) Successful in 9s
sop-checklist / all-items-acked (pull_request_target) Successful in 10s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 40s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m24s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 1m36s
Harness Replays / Harness Replays (pull_request) Successful in 19s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m43s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 3m7s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 3m26s
CI / Platform (Go) (pull_request) Failing after 6m4s
CI / Canvas (Next.js) (pull_request) Successful in 6m57s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / Python Lint & Test (pull_request) Successful in 7m31s
CI / all-required (pull_request) Waiting to run
audit-force-merge / audit (pull_request_target) Has been skipped
Fix three issues introduced by the branch changes that caused CI
failures on the staging target:

1. Revert De Morgan's law violation (QF1001) in
   org_helpers_pure_test.go — restores `ai >= mi || mi >= zi`.

2. Suppress `unused` lint on `waitAsyncForTest` after PR removed its
   call sites in handlers_test.go; kept for merge compatibility with
   main where test files still reference it.

3. Align TestParseDirectives with the simplified parse_directives
   signature (single list return) after sop-n/a removal.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 12:29:11 +00:00
fullstack-engineer 77998c76f7 fix(channels): remove duplicate EncryptSensitiveFields call in Create
audit-force-merge / audit (pull_request) Has been skipped
gate-check-v3 / gate-check (pull_request) Waiting to run
qa-review / approved (pull_request) Waiting to run
security-review / approved (pull_request) Waiting to run
sop-tier-check / tier-check (pull_request) Waiting to run
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 24s
cascade-list-drift-gate / check (pull_request) Successful in 13s
Check migration collisions / Migration version collision check (pull_request) Successful in 17s
CI / Detect changes (pull_request) Successful in 21s
E2E API Smoke Test / detect-changes (pull_request) Successful in 10s
Harness Replays / detect-changes (pull_request) Successful in 8s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 10s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 6s
MCP Stdio Transport Regression / MCP stdio with regular-file stdout (pull_request) Successful in 1m38s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Failing after 1m9s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Failing after 1m27s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m35s
publish-runtime-autobump / bump-and-tag (pull_request) Has been skipped
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 8s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 8s
publish-runtime-autobump / pr-validate (pull_request) Successful in 35s
gate-check-v3 / gate-check (pull_request_target) Successful in 8s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m39s
qa-review / approved (pull_request_target) Successful in 10s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m25s
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, local-postgres-e2
sop-checklist / na-declarations (pull_request) N/A: (none)
security-review / approved (pull_request_target) Successful in 14s
sop-tier-check / tier-check (pull_request_target) Successful in 13s
sop-checklist / all-items-acked (pull_request_target) Successful in 13s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m32s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Failing after 1m41s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 9s
Harness Replays / Harness Replays (pull_request) Successful in 18s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m57s
CI / Platform (Go) (pull_request) Failing after 3m43s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 2m31s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 2m41s
CI / Canvas (Next.js) (pull_request) Successful in 7m33s
CI / Python Lint & Test (pull_request) Successful in 6m46s
CI / all-required (pull_request) Has been cancelled
CI / Canvas Deploy Reminder (pull_request) Has been cancelled
The Create handler called EncryptSensitiveFields twice (copy-paste error
introduced during the OFFSEC-010 conflict resolution at commit 58882381).

The second call is harmless — EncryptSensitiveFields is idempotent and
skips values already prefixed with "ec1:" — but it wastes CPU and signals
a copy-paste bug. Remove it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 01:18:22 +00:00
4 changed files with 5 additions and 14 deletions
+3 -4
View File
@@ -135,8 +135,7 @@ class TestParseDirectives(unittest.TestCase):
self.aliases = _numeric_aliases()
def parse_ack_revoke(self, body):
directives, na_directives = sop.parse_directives(body, self.aliases)
self.assertEqual(na_directives, [])
directives = sop.parse_directives(body, self.aliases)
return directives
def test_simple_ack(self):
@@ -201,8 +200,8 @@ class TestParseDirectives(unittest.TestCase):
self.assertEqual(len(d), 1)
def test_empty_body(self):
self.assertEqual(sop.parse_directives("", self.aliases), ([], []))
self.assertEqual(sop.parse_directives(None, self.aliases), ([], []))
self.assertEqual(sop.parse_directives("", self.aliases), [])
self.assertEqual(sop.parse_directives(None, self.aliases), [])
def test_normalization_applied(self):
# /sop-ack Comprehensive_Testing → canonical comprehensive-testing
@@ -149,15 +149,6 @@ func (h *ChannelHandler) Create(c *gin.Context) {
return
}
// #319: encrypt sensitive fields (bot_token, webhook_secret) before
// persisting so a DB read/backup leak can't recover the credentials.
// Validation above ran against plaintext; storage is ciphertext.
if err := channels.EncryptSensitiveFields(body.Config); err != nil {
log.Printf("Channels: encrypt config failed for workspace %s: %v", workspaceID, err)
c.JSON(http.StatusInternalServerError, gin.H{"error": "encrypt failed"})
return
}
configJSON, _ := json.Marshal(body.Config)
allowedJSON, _ := json.Marshal(body.AllowedUsers)
enabled := true
@@ -287,7 +287,7 @@ func TestRenderCategoryRoutingYAML_StableOrdering(t *testing.T) {
if ai <= 0 || zi <= 0 || mi <= 0 {
t.Fatalf("could not locate all keys in output: %s", out)
}
if !(ai < mi && mi < zi) {
if ai >= mi || mi >= zi {
t.Errorf("keys not sorted: alpha=%d middle=%d zebra=%d, output:\n%s", ai, mi, zi, out)
}
}
@@ -88,6 +88,7 @@ func (h *WorkspaceHandler) goAsync(fn func()) {
}()
}
//nolint:unused // used by test files on main branch; kept for merge compatibility
func (h *WorkspaceHandler) waitAsyncForTest() {
h.asyncWG.Wait()
}