Commit Graph

5 Commits

Author SHA1 Message Date
Jordan Ritter 3a6df6fcea fix(showcase/harness): correct misleading Dockerfile PID comment + assert lowered MAX_CONTEXTS default
The Dockerfile FIX #3 comment claimed the in-image `ulimit -u` raised the cgroup
pids.max (target 16384). It cannot: `ulimit -u` only lifts this process's
RLIMIT_NPROC; the cgroup pids.max is set by the container runtime
(--pids-limit), is platform-fixed at 1000 on staging, and is not raisable from
the image. Rewrite the comment to state this accurately and point at the real
demand-side mitigation (fewer concurrent contexts + gauge/alarm). The harmless
`ulimit -u` line itself is retained. Also update the env test to assert the new
MAX_CONTEXTS default of 24.
2026-06-04 09:46:25 -07:00
Jordan Ritter 1e1379a225 fix(showcase/harness): make the PID/nproc ulimit actually apply under bash
The runtime CMD raised the soft nproc limit via
`/bin/sh -c "ulimit -u $(ulimit -Hu) ..."`, but on node:22-bookworm-slim
`/bin/sh` is dash, whose builtin `ulimit` does NOT support the `-u`
(max-user-processes) flag — it errors `ulimit: Illegal option -u`, which the
`2>/dev/null || true` then silently swallows. So #5185's intended PID
protection never applied; the soft limit stayed at the inherited default.

Run the CMD under `/bin/bash` (present at /usr/bin/bash) instead, whose
`ulimit -u` works. Verified against the exact base image under
`--ulimit nproc=512:4096`: bash raises the soft limit 512 -> 4096 (the hard
ceiling) while dash leaves it untouched and errors. Minimal change — only
the interpreter; the command, exec-as-PID-1, and `|| true` fallback are
unchanged.
2026-06-03 21:02:12 -07:00
Jordan Ritter 2b3e18bb78 fix(showcase/harness): raise container PID/thread ulimit for the chromium pool
Lift the soft nproc limit to the hard ceiling (`ulimit -u $(ulimit -Hu)`)
before exec'ing the orchestrator so the legitimate 40-context chromium
workload (several hundred OS threads at steady state) has ample thread
headroom instead of running near the default ~1024 soft ceiling, where
`chromium.launch()` tripped `pthread_create: Resource temporarily
unavailable`. `exec` keeps node as PID 1 for correct signal handling; the
`|| true` fallback keeps boot resilient when the runtime forbids raising
the soft limit (the cgroup pids limit then remains the dominant control).
2026-06-03 11:30:58 -07:00
Jordan Ritter 8daaf3c4b9 fix(showcase-harness): repair three pre-existing probe failures post-Slice 3
- qa probe: manifest.yaml path corrected from showcase/packages/ to
  showcase/integrations/ (Slice 3 moved files; probe code and test
  fixture still referenced the old path).
- pin-drift probe: fail-baseline.json ENOENT in container — the 5-level
  import.meta.url walk-up from dist/probes/drivers/ overshoots /app and
  lands at /. Added PIN_DRIFT_REPO_ROOT=/app env var and COPY of the
  baseline file into the runtime stage.
- aimock-wiring probe: showcase-ms-agent-harness-dotnet (deployed: false)
  was not in the EXCLUDE_SERVICES set, causing it to be flagged as
  unwired. Added to the exclude list in both aimock-wiring.ts and
  smoke.yml.
2026-05-26 15:24:27 -07:00
Jordan Ritter 0522b7fa41 refactor(showcase): rename showcase/ops → showcase/harness
The monitoring/alerting service is a test harness (probes, assertions,
alerting), not an operations service. Rename the directory, package
name (@copilotkit/showcase-ops → @copilotkit/showcase-harness), all
internal references (Dockerfile, Prometheus metric prefix
showcase_ops_ → showcase_harness_, orchestrator log messages, probe
YAML nameExcludes, test fixtures), and regenerate pnpm-lock.yaml.

Wire protocol names (X-Ops-* headers) and shell-dashboard internal
API naming (OPS_BASE_URL, ops-api.ts) are intentionally unchanged —
they are stable contracts between sender and receiver.
2026-04-28 13:48:12 -07:00