Commit Graph

5232 Commits

Author SHA1 Message Date
f99b0fdf94 test(OrgCancelButton): 17 test cases for cancel-deployment pill (#485)
Co-authored-by: hongming-pc2 <hongming-pc2@moleculesai.app>
Co-committed-by: hongming-pc2 <hongming-pc2@moleculesai.app>
2026-05-11 14:44:12 +00:00
8019481452 fix(ci): reconcile sweep workflow secrets — use confirmed-existing names (#482)
Co-authored-by: Molecule AI Core-DevOps <core-devops@agents.moleculesai.app>
Co-committed-by: Molecule AI Core-DevOps <core-devops@agents.moleculesai.app>
2026-05-11 14:07:53 +00:00
9ca86bee85 fix(canvas/test): consistent fake-timer state — fix ApprovalBanner test flakiness (#479)
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-11 14:04:04 +00:00
7a731f6b42 fix(runbooks): correct Gitea runner fetch timing facts (post-#457) (#478)
Co-authored-by: Molecule AI Infra-SRE <infra-sre@agents.moleculesai.app>
Co-committed-by: Molecule AI Infra-SRE <infra-sre@agents.moleculesai.app>
2026-05-11 13:45:42 +00:00
6403c5196f Merge pull request 'tools: gate-check-v3 MVP — automated SOP-6 + CI gate detector' (#393) from tools/gate-check-v3 into main 2026-05-11 13:41:08 +00:00
b57cebf8d4 fix(gate-check-v3): tier-aware gate verdict computation
tier:low and tier:high are OR gates — any one positive verdict
is sufficient. The previous implementation required ALL groups to have
positive verdicts, causing INCOMPLETE even when core-devops APPROVED
and core-lead was absent.

Now uses tier-specific logic:
- tier:low / tier:high (OR): any positive = CLEAR
- tier:medium (AND): all positive = CLEAR

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 13:38:02 +00:00
15e2d93989 fix(gate-check-v3): add pagination to api_list for comment/review scans
Paginate all list endpoints (comments, reviews) to handle PRs with
many comments without missing entries. Uses per_page=100 with page
increment loop, safety-capped at 20 pages.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 13:38:02 +00:00
3eb06e40e6 fix(gate-check-v3): use submitted_at for review timestamps
Gitea reviews use "submitted_at" not "created_at" for when the review
was submitted. The earlier signal_1_comment_scan fix (inherited from
sop-tier-check investigation) already handled this; signal_2 and
signal_3 were missing the same correction.

Fixes KeyError: 'created_at' on PRs with no comments/reviews.
Includes the individual-check-status fix (use "status" not "state").

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 13:38:02 +00:00
9d05335b1a fix(gate-check-v3): use correct API field for individual check status
Gitea Actions API uses "status" (pending/success/failure) not "state"
for individual status entries. The "state" field is null for pending
runs. This caused all_check_statuses to show Python null instead of
"pending" for queued jobs.

Also verified on PR #391 and PR #393 — individual checks now correctly
display "pending" while combined_state is "pending" (CI_PENDING verdict).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 13:38:02 +00:00
f470f589c0 tools/gate-check-v3: MVP automated PR gate detector
SOP-6 + CI gate checker for Gitea PRs. Detects:
- Signal 1: Author-aware agent-tag comment scan (tier-aware)
- Signal 2: REQUEST_CHANGES reviews state machine
- Signal 3: Staleness detection (SOP-12)
- Signal 6: CI required-checks awareness

Post `[gate-check-v3] STATUS:` comment on PRs. CLI + Gitea Actions
workflow (cron hourly + PR-triggered).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 13:38:02 +00:00
0a2e1e9a97 Merge pull request 'fix(canvas/test): replace fixed-delay dialog wait with waitFor polling' (#453) from fix/canvas-purchase-success-modal-test-timing into main 2026-05-11 13:31:59 +00:00
d7e163d2a8 Merge branch 'main' into fix/canvas-purchase-success-modal-test-timing 2026-05-11 13:27:38 +00:00
05e6443e2c test(canvas): add WorkspaceNode component test coverage (51 cases) (#480)
Co-authored-by: Molecule AI Core-FE <core-fe@agents.moleculesai.app>
Co-committed-by: Molecule AI Core-FE <core-fe@agents.moleculesai.app>
2026-05-11 13:14:19 +00:00
b62b18b523 [core-be-agent] ci: retrigger Canvas tests for env validation
Retry CI run to confirm Canvas test suite passes on current head.
2026-05-11 12:50:57 +00:00
e70955298b Merge pull request 'docs(runbooks): add Gitea Actions operational quirks reference' (#457) from docs/gitea-operational-quirks-runbook into main 2026-05-11 12:37:37 +00:00
db647de1cd Merge branch 'main' into docs/gitea-operational-quirks-runbook 2026-05-11 12:35:58 +00:00
94b08ef0de docs(runbooks): add Gitea Actions operational quirks reference
Documents four persistent operational findings from the 2026-05-11
Gitea migration and CI noise investigation:

1. Runner network isolation (git remote unreachable from container)
2. continue-on-error only works at step level, not job level
3. workflow_dispatch.inputs not supported
4. fetch-depth:0 on actions/checkout times out

References PR #441 (harness-replays detect-changes fix) and
Task #173 (pre-clone manifest deps pattern).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 12:25:54 +00:00
1a2cfb9417 test(canvas): add Toolbar component test coverage (19 cases) (#472)
Co-authored-by: Molecule AI Core-FE <core-fe@agents.moleculesai.app>
Co-committed-by: Molecule AI Core-FE <core-fe@agents.moleculesai.app>
2026-05-11 12:25:46 +00:00
3d572d97a3 fix(canvas/test): use string keys in TIER_CONFIG toHaveProperty calls (#440)
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-11 12:15:29 +00:00
beea0e9b88 Merge branch 'main' into fix/canvas-purchase-success-modal-test-timing 2026-05-11 12:06:53 +00:00
2747246519 fix(ci): sweep-stale-e2e-orgs reference + drop continue-on-error (closes EC2 leak) (#461)
Co-authored-by: claude-ceo-assistant <claude-ceo-assistant@agents.moleculesai.app>
Co-committed-by: claude-ceo-assistant <claude-ceo-assistant@agents.moleculesai.app>
2026-05-11 12:05:36 +00:00
67762ca422 Merge branch 'main' into fix/canvas-purchase-success-modal-test-timing 2026-05-11 12:00:57 +00:00
71cfb70a6f Merge pull request 'fix(canvas/test): ApprovalBanner mockReset to prevent queue stacking' (#467) from fix/approvalbanner-mockreset-452 into main 2026-05-11 11:58:53 +00:00
c2d27d2b3f fix(canvas/test): ApprovalBanner mockReset to prevent queue stacking
Cherry-picked from PR #452 (fix/canvas-test-and-design-fixes) which
was closed without merge during the PR #443 cascade. The fix adds a
mockPost reference so individual tests can reset the POST mock cleanly
instead of queueing multiple resolved/rejected values.

Without this, the "shows an error toast when POST fails" and "keeps
the card visible when POST fails" tests queue two responses from
beforeEach's mockResolvedValue({}) and the second mockRejectedValueOnce()
call, causing non-deterministic test outcomes.

Fixes test failures in ApprovalBanner suite.
2026-05-11 11:51:21 +00:00
ce06b8cd59 Merge pull request 'fix(publish-runtime-autobump): shallow clone + explicit tag fetch (fixes main RED)' (#463) from fix/publish-runtime-autobump-fetch-depth into main
Merge #463 — strict-root cascade clearing
2026-05-11 11:46:15 +00:00
e0bbba801e Merge branch 'main' into fix/publish-runtime-autobump-fetch-depth 2026-05-11 11:39:14 +00:00
5c10ee0d73 Merge pull request 'fix(ci): canonicalize MOLECULE_STAGING_ADMIN_TOKEN -> CP_STAGING_ADMIN_API_TOKEN (post-#443 rebase; staging-smoke + 4 e2e-staging-*) + drop staging-smoke continue-on-error' (#464) from fix/canonicalize-staging-admin-token-rebase-462 into main
Merge #464 — canonicalize MOLECULE_STAGING_ADMIN_TOKEN → CP_STAGING_ADMIN_API_TOKEN (post-#443 rebase; 5 workflows + 1 doc) + drop staging-smoke continue-on-error + fail-loud Notify. APPROVEs: hongming-pc2 1219 (Owners substance via the old #462 review chain) + core-devops 1241 (whitelist-counted). Completes internal#322 canonicalization.
2026-05-11 11:37:40 +00:00
8f1d24f33f fix(ci): canonicalize MOLECULE_STAGING_ADMIN_TOKEN -> CP_STAGING_ADMIN_API_TOKEN (post-#443 rebase) + drop staging-smoke continue-on-error
Re-applies PR#462 on current main (PR#443 merged first and renamed
canary-staging.yml -> staging-smoke.yml, conflicting #462).

Swept 6 files (15 secret-ref flips):

- .gitea/workflows/staging-smoke.yml          (3 refs + drop continue-on-error + add notify-on-failure step)
- .gitea/workflows/e2e-staging-saas.yml       (3 refs)
- .gitea/workflows/e2e-staging-sanity.yml     (3 refs)
- .gitea/workflows/e2e-staging-canvas.yml     (3 refs)
- .gitea/workflows/e2e-staging-external.yml   (3 refs)
- tests/e2e/STAGING_SAAS_E2E.md               (1 heading flip + 1 historical-rename breadcrumb)

Each workflow keeps one inline breadcrumb comment pointing back to
the old name and internal#322.

staging-smoke is the 30-min canary cadence for the entire staging
SaaS stack; silent failure (continue-on-error: true) masked exactly
the regressions the smoke exists to surface, same class as PR#461
(`sweep-stale-e2e-orgs`). Dropped continue-on-error from the smoke
job + added a fail-loud `if: failure()` Notify step mirroring
PR#461. The four other `e2e-staging-*` workflows KEEP
continue-on-error: true per RFC #219 §1 — they are advisory.

Excluded from this PR:
- .gitea/workflows/sweep-stale-e2e-orgs.yml  (PR#461 owns)
- .gitea/workflows/staging-verify.yml         (only references the plural MOLECULE_STAGING_ADMIN_TOKENS canary-fleet secret, out of scope)
- scripts/staging-smoke.sh                    (same — plural only)
- docs/architecture/canary-release.md         (same — plural only)
- .github/ mirror tree                        (separate scope per reference_molecule_core_actions_gitea_only)

Verified locally: yaml.safe_load clean on all 5 workflows; grep
returns ZERO non-breadcrumb references in the swept files; the
plural MOLECULE_STAGING_ADMIN_TOKENS references in
staging-verify.yml / scripts/staging-smoke.sh / canary-release.md
are intentionally untouched.

Refs: internal#322, PR#461, feedback_rename_pr_and_edit_pr_conflict_sequence
2026-05-11 04:33:56 -07:00
ae30cdef87 refactor(ci): drop "canary-" prefix → staging-smoke/staging-verify (Hongming directive 2026-05-11) (#443)
Co-authored-by: claude-ceo-assistant <claude-ceo-assistant@agents.moleculesai.app>
Co-committed-by: claude-ceo-assistant <claude-ceo-assistant@agents.moleculesai.app>
2026-05-11 11:25:29 +00:00
dd992fcc9b fix(publish-runtime-autobump): shallow clone + explicit tag fetch
Gitea Actions runners cannot reach https://git.moleculesai.app over HTTPS
(runbooks/gitea-operational-quirks.md §runner-network-isolation).
fetch-depth: 0 on actions/checkout triggers a full repo history fetch
that times out at ~15s, causing the workflow to fail on Gitea runners
(main RED, issue #460).

Fix: use fetch-depth: 1 (shallow clone) and explicitly fetch tags with
git fetch origin --tags --depth=1. The collision check (git tag --list)
still works since we only need the most recent tag, not full history.
git push of the new tag works on a shallow clone.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 11:23:12 +00:00
00f0a1066f Merge pull request 'refactor(workspace): extract idle-loop pending-check guard for direct unit-testing' (#451) from runtime/432-followup-helper-extraction into main 2026-05-11 11:02:24 +00:00
65f34711bc Merge branch 'main' into fix/canvas-purchase-success-modal-test-timing 2026-05-11 10:54:53 +00:00
df2e69b32f ci: re-trigger Gitea Actions status reporting (infra-runtime-be-agent) 2026-05-11 10:49:40 +00:00
4a7e1bd988 refactor(workspace): extract idle-loop pending-check guard for direct unit-testing
Follows up on #432 (merged). Extracts _check_delegation_results_pending()
from the inline guard in _run_idle_loop() so tests can call the real
production function directly via patch(builtins.open, ...).

Fixes #401: the previous test used a mirror copy of the guard logic,
which risks drifting from the production implementation over time.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 10:49:40 +00:00
0911ee1a89 Merge pull request 'fix(ci/harness-replays): add fetch-depth:0 to detect-changes checkout' (#441) from fix/harness-replays-detect-changes-fetch-depth into main 2026-05-11 10:48:51 +00:00
cebd9ab916 fix(canvas/test): replace fixed-delay dialog wait with waitFor polling
PurchaseSuccessModal tests used a fixed 50ms setTimeout to wait for the
dialog to appear after React useEffect batch + createPortal. This was
flaky because React's rendering timing varies.

Replace waitForDialog() fixed-delay with waitFor() polling — the test
waits exactly as long as React needs, no more. Update all dismiss tests
to use act(() => setTimeout(...)) after vi.useRealTimers() for reliable
real-timer behavior.

Result: 18/18 tests pass (was 14/18 with 4 timing-related failures).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 10:48:16 +00:00
d0ed03edc6 Merge branch 'main' into fix/harness-replays-detect-changes-fetch-depth 2026-05-11 10:41:17 +00:00
5a67b1dc5e Merge pull request 'feat(ci): sop-tier-check refire workflow via issue_comment (internal#292)' (#449) from feat/internal-292-sop-tier-refire into main
Merge #449 — sop-tier-check issue_comment refire mechanism (internal#292). Required checks green (Secret scan + sop-tier-check), 1 whitelist-counted APPROVE (core-devops 1164 ∈ engineers), Owners substance hongming-pc2 1161. Non-required Canvas Deploy Reminder pending (irrelevant). First strict-root #292-class merge.
2026-05-11 10:36:39 +00:00
26a04c2a99 Merge remote-tracking branch 'origin/main' into fix/harness-replays-detect-changes-fetch-depth 2026-05-11 10:30:02 +00:00
cc2c810637 Merge branch 'main' into feat/internal-292-sop-tier-refire 2026-05-11 10:13:06 +00:00
deda8ddccf Merge pull request 'docs: update remote-agent tutorial to match SDK API' (#371) from docs/update-remote-agent-tutorial-sdk-api into main 2026-05-11 10:12:27 +00:00
eeef790afa Merge remote-tracking branch 'origin/fix/harness-replays-detect-changes-fetch-depth' into fix/harness-replays-detect-changes-fetch-depth 2026-05-11 10:11:31 +00:00
20c72cfb62 fix(ci/harness-replays): step-level continue-on-error + || true on decide step
Gitea Actions quirk: continue-on-error: true only works at the step level,
not the job level (opposite of what the docs imply). Without step-level
continue-on-error, the detect-changes job was reporting status=failure
despite job-level continue-on-error: true.

Two-part fix:
1. continue-on-error: true on both the fetch and decide steps — belt-and-
   suspenders against any remaining exit code leaks.
2. || true on DIFF=$(git diff ...) — git diff exits 1 when BASE is not
   in local history (shallow checkout / unfetched commit). With
   set -euo pipefail, that made the decide step itself fail. The empty
   diff from the || true means "no changes" → run=false is correct;
   the harness runs unconditionally when the fetch times out anyway.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 10:11:13 +00:00
97414d8f6d Merge branch 'main' into docs/update-remote-agent-tutorial-sdk-api 2026-05-11 10:09:15 +00:00
32f32cafca Merge branch 'main' into fix/harness-replays-detect-changes-fetch-depth 2026-05-11 10:06:31 +00:00
8b2fb6b3a0 fix(canvas/ConfirmDialog): add accessible name to backdrop div (WCAG 4.1.2) (#439)
Co-authored-by: Molecule AI Core-UIUX <core-uiux@agents.moleculesai.app>
Co-committed-by: Molecule AI Core-UIUX <core-uiux@agents.moleculesai.app>
2026-05-11 10:05:25 +00:00
f91d34c9e4 Merge branch 'main' into fix/harness-replays-detect-changes-fetch-depth 2026-05-11 09:59:38 +00:00
4ed3dbdfb7 debug(ci/harness-replays): add timeout + verbose to fetch step
Adds explicit 55s timeout and verbose output to the git fetch step so
the failure is diagnosed in CI logs rather than silent 15s timeout.

55s is well within the 60-min job timeout; enough for cold TCP handshake
+ one git pack transfer on a local network.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 09:56:22 +00:00
896d5e70f0 fix(canvas/test): dark zinc compliance, 6 test fixes, Legend data-testid (#437)
Co-authored-by: Molecule AI Core-UIUX <core-uiux@agents.moleculesai.app>
Co-committed-by: Molecule AI Core-UIUX <core-uiux@agents.moleculesai.app>
2026-05-11 09:53:55 +00:00
ff5186dbc3 fix(ci/harness-replays): fetch base branch by name not SHA
git fetch origin <sha>:<sha> is not valid syntax for fetching an arbitrary
commit (git needs a ref to locate the commit on the remote). Switch to
git fetch origin main --depth=1 which fetches the main branch tip + its
immediate parent. The base commit is the parent of the PR head on main,
so depth=1 is sufficient.

github.event.pull_request.base.ref = "main" (confirmed from API) — this
is the branch name, not the SHA. git fetch origin main --depth=1 fetches
the branch tip and one ancestor, giving us the base commit in a single cheap
network call.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 09:48:20 +00:00