Skip to content

E2E findings: 40 fixes across routing, services, MCP, UI#20

Merged
Vincentwei1021 merged 3 commits into
mainfrom
session/2026-05-10-e2e-fixes
May 10, 2026
Merged

E2E findings: 40 fixes across routing, services, MCP, UI#20
Vincentwei1021 merged 3 commits into
mainfrom
session/2026-05-10-e2e-fixes

Conversation

@Vincentwei1021

Copy link
Copy Markdown
Owner

Summary

Fixes 40 findings from the 2026-05-10 E2E test pass (docs/testing/2026-05-10-e2e-findings.md). Three commits, organized by round and code domain:

  • 9a8b29fa — Round 1: backend correctness (routing, PATCH, synthesis preservation, comment notifications, MCP schemas, compute SSH key leak)
  • f83ff195 — Round 2: UI, locale, MCP cleanup, paper-search fallback, E2E-confirmed "already-fixed" verifications
  • 0c5d919a — F-025 hotfix found in end-to-end retest (unauth 401 now triggers fallback)

Findings fixed

P0

  • F-001 /research-projects/{uuid} now redirects to ./dashboard instead of 404
  • F-002 invalid experiment status transitions return 400 with a clear message (was silent 500)
  • F-021 refreshProjectSynthesis no longer clobbers agent-written synthesis when completedIdeas is empty — preserves the document and latestSynthesis* summary fields
  • F-022 /api/comments now dispatches comment_added notifications for the target assignee and creator (moved out of the activity listener to avoid double-delivery and races)
  • F-030 synapse_delete_project_group refuses non-empty groups unless force=true cascade-deletes children

P1

  • F-003/F-005 updateResearchProject rejects autonomousLoopAgentUuid pointing at a non-realtime (poll) agent with a typed 400
  • F-004 PATCH /api/research-projects/[uuid] returns the full GET-shaped payload (counts, autonomousLoop*, github*, activities)
  • F-006 createAgent assigns a deterministic palette color when none is provided; null colors fall back at render time
  • F-007/F-029 compute serializer masks sshKeyName/sshKeySource when managedKeyAvailable=true and exposes keyManagedByServer for UI
  • F-008 Project Settings gains Autonomous Loop and Auto Search cards (realtime-only agent picker + mode select + 20 new i18n keys)
  • F-009 locale-context calls router.refresh() after cookie write so Server Components re-render with the new locale
  • F-010 experiments board reacts to ?selected=<uuid> URL changes and strips the param on Sheet close
  • F-015 GET /api/compute-nodes returns a flat company-scoped list (was 405)
  • F-023/F-024 synapse_propose_experiment now stamps createdBy* and assignedAt/assignedBy on auto-proposed experiments
  • F-025 read_paper_brief/read_paper_head fall back to the public arXiv Atom API when DeepXiv cannot answer (not-found, or unauthenticated 401/403 without a token); real auth misconfig still surfaces
  • F-031 synapse_create_research_project accepts projectGroupUuid (canonical) in addition to groupUuid (alias)
  • F-032 synapse_create_research_question accepts optional parentUuid so agents can build hierarchies
  • F-033 baseline metrics accept mixed number / string / nested record
  • F-034 synapse_compare_results accepts Record<exp, Record<metric, number>>; returns per-metric deltas
  • F-035 RQ status MCP enum unified with platform vocabulary (open/in_progress/to_verify/done/closed) with legacy aliases
  • F-037 synapse_verify_reproducibility MCP tool removed (legacy ExperimentRegistry flow; underlying service kept for legacy REST route)

