Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: voidstackloop/escld
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: voidstackloop/escld
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fix/backend-deploy-crash-loop
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 15 files changed
  • 2 contributors

Commits on Sep 10, 2026

  1. fix: resolve AWS deploy crash-loop and CDK/deploy issues found via re…

    …al deployment
    
    Root-caused against a real cdk deploy, not from reading code alone:
    
    - backend-service-stack.ts: ECS healthCheckGracePeriodSeconds silently
      defaulted to 60s once an ALB target was attached, but the backend takes
      ~85s to finish booting (JVM + ADOT javaagent + Spring context). ECS killed
      every task mid-boot before it could ever answer, crash-looping a perfectly
      healthy application forever. Raised to 240s and made the ALB target-group
      interval/thresholds explicit instead of relying on defaults.
    - backend-service-stack.ts: MaxMetaspaceSize=192m was sized before the ADOT
      javaagent was added; the extra instrumentation classes exhausted it under
      real traffic (OutOfMemoryError: Metaspace), which took down the Redis/ES
      health indicators and made /actuator/health report DOWN. Raised to 384m.
    - backend-service-stack.ts: the container health check used CMD-SHELL, which
      ECS runs through /bin/sh -- dash in eclipse-temurin:25-jre, which does not
      implement /dev/tcp. The probe could never pass no matter how healthy the
      app was. Verified directly against the real image (old form fails even
      against a healthy server; fixed form passes/fails correctly). Switched to
      CMD + explicit bash.
    - UserServiceImpl.java: a new user's first page load fires several
      authenticated requests in parallel (feed + /users/me at minimum); all find
      no row and try to provision, and the losers trip users_cognito_sub_key.
      provision() unconditionally blamed a username collision instead, 500ing a
      legitimate sign-in. Now re-reads and returns the winner's row. Reproduced
      live against the deployed stack, fixed, and covered by a new test.
    - database-stack.ts: t4g -> t3 instance class (Graviton RDS capacity was
      tighter than Intel in eu-central-1) plus a configurable multiAz flag.
    - search-stack.ts: ECS health check retries capped at the real AWS limit
      (10, was 20) with startPeriod raised to preserve intent; Elasticsearch
      moved off PRIVATE_ISOLATED to PRIVATE_WITH_EGRESS so the Fargate task can
      reach ECR/CloudWatch Logs before the container starts.
    - compute-stack.ts, cache-stack.ts, event-streaming-stack.ts,
      rtmp-service-stack.ts, ws-sfu-stack.ts: security-group description strings
      fixed to the AWS-documented allowed charset (no em-dash, no bare ">").
    - infra/bin/infra.ts: threads the new dbMultiAz context flag through.
    - frontend/vite.config.ts: configurable VITE_CACHE_DIR so the dev server
      does not fight write permissions on a shared cache path.
    - .claude/launch.json: local dev-server launch config for the frontend.
    
    Verified: full infra CDK suite green (26 suites / 89 tests), backend
    UserServiceImplTest 4/4 including the new race test, and a real cdk deploy
    of all 29 stacks reached CREATE_COMPLETE with the backend ALB target group
    reporting healthy for the first time.
    
    Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
    voidstackloop and claude committed Sep 10, 2026
    Configuration menu
    Copy the full SHA
    46af13b View commit details
    Browse the repository at this point in the history
Loading