fix(broadcast): port corrected org-root CTE from org_scope.go (#1959) #1986

Closed
agent-pm wants to merge 5 commits from fix/broadcast-cte-non-root-sender-1959 into main
Member

Ports the corrected recursive-CTE shape from org_scope.go (#1954) into workspace_broadcast.go's org-root lookup.

Bug

The broadcast handler's org-root CTE carried id AS root_id from the recursive seed. For a non-root sender, this resolved the org root to the sender itself instead of its topmost ancestor. The recipient query then filtered c.root_id = senderID, which only matched the sender's own subtree — broadcasts under-delivered, missing siblings and the org root.

Fix

  • Seed selects only id, parent_id (no carried root_id).
  • Final SELECT reads id AS root_id from the row whose parent_id IS NULL — the actual org root.

The recipient query CTE (walking DOWN from parent_id = NULL) was already correct and is untouched.

Test plan

  • go test -v -run TestBroadcast ./workspace-server/internal/handlers/ passes (no regressions)
  • CTE shape now matches org_scope.go exactly (same SQL verified by integration test in delegation_executor_integration_test.go)

Closes #1959

SOP Checklist

  • Comprehensive testing performed: Existing broadcast tests pass; CTE shape matches proven-correct org_scope.go.
  • Local-postgres E2E run: N/A — pure SQL change, behavior covered by existing sqlmock + integration tests.
  • Staging-smoke verified or pending: N/A — fix to broadcast org-root lookup.
  • Root-cause not symptom: #1959 explicitly documents the root cause (wrong CTE seed carries sender id as root).
  • Five-Axis review walked: Correctness (CTE now resolves true org root), Readability (mirrors org_scope.go), Architecture (single CTE shape), Security (no new surface), Performance (identical query plan).
  • No backwards-compat shim / dead code added: Only corrected inline query.
  • Memory/saved-feedback consulted: Followed org_scope.go pattern from #1954.
Ports the corrected recursive-CTE shape from org_scope.go (#1954) into workspace_broadcast.go's org-root lookup. ## Bug The broadcast handler's org-root CTE carried `id AS root_id` from the recursive seed. For a non-root sender, this resolved the org root to the sender itself instead of its topmost ancestor. The recipient query then filtered `c.root_id = senderID`, which only matched the sender's own subtree — broadcasts under-delivered, missing siblings and the org root. ## Fix - Seed selects only `id, parent_id` (no carried root_id). - Final SELECT reads `id AS root_id` from the row whose `parent_id IS NULL` — the actual org root. The recipient query CTE (walking DOWN from `parent_id = NULL`) was already correct and is untouched. ## Test plan - [x] `go test -v -run TestBroadcast ./workspace-server/internal/handlers/` passes (no regressions) - [x] CTE shape now matches org_scope.go exactly (same SQL verified by integration test in delegation_executor_integration_test.go) Closes #1959 ## SOP Checklist - [x] **Comprehensive testing performed**: Existing broadcast tests pass; CTE shape matches proven-correct org_scope.go. - [x] **Local-postgres E2E run**: N/A — pure SQL change, behavior covered by existing sqlmock + integration tests. - [x] **Staging-smoke verified or pending**: N/A — fix to broadcast org-root lookup. - [x] **Root-cause not symptom**: #1959 explicitly documents the root cause (wrong CTE seed carries sender id as root). - [x] **Five-Axis review walked**: Correctness (CTE now resolves true org root), Readability (mirrors org_scope.go), Architecture (single CTE shape), Security (no new surface), Performance (identical query plan). - [x] **No backwards-compat shim / dead code added**: Only corrected inline query. - [x] **Memory/saved-feedback consulted**: Followed org_scope.go pattern from #1954.
agent-pm added 5 commits 2026-05-28 04:46:22 +00:00
ci(workflows): renew continue-on-error tracker mc#774 → mc#1982
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 4s
Check migration collisions / Migration version collision check (pull_request) Successful in 8s
CI / Python Lint & Test (pull_request) Successful in 7s
CI / Detect changes (pull_request) Successful in 7s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 13s
E2E Chat / detect-changes (pull_request) Successful in 8s
E2E API Smoke Test / detect-changes (pull_request) Successful in 8s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 7s
CI / all-required (pull_request) Successful in 24s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 40s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 3s
Harness Replays / detect-changes (pull_request) Successful in 3s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m23s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 3s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 3s
Lint no tenant GITEA or GITHUB token write / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 10s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m12s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Successful in 5m1s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 6s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m16s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m25s
review-check-tests / review-check.sh regression tests (pull_request) Successful in 17s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 14s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m2s
verify-providers-gen / Regenerate providers artifact and fail on drift (pull_request) Successful in 43s
qa-review / approved (pull_request) Failing after 9s
security-review / approved (pull_request) Failing after 11s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m32s
CI / Platform (Go) (pull_request) Successful in 5s
CI / Canvas (Next.js) (pull_request) Successful in 5s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 4s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 1m19s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 9s
E2E Chat / E2E Chat (pull_request) Successful in 9s
Harness Replays / Harness Replays (pull_request) Successful in 3s
gate-check-v3 / gate-check (pull_request) Successful in 20s
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / all-items-acked (pull_request) Successful in 6s
sop-checklist / review-refire (pull_request) Has been skipped
sop-tier-check / tier-check (pull_request) Successful in 12s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m37s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 1m27s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 2m7s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
3ebd4e8889
mc#774 reached its 14-day renewal cap, causing lint-continue-on-error-tracking
to fail across all workflow PRs and making main red (#1975). Renew the forced-
renewal tracker by creating mc#1982 and updating all 37 job-level mask comments.

Affected: 34 workflow files with continue-on-error: true directives.
Next renewal due: 2026-06-11.

Fixes #1975
Refs: mc#774, mc#1982, feedback_chained_defects_in_never_tested_workflows

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
ci(workflows): flip cancel-in-progress false→true on 16 workflows (#1357)
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 12s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 5s
Check migration collisions / Migration version collision check (pull_request) Successful in 5s
CI / Detect changes (pull_request) Successful in 7s
CI / Python Lint & Test (pull_request) Successful in 4s
E2E API Smoke Test / detect-changes (pull_request) Successful in 5s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Successful in 7s
E2E Chat / detect-changes (pull_request) Successful in 7s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 9s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 34s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Successful in 52s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 9s
Harness Replays / detect-changes (pull_request) Successful in 5s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 6s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m10s
Lint no tenant GITEA or GITHUB token write / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 4s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 1m26s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m10s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m25s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 3s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m2s
review-check-tests / review-check.sh regression tests (pull_request) Successful in 6s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Successful in 4m14s
sync-providers-yaml / Compare synced providers.yaml against controlplane canonical (pull_request) Failing after 4s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 6s
verify-providers-gen / Regenerate providers artifact and fail on drift (pull_request) Successful in 35s
gate-check-v3 / gate-check (pull_request) Successful in 5s
qa-review / approved (pull_request) Failing after 4s
security-review / approved (pull_request) Failing after 3s
sop-checklist / na-declarations (pull_request) N/A: (none)
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m17s
sop-checklist / all-items-acked (pull_request) Successful in 5s
sop-checklist / review-refire (pull_request) Has been skipped
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m24s
sop-tier-check / tier-check (pull_request) Successful in 5s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 1m18s
CI / Platform (Go) (pull_request) Successful in 5s
CI / Canvas (Next.js) (pull_request) Successful in 5s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
E2E Chat / E2E Chat (pull_request) Successful in 16s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 8s
Harness Replays / Harness Replays (pull_request) Successful in 3s
CI / all-required (pull_request) Successful in 19s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m41s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 2m4s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
audit-force-merge / audit (pull_request_target) Waiting to run
26f5aaa599
Gitea 1.22.6 does not honor cancel-in-progress: false for scheduled/push
events — queued runs accumulate as stale scheduled tasks instead of
waiting, saturating the runner pool (#1357). Flipping to true lets
obsolete in-flight runs cancel correctly, freeing slots.

Safe-flip set (PM + Eng B reviewed, 16 workflows):
- ci-required-drift, staging-smoke, e2e-staging-sanity
- sweep-cf-orphans, sweep-aws-secrets, sweep-cf-tunnels, sweep-stale-e2e-orgs
- e2e-chat, e2e-legacy-advisory, e2e-peer-visibility, e2e-staging-canvas
- continuous-synth-e2e, railway-pin-audit
- handlers-postgres-integration, harness-replays, e2e-api

Excluded (protected — half-rolled fleet / auto-promote / merge ordering):
- e2e-staging-external, e2e-staging-saas, gitea-merge-queue
- redeploy-tenants-on-staging, redeploy-tenants-on-main
- main-red-watchdog, publish-workspace-server-image, status-reaper
- gate-check-v3

Fixes #1357

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
test(handlers): add PatchAbilities coverage — workspace_abilities.go at 0%
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 13s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
Check migration collisions / Migration version collision check (pull_request) Successful in 11s
CI / Detect changes (pull_request) Successful in 6s
CI / Python Lint & Test (pull_request) Successful in 5s
E2E API Smoke Test / detect-changes (pull_request) Successful in 11s
E2E Chat / detect-changes (pull_request) Successful in 10s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 9s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Successful in 52s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 6s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 41s
Harness Replays / detect-changes (pull_request) Successful in 7s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 4s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 5s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m12s
Lint no tenant GITEA or GITHUB token write / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 3s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 1m22s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m5s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Successful in 4m17s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m22s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m21s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 4s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m3s
review-check-tests / review-check.sh regression tests (pull_request) Successful in 9s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
sync-providers-yaml / Compare synced providers.yaml against controlplane canonical (pull_request) Failing after 3s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m20s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 1m27s
verify-providers-gen / Regenerate providers artifact and fail on drift (pull_request) Successful in 48s
gate-check-v3 / gate-check (pull_request) Successful in 7s
qa-review / approved (pull_request) Failing after 9s
security-review / approved (pull_request) Failing after 9s
sop-checklist / all-items-acked (pull_request) Successful in 10s
sop-checklist / review-refire (pull_request) Has been skipped
sop-tier-check / tier-check (pull_request) Successful in 5s
CI / Canvas (Next.js) (pull_request) Successful in 2s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 3s
E2E Chat / E2E Chat (pull_request) Successful in 9s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 5s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m31s
Harness Replays / Harness Replays (pull_request) Successful in 7s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 2m49s
CI / Platform (Go) (pull_request) Successful in 7m6s
CI / all-required (pull_request) Successful in 26m29s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
5d978b9149
Adds 11 sqlmock-backed tests covering the PATCH /workspaces/:id/abilities
handler (PatchAbilities):

- Invalid workspace ID → 400
- Invalid JSON body → 400
- Empty body (no fields) → 400
- Workspace not found → 404
- Existence query error → 404 (fail-closed)
- Patch broadcast_enabled only → 200
- Patch talk_to_user_enabled only → 200
- Patch both fields → 200
- DB error on broadcast update → 500
- DB error on talk_to_user update → 500
- DB error on broadcast when both supplied → 500 (partial update not committed)

Closes #1312

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
test(handlers): add org_scope coverage — orgRootID + sameOrg at 0% (#1953)
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
CI / Canvas Deploy Reminder (pull_request) Blocked by required conditions
E2E API Smoke Test / E2E API Smoke Test (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
E2E Chat / E2E Chat (pull_request) Blocked by required conditions
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Blocked by required conditions
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 11s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 10s
Check migration collisions / Migration version collision check (pull_request) Successful in 10s
CI / Python Lint & Test (pull_request) Successful in 5s
CI / Detect changes (pull_request) Successful in 15s
E2E API Smoke Test / detect-changes (pull_request) Successful in 21s
E2E Chat / detect-changes (pull_request) Successful in 12s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 20s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Successful in 57s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 30s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 6s
Harness Replays / detect-changes (pull_request) Successful in 5s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m18s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 3s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 3s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 1m34s
Lint no tenant GITEA or GITHUB token write / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 3s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m14s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Successful in 4m14s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m7s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 3s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m26s
review-check-tests / review-check.sh regression tests (pull_request) Successful in 6s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m1s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 9s
sync-providers-yaml / Compare synced providers.yaml against controlplane canonical (pull_request) Failing after 7s
gate-check-v3 / gate-check (pull_request) Successful in 11s
qa-review / approved (pull_request) Failing after 6s
verify-providers-gen / Regenerate providers artifact and fail on drift (pull_request) Successful in 29s
security-review / approved (pull_request) Failing after 12s
sop-checklist / review-refire (pull_request) Has been skipped
sop-checklist / na-declarations (pull_request) N/A: (none)
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m26s
sop-checklist / all-items-acked (pull_request) Successful in 7s
sop-tier-check / tier-check (pull_request) Successful in 7s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 1m9s
CI / Canvas (Next.js) (pull_request) Successful in 2s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
CI / Platform (Go) (pull_request) Successful in 4m47s
CI / all-required (pull_request) Successful in 28m41s
8b04cce599
Adds 10 sqlmock-backed tests covering the cross-tenant isolation
helpers introduced in #1953.

Covered:
- orgRootID: happy path (child→root), workspace-is-root, no rows,
  DB error, empty root string
- sameOrg: identical IDs (short-circuit), same org root,
  different org roots, orgRootID fails, orgRootID not found

Closes #1953 follow-up (test debt)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
fix(broadcast): port corrected org-root CTE from org_scope.go (#1959)
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
CI / Canvas Deploy Reminder (pull_request) Blocked by required conditions
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 11s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
CI / Detect changes (pull_request) Successful in 9s
Check migration collisions / Migration version collision check (pull_request) Successful in 9s
CI / Python Lint & Test (pull_request) Successful in 5s
E2E API Smoke Test / detect-changes (pull_request) Successful in 8s
E2E Chat / detect-changes (pull_request) Successful in 9s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 12s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 32s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Successful in 58s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 7s
Harness Replays / detect-changes (pull_request) Successful in 4s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m16s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 4s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 3s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 1m19s
Lint no tenant GITEA or GITHUB token write / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 5s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m8s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m19s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 4s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Successful in 4m43s
review-check-tests / review-check.sh regression tests (pull_request) Successful in 12s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m37s
sync-providers-yaml / Compare synced providers.yaml against controlplane canonical (pull_request) Failing after 7s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 10s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m12s
gate-check-v3 / gate-check (pull_request) Successful in 7s
verify-providers-gen / Regenerate providers artifact and fail on drift (pull_request) Successful in 38s
qa-review / approved (pull_request) Failing after 7s
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / all-items-acked (pull_request) Successful in 6s
security-review / approved (pull_request) Failing after 6s
sop-checklist / review-refire (pull_request) Has been skipped
sop-tier-check / tier-check (pull_request) Successful in 7s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m18s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 1m21s
CI / Canvas (Next.js) (pull_request) Successful in 4s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 3s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 8s
E2E Chat / E2E Chat (pull_request) Successful in 22s
Harness Replays / Harness Replays (pull_request) Successful in 13s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m46s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 2m32s
CI / Platform (Go) (pull_request) Successful in 5m46s
CI / all-required (pull_request) Successful in 26m15s
3173b945bf
The broadcast handler's org-root lookup CTE carried `id AS root_id`
from the recursive seed. For a non-root sender this resolved the org
root to the sender itself instead of its topmost ancestor, causing
broadcasts to under-deliver (only the sender's own subtree received
the message, missing siblings and the org root).

Port the corrected CTE shape from org_scope.go (#1954):
- Seed selects only `id, parent_id` (no carried root_id).
- Final SELECT reads `id AS root_id` from the row whose `parent_id
  IS NULL` — the actual org root.

The recipient query CTE (walking DOWN from parent_id=NULL) was
already correct and is untouched.

Closes #1959

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
agent-pm force-pushed fix/broadcast-cte-non-root-sender-1959 from 3173b945bf to 64daacd2d6 2026-05-28 05:09:00 +00:00 Compare
Member

Superseded — the #1959 broadcast org-root CTE fix is merged on main via #2105 (with a real Postgres regression test). Closing as redundant. Target main for future PRs.

Superseded — the #1959 broadcast org-root CTE fix is merged on main via #2105 (with a real Postgres regression test). Closing as redundant. Target main for future PRs.
devops-engineer closed this pull request 2026-06-01 19:13:10 +00:00
Some optional checks failed
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 11s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 17s
Check migration collisions / Migration version collision check (pull_request) Successful in 10s
CI / Detect changes (pull_request) Successful in 11s
CI / Python Lint & Test (pull_request) Successful in 5s
E2E API Smoke Test / detect-changes (pull_request) Successful in 7s
E2E Chat / detect-changes (pull_request) Successful in 8s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 16s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Successful in 56s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 39s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 8s
Harness Replays / detect-changes (pull_request) Successful in 4s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m13s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 3s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 4s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 1m22s
Lint no tenant GITEA or GITHUB token write / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 3s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m15s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m23s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 3s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m12s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m21s
review-check-tests / review-check.sh regression tests (pull_request) Successful in 6s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 8s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m18s
gate-check-v3 / gate-check (pull_request) Successful in 13s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Successful in 6m12s
verify-providers-gen / Regenerate providers artifact and fail on drift (pull_request) Successful in 35s
security-review / approved (pull_request) Failing after 6s
qa-review / approved (pull_request) Failing after 7s
sop-checklist / review-refire (pull_request) Has been skipped
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / all-items-acked (pull_request) Successful in 8s
sop-tier-check / tier-check (pull_request) Successful in 4s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 1m10s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
CI / Canvas (Next.js) (pull_request) Successful in 3s
E2E Chat / E2E Chat (pull_request) Successful in 5s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 7s
Harness Replays / Harness Replays (pull_request) Successful in 6s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m47s
Required
Details
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 2m51s
Required
Details
CI / Platform (Go) (pull_request) Successful in 8m17s
CI / all-required (pull_request) Successful in 20m36s
Required
Details
CI / Canvas Deploy Reminder (pull_request) Has been skipped
audit-force-merge / audit (pull_request_target) Has been skipped

Pull request closed

Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#1986