P2

  • F-017 SSE contexts guard reconnect race on unmount via isUnmounting; comments clarify that native net::ERR_ABORTED is unsuppressable from JS
  • F-020 researchQuestionUuid on experiments POST/PATCH tightened to z.string().uuid()
  • F-026 listComments attaches a resolved mentions[] summary per comment; mention-renderer rewrites plain-text @handle tokens into canonical chips so API-written comments match UI-typeahead ones
  • F-027 autonomous-loop wake prompt and get_project_full_context hint explicitly enumerate "one independent run per card; split sweeps/ablations/repeated trials/comparisons"
  • F-036 synapse_update_experiment_plan accepts plan as an alias for description
  • F-038 deep research reports save as document type deep_research (new writes; existing rows keep their prior type)
  • F-040 stale synapse_pi_* comment stubs in pi.ts renamed to registered tool names
  • F-041 synapse_list_baselines returns {baselines: [...]} wrapper
  • F-042 create_project_group returns projects: []; update_project_group re-fetches via getProjectGroup so all three tools return the same shape
  • F-044 experiment-designs POST error messages name the missing or invalid field and echo the bad value

Verified already-fixed on branch (no new code)

  • F-011 /onboarding?force=1 is honored (commit 862a9999)
  • F-018 board loading.tsx already renders DashboardRouteSkeleton
  • F-019 agent-activity service already filters experiment counts by researchProjectUuid
  • F-039 synapse_search references already cleaned from CLAUDE.md / agent-working-guide
  • F-045 project-group.service already selects only minimal project fields

Out of scope (not in this PR)

F-012/F-013/F-014 OpenClaw external machine config, F-016 onboarding RSC abort chain, F-043 hypothesis-formulation MCP surface (large new tool family), F-046 hash-based debounce.

Test plan

  • pnpm exec tsc --noEmit — 2 pre-existing errors only (unrelated to this PR)
  • pnpm test — 1299 pass / 6 fail; fails are pre-existing mock/select drift in uuid-resolver, research-project.service, agent.service tests (confirmed unchanged vs. main baseline)
  • End-to-end retest on synapse-test — docker image rebuilt, 25 findings verified via API / MCP / Playwright browser
  • Manual browser check: Project Settings renders Autonomous Loop + Auto Search cards; ?selected= deep link opens detail Sheet; zh locale switch renders Chinese Server Components on first navigation

Artifacts

Retest screenshots under docs/testing/2026-05-10-e2e-screenshots/retest-*.png (Settings Loop card, deep-link detail panel).

Vincentwei1021 and others added 3 commits May 10, 2026 06:48
Addresses 24 bugs from docs/testing/2026-05-10-e2e-findings.md spanning
routing, APIs, services, and MCP tools. Breakdown:

P0:
- F-001: add /research-projects/[uuid]/page.tsx redirecting to dashboard
- F-002: map InvalidTransitionError to 400 in experiment PATCH route
- F-021: preserve agent-written project_synthesis across refresh
- F-022: dispatch comment_added notifications directly from
  commentService.createComment (move out of activity listener to avoid
  duplicate + race)

P1:
- F-003/F-005: reject non-realtime autonomousLoopAgentUuid at the
  research-project service layer with a typed 400
- F-004: PATCH /api/research-projects/[uuid] returns full GET-shaped
  payload (counts, autonomousLoop*, github*, activities)
- F-007/F-029: hide sshKeyName/sshKeySource via compute.service
  serializer when managedKeyAvailable; expose keyManagedByServer flag
- F-015: add GET /api/compute-nodes for flat company-scoped listing
- F-023/F-024: plumb createdBy* and assignedBy/assignedAt through
  createExperiment + synapse_propose_experiment
- F-028: honor explicit mentions[] array on /api/comments and mention
  service (dedupe with content-parsed tokens)
- F-030: synapse_delete_project_group refuses non-empty groups unless
  force=true cascades child-project deletes
- F-031: synapse_create_research_project accepts projectGroupUuid
  (canonical) in addition to legacy groupUuid
- F-032: synapse_create_research_question accepts optional parentUuid
- F-033: synapse_create_baseline metrics accept number | string |
  nested record
- F-034: synapse_compare_results accepts per-metric maps per experiment
- F-035: research-question MCP status enum aligned with platform
  vocabulary (open/in_progress/to_verify/done/closed) while keeping
  legacy aliases
- F-046: content-equality short-circuit in refreshProjectSynthesis

P2:
- F-020: tighten researchQuestionUuid with z.string().uuid()
- F-036: synapse_update_experiment_plan accepts plan alias for description
- F-038: deep research reports stored as document type 'deep_research'
- F-041: synapse_list_baselines returns {baselines:[...]} wrapper

