@calltelemetry/fmix 2.7.1 → 2.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/fmix +31 -5
  2. package/package.json +3 -3
package/bin/fmix CHANGED
@@ -23,7 +23,7 @@ set -uo pipefail
23
23
  # ---------------------------------------------------------------------------
24
24
  # Constants & config
25
25
  # ---------------------------------------------------------------------------
26
- FMIX_VERSION="2.7.1"
26
+ FMIX_VERSION="2.7.3"
27
27
  FMIX_HOME="${FMIX_HOME:-${HOME}/.ct-fmix}"
28
28
  FMIX_OS="$(uname -s)"
29
29
  FMIX_ARCH="$(uname -m)"
@@ -10834,6 +10834,22 @@ cmd_doctor() {
10834
10834
  local db_name
10835
10835
  db_name="$(fmix_db_name_for_worktree "$real_wt")"
10836
10836
  echo " Scratch DB: $db_name"
10837
+ # Existence check: the session's scratch DB must actually exist in
10838
+ # Postgres, or runtime tasks that try to boot the app against it will
10839
+ # fail at runtime anyway. Filesystem deps/build present is necessary
10840
+ # but not sufficient — a poisoned session can retain deps yet never
10841
+ # have created the scratch DB on this host postgres.
10842
+ if [[ -n "$DB_HOST" && -n "$DB_PORT" && -n "$DB_USER" ]]; then
10843
+ if fmix_control_psql 5 -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" -d "$db_name" -c "SELECT 1" >/dev/null 2>&1; then
10844
+ echo " [OK] scratch DB reachable: $db_name"
10845
+ else
10846
+ echo " [FAIL] scratch DB missing or unreachable: $db_name"
10847
+ echo " fix: run 'fmix setup --worktree $real_wt' to (re)create the session scratch DB"
10848
+ fail=$(( fail + 1 ))
10849
+ fi
10850
+ else
10851
+ echo " [INFO] scratch DB check skipped (DB_HOST/DB_PORT/DB_USER unset)"
10852
+ fi
10837
10853
  local doctor_deps doctor_build
10838
10854
  doctor_deps="$(fmix_session_deps_root "$real_wt")"
10839
10855
  doctor_build="$(fmix_compile_build_root "$real_wt")"
@@ -15233,8 +15249,12 @@ EOF
15233
15249
  local deps_timeout_out deps_timeout_rc deps_progress_out deps_progress_rc
15234
15250
  local deps_failure_out deps_failure_rc
15235
15251
  FMIX_DEPS_HEARTBEAT=0
15252
+ # The stall window is the discriminator: 1s against 5s of silence. The hard
15253
+ # limit is scaffolding and is kept far away so that if the stall watchdog
15254
+ # ever regressed, this case would fail on the stall assertion rather than
15255
+ # quietly become a hard-limit test.
15236
15256
  FMIX_DEPS_STALL_TIMEOUT=1
15237
- FMIX_DEPS_TIMEOUT=10
15257
+ FMIX_DEPS_TIMEOUT=60
15238
15258
  _fmix_run_deps_get() {
15239
15259
  sleep 5
15240
15260
  }
@@ -15255,11 +15275,17 @@ EOF
15255
15275
  # clear of the fixture's ~4s runtime, or a loaded runner trips the hard
15256
15276
  # limit and the case fails for a reason it is not testing. It was 5s, which
15257
15277
  # left one second of headroom for four sleeps, and it failed on macOS CI.
15258
- FMIX_DEPS_STALL_TIMEOUT=2
15259
- FMIX_DEPS_TIMEOUT=30
15278
+ # Three numbers have to stay ordered: output gap < stall window < total
15279
+ # runtime. Below the gap the watchdog fires despite progress; above the
15280
+ # total it can never fire and the case passes vacuously even if extension
15281
+ # is broken. It was 1 < 2 < 4, one second of margin on each side, which a
15282
+ # loaded runner erases -- a `sleep 1` that takes 2s trips a 2s window.
15283
+ # 1 < 4 < 8 keeps the same claim with 4x and 2x margin.
15284
+ FMIX_DEPS_STALL_TIMEOUT=4
15285
+ FMIX_DEPS_TIMEOUT=60
15260
15286
  _fmix_run_deps_get() {
15261
15287
  local i
15262
- for i in 1 2 3 4; do
15288
+ for i in 1 2 3 4 5 6 7 8; do
15263
15289
  printf 'dependency progress %s\n' "$i"
15264
15290
  sleep 1
15265
15291
  done
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calltelemetry/fmix",
3
- "version": "2.7.1",
3
+ "version": "2.7.3",
4
4
  "description": "Verified native FMix runner for CallTelemetry workspaces",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -26,7 +26,7 @@
26
26
  "directory": "packages/npm"
27
27
  },
28
28
  "fmix": {
29
- "runnerSha256": "6d82ad5c478edcdbf4c0cbf8ef7235356c93d1cb785d401834286e62e97f9cb9",
30
- "sourceTag": "fmix-v2.7.1"
29
+ "runnerSha256": "475bbdb8d63f9cb5c8abe1c2f8b8f98a8f435eba6883c85b43d18d56efc510f7",
30
+ "sourceTag": "fmix-v2.7.3"
31
31
  }
32
32
  }