Skip to content

Add PostgreSQL message route tests - #6

Closed
samxu01 wants to merge 1 commit into
mainfrom
codex/add-tests-to-improve-backend-coverage
Closed

Add PostgreSQL message route tests#6
samxu01 wants to merge 1 commit into
mainfrom
codex/add-tests-to-improve-backend-coverage

Conversation

@samxu01

@samxu01 samxu01 commented May 28, 2025

Copy link
Copy Markdown
Contributor

Summary

  • handle content field in message controller
  • update integration test for messages
  • add integration tests for PostgreSQL message routes using pg-mem

Testing

  • npm test

@samxu01 samxu01 closed this May 28, 2025
@samxu01
samxu01 deleted the codex/add-tests-to-improve-backend-coverage branch February 2, 2026 04:34
samxu01 added a commit that referenced this pull request May 24, 2026
Cron tick 2 captured a substantive review pass from Cody on PR #434
+ Claude's local MCP-tool-loading gap (Phase-4 finding #6). Cody's
findings are valid:

  P1 install.ts runtimeType fallback overreads — manifest.runtime.type
     for marketplace rows carries deployment shapes (standalone/
     commonly-hosted/hybrid) not canonical runtime identities; needs
     narrowing to manifest.runtime.runtimeType OR a shape→identity
     translator.
  P1 v2 marketplace Discover wired to /api/marketplace/browse
     (Installable schema) but install/remove still POST /api/apps/
     pods/:podId/apps (legacy App schema). Install clicks will fail.
  P2 AppCard fields lost in the Discover→App shim — kind, category,
     marketplace.totalInstalls, marketplace.logoUrl, etc.
  Test gap: AppsMarketplacePage.test.tsx still mocks old route, no
     regression coverage on /api/marketplace/browse.

Cody also drafted concrete Phase 2 shape for clawdbot bootstrap
(A+B+C bundle + COMMONLY_LOCAL_CLAWDBOT=1 + new `commonly dev
clawdbot` command) + noted backend schedulerService.ts ALREADY emits
heartbeat events — gap is the CLI wrapper dropping them. Lower-risk
than building cron from scratch.

I posted a huddle acknowledgment delegating fixes: Nova to draft the
install.ts narrowing fix, Cody to fully rewire the marketplace surface
(install/remove + AppCard mapping + test update), Theo to convert into
board tasks. Two-PR delivery (revisions on #434 + Phase 2 standalone)
is fine.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
samxu01 added a commit that referenced this pull request May 24, 2026
…); 2 Phase-4 findings

Phase 2 restart on new branch:

- Claude (sam-local) shipped a complete docs/local-dev/credentials.md
  runbook + .env.example restructure as text-to-commit at 6:34 PM
  (before the prior close-out cron exited). Path/recipe needs minor
  adjustments before commit. Routed to Theo/Cody/Nova for paste +
  push, with 30-min claim-the-orphan timer.
- Phase-4 #10 added: monitor cron should not stop the instant a
  stop condition hits — run one more tick after delay to catch
  long-tail in-flight responses. Claude's 2.E delivery would have
  been picked up on tick T+102min if I hadn't cancelled at T+97.
- Phase-4 #11 added: Claude (CLI-wrapper) writes principles to its
  OWN claude-code memory store (~/.claude/projects/...), NOT
  Commonly's agentmemories collection. Direct mongo query confirms
  theo/nova/cody have 0 rows in agentmemories. Cross-agent memory
  continuity doesn't work for CLI wrappers — compounds with #6
  (MCP tools not loaded).

No branch commits on phase-2 yet. 12-min monitor cron 88af22d0
armed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
samxu01 added a commit that referenced this pull request May 24, 2026
…e 2 ~80%

Cron R4 epilogue (stop condition firmly hit):

Cody resolved the Theo+Nova claim collision by shipping all of
Phase 2.A + 2.B + 2.D in a single comprehensive commit 3d398ab
(+812 lines, 4 files) while the others were still acknowledging.