Test updates:
- experiments-route + research-projects-route: align mocks with new
  shapes and use valid-format UUIDs
- comment.service + notification-listener: reflect moved dispatch

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Addresses a second batch of 15 findings from
docs/testing/2026-05-10-e2e-findings.md on top of 9a8b29f.

P1:
- F-006: createAgent now resolves color to a deterministic palette entry
  derived from the agent name when no explicit color is supplied, so
  openclaw agents like Haru get a consistent pill on the board
- F-008: new Autonomous Loop and Auto Search cards in Project Settings
  with realtime-only agent picker, enable switch, and loop mode select.
  20 new i18n keys in en + zh.
- F-009: locale-context calls router.refresh() after writing the locale
  cookie so Server Components re-render with the new locale
- F-010: experiments board reacts to ?selected=<uuid> URL changes and
  strips the param from the URL when the detail Sheet closes
- F-025: read_paper_brief / read_paper_head fall back to arXiv Atom
  export when DeepXiv responds not-found (auth/5xx still surface)
- F-037: remove synapse_verify_reproducibility MCP tool; underlying
  service kept for legacy /api/experiment-runs route
- F-039: confirmed synapse_search references already cleaned from
  CLAUDE.md + agent-working-guide (nothing to do)

P2:
- F-017: notification/realtime SSE contexts guard against reconnect
  race on unmount via isUnmounting flag; onerror comments clarify
  aborts-during-teardown are expected native network-layer messages
- F-026: listComments attaches a resolved mentions[] summary per
  comment; mention-renderer rewrites plain-text @handle tokens into
  canonical @[Name](type:uuid) markup before chip rendering, so
  API-created comments render the same as UI-typeahead comments
- F-027: autonomous-loop wake prompt and get_project_full_context hint
  enumerate one-independent-run-per-card and split sweeps/ablations/
  repeated-trials/comparisons into separate cards
- F-040: rename stale synapse_pi_* comment stubs in pi.ts to the
  registered tool names
- F-042: synapse_create_project_group returns projects: [] and
  synapse_update_project_group re-fetches via getProjectGroup so all
  three group tools return the same shape
- F-044: experiment-designs POST error messages now name the missing
  or invalid field and echo the bad value
- F-045: confirmed project-group service already selects only minimal
  project fields (nothing to do)

Confirmed as already fixed in earlier commits (no new code):
- F-011: onboarding honors ?force=1 (fixed in 862a999)
- F-018: route loading.tsx renders DashboardRouteSkeleton with board
  placeholders (fixed in c253064); residual "Loading..." is from the
  dashboard layout's session gate, outside board scope
- F-019: agent-activity service already filters experiment counts by
  researchProjectUuid

Test updates:
- paper-search: added 4 F-025 fallback tests
- agent.service: updated createAgent default-color assertion + added
  explicit-color-preservation test + fixed pre-existing
  listAgentSummaries mock-vs-select drift
- comment.service: added prisma.mention.findMany mock + default

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nfigured

End-to-end retest on synapse-test exposed that DeepXiv returns 401 for
unauthenticated requests, not 404 as assumed. The anonymous "1000 req/day"
path requires a token too. Agent J's original condition only covered 404
and error payloads matching "not found", so the fallback never fired on
deployments without a DeepXiv token.

Tightened deepxivIsNotFound to also accept 401/403 (and token-required
payloads) when no token is configured, while still surfacing real auth
failures when a token IS configured (misconfiguration remains visible).

deepxivGet now returns whether the request was authenticated; the two
consumers pass that through to the classifier.

Tests: split the 401 assertion into "falls back when unauthenticated" and
"does not fall back when a token is configured". Both pass. Added env
stub reset in beforeEach/afterEach to prevent cross-test pollution.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Vincentwei1021 Vincentwei1021 merged commit 9974afa into main May 10, 2026
@Vincentwei1021 Vincentwei1021 deleted the session/2026-05-10-e2e-fixes branch May 10, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant