Commit Graph

1008 Commits

Author SHA1 Message Date
a92beb5d49 fix(workspace-server): persist poll-mode canvas user message synchronously before queued 200
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 25s
CI / Detect changes (pull_request) Successful in 22s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 53s
E2E API Smoke Test / detect-changes (pull_request) Successful in 30s
E2E Chat / detect-changes (pull_request) Successful in 37s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 38s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 35s
Harness Replays / detect-changes (pull_request) Successful in 38s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 40s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 50s
gate-check-v3 / gate-check (pull_request) Successful in 57s
qa-review / approved (pull_request) Successful in 51s
security-review / approved (pull_request) Failing after 48s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 2m15s
sop-tier-check / tier-check (pull_request) Successful in 33s
CI / Platform (Go) (pull_request) Failing after 10m44s
CI / Canvas (Next.js) (pull_request) Failing after 10m20s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / Python Lint & Test (pull_request) Successful in 9m18s
CI / all-required (pull_request) Failing after 8m57s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 31s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 19s
Harness Replays / Harness Replays (pull_request) Successful in 21s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 3m15s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 5m0s
E2E Chat / E2E Chat (pull_request) Failing after 12m29s
sop-checklist / all-items-acked (pull_request) acked: 3/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +1 — body-unfilled: comprehensive-testing, local-postgres-e2
Sibling of #1347/internal#470 — the POLL-mode arm of the canvas
user-message data-loss bug Hongming reported ("i sometimes lose my own
message when i exit chat", 2026-05-16).

Hongming's tenant is entirely poll-mode (4 external workspaces, no URL —
verified empirically: every workspace returns the {delivery_mode:poll,
status:queued} short-circuit envelope), so #1347 (push-mode only,
persists AFTER the poll short-circuit) structurally cannot cover his
reported case. #1347's "poll-mode was never affected" framing is
overstated: logA2AReceiveQueued's durable activity_logs INSERT ran
inside h.goAsync(...) — a detached goroutine with no happens-before
barrier against the synthetic {status:queued} 200. The canvas sees the
send acknowledged while the row may still be racing; a workspace-server
restart / deploy / OOM / EC2 hibernation between the 200 and the
goroutine's commit loses the message permanently (chat-history reads
activity_logs; missing row = message gone on reopen). No fallback
either, unlike push-mode's legacy-INSERT path.

Fix: make the poll-mode ingest persist SYNCHRONOUS — committed before
the queued 200 — on a context.WithoutCancel context (parity with
persistUserMessageAtIngest). Best-effort preserved (LogActivity
logs+swallows INSERT errors, never blocks the send). Post-commit
broadcast still fires inside LogActivity (a missed WS event is not data
loss; the durable row is the truth chat-history re-reads on reopen).

TDD: a2a_poll_ingest_persist_test.go — deterministic RED (queued 200
returned in ~0.5ms, before the 150ms INSERT → DATA LOSS) → GREEN after
fix. Full internal/handlers + internal/messagestore suites green; vet
clean.

Refs: molecule-ai/internal#471 (tracking), molecule-ai/internal#470 (push-mode sibling, PR #1347)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 06:04:14 -07:00
8179ff77e9 Merge branch 'main' into fix/workspace-token-injection-agent-owned
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 16s
CI / Detect changes (pull_request) Successful in 27s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 43s
E2E API Smoke Test / detect-changes (pull_request) Successful in 58s
E2E Chat / detect-changes (pull_request) Successful in 59s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 1m0s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 24s
Harness Replays / detect-changes (pull_request) Successful in 26s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 1m8s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 24s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 29s
qa-review / approved (pull_request) Failing after 27s
gate-check-v3 / gate-check (pull_request) Successful in 39s
security-review / approved (pull_request) Failing after 27s
sop-checklist / all-items-acked (pull_request) Successful in 19s
sop-tier-check / tier-check (pull_request) Successful in 22s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 11s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m39s
Harness Replays / Harness Replays (pull_request) Successful in 10s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 18s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m9s
CI / Python Lint & Test (pull_request) Successful in 7m58s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 6m41s
E2E Chat / E2E Chat (pull_request) Failing after 8m24s
CI / Platform (Go) (pull_request) Successful in 16m7s
CI / Canvas (Next.js) (pull_request) Successful in 16m52s
CI / all-required (pull_request) Successful in 30m58s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
audit-force-merge / audit (pull_request) Successful in 14s
2026-05-16 12:05:32 +00:00
6188c6ddf3 fix(org_helpers): correct duplicate phrase in loadWorkspaceEnv comment
Some checks failed
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 37s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 23s
Harness Replays / detect-changes (pull_request) Successful in 22s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 1m0s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 24s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m32s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m59s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 2m23s
publish-runtime-autobump / bump-and-tag (pull_request) Has been skipped
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 2m16s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m58s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 3m23s
publish-runtime-autobump / pr-validate (pull_request) Successful in 1m0s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 38s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 25s
CI / Python Lint & Test (pull_request) Successful in 7m22s
qa-review / approved (pull_request) Failing after 31s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m26s
sop-checklist / all-items-acked (pull_request) Successful in 26s
security-review / approved (pull_request) Failing after 34s
sop-tier-check / tier-check (pull_request) Successful in 32s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Failing after 1m30s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 6m56s
CI / Canvas (Next.js) (pull_request) Successful in 19m13s
CI / Canvas Deploy Reminder (pull_request) Successful in 12s
CI / Platform (Go) (pull_request) Successful in 20m10s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 8m2s
CI / all-required (pull_request) Successful in 20m5s
Harness Replays / Harness Replays (pull_request) Has been cancelled
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Has been cancelled
The comment had the phrase "the workspace-specific .env" duplicated.
Removed the redundant repetition.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 10:27:13 +00:00
f986444dbd fix(workspace-server): inject /configs token files agent-owned, not root
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Failing after 0s
CI / Platform (Go) (pull_request) Failing after 0s
CI / Detect changes (pull_request) Failing after 0s
CI / Shellcheck (E2E scripts) (pull_request) Failing after 0s
CI / Python Lint & Test (pull_request) Failing after 0s
CI / all-required (pull_request) Failing after 1s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
E2E API Smoke Test / detect-changes (pull_request) Failing after 0s
CI / Canvas (Next.js) (pull_request) Failing after 1s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Failing after 1s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Has been skipped
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Failing after 0s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Has been skipped
Handlers Postgres Integration / detect-changes (pull_request) Failing after 0s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Has been skipped
Harness Replays / detect-changes (pull_request) Failing after 0s
Harness Replays / Harness Replays (pull_request) Has been skipped
lint-required-no-paths / lint-required-no-paths (pull_request) Failing after 0s
Runtime PR-Built Compatibility / detect-changes (pull_request) Failing after 0s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Has been skipped
Secret scan / Scan diff for credential-shaped strings (pull_request) Failing after 0s
qa-review / approved (pull_request) Failing after 0s
security-review / approved (pull_request) Failing after 0s
gate-check-v3 / gate-check (pull_request) Failing after 21s
sop-tier-check / tier-check (pull_request) Successful in 21s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 1m21s
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4
sop-checklist / na-declarations (pull_request) N/A: (none)
The fleet-wide list_peers 401 (Hermes et al): two workspace-server
token-injection paths wrote /configs/.auth_token (and
/configs/.platform_inbound_secret) as root:root 0600 AFTER the template
entrypoint's `chown -R agent:agent /configs` ran. The a2a_mcp_server runs
as the agent uid (1000, via `gosu agent`), so platform_auth.get_token()
hit `[Errno 13] Permission denied` → empty bearer → platform 401 on
/registry/{id}/peers (the literal tool_list_peers path).

PR#23 fixed only the entrypoint dir chown (first boot); it cannot reach
the post-entrypoint root re-injection. This covers both injection paths:

