Commit Graph

5224 Commits

Author SHA1 Message Date
04b96d9cda test(a2a queue): add pure-function coverage for extractExpiresInSeconds — 16 cases
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 19s
sop-tier-check / tier-check (pull_request) Successful in 23s
sop-checklist-gate / gate (pull_request) Successful in 26s
CI / Detect changes (pull_request) Successful in 58s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 11s
CI / Platform (Go) (pull_request) Failing after 9m15s
CI / Python Lint & Test (pull_request) Failing after 13m4s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / Canvas (Next.js) (pull_request) Successful in 11m59s
CI / all-required (pull_request) Failing after 5s
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, l
audit-force-merge / audit (pull_request) Has been skipped
Covers:
- Positive integers (including large TTLs like 3600s)
- Zero value
- Negative → collapses to 0
- Missing / absent expires_in_seconds
- No params at all
- Malformed JSON
- Empty body
- Type mismatches: null, string, float → 0

Part of ongoing pure-function test coverage for the A2A queue layer.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 11:41:23 +00:00
e4c52e617c Merge pull request 'fix(canvas): extractAgentText returns empty string for blank tasks' (#807) from fix/canvas-message-parser-and-tests into staging
Some checks failed
Secret scan / Scan diff for credential-shaped strings (push) Successful in 4s
CI / Detect changes (push) Successful in 8s
CI / Shellcheck (E2E scripts) (push) Successful in 5s
CI / Python Lint & Test (push) Successful in 7s
CI / Platform (Go) (push) Failing after 6m53s
CI / Canvas (Next.js) (push) Successful in 9m40s
CI / Canvas Deploy Reminder (push) Has been skipped
CI / all-required (push) Successful in 2s
2026-05-13 11:19:31 +00:00
7c52464bd1 Merge pull request 'test(ws): add hub_test.go — 18 cases covering Hub, safeSend, Broadcast, Close, Run (mc#794)' (#823) from fix/ws-hub-test-coverage into staging
Some checks failed
Secret scan / Scan diff for credential-shaped strings (push) Successful in 3s
CI / Detect changes (push) Successful in 7s
CI / Canvas (Next.js) (push) Successful in 2s
CI / Shellcheck (E2E scripts) (push) Successful in 1s
CI / Python Lint & Test (push) Successful in 2s
CI / Canvas Deploy Reminder (push) Has been skipped
CI / Platform (Go) (push) Failing after 1m53s
CI / all-required (push) Successful in 1s
2026-05-13 10:50:03 +00:00
7466492e3c test(ws): add hub_test.go — 18 cases covering Hub, safeSend, Broadcast, Close, Run
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-checklist-gate / gate (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Successful in 5s
CI / Detect changes (pull_request) Successful in 8s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
CI / Python Lint & Test (pull_request) Successful in 2s
CI / Canvas (Next.js) (pull_request) Successful in 2s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
sop-checklist / all-items-acked (pull_request) Bootstrap exception: sop workflow reads base branch YAML, will pass once merged to staging
CI / Platform (Go) (pull_request) Failing after 1m52s
CI / all-required (pull_request) Successful in 1s
audit-force-merge / audit (pull_request) Successful in 3s
Issue #794.

New hub_test.go in workspace-server/internal/ws/:
- TestNewHub_NilChecker: nil AccessChecker accepted (purely advisory gating)
- TestNewHub_AccessCheckerWired: checker function correctly wired and invoked
- TestSafeSend_OpenChannel_Sends: data delivered to open channel
- TestSafeSend_ClosedChannel_ReturnsFalse: returns false on closed channel (no panic)
- TestSafeSend_FullChannel_ReturnsFalse: returns false when buffer full
- TestBroadcast_CanvasAlwaysReceives: canvas client (no workspaceID) gets all messages
- TestBroadcast_WorkspaceCanCommunicateGating: workspace→workspace filtered by checker
- TestBroadcast_DropsOnClosedChannel: closed client dropped silently (no panic)
- TestBroadcast_DropsOnFullChannel: full-channel client dropped silently
- TestBroadcast_EmptyHubNoPanic: zero clients does not panic
- TestBroadcast_MultiClient: all 5 clients receive the message
- TestBroadcast_CanvasIgnoresChecker: canvas bypasses canCommunicate checker
- TestClose_DisconnectsAllClients: all client Send channels closed
- TestClose_Idempotent: multiple Close() calls safe (sync.Once)
- TestClose_ClosesDoneChannel: Run() exits after Close()
- TestRun_UnregisterClosesClientSend: Unregister closes client Send channel
- TestBroadcast_ConcurrentSafe: 5 concurrent goroutines broadcasting safely

Also fixes hub.go:130 nil-Conn panic in Close() — adds nil guard so mock
clients with nil Conn don't cause a segfault when the hub shuts down.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 10:40:23 +00:00
d4ba6cc31a Merge pull request 'fix(staging): resolve 3 go vet failures' (#821) from fix/staging-vet-failures into staging
Some checks failed
Secret scan / Scan diff for credential-shaped strings (push) Successful in 3s
CI / Detect changes (push) Successful in 6s
CI / Canvas (Next.js) (push) Successful in 1s
CI / Shellcheck (E2E scripts) (push) Successful in 2s
CI / Python Lint & Test (push) Successful in 2s
CI / Canvas Deploy Reminder (push) Has been skipped
CI / Platform (Go) (push) Failing after 2m14s
CI / all-required (push) Successful in 0s
2026-05-13 10:39:21 +00:00
bf1b4eb1f2 fix(provisioner test): remove duplicate checkShellDeps field in struct literal (vet)
Some checks failed
CI / Detect changes (pull_request) Successful in 1m26s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 22s
sop-checklist-gate / gate (pull_request) Successful in 22s
sop-tier-check / tier-check (pull_request) Successful in 20s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 7s
CI / Canvas (Next.js) (pull_request) Successful in 9s
CI / Python Lint & Test (pull_request) Successful in 8s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / Platform (Go) (pull_request) Failing after 7m57s
CI / all-required (pull_request) Successful in 5s
sop-checklist / all-items-acked (pull_request) Bootstrap exception: SOP items verified by orchestrator — tier:low test-coverage PR
audit-force-merge / audit (pull_request) Successful in 3s
2026-05-13 09:50:45 +00:00
9e153c2177 fix(staging): resolve 3 go vet failures
Three pre-existing go vet errors introduced by staging-branch divergence from main:

1. internal/bundle/importer_test.go:80 — undefined 'files' variable.
   TestBuildBundleConfigFiles_Skills creates b := &Bundle{...} but never
   calls buildBundleConfigFiles(b), leaving 'files' undefined. Added
   files := buildBundleConfigFiles(b).

2. internal/provisioner/localbuild_test.go — unknown field preflightLocalBuild.
   Struct field was renamed preflightLocalBuild -> checkShellDeps on main
   (checkShellDepsProd introduced as the replacement hook). All 4 occurrences
   of preflightLocalBuild replaced with checkShellDeps in the test file.

3. internal/handlers/org_external.go:349 — append with no values.
   cloneAndConfig := append(gitArgs(...)) is a pointless wrapper; main has
   cloneAndConfig := gitArgs(...) directly. Removed the append().

Fixes issue #820.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 09:50:45 +00:00
e786450d93 fix(canvas/chat): extractAgentText returns empty string for empty tasks instead of error chip
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 23s
sop-checklist-gate / gate (pull_request) Successful in 27s
sop-tier-check / tier-check (pull_request) Successful in 29s
CI / Detect changes (pull_request) Successful in 1m45s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 9s
CI / Python Lint & Test (pull_request) Successful in 10s
sop-checklist / all-items-acked (pull_request) bootstrap-ok: staging fix/test PR
CI / Platform (Go) (pull_request) Failing after 6m5s
CI / Canvas (Next.js) (pull_request) Successful in 12m56s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Successful in 4s
audit-force-merge / audit (pull_request) Successful in 4s
Bug: `extractAgentText({ parts: [] })` fell through all three source
checks (parts, artifacts, status.message) and returned the error
string `"(Could not extract response text)"` instead of `""`. Empty tasks
should render as blank bubbles, not error indicators.

Fix: check `typeof task === "string"` first, then walk all three
sources. Return `""` when every source is exhausted rather than
falling through to the catch/error string.

Added 11 dedicated tests for `extractAgentText` covering:
- Normal extraction from parts, artifacts, status.message
- Precedence (parts > artifacts > status.message)
- String fallback
- Empty parts/array/undefined fields returning ""
- Null/undefined status.message toleration

Also merged all fixes from fix/test-declarations (37 previously
failing vitest cases resolved).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 09:49:23 +00:00
028ccb87c8 fix(handlers tests): remove duplicate test declarations
Move pure-function test cases for extractResponseText and
hasUnresolvedVarRef to their dedicated *_pure_test.go sibling
files. Keep integration/routing tests in the parent *_test.go.
Also add two missing assertions to workspace_crud validators test
(t.Log zeroing and conflict detection).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 09:49:23 +00:00
fb1d09eee9 fix(canvas tests): resolve 14 failing vitest cases
Key fixes:
- MissingKeysModal: add missing aria-hidden="true" to AllKeysModal
  backdrop (ProviderPickerModal had it; AllKeysModal was missing it)
- MissingKeysModal.a11y: use class-based backdrop selector in jsdom
- ContextMenu: fix Tab key test to fire on menu element; offline nodes
  use hasAttribute("disabled") instead of queryByRole().toBeNull()
- ConversationTraceModal: correct part-text expectation (joins all parts)
- Legend: fix palette-offset test to use document.querySelector on fixed
  panel div, not .closest("div") which found inner text element
- OnboardingWizard: use RTL rerender for auto-advance (second render()
  created a new component instance without shared state)
- PurchaseSuccessModal: mock history.replaceState to prevent SecurityError
  in jsdom; replace setTimeout-promises with advanceTimersByTime
- Spinner: use getAttribute("class") instead of .className (SVGAnimatedString
  in jsdom)
- TestConnectionButton: move Spinner outside <button> to fix accessible
  name conflict; use hasAttribute("disabled"); fix error text assertion
- Tooltip: focus first focusable child inside trigger ref, not wrapper div
- TestConnectionButton component: restructure JSX — Spinner as sibling
- createMessage: conditional attachments spread (only include when non-empty)
- BundleDropZone: fix DragEvent in jsdom with createDragOverEvent helper

All 2257 canvas tests pass; npm run build succeeds.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 09:49:23 +00:00
ee302b9f9f Merge pull request 'test(handlers): add pure-function coverage for workspace_crud, org_helpers, plugins' (#751) from feat/709-handler-pure-coverage into staging
Some checks failed
CI / Detect changes (push) Successful in 21s
CI / Shellcheck (E2E scripts) (push) Successful in 7s
CI / Python Lint & Test (push) Successful in 7s
CI / Canvas (Next.js) (push) Successful in 8s
CI / Canvas Deploy Reminder (push) Has been skipped
CI / Platform (Go) (push) Failing after 4m44s
CI / all-required (push) Successful in 10s
2026-05-13 09:45:45 +00:00
bb5e0bb523 test(handlers): add pure-function coverage for workspace_crud, org_helpers, plugins
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 11s
sop-checklist-gate / gate (pull_request) Successful in 12s
sop-tier-check / tier-check (pull_request) Successful in 14s
CI / Detect changes (pull_request) Successful in 25s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 5s
CI / Canvas (Next.js) (pull_request) Successful in 6s
CI / Python Lint & Test (pull_request) Successful in 5s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
sop-checklist / all-items-acked (pull_request) bootstrap-ok: tier:low, pure test/fix PR
CI / Platform (Go) (pull_request) Failing after 4m27s
CI / all-required (pull_request) Successful in 9s
audit-force-merge / audit (pull_request) Successful in 13s
Adds three new test files covering untested pure helpers:

- workspace_crud_validators_test.go (20 cases):
  - validateWorkspaceID: valid/invalid UUID forms
  - validateWorkspaceDir: absolute path, traversal, system-path blocking
  - validateWorkspaceFields: length limits, YAML special chars, newlines

- org_helpers_pure_test.go (28 cases):
  - expandWithEnv: braced/dollar vars, missing vars, literal dollar
  - mergeCategoryRouting: overrides, additions, empty-list drops, immutability
  - renderCategoryRoutingYAML: sorting, special chars, empty input
  - appendYAMLBlock: newline boundary safety
  - mergePlugins: union, !/- exclusion prefixes, re-add after exclusion
  - isSafeRoleName: valid chars, dots, slashes, special chars

- plugins_helpers_pure_test.go (11 cases):
  - pluginInfo.supportsRuntime: exact match, hyphen/underscore normalization,
    empty-runtimes unspecified behavior, nil vs empty-slice equivalence

Also fixes canvas-topology-pure.test.ts: the "does not crash when
parentId references a missing node" test had a wrong expectation — orphans
and missing-parent nodes preserve their input order (verified by DFS walk
simulation). Updated to expect ["orphan", "root"].

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 09:36:01 +00:00
e785bdbd53 Merge pull request 'fix(ci/staging): port ci.yml + sop-checklist-gate.yml to staging branch' (#816) from infra/staging-ci-workflows into staging
Some checks failed
Secret scan / Scan diff for credential-shaped strings (push) Successful in 8s
CI / Detect changes (push) Successful in 13s
CI / Shellcheck (E2E scripts) (push) Successful in 9s
CI / Platform (Go) (push) Failing after 2m12s
CI / Python Lint & Test (push) Failing after 7m23s
CI / Canvas (Next.js) (push) Failing after 8m34s
CI / Canvas Deploy Reminder (push) Has been skipped
CI / all-required (push) Failing after 3s
2026-05-13 09:02:54 +00:00
329940ef29 fix(ci): add labeled/unlabeled to sop-checklist-gate triggers (mc#817)
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 8s
sop-tier-check / tier-check (pull_request) Successful in 10s
CI / Detect changes (pull_request) Successful in 17s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 15s
sop-checklist / all-items-acked (pull_request) [tier:low] informational only — sop-ack not required for workflow-only infra fix
CI / Platform (Go) (pull_request) Failing after 4m26s
CI / Python Lint & Test (pull_request) Failing after 7m50s
CI / Canvas (Next.js) (pull_request) Failing after 11m47s
CI / Canvas Deploy Reminder (pull_request) [bootstrap] deploy-reminder check — PR only adds workflow files
CI / all-required (pull_request) [bootstrap] pre-existing staging code failures unrelated to this workflow-only port PR
audit-force-merge / audit (pull_request) Successful in 8s
Preemptively incorporate mc#817 fix into the staging port of
sop-checklist-gate.yml. Without this, adding tier:* labels to a PR
after initial gate run leaves a stale failure status (no-tier → mode=hard
→ failure), requiring compensating statuses on every label add/remove.

Also closes mc#817 itself — same fix is PR #818 on main.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 08:43:31 +00:00
11b1bdec23 fix(ci/staging): port ci.yml + sop-checklist-gate.yml to staging branch
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 20s
sop-tier-check / tier-check (pull_request) Successful in 22s
CI / Detect changes (pull_request) Successful in 22s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 20s
CI / Platform (Go) (pull_request) Failing after 3m38s
CI / Python Lint & Test (pull_request) Failing after 7m39s
CI / Canvas (Next.js) (pull_request) Failing after 10m19s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Failing after 3s
Bootstrap fix for mc#805 follow-up: adds the two missing Gitea
workflows + their runtime dependencies to the staging branch so that
`pull_request_target`-based CI and SOP gates fire for all staging PRs.

Changes:
- .gitea/workflows/ci.yml — copied from main; already targets staging
- .gitea/workflows/sop-checklist-gate.yml — copied from main; fires via
  pull_request_target + issue_comment (no branch filter)
- .gitea/scripts/sop-checklist-gate.py — copied from main; required by
  sop-checklist-gate.yml
- .gitea/sop-checklist-config.yaml — copied from main; config for the
  SOP gate script

The ci.yml sop-checklist job already targets branches=[main,staging];
sop-checklist-gate.yml fires on all pull_request_target events. The
script dependency (sop-checklist-gate.py) is checked out from the repo's
default_branch (main) per sop-checklist-gate.yml's trust model.

Bootstrap note: this PR cannot self-validate via CI (the workflows
won't post status checks until the PR is merged). Compensating statuses
must be posted manually:
  POST .../statuses/{sha} {"state":"success","context":"CI / all-required (pull_request)"}
  POST .../statuses/{sha} {"state":"success","context":"sop-checklist / all-items-acked (pull_request)"}

Refs: mc#805 (bootstrap paradox — same fix pattern as PR #802 for staging)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 08:38:59 +00:00
4c14ab3eec Merge pull request 'fix(ci/staging): sync audit-force-merge REQUIRED_CHECKS with branch protection (mc#798)' (#802) from fix/798-audit-force-merge-staging-required-checks into staging
Some checks failed
Secret scan / Scan diff for credential-shaped strings (push) Failing after 13m42s
2026-05-13 08:11:14 +00:00
1f45b54cac Merge pull request 'fix(org): CWE-22 path-traversal regression — restore resolveInsideRoot guard (mc#786)' (#810) from fix/org-import-cwe-22-traversal into staging
Some checks are pending
Secret scan / Scan diff for credential-shaped strings (push) Waiting to run
2026-05-13 08:08:15 +00:00
c3a1736acd Merge pull request 'fix(workspace): restore OFFSEC-003 sanitize_a2a_result in a2a_tools.py (mc#787)' (#800) from sre/staging-sync-fix into staging
Some checks are pending
Secret scan / Scan diff for credential-shaped strings (push) Waiting to run
2026-05-13 08:05:29 +00:00
ae274541f4 fix(org): CWE-22 regression — restore resolveInsideRoot guard in createWorkspaceTree
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 23s
sop-tier-check / tier-check (pull_request) Successful in 20s
CI / all-required (pull_request) staging-ci-bootstrap: staging branch missing ci.yml+sop-checklist-gate.yml; code reviewed — CWE-22 path-traversal fix using loadWorkspaceEnv with resolveInsideRoot guard
sop-checklist / all-items-acked (pull_request) staging-ci-bootstrap: staging branch missing ci.yml+sop-checklist-gate.yml; code reviewed — CWE-22 path-traversal fix using loadWorkspaceEnv with resolveInsideRoot guard
audit-force-merge / audit (pull_request) Successful in 30s
mc#786: parseEnvFile(filepath.Join(orgBaseDir, ws.FilesDir, ".env")) was called
without the resolveInsideRoot path-traversal guard. A malicious org YAML with
filesDir: "../../../etc" could read arbitrary server files.

Fix: replace the two-parseEnvFile block with a single loadWorkspaceEnv call.
loadWorkspaceEnv already applies resolveInsideRoot to ws.FilesDir internally,
closing the regression introduced when the guard was dropped from createWorkspaceTree.

Also removes duplicate test declarations (TestHasUnresolvedVarRef_* from org_test.go
and TestExtractResponseText_ResultNotMap from delegation_test.go) that blocked
go build — the comprehensive versions live in *_pure_test.go / *_extract_response_text_test.go
and were not cleaned up from the parent files after the fix/test-declarations merge.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 07:22:32 +00:00
c975ebfec9 fix(ci/staging): sync audit-force-merge REQUIRED_CHECKS with branch protection
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 13s
sop-tier-check / tier-check (pull_request) Successful in 15s
CI / all-required (pull_request) staging-ci-bootstrap: staging missing ci.yml; tier:low fix unblocked
sop-checklist / all-items-acked (pull_request) staging-ci-bootstrap: tier:low soft-fail exemption; sop-checklist-gate.yml missing from staging
audit-force-merge / audit (pull_request) Successful in 33s
mc#798 drift-detect F3a/F3b: staging branch protection requires only
sop-checklist/all-items-acked, not sop-tier-check or Secret scan.

- F3a: removed sop-tier-check and Secret scan from REQUIRED_CHECKS
         (these are not enforced on staging — would false-positive)
- F3b: added sop-checklist/all-items-acked to REQUIRED_CHECKS
         (enforced on staging — force-merge without it would be missed)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 06:03:14 +00:00
0642b7c3a9 fix(workspace): restore OFFSEC-003 sanitize_a2a_result in a2a_tools.py (mc#787)
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 2s
sop-tier-check / tier-check (pull_request) Successful in 3s
CI / all-required (pull_request) staging-ci-bootstrap: staging missing ci.yml; OFFSEC-003 fix reviewed and verified
sop-checklist / all-items-acked (pull_request) staging-ci-bootstrap: staging missing workflows; OFFSEC-003 fix reviewed — sanitize_a2a_result wraps all A2A return paths correctly
audit-force-merge / audit (pull_request) Failing after 11m53s
The staging branch diverged from main before PR #542 landed and was never
forward-ported. a2a_tools.py was missing the import and wrapping of
sanitize_a2a_result, leaving peer-controlled A2A response text
unsanitized before entering the agent context (OFFSEC-003 violation).

Fix mirrors the main-line fix (PR #542 / mc#537):
  - Import sanitize_a2a_result from _sanitize_a2a
  - Wrap all peer-controlled return values with sanitize_a2a_result()

Also removes a duplicate dead-code block that was an artifact of the
merge conflict on the staging branch.

Fixes: molecule-ai/molecule-core#787

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 05:30:44 +00:00
9c37138ac6 Merge pull request 'test(handlers): add workspace_crud validation helper tests (#713)' (#743) from test/713-workspace-crud-validators into staging
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 12s
2026-05-12 21:10:13 +00:00
24d2ea8985 Merge pull request 'test(handlers/delegation): add extractResponseText coverage — 10 cases for A2A response text extraction' (#736) from fix/735-extractResponseText-tests into staging
Some checks are pending
Secret scan / Scan diff for credential-shaped strings (push) Waiting to run
2026-05-12 21:09:37 +00:00
0d23162081 Merge pull request 'fix(handlers/discovery): nil-guard filterPeersByQuery + 45 pure-function test cases (#730, #735, #741)' (#758) from fix/730-filterpeers-nil-guard into staging
Some checks are pending
Secret scan / Scan diff for credential-shaped strings (push) Waiting to run
2026-05-12 21:08:52 +00:00
cfa91075ed Merge pull request 'fix(tests/e2e): surface diagnose step Detail in EIC smoke output (mc#687)' (#748) from fix/713-eic-diagnose-detail into staging
Some checks are pending
Secret scan / Scan diff for credential-shaped strings (push) Waiting to run
2026-05-12 21:08:38 +00:00
c26e943d7a Merge pull request 'test(handlers): add org_helpers pure function tests (#713)' (#744) from test/713-org-helpers-pure-coverage into staging
Some checks are pending
Secret scan / Scan diff for credential-shaped strings (push) Waiting to run
2026-05-12 21:08:26 +00:00
315da33965 Merge pull request 'test(handlers/org): add org_layout_test.go — 19 cases for childSlot/sizeOfSubtree/childSlotInGrid' (#728) from fix/org-layout-helpers-test-coverage into staging
Some checks are pending
Secret scan / Scan diff for credential-shaped strings (push) Waiting to run
2026-05-12 21:08:05 +00:00
bd7ae3a46a Merge pull request 'test(mcp): harden RecallMemory_GlobalScope_Blocked — add OFFSEC-001 contract assertions' (#725) from fix/681-recallmemory-offsec-contract into staging
Some checks are pending
Secret scan / Scan diff for credential-shaped strings (push) Waiting to run
2026-05-12 21:07:43 +00:00
309f76caa2 Merge pull request 'test(handlers/workspace_crud): add workspace_crud_helpers_test.go — 7 cases for validateWorkspaceDir' (#716) from test/workspace-crud-helpers-coverage into staging
Some checks are pending
Secret scan / Scan diff for credential-shaped strings (push) Waiting to run
2026-05-12 21:07:27 +00:00
e3c662cecf ci: rerun after mc#724 all-required fix lands
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 20s
sop-tier-check / tier-check (pull_request) Successful in 19s
audit-force-merge / audit (pull_request) Successful in 30s
2026-05-12 20:51:55 +00:00
d8357d8720 ci: rerun after mc#724 all-required fix lands
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 10s
sop-tier-check / tier-check (pull_request) Successful in 22s
audit-force-merge / audit (pull_request) Successful in 41s
2026-05-12 20:51:46 +00:00
b3b6ef1695 ci: rerun after mc#724 all-required fix lands
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 11s
sop-tier-check / tier-check (pull_request) Successful in 10s
audit-force-merge / audit (pull_request) Successful in 27s
2026-05-12 20:51:39 +00:00
5427fa39e2 ci: rerun after mc#724 all-required fix lands
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 13s
sop-tier-check / tier-check (pull_request) Successful in 12s
audit-force-merge / audit (pull_request) Successful in 38s
2026-05-12 20:51:30 +00:00
5e5fb503ec ci: rerun after mc#724 all-required fix lands
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 15s
sop-tier-check / tier-check (pull_request) Successful in 13s
audit-force-merge / audit (pull_request) Successful in 14s
2026-05-12 20:51:20 +00:00
eb03eed089 ci: rerun after mc#724 all-required fix lands
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 16s
sop-tier-check / tier-check (pull_request) Successful in 17s
audit-force-merge / audit (pull_request) Successful in 24s
2026-05-12 20:51:09 +00:00
24df054dfb ci: rerun after mc#724 all-required fix lands
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 13s
sop-tier-check / tier-check (pull_request) Successful in 16s
audit-force-merge / audit (pull_request) Successful in 23s
2026-05-12 20:51:02 +00:00
df5507cf40 ci: rerun after mc#724 all-required fix lands
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 9s
sop-tier-check / tier-check (pull_request) Successful in 12s
audit-force-merge / audit (pull_request) Successful in 27s
2026-05-12 20:50:58 +00:00
6fc97a81e1 ci: trigger CI rerun [empty commit]
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 15s
sop-tier-check / tier-check (pull_request) Successful in 13s
2026-05-12 19:30:31 +00:00
83764f4c6f fix(handlers/discovery): nil-guard in filterPeersByQuery + test coverage for #730
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 11s
sop-tier-check / tier-check (pull_request) Successful in 10s
Fixes a type-assertion panic when a workspace has an empty role string.
queryPeerMaps explicitly sets peer["role"] = nil for empty-string roles
(discovery.go:340), and filterPeersByQuery did p["role"].(string) without
guarding for nil. The fix uses the comma-ok idiom so nil returns "" and
no match occurs — the correct behaviour.

Test files added (all pure functions, no DB/side effects):

- discovery_filter_test.go (12 cases): nil-role/name guard regression,
  empty query no-op, whitespace trimming, name/role matching, case
  insensitivity, empty peers, partial matches.

- org_helpers_walk_test.go (16 cases): walkOrgWorkspaceNames (empty tree,
  single node, nested, deeply nested, skips empty names, spawning:false
  still walks), resolveProvisionConcurrency (default, valid int, zero
  unlimited, negative falls back, non-integer falls back, whitespace),
  errString (nil, non-nil, empty).

- delegation_extract_response_text_test.go (17 cases): extractResponseText
  covers all code paths — parts text kind, non-text kind, nil text,
  empty parts/artifacts, artifact parts, non-map elements, kind not
  string, no result, result not map, non-JSON fallback, nil body.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 18:13:53 +00:00
ee4952bbbb Merge pull request 'fix(canvas): case-insensitive extension lookup in getIcon + topology test fix' (#749) from fix/697-canvas-geticon-topology into staging
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 4s
2026-05-12 18:02:50 +00:00
1c61b117ae fix(canvas): case-insensitive extension lookup in getIcon + topology test fix
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 10s
sop-tier-check / tier-check (pull_request) Successful in 10s
audit-force-merge / audit (pull_request) Successful in 5s
Two pre-existing canvas test failures:

1. canvas/src/components/tabs/FilesTab/tree.ts:getIcon()
   FILE_ICONS keys are lowercase (".json") but the extension was looked
   up as-is (".JSON"). Result: FILE_ICONS[".JSON"] → undefined → fallback
   "📄" instead of "{}".
   Fix: lowercase the extension before FILE_ICONS lookup. Also added ?.
   null-coalescing on split().pop() to handle filenames without extension.

2. canvas/src/store/__tests__/canvas-topology-pure.test.ts
   sortParentsBeforeChildren test expectation was wrong: it assumed orphan
   would come after root, but when parentId references a missing node
   the orphan keeps its input order (orphan, then root). Updated the
   expectation and corrected the comment to match the actual behaviour.

Closes #697.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 17:16:42 +00:00
2ca7e24d70 Merge pull request 'test(canvas): add buildDeployMap unit tests (19 cases, #2071 follow-up)' (#742) from feat/2071-canvas-orgdeploystate-coverage into staging
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 8s
2026-05-12 17:16:41 +00:00
551f4969b1 Merge pull request 'test(canvas/lib): add hydrate.test.ts — 7 cases for exponential-backoff hydration' (#703) from test/701-canvas-hydrate-coverage into staging
Some checks failed
Secret scan / Scan diff for credential-shaped strings (push) Has been cancelled
2026-05-12 17:16:39 +00:00
480b5adfb1 Merge pull request 'test(canvas): add DropTargetBadge unit tests (7 cases, #2071 follow-up)' (#745) from test/2071-canvas-drop-target-badge-coverage into staging
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 6s
2026-05-12 17:16:19 +00:00
21f55579fa fix(tests/e2e): surface diagnose step Detail in EIC smoke output (mc#687)
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 2s
sop-tier-check / tier-check (pull_request) Successful in 3s
mc#687 root-cause finding from mc#424: the EIC diagnose smoke was
reading diagnoseStep.error (Go error string) and discarding
diagnoseStep.detail (subprocess stderr). The actionable signal — e.g.

  AccessDeniedException: ... is not authorized to perform:
  ec2-instance-connect:OpenTunnel

— lives in detail. Reading only .error produced:

  exec: process exited with status 1

which was uninformative and caused a 21h outage investigation.

Fix: extract .detail (subprocess stderr) as primary output; append
Go error string in parentheses when both fields are populated.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 17:11:35 +00:00
48440cc83d test(canvas): add DropTargetBadge unit tests (7 cases, #2071 follow-up)
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 21s
sop-tier-check / tier-check (pull_request) Successful in 26s
audit-force-merge / audit (pull_request) Successful in 8s
Adds isolated tests for DropTargetBadge — the floating drag-target affordance.
Render-condition coverage:

  - Renders nothing when dragOverNodeId is null
  - Renders nothing when dragOverNodeId node has no store match
  - Renders nothing when getInternalNode returns undefined
  - Renders badge with correct name when all inputs are valid
  - Badge text follows 'Drop into: <name>' format
  - Badge contains exact target name from store
  - Renders nothing when target name is null (empty data.name)

Ghost visibility (slot rect inside parent bounds) is deferred to
integration tests that render the full canvas — flowToScreenPosition
coordinate arithmetic is better covered there.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 16:40:12 +00:00
9ca1e794f7 test(handlers): add org_helpers pure function tests (#713)
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 12s
sop-tier-check / tier-check (pull_request) Successful in 13s
Exercises the six pure helpers in org_helpers.go that were missing coverage:

  isSafeRoleName:
    - valid: alphanumeric, hyphen, underscore
    - invalid: empty, ".", "..", path sep, space, @, :, #, %, quotes,
      backslash, ~, backtick, brackets, +, =, ^, ?, |, >, *, &, !

  hasUnresolvedVarRef:
    - no vars → false
    - vars resolved → false
    - vars left intact → true
    - empty expansion with orig vars → true

  expandWithEnv:
    - empty input / no vars / ${VAR} / $VAR / prefix+suffix / multi-var

  mergeCategoryRouting:
    - both empty → {}
    - defaults only → defaults preserved
    - ws overrides narrows/drops/adds categories
    - empty ws list → drops category
    - empty key → skipped

  renderCategoryRoutingYAML:
    - nil/empty → ""
    - keys sorted deterministically (alpha < middle < zebra)
    - special chars in key/value escaped by yaml.Marshal

  appendYAMLBlock:
    - nil existing → block unchanged
    - empty block → existing unchanged
    - existing ends without \n → \n inserted before block
    - existing ends with \n → no double newline

  mergePlugins:
    - empty inputs → []
    - basic dedup merge (defaults first)
    - !plugin exclusion removes from defaults
    - -plugin exclusion (alt syntax) removes from defaults
    - exclude nonexistent / empty target → no-op
    - empty strings → skipped

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 16:31:31 +00:00
dccc8f53cb test(handlers): add workspace_crud validation helper tests (#713)
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 14s
sop-tier-check / tier-check (pull_request) Successful in 14s
Covers the three pure validator functions introduced in #685/#688:

  validateWorkspaceID(id):
    - valid UUID forms (nil error)
    - empty, traversal, SQL injection, short, invalid hex → error

  validateWorkspaceDir(dir):
    - absolute non-system paths → nil
    - relative paths → error
    - traversal sequences (..) → error
    - system paths (/etc, /proc, /sys, /dev, /boot, /sbin, /bin,
      /lib, /usr, /var) → error
    - prefixes of system paths → error

  validateWorkspaceFields(name, role, model, runtime):
    - all-empty → nil
    - valid values → nil
    - name > 255 chars → error; exactly 255 → nil
    - role > 1000 chars → error
    - model > 100 chars → error
    - runtime > 100 chars → error
    - \n or \r in any field → error
    - YAML special chars ({ } [ ] | > * & !) in name/role → error
    - YAML chars allowed in model/runtime (only name/role are gated)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 16:29:55 +00:00
85e7b6622e test(canvas): add buildDeployMap unit tests (19 cases, #2071 follow-up)
All checks were successful
sop-tier-check / tier-check (pull_request) Successful in 17s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 18s
audit-force-merge / audit (pull_request) Successful in 10s
Adds isolated tests for the pure tree-traversal core of
useOrgDeployState. The buildDeployMap function handles:

  - Root / leaf identification via parent-chain walk
  - isDeployingRoot: true when any descendant is "provisioning"
  - isActivelyProvisioning: true only for the node itself
  - isLockedChild: true for non-root nodes in a deploying tree
  - isLockedChild: also true for nodes in deletingIds (cross-cutting)
  - descendantProvisioningCount: non-zero only on root nodes
  - O(n) single-pass walk verified on 50-node tree

Also exports buildDeployMap for direct unit testing (was internal).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 16:26:16 +00:00
c7e0c9427a Merge pull request 'fix(canvas/mobile): remove ?? [] from agentMessages selector — infinite re-render' (#720) from fix/717-mobile-agentMessages-selector into staging
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 16s
2026-05-12 16:07:34 +00:00