Commit Graph

4809 Commits

Author SHA1 Message Date
7db9fc7211 Merge pull request 'fix(canvas): render delegation responses as normal messages not error banners' (#171) from fix/issue-159-delegation-response-error into main
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 4s
2026-05-09 21:50:52 +00:00
Molecule AI Core Platform Lead
d72bef93bc Merge remote-tracking branch 'origin/main' into trig-171
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Successful in 4s
audit-force-merge / audit (pull_request) Successful in 4s
2026-05-09 21:50:37 +00:00
Molecule AI Core Platform Lead
2cc68d57d6 Merge remote-tracking branch 'origin/main' into trig-171
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Successful in 3s
2026-05-09 21:49:50 +00:00
33fc860918 Merge pull request 'feat(canvas): screen reader live announcements for workspace status changes' (#172) from feat/canvas-a11y-live-announcements into main
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 5s
2026-05-09 21:49:45 +00:00
Molecule AI Core Platform Lead
862de8cd93 Merge remote-tracking branch 'origin/main' into trig-172
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Successful in 4s
audit-force-merge / audit (pull_request) Successful in 3s
2026-05-09 21:49:36 +00:00
eac153de90 Merge pull request 'fix(build): install plugins_registry/ at wheel top level for bare imports' (#173) from fix/issue-152-plugins-registry-top-level into main
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 4s
2026-05-09 21:49:30 +00:00
86f720ee14 fix(build): install plugins_registry/ at wheel top level for bare imports
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Successful in 4s
audit-force-merge / audit (pull_request) Successful in 3s
Issue #152: claude-code workspace plugin adapter import fails with
'No module named plugins_registry'. Plugin adapter code
(workspace-template-*) uses bare `from plugins_registry import ...`
but molecule-runtime only shipped it at
molecule_runtime/plugins_registry/ (the package namespace path).

Fix: copy workspace/plugins_registry/ to the top level of the wheel
in addition to molecule_runtime/plugins_registry/. Both copies coexist
— the top-level one satisfies bare imports from plugin adapters,
the nested one satisfies the rewritten
`from molecule_runtime.plugins_registry import ...` in adapter_base.py.

pyproject.toml updated to include plugins_registry* in the packages find
directive so setuptools ships it from the wheel root.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 21:49:03 +00:00
Molecule AI Core Platform Lead
736805e575 trigger: re-run sop-tier-check after core-lead approval + main sync
All checks were successful
sop-tier-check / tier-check (pull_request) Successful in 5s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
2026-05-09 21:48:43 +00:00
Molecule AI Core Platform Lead
ca74a9c064 Merge remote-tracking branch 'origin/main' into trig-171 2026-05-09 21:48:43 +00:00
Molecule AI Core Platform Lead
cf2501bd18 trigger: re-run sop-tier-check after core-lead approval + main sync
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
sop-tier-check / tier-check (pull_request) Successful in 5s
2026-05-09 21:48:40 +00:00
d353ab5286 docs(canvas-audit): mark live-announcements HIGH item as done, update secrets-store status
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Failing after 4s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 21:31:27 +00:00
1224f19cfc feat(canvas): screen reader live announcements for canvas state changes
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
sop-tier-check / tier-check (pull_request) Failing after 4s
Issue: HIGH priority item from canvas accessibility audit (2026-05-09).
Screen reader users had no way to know when workspace status changed
— the canvas updated visually but no announcement was made.

Changes:
- canvas.ts: add `liveAnnouncement: string` + `setLiveAnnouncement` to
  CanvasState so the store can hold the current announcement text.
- canvas-events.ts: set `liveAnnouncement` in handleCanvasEvent for 6
  key status transitions: ONLINE, OFFLINE, PAUSED, DEGRADED, PROVISIONING,
  REMOVED, PROVISION_FAILED. Names are looked up from store nodes so
  announcements are human-readable ("Alpha is now online" not "ws-1").
  TASK_UPDATED and AGENT_MESSAGE are intentionally excluded — they fire
  on every heartbeat and would overwhelm the user.
- Canvas.tsx: subscribe to `liveAnnouncement` from the store; render a
  visually-hidden `aria-live="polite" aria-atomic="true"` region that
  speaks the announcement then clears it after 500 ms so the same
  message doesn't re-announce on re-render. Fallback still announces
  workspace count on initial load.
- canvas-events.test.ts: 12 new test cases covering announcement
  content for all 6 event types, empty/no-announcement cases, and
  payload-name fallback when a node isn't yet in the store.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 21:30:33 +00:00
d15040d233 fix(canvas): render delegation responses as normal messages not error banners
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 4s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
Issue #159: successful delegation responses were rendered as error
banners because extractResponseText() only handled the A2A result
format (body.result.parts[].text) but delegation.go stores
response_body as {text: "...", delegation_id: "..."}. The error
status was set when the HTTP transport failed even though the actual
agent response was received.

Fixes:
1. extractResponseText: check body.text before the result path so
   delegation response_body.text is extracted correctly
2. extractResponseText: also check body.response_preview (WS event shape
   from DELEGATION_COMPLETE handler)
3. GroupedCommsView: render NormalMessage when status=error but
   responseText is populated (delegation succeeded, transport failed)
   instead of burying the content in an error banner

Tests: 8 new cases (4 extractResponseText + 2 extractRequestText
regression + 2 render tests). 189 tests pass across 10 files.

Closes #159.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 21:26:39 +00:00
020d63cbc7 Merge pull request 'tech-debt: rename molecule-monorepo-net to molecule-core-net' (#166) from tech-debt/rename-network into main
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 4s
2026-05-09 21:19:39 +00:00
Molecule AI Core Platform Lead
ea8ac4f023 Merge remote-tracking branch 'origin/main' into tech-debt/rename-net
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Successful in 4s
audit-force-merge / audit (pull_request) Successful in 4s
2026-05-09 21:19:28 +00:00
Molecule AI Core Platform Lead
f4598c8c2a trigger: re-run sop-tier-check after tier:low + core-lead approval + main sync
All checks were successful
sop-tier-check / tier-check (pull_request) Successful in 5s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
2026-05-09 21:18:47 +00:00
Molecule AI Core Platform Lead
ad89173f0f Merge remote-tracking branch 'origin/main' into tech-debt/rename-net 2026-05-09 21:18:46 +00:00
032e37e703 Merge pull request 'fix(workspace-server): sanitize err.Error() leaks in CascadeDelete and OrgImport' (#168) from fix/sanitize-err-leaks-cascade-delete-and-org-import into main
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 4s
2026-05-09 21:17:19 +00:00
Molecule AI Core Platform Lead
49d53204cc Merge remote-tracking branch 'origin/main' into fix/168-mine
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Successful in 4s
audit-force-merge / audit (pull_request) Successful in 4s
2026-05-09 21:17:07 +00:00
Molecule AI Core Platform Lead
7bcfc8821e trigger: re-run sop-tier-check after dropping tier:medium + receiving 2 approvals
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Successful in 4s
2026-05-09 21:16:20 +00:00
84b38914bd Merge pull request 'fix(canvas): render delegation message body in Agent Comms tab' (#167) from fix/issue-158-delegation-message-body into main
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 4s
2026-05-09 21:15:19 +00:00
Molecule AI Core Platform Lead
f9d58b2186 Merge remote-tracking branch 'origin/main' into fix/167-uiux
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Successful in 4s
audit-force-merge / audit (pull_request) Successful in 4s
2026-05-09 21:14:54 +00:00
Molecule AI Core Platform Lead
b9db10432d trigger: re-run sop-tier-check after dropping duplicate tier:medium label
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Successful in 4s
2026-05-09 21:14:07 +00:00
Molecule AI Core Platform Lead
5b50dafe34 trigger: re-run CI after tier:low label + core-lead approval
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Failing after 4s
2026-05-09 21:09:59 +00:00
Molecule AI Core Platform Lead
7090eab0d5 fix(workspace-server): sanitize err.Error() leaks in CascadeDelete and OrgImport
Some checks failed
audit-force-merge / audit (pull_request) Has been skipped
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Failing after 4s
[core-lead-agent] Closes Core-Security audit finding (2026-05-09 audit cycle, MEDIUM):

1. workspace-server/internal/handlers/workspace_crud.go:335
   `DELETE /workspaces/:id` returned `err.Error()` verbatim in the 500
   body, leaking wrapped lib/pq driver strings (schema column names,
   index hints) to HTTP clients. Replaced with sanitized message;
   raw error already logged server-side via the existing log.Printf
   immediately above.

2. workspace-server/internal/handlers/org.go:610
   `OrgImport` echoed the user-supplied `body.Dir` verbatim in the 404
   "org template not found: %s" response. Path traversal is already
   blocked by resolveInsideRoot earlier in the handler, but echoing
   raw input back lets a client probe filesystem layout (404-with-echo
   vs. 400-from-resolve is itself a signal). Dropped the input from the
   client-facing message; preserved full context in a new log.Printf
   (orgFile path + the requested body.Dir) for operator triage.

Both fixes preserve operator-side diagnostics (logs unchanged in
content, only client-facing JSON sanitized). No behavior change for
legitimate clients — error type, status code, and JSON shape all stay
the same.

Tier: low. Defensive hardening only; reduces info-disclosure surface
without altering control-flow or auth gates.
2026-05-09 21:01:40 +00:00
1320901b1c Merge pull request 'fix(canvas): cap maxWorkers:1 to prevent jsdom pool worker startup timeouts' (#149) from fix/vitest-pool-worker-startup-timeouts into main
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 5s
2026-05-09 20:58:02 +00:00
2654a4da01 fix(canvas): render delegation message body in Agent Comms tab
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
sop-tier-check / tier-check (pull_request) Failing after 4s
Agent Comms tab rendered outbound delegations as blank bubbles because
extractRequestText only checked the A2A JSON-RPC format
(body.params.message.parts[].text) while delegation.go stores
request_body as {"task": "...", "delegation_id": "..."}.

Fix: check body.task first for delegation activities, then fall back to
the A2A format. Add six test cases covering the delegation shape,
precedence over A2A params when both present, empty-string guard, and
non-string type guard.

Closes #158.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 20:57:53 +00:00
Molecule AI Core Platform Lead
0a29c0a9e5 Merge remote-tracking branch 'origin/main' into fix/vitest-pool
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 7s
sop-tier-check / tier-check (pull_request) Successful in 8s
audit-force-merge / audit (pull_request) Successful in 5s
2026-05-09 20:57:16 +00:00
Molecule AI Core Platform Lead
205ee9645c trigger: re-run sop-tier-check after core-lead approval
All checks were successful
CodeQL / Analyze (${{ matrix.language }}) (go) (pull_request) Successful in 1s
CodeQL / Analyze (${{ matrix.language }}) (javascript-typescript) (pull_request) Successful in 0s
CodeQL / Analyze (${{ matrix.language }}) (python) (pull_request) Successful in 1s
pr-guards / disable-auto-merge-on-push (pull_request) Successful in 2s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 5s
E2E API Smoke Test / detect-changes (pull_request) Successful in 6s
CI / Detect changes (pull_request) Successful in 10s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 9s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 8s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 9s
sop-tier-check / tier-check (pull_request) Successful in 9s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 9s
Harness Replays / detect-changes (pull_request) Successful in 10s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 3s
Harness Replays / Harness Replays (pull_request) Successful in 3s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 4s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 22s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 50s
CI / Platform (Go) (pull_request) Successful in 2m50s
CI / Canvas (Next.js) (pull_request) Successful in 3m27s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / Python Lint & Test (pull_request) Successful in 7m18s
2026-05-09 20:55:19 +00:00
fa7e4101d7 fix(canvas): show task text in Agent Comms for MCP delegate_task calls (#163)
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 4s
Closes #158.

[FORCE-MERGE AUDIT — §SOP-7]
- Approver: hongming via chat-go ("go") in conversation transcript ~21:00 UTC on 2026-05-09
- Bypassed: required status checks (all pending — runner pickup issue, separate from PR correctness)
- Audit channel: orchestrator force-merge log + this commit message

Fixes the one-sided Agent Comms rendering by writing activity_log rows for MCP delegate_task calls. PR authored by core-fe under per-persona Gitea identity (post #156 merge).
2026-05-09 20:54:53 +00:00
c16c5c6183 infra(docker-compose): include infra services so docker compose up starts Temporal (#162)
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 4s
[FORCE-MERGE AUDIT — §SOP-7]
- Approver: hongming via chat-go ("go") in conversation transcript ~21:00 UTC on 2026-05-09
- Bypassed: required status checks (all pending — runner pickup issue, separate from PR correctness)
- Audit channel: orchestrator force-merge log + this commit message

Part of overnight team shipping cycle. PR authored by team persona under per-persona Gitea identity (post #156 merge).
2026-05-09 20:54:36 +00:00
252f8d0c47 tech-debt: rename molecule-monorepo-net -> molecule-core-net
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 4s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
Renames Docker network across all code, configs, scripts, and docs.

Per issue #93: the network was named molecule-monorepo-net as a holdover
from when the repo was called molecule-monorepo. The canonical repo name is
now molecule-core, so the network should be molecule-core-net.

Files changed:
- docker-compose.yml, docker-compose.infra.yml: network definition
- infra/scripts/setup.sh: docker network create
- scripts/nuke-and-rebuild.sh: docker network rm
- workspace-server/internal/provisioner/provisioner.go: DefaultNetwork
- All comments/docs: updated wording

Acceptance: grep -rn 'molecule-monorepo-net' returns zero matches.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 20:51:48 +00:00
e8f521011f fix(mcp): write delegation activity row so canvas Agent Comms shows task text
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (go) (pull_request) Successful in 1s
CodeQL / Analyze (${{ matrix.language }}) (javascript-typescript) (pull_request) Successful in 1s
CodeQL / Analyze (${{ matrix.language }}) (python) (pull_request) Successful in 1s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 5s
CI / Detect changes (pull_request) Successful in 8s
E2E API Smoke Test / detect-changes (pull_request) Successful in 8s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 9s
sop-tier-check / tier-check (pull_request) Failing after 8s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 8s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 12s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 11s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 4s
Harness Replays / detect-changes (pull_request) Successful in 12s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 27s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 35s
Harness Replays / Harness Replays (pull_request) Failing after 43s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Failing after 53s
CI / Platform (Go) (pull_request) Successful in 3m17s
CI / Canvas (Next.js) (pull_request) Successful in 4m3s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 5m55s
CI / Python Lint & Test (pull_request) Successful in 7m29s
audit-force-merge / audit (pull_request) Successful in 5s
MCP delegate_task and delegate_task_async bypassed the delegation activity
lifecycle entirely — no activity_log row was written for MCP-initiated
delegations. As a result the canvas Agent Comms tab rendered outbound
delegations as bare "Delegation dispatched" events with no task body.

Fix: insert a delegation row (mirroring insertDelegationRow from
delegation.go) before the A2A call so the canvas can show the task text.
The sync tool updates status to 'dispatched' after the HTTP call; the
async tool inserts with 'dispatched' directly (goroutine won't update).

Closes #158.
Closes #49 (partial — addresses the canvas-display gap; full lifecycle
parity requires DelegationWriter extraction, tracked separately).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 20:44:06 +00:00
8cd52fc642 infra(docker-compose): include infra services so docker compose up starts Temporal
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Failing after 4s
audit-force-merge / audit (pull_request) Successful in 4s
Per issue #153: `docker compose up -d` (docker-compose.yml) did not start
Temporal because it lived only in docker-compose.infra.yml. Users had to know
to run `setup.sh` which explicitly uses `-f docker-compose.infra.yml`.

Adding `include: - docker-compose.infra.yml` makes the full infra stack
(starting with Temporal) start with the default `docker compose up` command.

Both compose files define postgres/redis — the main file's definitions take
precedence via compose merge semantics, so no service conflicts.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 20:41:37 +00:00
6193f67bc0 fix(workspace): set git user.name/email from $GITEA_USER at boot (#156)
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 4s
Closes #155.

[FORCE-MERGE AUDIT — §SOP-7]
- Approver: hongming (Gitea PR review APPROVED 2026-05-09T20:27:01Z)
- Chat-go: explicit go in conversation transcript ~20:39 UTC after Hongming clicked approve
- Bypassed: required status checks (all pending forever — likely runner pickup issue, separate from this PR's correctness)
- Audit channel: orchestrator force-merge log + this commit message

Next: workspace runtime image rebuilds via publish-runtime.yml; new workspaces pick up persistent persona git identity.
2026-05-09 20:36:58 +00:00
2ef4f64b31 docs(design-system): add canvas architecture + known issues from Core-FE
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Failing after 4s
audit-force-merge / audit (pull_request) Has been skipped
Added from Core-FE verified findings:
- Canvas stack: @xyflow/react v12, Next.js 14, Tailwind v4, Zustand
- Directory structure with verified file locations
- Known issues: secrets-store.ts getGrouped() performance bug
- Pre-commit hook verification needed
- Tech debt items: any types, selector memoization, use client enforcement

Updated canvas-audit-items.md with architecture section.

Co-Authored-By: Core-FE <core-fe@moleculesai.app>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 20:26:34 +00:00
d27b1e13de docs(design-system): correct theme system — three modes, semantic tokens
Major correction from Core-FE review:
- Canvas has THREE themes: System/Light/Dark, not dark-only
- Warm paper tones for light, zinc-adjacent dark for dark mode
- ThemeProvider handles switching, persisted in mol_theme cookie
- Use semantic tokens: bg-surface, bg-surface-card, border-line, text-ink
- NEVER use raw zinc for surfaces — only for borders/disabled/code

Updated:
- Section 1: Three-mode theme palette with exact hex values
- Section 4: Component patterns now use semantic tokens
- Added Section 4.6: ThemeProvider + useTheme() usage
- Section 7: Enforcement checklist now includes token rules

Co-Authored-By: Core-FE <core-fe@moleculesai.app>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 20:19:40 +00:00
efbe4035f3 docs(design-system): add verified canvas design system v1
Cross-reference the Core-FE draft against actual molecule-core/canvas/src/
codebase. Creates two new docs:

- canvas-design-system-v1.md: Full design system with verified color
  palette, typography scale, animation tokens (from theme-tokens.css),
  component patterns, WCAG 2.1 AA checklist. Marks all items as
  VERIFIED with source file citations.

- canvas-audit-items.md: Updated architecture brain dump with verified
  findings on React Flow canvas accessibility. Flags remaining gaps
  (screen reader announcements, keyboard shortcuts help, keyboard drag).

Key verified discrepancies from draft:
- Font: system-ui stack (not Inter/Geist)
- Tooltip: uses aria-describedby + role=tooltip (not group-hover CSS)
- Animation tokens: already defined in theme-tokens.css
- ContextMenu: has full keyboard nav (arrow keys, wrap-around)

Co-Authored-By: Core-FE <core-fe@moleculesai.app>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 20:08:16 +00:00
orchestrator
a4fc04189c fix(workspace): set git user.name/email from $GITEA_USER at boot
Some checks failed
branch-protection drift check / Branch protection drift (pull_request) Successful in 10s
Check merge_group trigger on required workflows / Required workflows have merge_group trigger (pull_request) Successful in 11s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 14s
cascade-list-drift-gate / check (pull_request) Successful in 18s
Check migration collisions / Migration version collision check (pull_request) Successful in 23s
CI / Detect changes (pull_request) Successful in 24s
E2E API Smoke Test / detect-changes (pull_request) Successful in 24s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 24s
pr-guards / disable-auto-merge-on-push (pull_request) Failing after 7s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 22s
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 25s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 20s
sop-tier-check / tier-check (pull_request) Failing after 21s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 38s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 26s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 41s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 1m46s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 13s
Harness Replays / Harness Replays (pull_request) Successful in 9s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 1m31s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 4m8s
CI / Python Lint & Test (pull_request) Successful in 8m54s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / Canvas (Next.js) (pull_request) Failing after 10m21s
CI / Platform (Go) (pull_request) Successful in 13m8s
CodeQL / Analyze (${{ matrix.language }}) (go) (pull_request) Failing after 22m59s
CodeQL / Analyze (${{ matrix.language }}) (javascript-typescript) (pull_request) Failing after 23m26s
CodeQL / Analyze (${{ matrix.language }}) (python) (pull_request) Failing after 23m31s
audit-force-merge / audit (pull_request) Successful in 4s
Closes #155.

Without this, every commit from a workspace booted via the standard
provisioner lands with an empty `user.name`/`user.email` and Gitea
attributes the work to whichever PAT pushed (typically the founder's
`claude-ceo-assistant`), instead of the persona that actually authored
the commit. That's the same fingerprint pattern that got us suspended
on GitHub 2026-05-06.

GITEA_USER is already injected per-workspace by the provisioner from
workspace_secrets (verified: 8/8 Core-* workspaces have it set,
correctly-named, on operator + local). Boot picks it up unconditionally;
falls through cleanly if unset (e.g. legacy boxes without persona
identity wiring).

Email uses `bot.moleculesai.app` so agent commits are visually distinct
from human-authored commits in Gitea history. The `gitconfig` copy from
`/root/.gitconfig` to `/home/agent/.gitconfig` is now unconditional —
previously it was nested inside the `molecule-git-token-helper.sh`
block, which meant the per-persona identity wouldn't propagate to the
agent user when the helper was unavailable.

Also added an inline note that the github.com credential-helper block
is post-suspension legacy. Full removal tracked under #171; this PR
deliberately doesn't touch it (smaller blast radius).

Tested: docker exec sets the same config in 8 running Core-* workspaces
locally and they pick up correct identity for `git config -l`. Will
reset when those containers restart, hence this PR for the persistent
fix.
2026-05-09 12:52:17 -07:00
c0abbe33ef Merge pull request 'ci(audit-force-merge): fan §SOP-6 force-merge audit to molecule-core' (#150) from fan/audit-force-merge into main
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 4s
2026-05-09 03:13:26 +00:00
323bbb4ec2 ci(secret-scan): port from .github/ to .gitea/ — fix unsatisfiable required check
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Successful in 5s
audit-force-merge / audit (pull_request) Successful in 4s
molecule-core/main branch protection requires the status-check context
'Secret scan / Scan diff for credential-shaped strings (pull_request)'
but the workflow lived only in .github/workflows/, which Gitea Actions
doesn't see — every PR's required-status-checks rollup left the context
in 'expected' / never-fires state, blocking merge.

Port to .gitea/workflows/secret-scan.yml. Drops:
  - merge_group event (Gitea has no merge queue)
  - workflow_call (no cross-repo reusable invocation on Gitea)
SELF exclude lists both .github/ and .gitea/ paths so a future sync
between them stays clean. Job + step names match the GitHub workflow
so the produced status-check context name matches branch protection
unchanged.

Same regex set as the runtime's pre-commit hook
(molecule-ai-workspace-runtime: molecule_runtime/scripts/pre-commit-checks.sh).

This unblocks PR #150 (audit-force-merge fan-out) and every future
PR on molecule-core/main.
2026-05-08 20:13:06 -07:00
0529bc246a trigger: re-run sop-tier-check after dev-lead approval
All checks were successful
sop-tier-check / tier-check (pull_request) Successful in 3s
2026-05-08 20:10:26 -07:00
6818f01447 ci(audit-force-merge): fan §SOP-6 force-merge audit to molecule-core
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 4s
Mirrors the canonical workflow shipped on internal#120 + #122. Same
shape: pull_request_target on closed, base.sha checkout, structured
JSON event to runner stdout that Vector ships to Loki on
molecule-canonical-obs.

REQUIRED_CHECKS env declares both molecule-core/main protected
contexts (sop-tier-check + Secret scan). Mirror against branch
protection if either is added/removed.

Verified end-to-end on internal: synthetic force-merge of internal#123
emitted incident.force_merge with all expected fields, indexable in
Loki via {host="molecule-canonical-1"} |= "incident.force_merge".

Tier: low (CI workflow, no platform code path).
2026-05-08 20:09:35 -07:00
d25e5c0f43 Merge pull request 'fix(canvas): boot-time matched-pair guard for ADMIN_TOKEN env vars (#175)' (#53) from fix/175-env-matched-pair-guard into main
force-merge: secret-scan path filter + claude-ceo-asst Owner override per §SOP-6.
2026-05-09 02:24:20 +00:00
claude-ceo-assistant
04157f6896 trigger: re-fire sop-tier-check after tier:medium re-label
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 3s
2026-05-08 19:22:39 -07:00
Hongming Wang
a6477d2b0c fix(canvas): boot-time matched-pair guard for ADMIN_TOKEN env vars (#175)
Closes the post-PR-#174 self-review gap: the matched-pair contract
between ADMIN_TOKEN (server-side bearer gate) and NEXT_PUBLIC_ADMIN_TOKEN
(canvas client-side bearer attach) was descriptive only, living in a
.env file comment. Future agents/devs could re-misconfigure with one
of the two unset and silently 401 — every workspace API call refused
with no actionable diagnostic.

Adds checkAdminTokenPair() to canvas/next.config.ts, run after
loadMonorepoEnv() so it sees the post-load state. Two distinct
warnings (server-set/client-unset and the inverse) so an operator can
tell which half is missing without grep'ing. Empty string is treated
as unset so KEY= and unset KEY produce the same verdict.

Warn-only, not exit — production canvas Docker images bake these vars
at image-build time and a hard exit would turn a recoverable auth
issue into a crashloop. The console.error fires in `next dev`, the
standalone server's stdout, and the canvas Docker container logs —
the three places an operator looks when "everything 401s."

Tests pin exact stderr strings (per feedback_assert_exact_not_substring)
across 6 cases: both unset, both set, ADMIN_TOKEN-only, NEXT_PUBLIC-only,
empty-string-as-unset, and the empty-string-asymmetric mismatch.
Mutation-tested: flipping the if-condition from === to !== fails all 6.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 19:22:39 -07:00
9456d1c5fd fix(canvas): cap maxWorkers:1 to prevent jsdom pool worker startup timeouts
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (javascript-typescript) (pull_request) Successful in 1s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 5s
CodeQL / Analyze (${{ matrix.language }}) (go) (pull_request) Successful in 1s
CodeQL / Analyze (${{ matrix.language }}) (python) (pull_request) Successful in 0s
CI / Detect changes (pull_request) Successful in 7s
E2E API Smoke Test / detect-changes (pull_request) Successful in 7s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 7s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 8s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 8s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 9s
Harness Replays / detect-changes (pull_request) Successful in 9s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 3s
CI / Platform (Go) (pull_request) Successful in 4s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 3s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 3s
CI / Python Lint & Test (pull_request) Successful in 5s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 3s
Harness Replays / Harness Replays (pull_request) Failing after 38s
sop-tier-check / tier-check (pull_request) Failing after 4s
CI / Canvas (Next.js) (pull_request) Successful in 2m23s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 4m3s
The forks pool's implicit maxWorkers=1 (2-CPU runner) was insufficient
to prevent concurrent jsdom worker cold-starts. Each jsdom worker
allocates ~30-50 MB RSS at boot; multiple workers starting simultaneously
exhaust available memory, causing 5 test files to fail with:

  [vitest-pool]: Failed to start forks worker for test files ...
  [vitest-pool-runner]: Timeout waiting for worker to respond

Individual jsdom test files take 12-15 s in isolation and pass cleanly.
Failures only occur when 51 files are run together through the pool.

Fix: explicitly set maxWorkers:1 so a single worker processes all files
sequentially, eliminating concurrent jsdom bootstrap memory pressure.
With this change, all 51 files pass (was 46 pass + 5 fail), and suite
duration improves from ~5070 s to ~1117 s because workers no longer
compete for resources during startup.

Ref: issue #148
Ref: vitest-pool investigation for issue #22 (canvas side)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 02:02:10 +00:00
b671019364 Merge pull request 'refactor(sop-tier-check): extract bash to .gitea/scripts/ + SOP_DEBUG gate' (#147) from refactor/sop-tier-check-extract-script into main
force-merge: workflow-only PR; secret-scan did not fire (path filter). sop-tier-check passing.
2026-05-09 01:52:55 +00:00
claude-ceo-assistant
dee733cf97 refactor(sop-tier-check): fan extract+SOP_DEBUG from internal#119
All checks were successful
sop-tier-check / tier-check (pull_request) Successful in 1s
Mirrors the canonical refactor: workflow YAML shrinks (env+invocation),
logic moves to .gitea/scripts/sop-tier-check.sh, debug echoes gated on
SOP_DEBUG, checkout@v6 pinned to base.sha.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 18:52:27 -07:00
a2970db8ed Merge pull request 'fix(sop-tier-check): use pull_request_target — pull_request leaks SOP_TIER_CHECK_TOKEN' (#146) from fix/sop-tier-check-pr-target-security into main
force-merge: bootstrapping gap (workflow trigger swap leaves first PR uncovered) + critical security fix per §SOP-6 Owner override. Fans internal#116 to molecule-core.
2026-05-09 01:48:57 +00:00