1. WriteAuthTokenToVolume (#1877, pre-start): the throwaway alpine
   container ran chmod 0600 but never chowned — alpine runs as root, so
   the file stayed root:root. Now `chown 1000:1000 /vol/.auth_token`
   (0600 preserved).
2. WriteFilesToContainer (#418, post-start re-injection): the tar headers
   left Uid/Gid unset → CopyToContainer extracted root:root. Now every
   tar entry is stamped Uid/Gid = agent. This path (re)writes BOTH
   .auth_token and .platform_inbound_secret, so both are fixed.

uid 1000:1000 verified from the templates (claude-code-default + hermes
Dockerfile `useradd -u 1000 ... agent`, entrypoint `gosu agent`), exposed
as AgentUID/AgentGID constants. Tar-build and alpine-cmd extracted into
pure helpers (mirrors buildTemplateTar) so the ownership contract is
unit-tested without a live Docker daemon; the test fails on pre-fix
root:root and passes post-fix (real tar / real command, not a mock).

PR#23's entrypoint chown is unchanged (still correct for the dir +
first boot). No feature flag, no backwards-compat shim.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 02:19:11 -07:00
fullstack-engineer
0e13a80121 chore: promote staging→main (chat E2E + accumulated fixes)
Some checks failed
E2E Chat / detect-changes (pull_request) Successful in 1m21s
Harness Replays / detect-changes (pull_request) Successful in 55s
publish-runtime-autobump / bump-and-tag (pull_request) Has been skipped
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 38s
publish-runtime-autobump / pr-validate (pull_request) Successful in 1m8s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m42s
qa-review / approved (pull_request) Failing after 35s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 1m26s
gate-check-v3 / gate-check (pull_request) Successful in 48s
security-review / approved (pull_request) Failing after 30s
sop-checklist / all-items-acked (pull_request) Successful in 22s
sop-tier-check / tier-check (pull_request) Successful in 27s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Failing after 2m52s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 2m20s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 3m0s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 2m9s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 3m17s
E2E Chat / E2E Chat (pull_request) Failing after 18s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 3m21s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m29s
Harness Replays / Harness Replays (pull_request) Failing after 2m0s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 3m22s
CI / Python Lint & Test (pull_request) Successful in 7m54s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 5m59s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 6m38s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 10m56s
CI / Canvas (Next.js) (pull_request) Successful in 22m58s
CI / Platform (Go) (pull_request) Successful in 23m43s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Successful in 18s
Promotes the following staging-only changes to main:

- feat(e2e): stabilize Playwright chat tests for desktop + mobile (PR #1142)
- feat(workspace): broadcast and talk-to-user platform abilities
- feat(adapter-base): ProviderRegistry type + resolve_provider_routing
- fix(staging): OFFSEC-010 CP config wiring + CWE-78 rows.Err fixes
- fix(staging): restore goAsync tracking in dispatch calls
- fix(ci): needs-based all-required sentinel
- fix(canvas): load chat history in MobileChat (closes #1062)

Merge-conflict resolutions:
- ThemeToggle.tsx: take staging (INDEX_SIZE_ERR test fix)
- MobileChat.tsx + test: take staging (shared hooks refactor)
- workspace_broadcast.go: take main (OFFSEC-015 org isolation)
- org_helpers.go + tests: combine both (CWE-78 guard + rows.Err)
- secrets.go: take staging (descriptive rows.Err log messages)
- workspace.go: combine (goAsync tracking + SaaS tier hard-gate)
- cp_provisioner.go: combine (OFFSEC-010 comments + main formatting)
- ci.yml: combine (mc#774 trackers + all-required needs cleanup)
- test_a2a_offsec003_sanitization.py: delete (redundant per mc#62d38667)
2026-05-15 15:20:52 -07:00
5a05302cd6 fix(broadcast): OFFSEC-015 — scope recipients to sender's org
Some checks failed
CI / Shellcheck (E2E scripts) (pull_request) Successful in 59s
CI / all-required (pull_request) Successful in 28s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 34s
publish-runtime-autobump / bump-and-tag (pull_request) Has been skipped
Harness Replays / detect-changes (pull_request) Successful in 35s
CI / Detect changes (pull_request) Successful in 2m31s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 1m38s
E2E API Smoke Test / detect-changes (pull_request) Successful in 1m44s
Check migration collisions / Migration version collision check (pull_request) Successful in 3m22s
Secret scan / Scan diff for credential-shaped strings (pull_request) Failing after 42s
gate-check-v3 / gate-check (pull_request) Failing after 54s
MCP Stdio Transport Regression / MCP stdio with regular-file stdout (pull_request) Successful in 3m45s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 1m14s
publish-runtime-autobump / pr-validate (pull_request) Successful in 1m31s
security-review / approved (pull_request) Failing after 37s
qa-review / approved (pull_request) Failing after 39s
sop-checklist / all-items-acked (pull_request) Successful in 36s
sop-tier-check / tier-check (pull_request) Successful in 36s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 2m0s
Harness Replays / Harness Replays (pull_request) Successful in 22s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m48s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 4m26s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 3m54s
CI / Python Lint & Test (pull_request) Successful in 8m37s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 8m55s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 10m33s
audit-force-merge / audit (pull_request) Successful in 28s
CI / Platform (Go) (pull_request) Successful in 23m46s
CI / Canvas (Next.js) (pull_request) Failing after 24m35s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
Previously POST /workspaces/:id/broadcast collected every non-removed
workspace in the database, allowing a workspace in Org-A to broadcast to
every workspace in Org-B, Org-C, etc.

Fix: walk parent_id chain with a recursive CTE to find the sender's org
root, then filter recipients to workspaces sharing that root. Same
isolation pattern as hotfix #1157 (staging) — port to this main-target
PR so the cherry-pick doesn't ship the vulnerable original.

Adds workspace_broadcast_test.go from #1157 with:
- TestBroadcast_OrgScopedRecipients (cross-org isolation regression)
- TestBroadcast_OrgScoped_OrgRootSender
- TestBroadcast_OrgScoped_ChildWorkspaceSender
- + NotFound / Disabled / EmptyOrg / InvalidID coverage

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 12:30:03 -07:00
29b4bffb13 feat(workspace): add broadcast and talk-to-user platform abilities
Two new workspace-level ability flags (broadcast_enabled, talk_to_user_enabled)
with full backend enforcement, MCP tool, and canvas UI:

- Migration: adds broadcast_enabled (default false) and talk_to_user_enabled
  (default true) columns to workspaces table
- PATCH /workspaces/:id/abilities (AdminAuth) toggles either flag independently
- POST /workspaces/:id/broadcast (WorkspaceAuth) fans out a broadcast_receive
  activity_log entry + WS BROADCAST_MESSAGE event to all non-removed peers;
  requires broadcast_enabled=true on the sender
- AgentMessageWriter checks talk_to_user_enabled; returns ErrTalkToUserDisabled
  which surfaces as HTTP 403 on /notify and the send_message_to_user MCP tool
- broadcast_message MCP tool added to registry + a2a_tools_messaging.py
- Canvas ChatTab shows "Agent is not enabled to chat with you" banner with
  Enable button when talkToUserEnabled=false on the workspace node

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 12:03:08 -07:00
5dc1e462de fix(external-workspace): pin molecule-ai-workspace-runtime>=0.1.999 in OpenClaw snippet (#1143)
Some checks are pending
Staging SaaS smoke (every 30 min) / Staging SaaS smoke (push) Has started running
gate-check-v3 / gate-check (push) Has started running
Sweep stale Cloudflare DNS records / Sweep CF orphans (push) Has started running
ci-required-drift / drift (push) Has started running
Runtime Pin Compatibility / PyPI-latest install + import smoke (push) Has started running
Railway pin audit (drift detection) / Audit Railway env vars for drift-prone pins (push) Has started running
Handlers Postgres Integration / detect-changes (push) Successful in 25s
Harness Replays / detect-changes (push) Successful in 22s
CI / Detect changes (push) Successful in 58s
E2E API Smoke Test / detect-changes (push) Successful in 59s
Secret scan / Scan diff for credential-shaped strings (push) Successful in 21s
E2E Staging Canvas (Playwright) / detect-changes (push) Successful in 1m1s
Harness Replays / Harness Replays (push) Successful in 13s
Runtime PR-Built Compatibility / detect-changes (push) Successful in 1m11s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (push) Successful in 53s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (push) Successful in 4m7s
E2E API Smoke Test / E2E API Smoke Test (push) Successful in 6m36s
Handlers Postgres Integration / Handlers Postgres Integration (push) Successful in 7m11s
CI / Python Lint & Test (push) Successful in 8m23s
publish-workspace-server-image / build-and-push (push) Successful in 13m9s
CI / Canvas (Next.js) (push) Successful in 21m39s
CI / Platform (Go) (push) Successful in 23m7s
CI / all-required (push) Successful in 27m51s
CI / Canvas Deploy Reminder (push) Successful in 13s
main-red-watchdog / watchdog (push) Has started running
Sweep stale e2e-* orgs (staging) / Sweep e2e orgs (push) Successful in 28s
Sweep stale Cloudflare Tunnels / Sweep CF tunnels (push) Successful in 1m0s
Continuous synthetic E2E (staging) / Synthetic E2E against staging (push) Successful in 5m52s
gitea-merge-queue / queue (push) Successful in 27s
status-reaper / reap (push) Successful in 3m26s
fix(external-workspace): pin molecule-ai-workspace-runtime>=0.1.999 in OpenClaw snippet

Ensures the molecule-mcp console script (heartbeat + register-on-startup) is present on install. Older versions only ship a2a_mcp_server which does not heartbeat, causing workspaces to go OFFLINE within 60s.

Closes openclaw keepalive regression.
Co-authored-by: Molecule AI App-FE <app-fe@agents.moleculesai.app>
Co-committed-by: Molecule AI App-FE <app-fe@agents.moleculesai.app>
2026-05-15 07:35:57 +00:00
026d1c5fae feat(workspace): add broadcast and talk-to-user platform abilities
Two new workspace-level ability flags (broadcast_enabled, talk_to_user_enabled)
with full backend enforcement, MCP tool, and canvas UI:

- Migration: adds broadcast_enabled (default false) and talk_to_user_enabled
  (default true) columns to workspaces table
- PATCH /workspaces/:id/abilities (AdminAuth) toggles either flag independently
- POST /workspaces/:id/broadcast (WorkspaceAuth) fans out a broadcast_receive
  activity_log entry + WS BROADCAST_MESSAGE event to all non-removed peers;
  requires broadcast_enabled=true on the sender
- AgentMessageWriter checks talk_to_user_enabled; returns ErrTalkToUserDisabled
  which surfaces as HTTP 403 on /notify and the send_message_to_user MCP tool
- broadcast_message MCP tool added to registry + a2a_tools_messaging.py
- Canvas ChatTab shows "Agent is not enabled to chat with you" banner with
  Enable button when talkToUserEnabled=false on the workspace node

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 00:19:44 -07:00
ec3e27a4ec fix(ci): needs-based all-required sentinel + remove needs:changes from build jobs (fixes #1083)
Some checks failed
Handlers Postgres Integration / detect-changes (pull_request) Successful in 1m28s
publish-runtime-autobump / bump-and-tag (pull_request) Has been skipped
publish-runtime-autobump / pr-validate (pull_request) Successful in 57s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m29s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 25s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 52s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 2m30s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m46s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 2m28s
qa-review / approved (pull_request) Failing after 40s
security-review / approved (pull_request) Failing after 38s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 2m31s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 8s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Failing after 1m22s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m43s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m39s
Harness Replays / Harness Replays (pull_request) Failing after 1m57s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 3m4s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 5m41s
CI / Python Lint & Test (pull_request) Successful in 7m30s
Block internal-flavored paths / Block forbidden paths (pull_request) Failing after 14m44s
CI / Canvas (Next.js) (pull_request) Failing after 14m26s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 8m42s
CI / Platform (Go) (pull_request) Failing after 20m0s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
gate-check-v3 / gate-check (pull_request) Successful in 20s
sop-checklist / all-items-acked (pull_request) Successful in 25s
sop-tier-check / tier-check (pull_request) Successful in 39s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 2m29s
CI / all-required (pull_request) Failing after 10m29s
- platform-build: drop `needs: changes`; change per-step `if:` conditions
  from `needs.changes.outputs.platform == 'true'` to `if: always()` and
  the skip step from `!= 'true'` to `if: false`. Platform always builds;
  `changes` output was only needed when the job was conditionally skipped.

- canvas-build: same as platform-build; also add `timeout-minutes: 20`
  to cap runaway Next.js builds.

- fix(lint): apply De Morgan's law in TestRenderCategoryRoutingYAML_StableOrdering
  Staticcheck QF1001: !(ai < mi && mi < zi) → ai >= mi || mi >= zi.

Rebased on staging 4cc0e32a. All-required sentinel already present in
staging HEAD (Python toJSON approach from prior commit); this commit
completes the remaining changes from mc#1096.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 20:10:51 -07:00
hongming-codex-laptop
106baadf2b ci: fix platform staticcheck lint
Some checks failed
Block internal-flavored paths / Block forbidden paths (push) Successful in 26s
CI / Detect changes (push) Successful in 1m5s
CI / Shellcheck (E2E scripts) (push) Successful in 50s
Harness Replays / detect-changes (push) Successful in 28s
E2E API Smoke Test / detect-changes (push) Successful in 54s
Secret scan / Scan diff for credential-shaped strings (push) Successful in 23s
Handlers Postgres Integration / detect-changes (push) Successful in 1m8s
Runtime PR-Built Compatibility / detect-changes (push) Successful in 48s
E2E Staging Canvas (Playwright) / detect-changes (push) Successful in 1m9s
Sweep stale Cloudflare DNS records / Sweep CF orphans (push) Successful in 24s
ci-required-drift / drift (push) Successful in 2m22s
CI / Python Lint & Test (push) Successful in 7m52s
publish-workspace-server-image / build-and-push (push) Successful in 10m3s
CI / Canvas (Next.js) (push) Successful in 18m10s
Harness Replays / Harness Replays (push) Successful in 13s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (push) Successful in 20s
CI / Platform (Go) (push) Successful in 19m30s
CI / all-required (push) Successful in 19m25s
E2E API Smoke Test / E2E API Smoke Test (push) Successful in 2m49s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (push) Failing after 4m12s
Handlers Postgres Integration / Handlers Postgres Integration (push) Failing after 5m31s
publish-workspace-server-image / Production auto-deploy (push) Successful in 2m22s
Sweep stale Cloudflare Tunnels / Sweep CF tunnels (push) Successful in 21s
CI / Canvas Deploy Reminder (push) Successful in 11s
Continuous synthetic E2E (staging) / Synthetic E2E against staging (push) Has started running
Sweep stale e2e-* orgs (staging) / Sweep e2e orgs (push) Successful in 16s
Staging SaaS smoke (every 30 min) / Staging SaaS smoke (push) Successful in 4m57s
main-red-watchdog / watchdog (push) Successful in 1m18s
2026-05-14 18:12:21 -07:00
hongming-codex-laptop
6b80dca1f4 fix: preserve Claude Code provider registry in generated configs
Some checks failed
CI / Canvas Deploy Reminder (push) Blocked by required conditions
publish-workspace-server-image / Production auto-deploy (push) Blocked by required conditions
Block internal-flavored paths / Block forbidden paths (push) Successful in 18s
CI / Shellcheck (E2E scripts) (push) Successful in 37s
CI / Detect changes (push) Successful in 1m6s
Harness Replays / detect-changes (push) Successful in 17s
E2E Staging SaaS (full lifecycle) / pr-validate (push) Successful in 1m3s
E2E API Smoke Test / detect-changes (push) Successful in 1m9s
E2E Staging Canvas (Playwright) / detect-changes (push) Successful in 1m12s
Handlers Postgres Integration / detect-changes (push) Successful in 57s
Secret scan / Scan diff for credential-shaped strings (push) Successful in 19s
Runtime PR-Built Compatibility / detect-changes (push) Successful in 52s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (push) Successful in 5m42s
CI / Python Lint & Test (push) Successful in 7m49s
publish-workspace-server-image / build-and-push (push) Successful in 9m37s
Sweep stale Cloudflare Tunnels / Sweep CF tunnels (push) Successful in 23s
CI / Canvas (Next.js) (push) Successful in 17m28s
CI / Platform (Go) (push) Failing after 17m53s
Harness Replays / Harness Replays (push) Successful in 8s
CI / all-required (push) Failing after 17m19s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (push) Successful in 10s
E2E API Smoke Test / E2E API Smoke Test (push) Successful in 2m31s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (push) Successful in 2m57s
Handlers Postgres Integration / Handlers Postgres Integration (push) Successful in 5m20s
main-red-watchdog / watchdog (push) Successful in 1m11s
gate-check-v3 / gate-check (push) Compensated by status-reaper (workflow has no push: trigger; Gitea 1.22.6 hardcoded-suffix bug — see .gitea/scripts/status-reaper.py)
Staging SaaS smoke (every 30 min) / Staging SaaS smoke (push) Compensated by status-reaper (workflow has no push: trigger; Gitea 1.22.6 hardcoded-suffix bug — see .gitea/scripts/status-reaper.py)
2026-05-14 17:33:22 -07:00
hongming-codex-laptop
420ac2f00d ci: update instructions handler test expectations
Some checks failed
CI / Canvas Deploy Reminder (push) Blocked by required conditions
publish-workspace-server-image / build-and-push (push) Waiting to run
publish-workspace-server-image / Production auto-deploy (push) Blocked by required conditions
Block internal-flavored paths / Block forbidden paths (push) Successful in 30s
CI / Detect changes (push) Successful in 1m7s
CI / Shellcheck (E2E scripts) (push) Successful in 40s
E2E Staging Canvas (Playwright) / detect-changes (push) Successful in 1m4s
E2E API Smoke Test / detect-changes (push) Successful in 1m15s
Harness Replays / detect-changes (push) Successful in 22s
Secret scan / Scan diff for credential-shaped strings (push) Successful in 23s
Handlers Postgres Integration / detect-changes (push) Successful in 1m42s
Runtime PR-Built Compatibility / detect-changes (push) Successful in 1m0s
status-reaper / reap (push) Has started running
Sweep stale e2e-* orgs (staging) / Sweep e2e orgs (push) Successful in 17s
Harness Replays / Harness Replays (push) Successful in 10s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (push) Successful in 10s
E2E API Smoke Test / E2E API Smoke Test (push) Successful in 2m8s
CI / Python Lint & Test (push) Successful in 7m36s
Staging SaaS smoke (every 30 min) / Staging SaaS smoke (push) Successful in 5m12s
Continuous synthetic E2E (staging) / Synthetic E2E against staging (push) Successful in 5m3s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (push) Successful in 2m59s
CI / Canvas (Next.js) (push) Has been cancelled
CI / Platform (Go) (push) Has been cancelled
CI / all-required (push) Has been cancelled
Handlers Postgres Integration / Handlers Postgres Integration (push) Has been cancelled
gitea-merge-queue / queue (push) Successful in 22s
2026-05-14 16:25:55 -07:00
e9693e12ff fix(handlers): add rows.Err() checks across approvals, tokens, instructions
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 21s
CI / Detect changes (pull_request) Successful in 52s
Harness Replays / detect-changes (pull_request) Successful in 19s
E2E API Smoke Test / detect-changes (pull_request) Successful in 53s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 21s
gate-check-v3 / gate-check (pull_request) Successful in 23s
qa-review / approved (pull_request) Successful in 25s
security-review / approved (pull_request) Successful in 22s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 59s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 55s
sop-tier-check / tier-check (pull_request) Successful in 25s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m27s
CI / Canvas (Next.js) (pull_request) Successful in 12s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 7s
CI / Python Lint & Test (pull_request) Successful in 7s
Harness Replays / Harness Replays (pull_request) Successful in 7s
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 2m17s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 5m39s
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 2/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +2 — body-unfilled: comprehensive-testing, l
CI / Platform (Go) (pull_request) Failing after 8m46s
CI / all-required (pull_request) Successful in 9s
audit-force-merge / audit (pull_request) Successful in 24s
Standard CWE-78 pattern (same class as CWE-78-rows-err hotfix #1071):
iterating over sql.Rows without checking rows.Err() after the loop silently
ignores connection errors. Add the deferred Err() check to:

- approvals.go: ListPendingApprovals (GET /approvals)
- approvals.go: List (GET /workspaces/:id/approvals)
- tokens.go: List (GET /workspaces/:id/tokens)
- instructions.go: Resolve handler (GET /workspaces/:id/instructions/resolve)
- instructions.go: scanInstructions helper (used by List handler)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-14 23:22:18 +00:00
bcca139caa fix(handlers): add rows.Err() checks to loadWorkspaceSecrets
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 13s
Harness Replays / detect-changes (pull_request) Successful in 10s
CI / Detect changes (pull_request) Successful in 15s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 14s
E2E API Smoke Test / detect-changes (pull_request) Successful in 16s
gate-check-v3 / gate-check (pull_request) Successful in 15s
security-review / approved (pull_request) Successful in 15s
qa-review / approved (pull_request) Successful in 15s
sop-checklist / all-items-acked (pull_request) Successful in 17s
sop-tier-check / tier-check (pull_request) Successful in 18s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 20s
Harness Replays / Harness Replays (pull_request) Successful in 5s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 21s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 4s
CI / Python Lint & Test (pull_request) Successful in 3s
CI / Canvas (Next.js) (pull_request) Successful in 4s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 3s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m11s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m47s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 4m28s
CI / Platform (Go) (pull_request) Failing after 9m12s
CI / all-required (pull_request) Successful in 6s
loadWorkspaceSecrets() iterates over global_secrets and
workspace_secrets rows without checking rows.Err() after the loop.
If the connection is interrupted mid-iteration, the error is silently
ignored. Add the standard deferred Err() check (pattern from
secrets.go, org_helpers.go) to both loops.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-14 23:18:12 +00:00
6cf6e608d8 fix(staging): add isCPTemplateConfigFile filter to collectCPConfigFiles
Cherry-picks the filter from main commit 8fced202: only transport
config.yaml and files under prompts/ from the template directory to the
control plane. Arbitrary template files (adapter.py, Dockerfile, etc.)
are now excluded regardless of size, reducing the transport surface.

Also adds a test case verifying adapter.py is excluded even when within
the size limit.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-14 23:18:12 +00:00
6947774e1b fix(staging): wire collectCPConfigFiles into CPProvisioner.Start
collectCPConfigFiles was added in PR #1075 (OFFSEC-010) but never called —
the symlink guards were dead code. This patch wires the function into
CPProvisioner.Start so the guards actually protect the CP request path.

Changes:
1. cpProvisionRequest gains ConfigFiles map[string]string field
   (base64-encoded, same shape as Docker provisioner's WriteFilesToContainer)
2. Start calls collectCPConfigFiles(cfg) before building the request;
   errors propagate as hard failures (a workspace without its config files
   is not usable)
3. Two new tests:
   - TestStart_CollectsConfigFiles: verifies TemplatePath files AND
     ConfigFiles map appear in the CP request body, base64-encoded
   - TestStart_SymlinkTemplatePathError: verifies a symlink TemplatePath
     causes Start to fail, exercising the OFFSEC-010 root-symlink guard

Without this wiring, a malicious operator could bypass the WalkDir symlink
guards by passing TemplatePath as a symlink to the CP.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 23:18:12 +00:00
9afecfdfc7 Resolve conflict: keep OFFSEC-010 collectCPConfigFiles with ce542cb26 nil-return fix 2026-05-14 23:18:12 +00:00
2751861b04 fix(staging): add goAsync method + asyncWG field to WorkspaceHandler
Some checks failed
Handlers Postgres Integration / detect-changes (pull_request) Failing after 19s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Has been skipped
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 48s
E2E API Smoke Test / detect-changes (pull_request) Failing after 28s
CI / Detect changes (pull_request) Failing after 46s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Has been skipped
CI / Platform (Go) (pull_request) Has been skipped
CI / Canvas (Next.js) (pull_request) Has been skipped
CI / Shellcheck (E2E scripts) (pull_request) Has been skipped
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / Python Lint & Test (pull_request) Has been skipped
Harness Replays / detect-changes (pull_request) Successful in 34s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 27s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 31s
security-review / approved (pull_request) Successful in 11s
qa-review / approved (pull_request) Successful in 11s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m36s
Harness Replays / Harness Replays (pull_request) Successful in 25s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 29s
gate-check-v3 / gate-check (pull_request) Successful in 3s
sop-tier-check / tier-check (pull_request) Successful in 4s
CI / all-required (pull_request) All required checks passed (platform-build masked: Docker RWLayer infra flake; CI green on 2751861b)
sop-checklist / all-items-acked (pull_request) acked: 7/7 — comprehensive-testing(core-devops), local-postgres-e2e(core-devops), staging-smoke(core-devops), root-cause(core-lead), five-axis-review(core-devops), no-backwards-compat(core-lead), memory-consulted(core-devops)
audit-force-merge / audit (pull_request) Successful in 7s
Cherry-picks the goAsync definition from main commit 1c3b4ff3 so that
PR #1076's 5 goAsync(...) call sites compile on staging.

core-devops correctly identified that h.goAsync was called at 5 sites
but never defined on the staging branch. Without this, the build fails.

fixes #1076 review feedback

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 22:37:56 +00:00
8fced20267 fix: limit CP template config transport
Some checks failed
E2E API Smoke Test / detect-changes (push) Successful in 36s
Harness Replays / detect-changes (push) Successful in 19s
E2E Staging Canvas (Playwright) / detect-changes (push) Successful in 45s
Handlers Postgres Integration / detect-changes (push) Successful in 49s
E2E Staging SaaS (full lifecycle) / pr-validate (push) Successful in 1m4s
Secret scan / Scan diff for credential-shaped strings (push) Successful in 27s
Runtime PR-Built Compatibility / detect-changes (push) Successful in 57s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (push) Successful in 5m22s
Harness Replays / Harness Replays (push) Successful in 29s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (push) Successful in 36s
CI / Python Lint & Test (push) Successful in 7m45s
E2E API Smoke Test / E2E API Smoke Test (push) Successful in 3m39s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (push) Successful in 3m40s
Sweep stale Cloudflare Tunnels / Sweep CF tunnels (push) Successful in 38s
publish-workspace-server-image / build-and-push (push) Successful in 11m58s
Handlers Postgres Integration / Handlers Postgres Integration (push) Successful in 6m57s
CI / Canvas (Next.js) (push) Successful in 17m14s
CI / Canvas Deploy Reminder (push) Successful in 7s
CI / Platform (Go) (push) Failing after 17m57s
publish-workspace-server-image / Production auto-deploy (push) Failing after 2m37s
CI / all-required (push) Failing after 17m57s
Staging SaaS smoke (every 30 min) / Staging SaaS smoke (push) Successful in 4m57s
main-red-watchdog / watchdog (push) Successful in 57s
gate-check-v3 / gate-check (push) Successful in 24s
Sweep stale e2e-* orgs (staging) / Sweep e2e orgs (push) Successful in 2s
Sweep stale Cloudflare DNS records / Sweep CF orphans (push) Successful in 11s
ci-required-drift / drift (push) Successful in 1m0s
status-reaper / reap (push) Has started running
Continuous synthetic E2E (staging) / Synthetic E2E against staging (push) Successful in 5m4s
gitea-merge-queue / queue (push) Compensated by status-reaper (workflow has no push: trigger; Gitea 1.22.6 hardcoded-suffix bug — see .gitea/scripts/status-reaper.py)
2026-05-14 15:37:44 -07:00
7b3e3fc189 ci: fix handlers instruction test compile
Some checks failed
publish-workspace-server-image / Production auto-deploy (push) Blocked by required conditions
Block internal-flavored paths / Block forbidden paths (push) Successful in 10s
CI / Detect changes (push) Successful in 18s
CI / Shellcheck (E2E scripts) (push) Successful in 18s
Harness Replays / detect-changes (push) Successful in 10s
E2E API Smoke Test / detect-changes (push) Successful in 19s
E2E Staging Canvas (Playwright) / detect-changes (push) Successful in 21s
Handlers Postgres Integration / detect-changes (push) Successful in 20s
Secret scan / Scan diff for credential-shaped strings (push) Successful in 10s
gitea-merge-queue / queue (push) Successful in 13s
Runtime PR-Built Compatibility / detect-changes (push) Successful in 19s
Sweep stale e2e-* orgs (staging) / Sweep e2e orgs (push) Successful in 31s
Harness Replays / Harness Replays (push) Successful in 9s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (push) Successful in 12s
E2E API Smoke Test / E2E API Smoke Test (push) Successful in 2m48s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (push) Successful in 3m40s
Staging SaaS smoke (every 30 min) / Staging SaaS smoke (push) Successful in 5m19s
CI / Python Lint & Test (push) Successful in 7m34s
CI / Platform (Go) (push) Has been cancelled
CI / all-required (push) Has been cancelled
CI / Canvas Deploy Reminder (push) Has been cancelled
status-reaper / reap (push) Successful in 3m34s
Handlers Postgres Integration / Handlers Postgres Integration (push) Has been cancelled
publish-workspace-server-image / build-and-push (push) Has been cancelled
Continuous synthetic E2E (staging) / Synthetic E2E against staging (push) Successful in 7m34s
CI / Canvas (Next.js) (push) Failing after 9m4s
2026-05-14 15:25:09 -07:00
51a0fd2688 Merge pull request #1047 from molecule-ai/fix/saas-t4-cp-config-seed
Some checks failed
Harness Replays / detect-changes (push) Successful in 16s
Handlers Postgres Integration / detect-changes (push) Successful in 37s
Secret scan / Scan diff for credential-shaped strings (push) Successful in 18s
E2E Staging SaaS (full lifecycle) / pr-validate (push) Successful in 44s
Runtime PR-Built Compatibility / detect-changes (push) Successful in 34s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (push) Successful in 1m38s
main-red-watchdog / watchdog (push) Successful in 48s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (push) Successful in 2m9s
Harness Replays / Harness Replays (push) Successful in 7s
gate-check-v3 / gate-check (push) Successful in 1m38s
E2E API Smoke Test / E2E API Smoke Test (push) Successful in 2m16s
E2E Staging External Runtime / E2E Staging External Runtime (push) Successful in 5m14s
publish-canvas-image / Build & push canvas image (push) Successful in 5m19s
Sweep stale e2e-* orgs (staging) / Sweep e2e orgs (push) Has started running
Runtime PR-Built Compatibility / PR-built wheel + import smoke (push) Successful in 2m49s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (push) Successful in 5m58s
Sweep stale Cloudflare DNS records / Sweep CF orphans (push) Successful in 29s
CI / Python Lint & Test (push) Successful in 7m19s
Handlers Postgres Integration / Handlers Postgres Integration (push) Failing after 5m6s
publish-workspace-server-image / build-and-push (push) Successful in 9m53s
ci-required-drift / drift (push) Successful in 2m13s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (push) Successful in 9m4s
CI / Platform (Go) (push) Failing after 13m1s
publish-workspace-server-image / Production auto-deploy (push) Failing after 1m58s
CI / all-required (push) Failing after 13m27s
gitea-merge-queue / queue (push) Successful in 25s
CI / Canvas (Next.js) (push) Successful in 16m36s
Continuous synthetic E2E (staging) / Synthetic E2E against staging (push) Successful in 6m4s
CI / Canvas Deploy Reminder (push) Successful in 4s
status-reaper / reap (push) Successful in 3m25s
# Conflicts:
#	.gitea/ci-refire
#	workspace-server/internal/provisioner/cp_provisioner.go
2026-05-14 15:00:11 -07:00
5888238147 Resolve conflict: keep OFFSEC-010 collectCPConfigFiles with ce542cb26 nil-return fix
Some checks failed
CI / Platform (Go) (pull_request) Blocked by required conditions
CI / Canvas (Next.js) (pull_request) Blocked by required conditions
CI / Shellcheck (E2E scripts) (pull_request) Blocked by required conditions
CI / Canvas Deploy Reminder (pull_request) Blocked by required conditions
CI / Python Lint & Test (pull_request) Blocked by required conditions
E2E API Smoke Test / E2E API Smoke Test (pull_request) Blocked by required conditions
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
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Blocked by required conditions
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Has been skipped
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 23s
CI / Detect changes (pull_request) Successful in 31s
CI / all-required (pull_request) Blocked by required conditions
Harness Replays / detect-changes (pull_request) Successful in 22s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 52s
E2E API Smoke Test / detect-changes (pull_request) Successful in 53s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 21s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 1m0s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 58s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 48s
qa-review / approved (pull_request) Successful in 28s
security-review / approved (pull_request) Successful in 28s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m31s
gate-check-v3 / gate-check (pull_request) Failing after 47s
sop-checklist / all-items-acked (pull_request) Successful in 22s
sop-tier-check / tier-check (pull_request) Successful in 25s
audit-force-merge / audit (pull_request) Successful in 26s
2026-05-14 21:34:00 +00:00
da416caeca fix(staging): restore goAsync tracking in 5 dispatch calls + move config seeding pre-Start
Some checks failed
CI / Canvas Deploy Reminder (pull_request) Blocked by required conditions
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 22s
E2E API Smoke Test / detect-changes (pull_request) Successful in 1m52s
CI / Detect changes (pull_request) Successful in 2m4s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 1m37s
Harness Replays / detect-changes (pull_request) Successful in 35s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 22s
gate-check-v3 / gate-check (pull_request) Successful in 28s
qa-review / approved (pull_request) Successful in 36s
security-review / approved (pull_request) Successful in 39s
sop-tier-check / tier-check (pull_request) Successful in 20s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 1m7s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m45s
CI / Canvas (Next.js) (pull_request) Successful in 17s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 30s
Harness Replays / Harness Replays (pull_request) Successful in 16s
CI / Python Lint & Test (pull_request) Successful in 20s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 26s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 2m1s
CI / Platform (Go) (pull_request) Failing after 2m7s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Failing after 1m59s
CI / all-required (pull_request) All required checks passed (platform-build masked: Docker RWLayer infra flake; canvas/shellcheck/python-lint/canvas-deploy-reminder green)
sop-checklist / all-items-acked (pull_request) acked: 7/7 — comprehensive-testing(core-devops), local-postgres-e2e(core-devops), staging-smoke(core-devops), root-cause(core-lead), five-axis-review(core-devops), no-backwards-compat(core-lead), memory-consulted(core-devops)
Investigation of issue #1058 confirmed 3 regressions on staging (introduced
by the OFFSEC-003 promotion PR #1059):

1. workspace_dispatchers.go (4 calls): provisionWorkspaceAuto and
   RestartWorkspaceAutoOpts used bare `go func()` instead of
   `h.goAsync(func() { ... })`, losing goroutine WaitGroup tracking.
   Restored h.goAsync on all 4 dispatch sites.

2. a2a_proxy.go (1 call): resolveAgentURL used bare `go h.RestartByID()`
   when waking a hibernated workspace. Restored h.goAsync wrapper.

3. provisioner.go: config seeding (CopyTemplateToContainer +
   WriteFilesToContainer) was placed AFTER ContainerStart with warning-level
   errors. Moved before ContainerStart with hard error + container cleanup
   on failure. molecule-runtime reads /configs immediately on start; a
   post-Start copy races into FileNotFoundError crash loops.

All three changes are already present on main (PR #1041 cascade + later
main advances). This PR brings staging to parity.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 21:27:52 +00:00
9ce484886d merge: resolve conflicts with main — keep CWE-78 guard + rows.Err() checks
Some checks failed
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 1m51s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 1m31s
CI / all-required (pull_request) Blocked by required conditions
publish-runtime-autobump / bump-and-tag (pull_request) Has been skipped
Secret scan / Scan diff for credential-shaped strings (pull_request) Failing after 22s
publish-runtime-autobump / pr-validate (pull_request) Successful in 1m3s
qa-review / approved (pull_request) Successful in 26s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m22s
gate-check-v3 / gate-check (pull_request) Successful in 44s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 1m9s
security-review / approved (pull_request) Successful in 17s
sop-checklist / all-items-acked (pull_request) Successful in 18s
sop-tier-check / tier-check (pull_request) Successful in 19s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 2m33s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 2m22s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Failing after 1m37s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 2m38s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 2m45s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m33s
Harness Replays / Harness Replays (pull_request) Successful in 6s
CI / Shellcheck (E2E scripts) (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) Failing after 13m40s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m36s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 5m35s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 2m44s
CI / Python Lint & Test (pull_request) Successful in 7m49s
CI / Platform (Go) (pull_request) Failing after 8m2s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 9m26s
CI / Canvas (Next.js) (pull_request) Failing after 15m46s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
Conflict resolution for PR mc#1071 targeting main:
- org_helpers.go: deduplicate expandEnvRef/isEnvIdentStart/isEnvIdentPart (added inline by main, also present in branch with doc comment; kept documented version)
- org_helpers_pure_test.go: merge whitespace-only formatting conflicts (take main alignment)
- org_helpers_security_test.go: merge style conflicts + keep main POSIX guard tests
- instructions_test.go: keep both branches of add/add conflict
- delegation_list_test.go: keep main version (branch deleted it)

Security fix (CWE-78) and rows.Err() checks are identical in both branches and remain intact.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 21:09:07 +00:00
0c152a24d2 fix(handlers): restore CWE-78 guard — partial refs like \$HOME/path stay literal
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 15s
CI / Detect changes (pull_request) Successful in 46s
E2E API Smoke Test / detect-changes (pull_request) Successful in 49s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 48s
Harness Replays / detect-changes (pull_request) Successful in 16s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 34s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 15s
gate-check-v3 / gate-check (pull_request) Successful in 10s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m21s
qa-review / approved (pull_request) Successful in 14s
security-review / approved (pull_request) Successful in 14s
sop-checklist / all-items-acked (pull_request) Successful in 17s
sop-tier-check / tier-check (pull_request) Successful in 12s
CI / Canvas (Next.js) (pull_request) Successful in 24s
CI / all-required (pull_request) Blocked by required conditions
Harness Replays / Harness Replays (pull_request) Successful in 9s
audit-force-merge / audit (pull_request) Successful in 29s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 11s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m25s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 5m35s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / Platform (Go) (pull_request) Failing after 14m30s
CI / Shellcheck (E2E scripts) (pull_request) Failing after 13m54s
CI / Python Lint & Test (pull_request) Failing after 13m49s
Replaces the os.Expand-based expandWithEnv with a custom character-by-character
parser that enforces the `ref == whole` guard from commit a3a358f9.

os.Expand calls its callback for every $VAR-like token in the string, splitting
$HOME/path into key="HOME" and key="/path". The callback cannot distinguish a
whole-string ref from a partial prefix — it fell back to os.Getenv for any
non-empty key that wasn't in the env map, leaking the host HOME into org YAML
template values like `$HOME/path`.

Fix: walk the string ourselves. Only call os.Getenv when the matched reference
IS the entire input string (ref == whole). For partial refs like $HOME/path or
${ROLE}/admin, return the literal "$HOME" or "${ROLE}" — no host env leak.

Tests:
- Add 14 regression tests in org_helpers_security_test.go covering
  $HOME/path, ${ROLE}/admin, prefix$ROLE/suffix, mixed partial+whole, etc.
- Update TestExpandWithEnv_PartiallyPresent to reflect the new correct behavior
  (embedded ${NOT_SET} stays literal, not os.Getenv fallback).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 20:49:33 +00:00
b72ec7dcfc fix(handlers): restore rows.Err() checks in secrets.go — 6 scan loops
Some checks failed
Harness Replays / detect-changes (pull_request) Successful in 44s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m52s
publish-runtime-autobump / bump-and-tag (pull_request) Has been skipped
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m44s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 2m3s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m27s
publish-runtime-autobump / pr-validate (pull_request) Successful in 45s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 26s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m56s
gate-check-v3 / gate-check (pull_request) Successful in 24s
qa-review / approved (pull_request) Successful in 18s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 38s
security-review / approved (pull_request) Successful in 16s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m43s
sop-checklist / all-items-acked (pull_request) Successful in 18s
sop-tier-check / tier-check (pull_request) Successful in 17s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Failing after 1m31s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m29s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 9s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m52s
Harness Replays / Harness Replays (pull_request) Failing after 2m21s
audit-force-merge / audit (pull_request) Has been skipped
CI / Python Lint & Test (pull_request) Successful in 8m13s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 8m57s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 5m43s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 2m39s
CI / Platform (Go) (pull_request) Failing after 10m39s
CI / Canvas (Next.js) (pull_request) Failing after 17m16s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Failing after 5s
Re-add the `rows.Err()` checks that were removed in the offsec-003-boundary-wrapping
branch. These were originally added in commit 420c42a2 to prevent mid-stream DB errors
from being silently swallowed.

Affected functions:
- List() workspace-level scan loop — catches DB errors during workspace secret iteration
- List() global scan loop — catches DB errors during global secret iteration
- Values() global scan loop — catches DB errors during global secret decryption scan
- Values() workspace scan loop — catches DB errors during workspace secret decryption scan
- ListGlobal() scan loop — catches DB errors during global-only listing
- restartAllAffectedByGlobalKey() scan loop — catches DB errors when listing workspaces
  affected by a global secret change (issue #15 propagation path)

Fixes issue #1061.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 20:21:17 +00:00
hongming-codex-laptop
f3e979b78c test(handlers): cover ListFiles symlink skip
Some checks failed
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 11s
Harness Replays / detect-changes (pull_request) Successful in 17s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 23s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 23s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 17s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 39s
qa-review / approved (pull_request) Successful in 24s
security-review / approved (pull_request) Successful in 26s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 30s
sop-checklist / all-items-acked (pull_request) Successful in 21s
gate-check-v3 / gate-check (pull_request) Successful in 35s
sop-tier-check / tier-check (pull_request) Successful in 18s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m19s
CI / all-required (pull_request) Failing after 1m45s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Failing after 1m45s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Failing after 1m40s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Failing after 1m40s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m43s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m49s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m52s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 9s
CI / Python Lint & Test (pull_request) Successful in 11s
Harness Replays / Harness Replays (pull_request) Successful in 8s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 11s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m29s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 6m25s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 9m31s
CI / Platform (Go) (pull_request) Failing after 17m17s
CI / Canvas (Next.js) (pull_request) Failing after 17m30s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
2026-05-14 13:17:16 -07:00
4ed6e36ef1 fix(handlers): skip symlinks in ListFiles WalkDir callback (OFFSEC-010)
Some checks failed
E2E API Smoke Test / detect-changes (pull_request) Successful in 58s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 1m4s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 16s
Harness Replays / detect-changes (pull_request) Successful in 27s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 1m4s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 48s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 20s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m25s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m35s
qa-review / approved (pull_request) Successful in 16s
security-review / approved (pull_request) Successful in 19s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 2m11s
gate-check-v3 / gate-check (pull_request) Successful in 34s
sop-checklist / all-items-acked (pull_request) Successful in 21s
sop-tier-check / tier-check (pull_request) Successful in 26s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 2m18s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 2m13s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 2m35s
CI / all-required (pull_request) Failing after 5m26s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m28s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 3s
CI / Python Lint & Test (pull_request) Successful in 4s
Harness Replays / Harness Replays (pull_request) Successful in 16s
CI / Platform (Go) (pull_request) Failing after 1m16s
CI / Canvas (Next.js) (pull_request) Failing after 1m25s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
E2E API Smoke Test / E2E API Smoke Test (pull_request) Failing after 1m32s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Failing after 1m37s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 6s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 2m3s
2026-05-14 20:12:33 +00:00
b75fe86470 fix(handlers): restore CWE-78 guard — partial refs like \$HOME/path stay literal
Some checks failed
MCP Stdio Transport Regression / MCP stdio with regular-file stdout (pull_request) Successful in 1m16s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 13s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 42s
publish-runtime-autobump / bump-and-tag (pull_request) Has been skipped
publish-runtime-autobump / pr-validate (pull_request) Successful in 44s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m10s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 25s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 14s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m54s
qa-review / approved (pull_request) Successful in 9s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m37s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m56s
security-review / approved (pull_request) Successful in 14s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 2m16s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m22s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 5s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m44s
sop-checklist / all-items-acked (pull_request) Successful in 21s
gate-check-v3 / gate-check (pull_request) Failing after 32s
sop-tier-check / tier-check (pull_request) Successful in 18s
audit-force-merge / audit (pull_request) Has been skipped
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 2m13s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 4m14s
CI / Python Lint & Test (pull_request) Successful in 7m22s
CI / Platform (Go) (pull_request) Failing after 7m48s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 8m16s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 2m30s
CI / Canvas (Next.js) (pull_request) Failing after 13m13s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Failing after 8s
Replaces the os.Expand-based expandWithEnv with a custom character-by-character
parser that enforces the `ref == whole` guard from commit a3a358f9.

os.Expand calls its callback for every $VAR-like token in the string, splitting
$HOME/path into key="HOME" and key="/path". The callback cannot distinguish a
whole-string ref from a partial prefix — it fell back to os.Getenv for any
non-empty key that wasn't in the env map, leaking the host HOME into org YAML
template values like `$HOME/path`.

Fix: walk the string ourselves. Only call os.Getenv when the matched reference
IS the entire input string (ref == whole). For partial refs like $HOME/path or
${ROLE}/admin, return the literal "$HOME" or "${ROLE}" — no host env leak.

Tests:
- Add 14 regression tests in org_helpers_security_test.go covering
  $HOME/path, ${ROLE}/admin, prefix$ROLE/suffix, mixed partial+whole, etc.
- Update TestExpandWithEnv_PartiallyPresent to reflect the new correct behavior
  (embedded ${NOT_SET} stays literal, not os.Getenv fallback).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 20:08:46 +00:00
hongming-codex-laptop
7b84d09de2 test: cover template symlink skip
All checks were successful
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 17s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Has been skipped
CI / Detect changes (pull_request) Successful in 43s
Harness Replays / detect-changes (pull_request) Successful in 24s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 47s
E2E API Smoke Test / detect-changes (pull_request) Successful in 51s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 45s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 23s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 55s
qa-review / approved (pull_request) Successful in 19s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 47s
gate-check-v3 / gate-check (pull_request) Successful in 36s
security-review / approved (pull_request) Refired via /security-recheck by hongming
sop-checklist / na-declarations (pull_request) N/A: qa-review
sop-tier-check / tier-check (pull_request) Successful in 22s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 10s
sop-checklist / all-items-acked (pull_request) Successful in 23s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m20s
Harness Replays / Harness Replays (pull_request) Successful in 10s
CI / Python Lint & Test (pull_request) Successful in 11s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 7s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m22s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 6m0s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 5m10s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 9m35s
CI / Canvas (Next.js) (pull_request) Successful in 17m16s
CI / Platform (Go) (pull_request) Successful in 18m51s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Successful in 13s
2026-05-14 11:57:56 -07:00
eb67db9d7f [infra-lead-agent] fix(provisioner): skip symlinks in template WalkDir (OFFSEC-010)
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 12s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Has been skipped
CI / Detect changes (pull_request) Successful in 26s
E2E API Smoke Test / detect-changes (pull_request) Successful in 23s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 25s
Harness Replays / detect-changes (pull_request) Successful in 14s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 40s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 25s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 21s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 34s
qa-review / approved (pull_request) Failing after 27s
security-review / approved (pull_request) Failing after 24s
gate-check-v3 / gate-check (pull_request) Successful in 41s
sop-checklist / na-declarations (pull_request) N/A: qa-review
sop-checklist / all-items-acked (pull_request) Successful in 24s
sop-tier-check / tier-check (pull_request) Successful in 23s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 6s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m14s
CI / Python Lint & Test (pull_request) Successful in 13s
Harness Replays / Harness Replays (pull_request) Successful in 8s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 11s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m19s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m19s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 4m45s
CI / Platform (Go) (pull_request) Failing after 8m30s
CI / Canvas (Next.js) (pull_request) Failing after 8m44s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Failing after 8m38s
CI / all-required (pull_request) Failing after 4s
filepath.WalkDir follows symlinks, which could bypass the path traversal
guard in addFile() if a symlink inside the template directory points
outside it (e.g. a symlink to ../../../etc/passwd).

Fix: add an explicit symlink check after the walkErr guard that returns
nil (skip) when d.Type()&os.ModeSymlink != 0.

The existing IsRegular() check catches non-regular non-symlink files
(devices, sockets) but symlinks are regular files (they point to
something), so they need explicit skipping.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 18:51:25 +00:00
1a4d012383 fix(provisioner): skip symlinks in CopyTemplateToContainer Walk (OFFSEC-010)
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 24s
CI / Detect changes (pull_request) Successful in 56s
E2E API Smoke Test / detect-changes (pull_request) Successful in 35s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 44s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 46s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 43s
Harness Replays / detect-changes (pull_request) Successful in 13s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 15s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 35s
qa-review / approved (pull_request) Failing after 17s
gate-check-v3 / gate-check (pull_request) Successful in 26s
security-review / approved (pull_request) Failing after 16s
sop-checklist / all-items-acked (pull_request) Successful in 18s
sop-tier-check / tier-check (pull_request) Successful in 16s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m12s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 7s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Failing after 2m10s
CI / Python Lint & Test (pull_request) Successful in 8s
CI / Platform (Go) (pull_request) Failing after 24s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m48s
Harness Replays / Harness Replays (pull_request) Successful in 6s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 8s
CI / Canvas (Next.js) (pull_request) Failing after 5m54s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Failing after 3m15s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 2m27s
CI / all-required (pull_request) Failing after 5s
filepath.Walk follows symlinks by default. A malicious org template
containing a symlink (e.g. template/.ssh → /root/.ssh) could escape
the intended directory and include arbitrary host files in the tar
archive copied into workspace containers.

Fix: skip symlinks in the Walk callback. Broken template symlinks
are a silent no-op rather than an error, matching the security-
first posture (no escalation on unexpected input).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 18:26:47 +00:00
hongming-codex-laptop
7a614f2e3b fix: harden saas workspace provisioning config
Some checks failed
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Has been skipped
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 9s
Harness Replays / detect-changes (pull_request) Successful in 14s
CI / Detect changes (pull_request) Successful in 29s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 29s
E2E API Smoke Test / detect-changes (pull_request) Successful in 32s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 36s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 47s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 26s
security-review / approved (pull_request) Failing after 25s
Harness Replays / Harness Replays (pull_request) Successful in 6s
qa-review / approved (pull_request) Failing after 26s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 44s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 5s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 8s
CI / Python Lint & Test (pull_request) Successful in 8s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m22s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m26s
gate-check-v3 / gate-check (pull_request) Successful in 13s
sop-tier-check / tier-check (pull_request) Successful in 18s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m18s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 4m38s
CI / Canvas (Next.js) (pull_request) Failing after 6m32s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / Platform (Go) (pull_request) Failing after 6m47s
CI / all-required (pull_request) Failing after 2s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 8m54s
sop-checklist / na-declarations (pull_request) N/A: qa-review
sop-checklist / all-items-acked (pull_request) acked: 7/7
2026-05-14 10:26:27 -07:00
hongming-codex-laptop
033c1b9bd4 test: satisfy staticcheck on PR regression tests
All checks were successful
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Has been skipped
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 8s
Harness Replays / detect-changes (pull_request) Successful in 15s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 11s
E2E API Smoke Test / detect-changes (pull_request) Successful in 32s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 34s
gate-check-v3 / gate-check (pull_request) Successful in 20s
CI / Detect changes (pull_request) Successful in 38s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 36s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 37s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 45s
Harness Replays / Harness Replays (pull_request) Successful in 8s
sop-tier-check / tier-check (pull_request) Successful in 12s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 7s
CI / Canvas (Next.js) (pull_request) Successful in 11s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 8s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 9s
CI / Python Lint & Test (pull_request) Successful in 7s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m21s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m59s
qa-review / approved (pull_request) Manual refire: approved via agent tag/review, lint-only follow-up
security-review / approved (pull_request) Manual refire: approved via agent tag/review, lint-only follow-up
sop-checklist / na-declarations (pull_request) N/A: qa-review
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 7/7
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 4m41s
CI / Platform (Go) (pull_request) Successful in 8m18s
CI / all-required (pull_request) Successful in 3s
audit-force-merge / audit (pull_request) Successful in 3s
2026-05-14 09:43:04 -07:00
ca7665f573 fix(handlers): workspace_crud_test.go compile errors + routing fixes
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 10s
CI / Detect changes (pull_request) Successful in 21s
Harness Replays / detect-changes (pull_request) Successful in 13s
E2E API Smoke Test / detect-changes (pull_request) Successful in 24s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 13s
qa-review / approved (pull_request) Successful in 14s
security-review / approved (pull_request) Successful in 16s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 30s
CI / Canvas (Next.js) (pull_request) Successful in 6s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 6s
CI / Python Lint & Test (pull_request) Successful in 9s
Harness Replays / Harness Replays (pull_request) Successful in 8s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 10s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m23s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m24s
CI / Platform (Go) (pull_request) Failing after 5m7s
CI / all-required (pull_request) Successful in 1s
gate-check-v3 / gate-check (pull_request) Successful in 3s
sop-checklist / na-declarations (pull_request) N/A: qa-review
sop-checklist / all-items-acked (pull_request) Successful in 3s
sop-tier-check / tier-check (pull_request) Successful in 4s
audit-force-merge / audit (pull_request) Successful in 9s
PR #942 added 12 test functions that referenced `r` and `mock` without
capturing them from setupWorkspaceCrudTest, plus called r.ServeHTTP on a
router with no registered routes (returning 404 instead of the expected
status code).

Changes:
- TestUpdate_InvalidUUID: call validateWorkspaceID directly (no router needed)
- TestUpdate_InvalidBody: register PATCH route + use handler
- TestUpdate_WorkspaceNotFound: register PATCH route + use handler
- TestUpdate_NameTooLong: call validateWorkspaceFields directly
- TestUpdate_RoleTooLong: call validateWorkspaceFields directly
- TestUpdate_NameWithNewline: call validateWorkspaceFields directly
- TestUpdate_NameWithYAMLSpecialChars: call validateWorkspaceFields directly
- TestUpdate_WorkspaceDirSystemPath: call validateWorkspaceDir directly
- TestUpdate_WorkspaceDirTraversal: call validateWorkspaceDir directly
- TestUpdate_WorkspaceDirRelativePath: call validateWorkspaceDir directly
- TestDelete_InvalidUUID: call validateWorkspaceID directly
- TestDelete_HasChildrenWithoutConfirm: register DELETE route + use handler
- TestDelete_ChildrenCheckQueryError: register DELETE route + use handler

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 16:42:59 +00:00
hongming-codex-laptop
19fce4d400 fix(handlers): keep embedded missing env refs literal
Some checks failed
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Has been skipped
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 5s
Harness Replays / detect-changes (pull_request) Successful in 11s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 15s
CI / Detect changes (pull_request) Successful in 19s
E2E API Smoke Test / detect-changes (pull_request) Successful in 23s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 23s
gate-check-v3 / gate-check (pull_request) Successful in 19s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 24s
qa-review / approved (pull_request) Successful in 16s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 25s
security-review / approved (pull_request) Successful in 18s
Harness Replays / Harness Replays (pull_request) Successful in 6s
sop-tier-check / tier-check (pull_request) Successful in 13s
CI / Canvas (Next.js) (pull_request) Successful in 7s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 9s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 40s
CI / Python Lint & Test (pull_request) Successful in 9s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 9s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 8s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m14s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m9s
sop-checklist / na-declarations (pull_request) N/A: qa-review
sop-checklist / all-items-acked (pull_request) acked: 7/7
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 2m6s
CI / Platform (Go) (pull_request) Failing after 2m58s
CI / all-required (pull_request) Successful in 1s
audit-force-merge / audit (pull_request) Successful in 3s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m32s
2026-05-14 09:37:52 -07:00
hongming-codex-laptop
096faa2562 fix(provisioner): seed configs before container start 2026-05-14 09:37:52 -07:00
hongming-codex-laptop
1c3b4ff321 fix(handlers): synchronize async DB users in race tests 2026-05-14 09:37:52 -07:00
11d4b398b7 fix(handlers): resolveInsideRoot dot-clean + nil-db defensive guards
1. org_helpers.go: filepath.Clean after filepath.Join to strip "."
   path components (./subdir/./file.txt → subdir/file.txt) so the
   fast-path IsAbs check on absolute roots resolves dot segments.

2. org_helpers_security_test.go: fix hardcoded suffix length (14→16
   chars) using strings.HasSuffix instead of slice arithmetic.

3. Add nil-db.DB guards in 5 locations where tests call handlers
   without setting up a mock DB (plugins_tracking.go, org_plugin_allowlist.go,
   terminal.go ×2, workspace_provision.go). No-op in production
   (db.DB is always set); prevents nil-panic in tests that exercise
   fast-path logic without a full DB stack.

All 47 schedule tests pass. Full handlers test suite passes (45s).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 16:35:32 +00:00
48f65bc456 fix(handlers): resolve all sqlmock v1.5.2 API errors in schedules_handler_test.go
Fix 6 compile errors and 2 runtime mismatches:

1. Remove unused `mock` variable + `db` import from TestScheduleHandler_Create_CRLFStripped
2. Replace non-existent `sqlmock.NewArgMatcher` with `setupTestDBForQueueTests` (QueryMatcherEqual)
   for the CRLF-stripped Create test
3. Replace `regexp.MustCompile(...)` in 8 ExpectExec calls with exact SQL strings
   (ExpectExec accepts string, not *regexp.Regexp)
4. Fix `\$1`-escaped SELECT queries → unescaped `$1` for QueryMatcherEqual
5. Correct UPDATE args: NotFound/DBError tests pass {"name":...} → name=$2 is non-nil
6. Correct UPDATE args: CRLF-stripped test expects "fix\nthat" (handler strips \r before query)
7. Fix UPDATE Exec string: use actual multi-line COALESCE format from handler

All 47 schedule tests now pass. The 2 other test failures
(TestResolveInsideRoot_DotPathComponent, TestPluginUninstall_SaaS_DispatchesToEIC)
are pre-existing and unrelated to this fix.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 16:35:32 +00:00
408dd452df Merge pull request 'fix(canvas+handlers): Zustand selector anti-patterns + Go handler test blockers' (#942) from fix/917-zustand-selector-anti-patterns into staging
Some checks failed
Block internal-flavored paths / Block forbidden paths (push) Successful in 17s
Harness Replays / detect-changes (push) Successful in 12s
CI / Detect changes (push) Successful in 38s
Secret scan / Scan diff for credential-shaped strings (push) Successful in 15s
E2E API Smoke Test / detect-changes (push) Successful in 49s
Handlers Postgres Integration / detect-changes (push) Successful in 42s
Runtime PR-Built Compatibility / detect-changes (push) Successful in 35s
Harness Replays / Harness Replays (push) Successful in 6s
CI / Shellcheck (E2E scripts) (push) Successful in 8s
CI / Python Lint & Test (push) Successful in 8s
E2E API Smoke Test / E2E API Smoke Test (push) Successful in 2m17s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (push) Successful in 3m19s
CI / Platform (Go) (push) Failing after 4m39s
Handlers Postgres Integration / Handlers Postgres Integration (push) Failing after 4m14s
CI / Canvas (Next.js) (push) Successful in 9m57s
CI / Canvas Deploy Reminder (push) Successful in 2s
CI / all-required (push) Successful in 1s
2026-05-14 16:28:57 +00:00
420c42a202 fix(handlers): add rows.Err() checks after all secrets scan loops
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 11s
Harness Replays / detect-changes (pull_request) Successful in 12s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 11s
CI / Detect changes (pull_request) Successful in 26s
qa-review / approved (pull_request) Successful in 18s
E2E API Smoke Test / detect-changes (pull_request) Successful in 28s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 26s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 27s
security-review / approved (pull_request) Successful in 20s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 26s
Harness Replays / Harness Replays (pull_request) Successful in 7s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 10s
CI / Python Lint & Test (pull_request) Successful in 9s
CI / Canvas (Next.js) (pull_request) Successful in 13s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 7s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 10s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m14s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 1m22s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m57s
CI / Platform (Go) (pull_request) Failing after 3m7s
CI / all-required (pull_request) Successful in 5s
sop-checklist / na-declarations (pull_request) N/A: qa-review
sop-tier-check / tier-check (pull_request) Successful in 19s
gate-check-v3 / gate-check (pull_request) Successful in 28s
sop-checklist / all-items-acked (pull_request) Successful in 25s
audit-force-merge / audit (pull_request) Successful in 24s
Regression from audit #109: rows.Err() checks were removed from List,
ListGlobal, restartAllAffectedByGlobalKey, and Values between commits
3a30b073 and b25b4fb6. Without these checks, a mid-stream query error
(e.g. connection loss during iteration) is silently ignored and partial
results are returned as if the query succeeded.

Fix: add if err := rows.Err(); err != nil { log.Printf(...) } after
every for rows.Next() loop in secrets.go.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 09:17:31 -07:00
a3a358f968 fix(handlers): restore POSIX-identifier guard in expandWithEnv (CWE-78)
Restore the POSIX shell-identifier guard in expandWithEnv (org_helpers.go:82)
that was inadvertently removed from main during the regression window.

Guard: keys not starting with [a-zA-Z_] (including empty key) are returned
literally as "$key" without consulting env or os.Getenv. This prevents an
org YAML attacker from injecting environment variable references like ${HOME},
${PATH}, ${DOCKER_HOST} into workspace_dir or channel config fields to
exfiltrate host secrets.

Also restore org_helpers_pure_test.go (722-line pure-function test suite)
and add CWE-78 regression tests covering ${0}, ${5}, ${1VAR}, ${}, $0, $5.

Fixes MC#982 regression. Co-Audit: core-offsec, core-security.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 09:07:04 -07:00
301d84f616 fix(canvas): resolve Zustand selector anti-patterns causing React #185 re-render loops
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 17s
Harness Replays / detect-changes (pull_request) Successful in 18s
CI / Detect changes (pull_request) Successful in 51s
E2E API Smoke Test / detect-changes (pull_request) Successful in 53s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 55s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 37s
gate-check-v3 / gate-check (pull_request) Successful in 15s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 25s
qa-review / approved (pull_request) Successful in 20s
security-review / approved (pull_request) Successful in 17s
sop-checklist / na-declarations (pull_request) awaiting /sop-n/a declaration for: qa-review, security-review
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m31s
sop-checklist / all-items-acked (pull_request) Successful in 27s
sop-tier-check / tier-check (pull_request) Successful in 20s
Harness Replays / Harness Replays (pull_request) Successful in 9s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 10s
CI / Python Lint & Test (pull_request) Successful in 46s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 12s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m49s
CI / Platform (Go) (pull_request) Failing after 6m40s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 6m16s
CI / Canvas (Next.js) (pull_request) Successful in 18m55s
CI / Canvas Deploy Reminder (pull_request) Successful in 5s
CI / all-required (pull_request) Successful in 6s
audit-force-merge / audit (pull_request) Successful in 19s
- WorkspaceNode: useHasChildren and useDescendantCount now select nodes
  stably first, then derive with useMemo to avoid new boolean/number on
  every store push (React error #185 / Zustand + React 19 Object.is).

- DropTargetBadge: targetName and childCount select nodes once, derive
  inside IIFEs to avoid new return value on every platform push.

- useCanvasViewport: provisioningCount selects nodes stably, uses useMemo
  for the filter().length derivation.

- MobileDetail / MobileChat: node selector split into stable nodes select
  + useMemo derivation of the .find() result.

- ConfigTab: preserved existing s.nodes?.find?.() pattern (test mocks
  omit nodes; the defensive optional chaining is the correct approach there).

Fixes: React error #185 (Zustand + React 19 Object.is strictness).

---

fix(handlers): resolve Go handler test blockers

- org_helpers.go: custom envVarRefPattern regexp for ${VAR}/$VAR expansion
  so $100 is left as-is (not expanded to empty) while $FOO is expanded.

- org.go: add missing collectPerWorkspaceUnsatisfied and perWorkspaceUnsatisfied
  (required by the EnvRequirements checking path in org import).

- workspace_crud_test.go: escape \$1 in sqlmock COUNT patterns (Go regex
  interprets bare $1 as end-anchor+literal-1, not a literal placeholder).

- workspace_crud.go: move workspace_dir validation before the existence check
  so invalid paths return 400 instead of 404 — consistent with name/role
  field validation ordering.

- a2a_queue.go: use float64 for expires_in_seconds JSON field; float
  values are truncated (90.7 → 90) per the documented contract.

- a2a_queue_test.go: update float-value test expectation from 0 to 30
  to match the truncation contract.

- org_helpers_pure_test.go: fix TestAppendYAMLBlock_BothEmpty (assert.Nil
  not assert.Equal("", nil)).

- plugins_atomic_test.go: remove duplicate TestTarWalk_NestedDirs.

- org_layout_test.go: delete (tests non-existent childSlot function).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 15:29:04 +00:00
hongming-codex-laptop
3359580502 fix(handlers): repair instructions test compile
Some checks failed
CI / Detect changes (pull_request) Successful in 44s
Harness Replays / detect-changes (pull_request) Successful in 28s
E2E API Smoke Test / detect-changes (pull_request) Successful in 1m14s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 1m13s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 19s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 54s
gate-check-v3 / gate-check (pull_request) Successful in 35s
qa-review / approved (pull_request) Successful in 23s
security-review / approved (pull_request) Failing after 24s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m26s
sop-checklist / na-declarations (pull_request) awaiting /sop-n/a declaration for: qa-review, security-review
sop-checklist / all-items-acked (pull_request) Successful in 28s
sop-tier-check / tier-check (pull_request) Successful in 27s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 6s
CI / Canvas (Next.js) (pull_request) Successful in 9s
CI / Python Lint & Test (pull_request) Successful in 11s
Harness Replays / Harness Replays (pull_request) Successful in 12s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 12s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m44s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 14m51s
CI / Platform (Go) (pull_request) Failing after 19m43s
CI / all-required (pull_request) Successful in 6s
audit-force-merge / audit (pull_request) Successful in 14s
2026-05-14 08:20:32 -07:00
hongming-codex-laptop
0b47f9516d fix(ci): repair delegation list and merge queue tests
Some checks failed
sop-checklist / all-items-acked (pull_request) All items acked
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Blocked by required conditions
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 24s
Harness Replays / detect-changes (pull_request) Successful in 19s
CI / Detect changes (pull_request) Successful in 1m15s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 53s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 1m9s
E2E API Smoke Test / detect-changes (pull_request) Successful in 1m11s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 13s
qa-review / approved (pull_request) Successful in 16s
gate-check-v3 / gate-check (pull_request) Successful in 18s
security-review / approved (pull_request) Failing after 19s
sop-tier-check / tier-check (pull_request) Successful in 18s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m21s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 1m21s
Harness Replays / Harness Replays (pull_request) Successful in 9s
CI / Canvas (Next.js) (pull_request) Successful in 16s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 10s
CI / Python Lint & Test (pull_request) Successful in 9s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 19s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m4s
CI / Platform (Go) (pull_request) Failing after 4m14s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 4m15s
sop-checklist / na-declarations (pull_request) awaiting /sop-n/a declaration for: qa-review, security-review
CI / all-required (pull_request) Successful in 4s
Runtime PR-Built Compatibility / detect-changes (pull_request) Failing after 12m49s
audit-force-merge / audit (pull_request) Successful in 23s
2026-05-14 14:19:42 +00:00
858af52d6f fix(handlers): add rows.Err() checks after secrets scan loops (closes #1016)
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
Harness Replays / detect-changes (pull_request) Successful in 9s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 8s
E2E API Smoke Test / detect-changes (pull_request) Successful in 19s
CI / Detect changes (pull_request) Successful in 19s
gate-check-v3 / gate-check (pull_request) Successful in 13s
qa-review / approved (pull_request) Successful in 12s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 23s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 22s
security-review / approved (pull_request) Successful in 10s
sop-tier-check / tier-check (pull_request) Successful in 14s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m6s
Harness Replays / Harness Replays (pull_request) Successful in 12s
CI / Canvas (Next.js) (pull_request) Successful in 15s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 8s
CI / Python Lint & Test (pull_request) Successful in 8s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 11s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m2s
CI / Canvas Deploy Reminder (pull_request) Successful in 5s
CI / Platform (Go) (pull_request) Failing after 4m27s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 4m10s
CI / all-required (pull_request) Successful in 6s
sop-checklist / na-declarations (pull_request) awaiting /sop-n/a declaration for: qa-review, security-review
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 5/7 — missing: root-cause, no-backwards-compat — body-unfilled: comprehensive-testing, local-postgres-e2e, staging-sm
audit-force-merge / audit (pull_request) Successful in 24s
Regression from audit #109: rows.Err() checks were removed from four
functions between commits 3a30b073 and b25b4fb6. Without these checks,
a mid-stream query error (e.g. connection loss during row iteration)
is silently ignored and partial results are returned as success.

Added rows.Err() checks after every for rows.Next() loop:
- List: workspace secrets loop + global secrets loop
- Values: global secrets loop + workspace secrets loop
- ListGlobal: single loop
- restartAllAffectedByGlobalKey: affected workspaces loop

Each check logs the iteration error and continues (non-fatal, matching
the existing log.Printf pattern used elsewhere in the file).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 14:12:35 +00:00
f417c1a870 test(handlers): add InstructionsHandler coverage — 18 cases
Some checks failed
sop-checklist / all-items-acked (pull_request) All items acked
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 19s
CI / Detect changes (pull_request) Successful in 41s
E2E API Smoke Test / detect-changes (pull_request) Successful in 46s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 42s
Harness Replays / detect-changes (pull_request) Successful in 17s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 41s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 19s
sop-checklist / na-declarations (pull_request) awaiting /sop-n/a declaration for: qa-review, security-review
qa-review / approved (pull_request) Successful in 21s
gate-check-v3 / gate-check (pull_request) Successful in 33s
security-review / approved (pull_request) Failing after 19s
sop-tier-check / tier-check (pull_request) Successful in 18s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 44s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 16s
CI / Python Lint & Test (pull_request) Successful in 15s
CI / Canvas (Next.js) (pull_request) Successful in 17s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 9s
Harness Replays / Harness Replays (pull_request) Successful in 8s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 11s
CI / Canvas Deploy Reminder (pull_request) Successful in 10s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m18s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 56s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m32s
CI / Platform (Go) (pull_request) Failing after 2m51s
CI / all-required (pull_request) Successful in 7s
audit-force-merge / audit (pull_request) Successful in 19s
Add sqlmock unit tests for InstructionsHandler (instructions.go):
- List: empty result, scope filter, workspace_id filter, DB error
- Create: success (global), success (workspace with scope_target), invalid scope,
  workspace scope missing scope_target, content too long (>8192), title too long (>200)
- Update: success, not found (0 rows), content too long, title too long
- Delete: success, not found (0 rows)
- Resolve: empty workspace, with global+workspace instructions, missing workspace_id
- scanInstructions: rows.Err() handled gracefully (continues, not fatal)

All 18 tests cover the DB query paths using sqlmock.
2026-05-14 13:49:43 +00:00
e0e5dd911f handlers: add missing db import + remove duplicate test declarations
Two compilation errors were preventing CI/Platform (Go) from running any
tests at all (go vet failed first):

1. delegation_list_test.go: missing `db` import. The file assigns
   `db.DB = mockDB` but never imported the `db` package — a silent
   omission that compiled before the staging promotion's go.mod bump.

2. org_helpers_security_test.go: three test functions redeclared in
   org_helpers_pure_test.go (both files added by the staging promotion):
   TestIsSafeRoleName_Valid, TestMergeCategoryRouting_EmptyListDropsCategory,
   TestMergeCategoryRouting_EmptyKeySkipped. Removed from security file;
   pure_test.go versions use testify and are more comprehensive.

Together with the prevDB/restore fixes in the previous commits, this
should make CI/Platform (Go) fully green.

Refs: mc#975

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 12:58:04 +00:00