What landed in 3d398ab:
- docker-compose.dev.yml: Dockerfile.commonly → Dockerfile default
  on both clawdbot compose services (Phase 2.B, 2-line change)
- dev.sh: +71 lines — read_env_value / is_truthy_env_value helpers
  + COMMONLY_LOCAL_CLAWDBOT=1 gating on the clawdbot profile (2.A)
- cli/src/commands/dev.js: +593 lines — new `commonly dev clawdbot`
  bootstrap subcommand: login → pod → install moltbot → harvest
  runtime token → write external/clawdbot-state/config/moltbot.json
  with controlUi flag → drop OPENCLAW_USER_TOKEN +
  OPENCLAW_RUNTIME_TOKEN into .env (Phase 2.D)
- cli/__tests__/dev.test.mjs: +148 lines NEW regression test file

Cody's session total: 5 code commits across PR #434 + phase-2.
Theo + Nova: 0 code commits between them.

The standout signal of the session: in this multi-agent setup,
cloud-codex (Cody) is the sole implementer; openclaw moltbots add
review + coordination value but can't ship code today. Captured in
Phase-4 #14 (workspace gap) + #6 + #11 + #15 (tool registry gaps).

Final Phase 2 state:
  ✅ 2.E shipped (3fa0565)
  ✅ 2.A+B+D shipped (3d398ab)
  🟡 2.C openclaw bundled-skills upstream — cross-repo, needs Sam
  📐 ADR-2.F implementation — design complete, code natural-next-sprint

Cron 88af22d0 cancelled. Phase 2 ~80% complete.

Total Phase-4 affordance findings: 17. Memory entries written: 2
(feedback-agents-collab-execute-not-handoff,
feedback-claim-the-orphan-stalled-peer-work).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lilyshen0722 pushed a commit that referenced this pull request Jul 19, 2026
…ff (#685)

reconnectionAttempts: 5 idi. socket.io gecikmeyi üstel artırdığı için bu ~17
saniyelik bir pencere demek (1s→2s→4s→5s→5s, delayMax 5000 varsayılanı).
Bu pencereyi aşan HER kesintide — laptop uykusu, backend deploy'u, uzun ağ
blip'i — socket KALICI olarak pes ediyor ve bir daha denemiyordu. Sayfa açık
kalıyor, REST ile yüklenmiş eski mesajlar duruyor, yeni hiçbir şey gelmiyor:
kullanıcı sessizce bayat veriye bakıp 'mesajım gitmedi mi?' diyor. Pod'u açık
bırakıp agentları izlemek bu üründe beklenen kullanım (canlı gözlendi
2026-07-16: sekme ~1 saat sonra ölü, F5 ile düzeliyor).

A/B ölçümü (aynı backend, iki istemci yan yana, 45sn kesinti):
  ESKİ(5): deneme #5 -> *** PES ETTİ — bir daha denemeyecek ***
  YENİ(∞): deneme #6 -> *** YENİDEN BAĞLANDI *** -> CONNECT
12sn'lik kısa kesintide ikisi de toparlıyor — sorun yalnız uzun kesintide.

Değişiklik:
- reconnectionAttempts: Infinity + reconnectionDelayMax 30sn + jitter 0.5
  (sunucu dönene kadar dener; backoff ile sunucuyu dövmez)
- visibilitychange/online/focus -> hemen connect(): backoff 30sn'ye çıkabildiği
  için kullanıcı sekmeye döndüğünde bir sonraki denemeyi beklemesin. Sunucu
  taraflı kapatmada (io.disconnect) otomatik reconnect devreye girmez —
  bu olaylar o durumun da tek kurtarma yolu.
- Listener'lar cleanup'ta kaldırılıyor.

Doğrulama: tsc SocketContext.tsx için temiz (repodaki diğer tip hataları
mevcut ve ilgisiz); vite HMR derledi, hata yok.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant