diff --git a/src/lock-publisher.mjs b/src/lock-publisher.mjs index 004bcd7..d01c68d 100644 --- a/src/lock-publisher.mjs +++ b/src/lock-publisher.mjs @@ -1,4 +1,4 @@ -import { randomUUID, randomInt } from 'node:crypto'; +import { randomUUID } from 'node:crypto'; import { SimplePool } from 'nostr-tools/pool'; import { getPublishTimeoutMs, diff --git a/src/relay-health.mjs b/src/relay-health.mjs index 6e09d0b..3e4f921 100644 --- a/src/relay-health.mjs +++ b/src/relay-health.mjs @@ -4,7 +4,7 @@ import WebSocket from 'ws'; import { finalizeEvent, generateSecretKey, getPublicKey } from 'nostr-tools/pure'; import { getNamespace, getRelays } from './torch-config.mjs'; import { MS_PER_SECOND } from './constants.mjs'; -import { withTimeout } from './utils.mjs'; +import { withTimeout } from './lock-utils.mjs'; const PROBE_KIND = 27235; diff --git a/test_output.txt b/test_output.txt new file mode 100644 index 0000000..bf879da --- /dev/null +++ b/test_output.txt @@ -0,0 +1,3591 @@ + +> torch-lock@0.1.0 test +> npm run validate:scheduler && npm run test:integration:e2e && node --test --test-timeout=30000 test/*.test.mjs test/*.test.js + + +> torch-lock@0.1.0 validate:scheduler +> node scripts/validate-scheduler-roster.mjs && node scripts/validate-prompt-contract.mjs && node scripts/validate-scheduler-flow-parity.mjs && npm run validate:scheduler-failure-schema + +Scheduler tables, roster, and prompt filenames are in sync. +Prompt contract validated for all daily/weekly prompts. +Scheduler flow parity validated for prompts and scheduler implementation. + +> torch-lock@0.1.0 validate:scheduler-failure-schema +> node --test test/scheduler-lock-failure-schema.contract.test.mjs + +TAP version 13 +# Subtest: scheduler lock backend failure artifact matches required frontmatter schema +ok 1 - scheduler lock backend failure artifact matches required frontmatter schema + --- + duration_ms: 111.739936 + type: 'test' + ... +# Subtest: schema contract catches missing required lock-backend field +ok 2 - schema contract catches missing required lock-backend field + --- + duration_ms: 2.014385 + type: 'test' + ... +# Subtest: schema contract catches misnamed lock-backend key +ok 3 - schema contract catches misnamed lock-backend key + --- + duration_ms: 0.512171 + type: 'test' + ... +1..3 +# tests 3 +# suites 0 +# pass 3 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 199.311887 + +> torch-lock@0.1.0 test:integration:e2e +> node --test test/scheduler-preflight-lock.e2e.test.mjs + +TAP version 13 +# Subtest: lock preflight e2e: successful lock writes completed status snapshot +ok 1 - lock preflight e2e: successful lock writes completed status snapshot + --- + duration_ms: 406.248458 + type: 'test' + ... +# Subtest: lock preflight e2e: exit code 2 quorum failure persists failed backend status and prompt-not-started marker +ok 2 - lock preflight e2e: exit code 2 quorum failure persists failed backend status and prompt-not-started marker + --- + duration_ms: 102.262067 + type: 'test' + ... +# Subtest: lock preflight e2e: non-lock failure exits failed without prompt parse/schema classification +ok 3 - lock preflight e2e: non-lock failure exits failed without prompt parse/schema classification + --- + duration_ms: 98.931868 + type: 'test' + ... +1..3 +# tests 3 +# suites 0 +# pass 3 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 697.533977 +TAP version 13 +# Subtest: Build artifacts verification +ok 1 - Build artifacts verification # SKIP dist/ not found — run npm run build first + --- + duration_ms: 1.034531 + type: 'test' + ... +# Subtest: parseArgs should parse basic command +ok 2 - parseArgs should parse basic command + --- + duration_ms: 1.869442 + type: 'test' + ... +# Subtest: parseArgs should parse agent and cadence +ok 3 - parseArgs should parse agent and cadence + --- + duration_ms: 0.359995 + type: 'test' + ... +# Subtest: parseArgs should parse equals sign syntax +ok 4 - parseArgs should parse equals sign syntax + --- + duration_ms: 2.07098 + type: 'test' + ... +# Subtest: parseArgs should parse dry-run flag +ok 5 - parseArgs should parse dry-run flag + --- + duration_ms: 0.377011 + type: 'test' + ... +# Subtest: parseArgs should parse port with default +ok 6 - parseArgs should parse port with default + --- + duration_ms: 0.278013 + type: 'test' + ... +# Subtest: parseArgs should parse custom port +ok 7 - parseArgs should parse custom port + --- + duration_ms: 0.186551 + type: 'test' + ... +# Subtest: parseArgs should parse ignore-logs flag +ok 8 - parseArgs should parse ignore-logs flag + --- + duration_ms: 0.258233 + type: 'test' + ... +# Subtest: parseArgs should parse memory flags +ok 9 - parseArgs should parse memory flags + --- + duration_ms: 1.228477 + type: 'test' + ... +# Subtest: parseArgs should parse memory flags with equals +ok 10 - parseArgs should parse memory flags with equals + --- + duration_ms: 0.552014 + type: 'test' + ... +# Subtest: cmdList + # Subtest: should list active locks and identify unknown agents + ok 1 - should list active locks and identify unknown agents + --- + duration_ms: 3.530246 + type: 'test' + ... + 1..1 +ok 11 - cmdList + --- + duration_ms: 4.850367 + type: 'suite' + ... +# No TORCH installation detected in this directory. +# Looked for: +# - A torch/ subdirectory containing roster.json or bin/ +# - A package.json with name "torch-lock" (root install) +# Initializing torch in /app/test-ops-remove-PP3oJ8/project-force/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-PP3oJ8/project-force/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# No package.json found in host root. Skipping script injection. +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - src/proposals/ (governance proposals) +# - torch-lock npm package (via npm uninstall) +# Removing TORCH... +# Removed torch/ (TORCH install directory) +# Removed torch-config.json +# Removed .torch/ (prompt history) +# Removed src/proposals/ (governance proposals) +# Removed empty src/ directory +# Running npm uninstall torch-lock... +# Uninstalled torch-lock package. +# TORCH has been completely removed from this project. +# If you used TORCH environment variables (NOSTR_LOCK_*, TORCH_*), +# remember to remove them from your shell profile or CI configuration. +# Initializing torch in /app/test-ops-remove-PP3oJ8/project-runtime/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-PP3oJ8/project-runtime/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# No package.json found in host root. Skipping script injection. +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - .scheduler-memory/ (memory store) +# - task-logs/ (scheduler logs) +# - src/proposals/ (governance proposals) +# - torch-lock npm package (via npm uninstall) +# Removing TORCH... +# Removed torch/ (TORCH install directory) +# Removed torch-config.json +# Removed .torch/ (prompt history) +# Removed .scheduler-memory/ (memory store) +# Removed task-logs/ (scheduler logs) +# Removed src/proposals/ (governance proposals) +# Removed empty src/ directory +# Running npm uninstall torch-lock... +# Uninstalled torch-lock package. +# TORCH has been completely removed from this project. +# If you used TORCH environment variables (NOSTR_LOCK_*, TORCH_*), +# remember to remove them from your shell profile or CI configuration. +# Initializing torch in /app/test-ops-remove-PP3oJ8/project-proposals/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-PP3oJ8/project-proposals/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# No package.json found in host root. Skipping script injection. +# - src/proposals/ (governance proposals) +# - torch-lock npm package (via npm uninstall) +# Removing TORCH... +# Removed torch/ (TORCH install directory) +# Removed torch-config.json +# Removed .torch/ (prompt history) +# Removed src/proposals/ (governance proposals) +# Removed empty src/ directory +# Running npm uninstall torch-lock... +# Uninstalled torch-lock package. +# TORCH has been completely removed from this project. +# If you used TORCH environment variables (NOSTR_LOCK_*, TORCH_*), +# remember to remove them from your shell profile or CI configuration. +# Initializing torch in /app/test-ops-remove-PP3oJ8/project-scripts/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-PP3oJ8/project-scripts/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Added script: "torch:dashboard" +# Added script: "torch:check" +# Added script: "torch:lock" +# Added script: "torch:health" +# Added script: "torch:memory:list" +# Added script: "torch:memory:inspect" +# Updated package.json with convenience scripts. +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - src/proposals/ (governance proposals) +# - torch:* scripts from package.json +# - torch-lock npm package (via npm uninstall) +# Removing TORCH... +# Removed torch/ (TORCH install directory) +# Removed torch-config.json +# Removed .torch/ (prompt history) +# Removed src/proposals/ (governance proposals) +# Removed empty src/ directory +# Removed script: "torch:dashboard" +# Removed script: "torch:check" +# Removed script: "torch:lock" +# Removed script: "torch:health" +# Removed script: "torch:memory:list" +# Removed script: "torch:memory:inspect" +# Updated package.json. +# Running npm uninstall torch-lock... +# Uninstalled torch-lock package. +# TORCH has been completely removed from this project. +# If you used TORCH environment variables (NOSTR_LOCK_*, TORCH_*), +# remember to remove them from your shell profile or CI configuration. +# Initializing torch in /app/test-ops-remove-PP3oJ8/project-cancel/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-PP3oJ8/project-cancel/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - src/proposals/ (governance proposals) +# - torch-lock npm package (via npm uninstall) +# Removal cancelled. +# No package.json found in host root. Skipping script injection. +# Initializing torch in /app/test-ops-remove-PP3oJ8/project-confirm/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-PP3oJ8/project-confirm/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# No package.json found in host root. Skipping script injection. +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - src/proposals/ (governance proposals) +# - torch-lock npm package (via npm uninstall) +# Removing TORCH... +# Removed torch/ (TORCH install directory) +# Removed torch-config.json +# Removed .torch/ (prompt history) +# Removed src/proposals/ (governance proposals) +# Removed empty src/ directory +# Running npm uninstall torch-lock... +# Uninstalled torch-lock package. +# TORCH has been completely removed from this project. +# If you used TORCH environment variables (NOSTR_LOCK_*, TORCH_*), +# remember to remove them from your shell profile or CI configuration. +# Subtest: cmdRemove reports nothing when no TORCH installation exists +ok 12 - cmdRemove reports nothing when no TORCH installation exists + --- + duration_ms: 2.986058 + type: 'test' + ... +# Subtest: cmdRemove with --force removes torch/ directory +ok 13 - cmdRemove with --force removes torch/ directory + --- + duration_ms: 1149.642173 + type: 'test' + ... +# Subtest: cmdRemove removes runtime artifacts (task-logs, .scheduler-memory) +ok 14 - cmdRemove removes runtime artifacts (task-logs, .scheduler-memory) + --- + duration_ms: 1526.269064 + type: 'test' + ... +# Subtest: cmdRemove removes src/proposals/ and cleans empty src/ +ok 15 - cmdRemove removes src/proposals/ and cleans empty src/ + --- + duration_ms: 927.819158 + type: 'test' + ... +# Subtest: cmdRemove cleans torch:* scripts from host package.json +ok 16 - cmdRemove cleans torch:* scripts from host package.json + --- + duration_ms: 494.30064 + type: 'test' + ... +# Subtest: cmdRemove cancels when user declines confirmation +ok 17 - cmdRemove cancels when user declines confirmation + --- + duration_ms: 39.005619 + type: 'test' + ... +# Subtest: cmdRemove confirmed via mockAnswers removes artifacts +ok 18 - cmdRemove confirmed via mockAnswers removes artifacts + --- + duration_ms: 979.855493 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: enabled (Basic Auth) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Subtest: Dashboard Authentication + # Subtest: returns 401 when auth is required but missing + ok 1 - returns 401 when auth is required but missing + --- + duration_ms: 32.684368 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: enabled (Basic Auth) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: returns 401 when malformed auth header is provided + ok 2 - returns 401 when malformed auth header is provided + --- + duration_ms: 9.31682 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: enabled (Basic Auth) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: returns 200 when valid credentials are provided + ok 3 - returns 200 when valid credentials are provided + --- + duration_ms: 8.872988 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: enabled (Basic Auth) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: returns 401 when password has different byte length than stored credential + ok 4 - returns 401 when password has different byte length than stored credential + --- + duration_ms: 18.306012 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: returns 200 when auth is disabled + ok 5 - returns 200 when auth is disabled + --- + duration_ms: 7.949731 + type: 'test' + ... + 1..5 +ok 19 - Dashboard Authentication + --- + duration_ms: 80.622032 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Authentication: DISABLED (Dashboard is public) +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Subtest: Dashboard Configuration Exposure Security +ok 20 - Dashboard Configuration Exposure Security + --- + duration_ms: 39.050281 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Subtest: Dashboard Configuration Security + # Subtest: sanitizes config when auth is disabled + ok 1 - sanitizes config when auth is disabled + --- + duration_ms: 44.35078 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: enabled (Basic Auth) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: sanitizes auth credentials even when authenticated + ok 2 - sanitizes auth credentials even when authenticated + --- + duration_ms: 15.194309 + type: 'test' + ... + 1..2 +ok 21 - Dashboard Configuration Security + --- + duration_ms: 62.892073 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Subtest: Dashboard Path Traversal Security Fix + # Subtest: allows access to valid dashboard index + ok 1 - allows access to valid dashboard index + --- + duration_ms: 39.484374 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /../../etc/passwd + ok 2 - blocks traversal attempt: /../../etc/passwd + --- + duration_ms: 9.064024 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /dashboard/../../etc/passwd + ok 3 - blocks traversal attempt: /dashboard/../../etc/passwd + --- + duration_ms: 5.25861 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /dashboard/../../../etc/passwd + ok 4 - blocks traversal attempt: /dashboard/../../../etc/passwd + --- + duration_ms: 4.982216 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /../package.json + ok 5 - blocks traversal attempt: /../package.json + --- + duration_ms: 6.170306 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /dashboard/../package.json + ok 6 - blocks traversal attempt: /dashboard/../package.json + --- + duration_ms: 3.481277 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /dashboard/%2e%2e/package.json + ok 7 - blocks traversal attempt: /dashboard/%2e%2e/package.json + --- + duration_ms: 3.172906 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /dashboard/%2e%2e%2fpackage.json + ok 8 - blocks traversal attempt: /dashboard/%2e%2e%2fpackage.json + --- + duration_ms: 4.395716 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /..%2fpackage.json + ok 9 - blocks traversal attempt: /..%2fpackage.json + --- + duration_ms: 5.64661 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# (node:9492) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added to [process]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit +# (Use `node --trace-warnings ...` to show where the warning was created) +# (node:9492) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added to [process]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /%2e%2e%2fpackage.json + ok 10 - blocks traversal attempt: /%2e%2e%2fpackage.json + --- + duration_ms: 4.206979 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /dashboard/..%5cpackage.json + ok 11 - blocks traversal attempt: /dashboard/..%5cpackage.json + --- + duration_ms: 4.580223 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /dashboard/..%252fpackage.json + ok 12 - blocks traversal attempt: /dashboard/..%252fpackage.json + --- + duration_ms: 7.604426 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /dashboard/....//package.json + ok 13 - blocks traversal attempt: /dashboard/....//package.json + --- + duration_ms: 3.968826 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /dashboard/.../package.json + ok 14 - blocks traversal attempt: /dashboard/.../package.json + --- + duration_ms: 2.905021 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: //etc/passwd + ok 15 - blocks traversal attempt: //etc/passwd + --- + duration_ms: 2.692924 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /dashboard//../../etc/passwd + ok 16 - blocks traversal attempt: /dashboard//../../etc/passwd + --- + duration_ms: 3.446376 + type: 'test' + ... + # Subtest: allows traversal within allowed paths + ok 17 - allows traversal within allowed paths + --- + duration_ms: 4.328869 + type: 'test' + ... + 1..17 +ok 22 - Dashboard Path Traversal Security Fix + --- + duration_ms: 121.39188 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# Authentication: DISABLED (Dashboard is public) +# NODE_V8_COVERAGE: undefined +# Subtest: Dashboard File Access Security + # Subtest: allows access to dashboard assets + ok 1 - allows access to dashboard assets + --- + duration_ms: 35.370875 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: allows access to global assets + ok 2 - allows access to global assets + --- + duration_ms: 10.373322 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: allows access to landing page + ok 3 - allows access to landing page + --- + duration_ms: 8.900465 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks access to package.json + ok 4 - blocks access to package.json + --- + duration_ms: 8.497734 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks access to src/dashboard.mjs + ok 5 - blocks access to src/dashboard.mjs + --- + duration_ms: 5.93035 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks access to random root files + ok 6 - blocks access to random root files + --- + duration_ms: 4.502029 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: allows access to torch-config.json via special handler + ok 7 - allows access to torch-config.json via special handler + --- + duration_ms: 5.402213 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks directory traversal attempts + ok 8 - blocks directory traversal attempts + --- + duration_ms: 4.338745 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: responses include security headers + ok 9 - responses include security headers + --- + duration_ms: 6.767155 + type: 'test' + ... + # Subtest: error responses include security headers + ok 10 - error responses include security headers + --- + duration_ms: 7.405026 + type: 'test' + ... + 1..10 +ok 23 - Dashboard File Access Security + --- + duration_ms: 103.179227 + type: 'test' + ... +# Subtest: ExitError + # Subtest: should capture the code and message correctly + ok 1 - should capture the code and message correctly + --- + duration_ms: 1.810964 + type: 'test' + ... + # Subtest: should be an instance of Error and ExitError + ok 2 - should be an instance of Error and ExitError + --- + duration_ms: 0.572276 + type: 'test' + ... + # Subtest: should have a stack trace + ok 3 - should have a stack trace + --- + duration_ms: 0.460578 + type: 'test' + ... + # Subtest: should have the correct name + ok 4 - should have the correct name + --- + duration_ms: 0.263361 + type: 'test' + ... + 1..4 +ok 24 - ExitError + --- + duration_ms: 4.938779 + type: 'suite' + ... +# Subtest: createProposal should throw error for disallowed target +ok 25 - createProposal should throw error for disallowed target + --- + duration_ms: 6.851009 + type: 'test' + ... +# Subtest: validateProposal should return invalid for disallowed target +ok 26 - validateProposal should return invalid for disallowed target + --- + duration_ms: 10.388824 + type: 'test' + ... +# Subtest: validateProposal should return valid for allowed target +ok 27 - validateProposal should return valid for allowed target + --- + duration_ms: 7.360708 + type: 'test' + ... +# Subtest: Governance Service Security: Command Injection Prevention +ok 28 - Governance Service Security: Command Injection Prevention + --- + duration_ms: 190.641505 + type: 'test' + ... +# Subtest: SCN-proposal-create: createProposal writes meta.json, new.md, change.diff +ok 29 - SCN-proposal-create: createProposal writes meta.json, new.md, change.diff + --- + duration_ms: 19.635454 + type: 'test' + ... +# Subtest: SCN-proposal-list: listProposals returns created proposal; status filter works +ok 30 - SCN-proposal-list: listProposals returns created proposal; status filter works + --- + duration_ms: 2.812529 + type: 'test' + ... +# Subtest: SCN-proposal-reject: rejectProposal marks proposal with rejected status and reason +ok 31 - SCN-proposal-reject: rejectProposal marks proposal with rejected status and reason + --- + duration_ms: 15.568578 + type: 'test' + ... +# Git commit failed (ignoring): Command failed: git commit -m feat(prompts): apply proposal 2026-02-25T16-11-04-757Z___test-agent__ by __test-agent__ +# Subtest: SCN-archive-naming: applyProposal archives with timestamp_hash filename and sidecar +ok 32 - SCN-archive-naming: applyProposal archives with timestamp_hash filename and sidecar + --- + duration_ms: 45.313944 + type: 'test' + ... +# Subtest: SCN-version-list: listPromptVersions returns versions newest-first with metadata +ok 33 - SCN-version-list: listPromptVersions returns versions newest-first with metadata + --- + duration_ms: 17.524835 + type: 'test' + ... +# Subtest: SCN-rollback-latest: rollbackPrompt restores the most recently archived content +ok 34 - SCN-rollback-latest: rollbackPrompt restores the most recently archived content + --- + duration_ms: 9.032474 + type: 'test' + ... +# Subtest: SCN-rollback-hash: rollbackPrompt --strategy restores matching archive +ok 35 - SCN-rollback-hash: rollbackPrompt --strategy restores matching archive + --- + duration_ms: 8.119122 + type: 'test' + ... +# Initializing torch in /app/test_validation_env/valid-dir_123... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created valid-dir_123/roster.json +# Created valid-dir_123/META_PROMPTS.md +# Created valid-dir_123/scheduler-flow.md +# Created valid-dir_123/daily-scheduler.md +# Created valid-dir_123/weekly-scheduler.md +# Created 23 files in valid-dir_123/prompts/daily/ +# Created 24 files in valid-dir_123/prompts/weekly/ +# Created test_validation_env/valid-dir_123/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created valid-dir_123/TORCH_DASHBOARD.md +# Added script: "torch:dashboard" +# Added script: "torch:check" +# Added script: "torch:lock" +# Added script: "torch:health" +# Added script: "torch:memory:list" +# Added script: "torch:memory:inspect" +# Updated package.json with convenience scripts. +# Initialization complete. +# You can now customize the files in valid-dir_123/ +# ● From torch-config.json: +# - Hashtag: ns-agent-lock +# - Namespace: ns +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=ns-agent-lock&namespace=ns&relays= +# Initializing torch in /app/test_validation_env... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Skipping package.json to avoid overwriting host package.json (installing to root). +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created roster.json +# Created META_PROMPTS.md +# Created scheduler-flow.md +# Created daily-scheduler.md +# Created weekly-scheduler.md +# Created 24 files in prompts/daily/ +# Created 24 files in prompts/weekly/ +# Created test_validation_env/.gitignore with node_modules +# Updating existing torch-config.json... +# Saved configuration to torch-config.json +# Created TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in / +# ● From torch-config.json: +# - Hashtag: ns-agent-lock +# - Namespace: ns +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=ns-agent-lock&namespace=ns&relays= +# Initializing torch in /app/test_validation_env/path/to/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created path/to/torch/roster.json +# Created path/to/torch/META_PROMPTS.md +# Created path/to/torch/scheduler-flow.md +# Created path/to/torch/daily-scheduler.md +# Created path/to/torch/weekly-scheduler.md +# Created 23 files in path/to/torch/prompts/daily/ +# Created 24 files in path/to/torch/prompts/weekly/ +# Created test_validation_env/path/to/torch/.gitignore with node_modules +# Updating existing torch-config.json... +# Saved configuration to torch-config.json +# Created path/to/torch/TORCH_DASHBOARD.md +# Script "torch:dashboard" already exists, skipping. +# Script "torch:check" already exists, skipping. +# Script "torch:lock" already exists, skipping. +# Script "torch:health" already exists, skipping. +# Script "torch:memory:list" already exists, skipping. +# Script "torch:memory:inspect" already exists, skipping. +# Initialization complete. +# You can now customize the files in path/to/torch/ +# ● From torch-config.json: +# - Hashtag: ns-agent-lock +# - Namespace: ns +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=ns-agent-lock&namespace=ns&relays= +# Subtest: cmdInit should validate install directory name + # Subtest: should reject directory with semicolon + ok 1 - should reject directory with semicolon + --- + duration_ms: 3.15821 + type: 'test' + ... + # Subtest: should reject directory with spaces + ok 2 - should reject directory with spaces + --- + duration_ms: 0.370491 + type: 'test' + ... + # Subtest: should reject directory with quotes + ok 3 - should reject directory with quotes + --- + duration_ms: 0.361269 + type: 'test' + ... + # Subtest: should reject directory with backticks + ok 4 - should reject directory with backticks + --- + duration_ms: 0.290656 + type: 'test' + ... + # Subtest: should reject directory with $ + ok 5 - should reject directory with $ + --- + duration_ms: 0.283501 + type: 'test' + ... + # Subtest: should accept valid directory names + ok 6 - should accept valid directory names + --- + duration_ms: 43.787652 + type: 'test' + ... + # Subtest: should accept "." + ok 7 - should accept "." + --- + duration_ms: 37.556401 + type: 'test' + ... + # Subtest: should accept nested paths with slashes + ok 8 - should accept nested paths with slashes + --- + duration_ms: 39.230981 + type: 'test' + ... + 1..8 +ok 36 - cmdInit should validate install directory name + --- + duration_ms: 197.489434 + type: 'test' + ... +# file:///app/src/relay-health.mjs:7 +# import { withTimeout } from './utils.mjs'; +# ^^^^^^^^^^^ +# SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout' +# at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) +# at async ModuleJob.run (node:internal/modules/esm/module_job:335:5) +# at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) +# at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) +# Node.js v22.22.0 +# Subtest: test/lib.test.mjs +not ok 15 - test/lib.test.mjs + --- + duration_ms: 161.729737 + type: 'test' + location: '/app/test/lib.test.mjs:1:1' + failureType: 'testCodeFailure' + exitCode: 1 + signal: ~ + error: 'test failed' + code: 'ERR_TEST_FAILURE' + ... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# Published to 1/3 relays (required=1, timeout=25ms) +# [publish:primary] Publishing to 2 relays (wss://relay-a, wss://relay-b)... +# [publish:primary] Publishing to 2 relays (wss://relay-a, wss://relay-b)... +# Published to 2/2 relays (required=2, timeout=25ms) +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# Published to 2/3 relays (required=2, timeout=25ms) +# (node:9648) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time +# (Use `node --trace-warnings ...` to show where the warning was created) +# Subtest: ci-resilience lock acquisition under unstable relays + # Subtest: recovers after all relays are down for an initial outage window + ok 1 - recovers after all relays are down for an initial outage window + --- + duration_ms: 24.906541 + type: 'test' + ... + # Subtest: survives intermittent timeout spikes and reaches quorum with bounded retries + ok 2 - survives intermittent timeout spikes and reaches quorum with bounded retries + --- + duration_ms: 2.235553 + type: 'test' + ... + # Subtest: handles staggered relay recovery and never exceeds retry budget + ok 3 - handles staggered relay recovery and never exceeds retry budget + --- + duration_ms: 3.562803 + type: 'test' + ... + 1..3 +ok 38 - ci-resilience lock acquisition under unstable relays + --- + duration_ms: 32.497914 + type: 'suite' + ... +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# Published to 1/1 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# Published to 1/1 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# (node:9655) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time +# (Use `node --trace-warnings ...` to show where the warning was created) +# Subtest: publishLock retry behavior + # Subtest: succeeds immediately on first attempt without retries + ok 1 - succeeds immediately on first attempt without retries + --- + duration_ms: 6.316478 + type: 'test' + ... + # Subtest: retries a transient failure then succeeds within retry budget with bounded jitter + ok 2 - retries a transient failure then succeeds within retry budget with bounded jitter + --- + duration_ms: 2.943768 + type: 'test' + ... + # Subtest: returns terminal relay_publish_quorum_failure after exhausting retry budget + ok 3 - returns terminal relay_publish_quorum_failure after exhausting retry budget + --- + duration_ms: 3.561734 + type: 'test' + ... + # Subtest: short-circuits non-retryable failures without extra attempts + ok 4 - short-circuits non-retryable failures without extra attempts + --- + duration_ms: 2.09353 + type: 'test' + ... + 1..4 +ok 39 - publishLock retry behavior + --- + duration_ms: 16.641676 + type: 'suite' + ... +# Subtest: lock-ops + # Subtest: parseLockEvent + # Subtest: parses a valid lock event correctly + ok 1 - parses a valid lock event correctly + --- + duration_ms: 1.822859 + type: 'test' + ... + # Subtest: returns nulls when content is invalid JSON + ok 2 - returns nulls when content is invalid JSON + --- + duration_ms: 0.547063 + type: 'test' + ... + # Subtest: returns nulls when required content fields are missing + ok 3 - returns nulls when required content fields are missing + --- + duration_ms: 0.285938 + type: 'test' + ... + # Subtest: returns nulls when content is an array (not object) + ok 4 - returns nulls when content is an array (not object) + --- + duration_ms: 0.610808 + type: 'test' + ... + 1..4 + ok 1 - parseLockEvent + --- + duration_ms: 4.349837 + type: 'suite' + ... +# [publish:primary] Publishing to 2 relays (wss://primary-a, wss://primary-b)... +# [publish:primary] Publishing to 2 relays (wss://primary-a, wss://primary-b)... +# Published to 2/2 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://primary-down)... +# [publish:primary] Publishing to 1 relays (wss://primary-down)... +# [publish:primary] Publishing to 1 relays (wss://primary-down)... +# [publish:primary] Publishing to 1 relays (wss://primary-bad)... +# [publish:primary] Publishing to 5 relays (relay-timeout, wss://dns, wss://tcp, wss://tls, wss://ws)... +# [publish:primary] Publishing to 2 relays (wss://relay-bad, wss://relay-ok)... +# {"event":"lock_publish_quorum_met","correlationId":"d2d2ce35-e4eb-4798-9f55-06ad3731764c","attemptId":"e7a47401-2d7e-4cbe-8ee7-3bc22e8f0d79","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":0}],"totalElapsedMs":0} +# Published to 1/2 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://primary-bad)... +# [publish:fallback] Publishing to 1 relays (wss://fallback-ok)... +# {"event":"lock_publish_quorum_met","correlationId":"9aec7271-ea8f-4396-8d92-c43963dab692","attemptId":"746b9d4d-4cb4-4aae-960e-45e0b12f9a0d","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":1}],"totalElapsedMs":1} +# Published to 1/2 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 2 relays (wss://bad, wss://healthy)... +# {"event":"lock_publish_quorum_met","correlationId":"e72c524c-b42b-46c8-b9fa-ee5e916f1a64","attemptId":"71989fbf-197a-46c2-9a7c-9e56801be8a3","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":0}],"totalElapsedMs":0} +# Published to 1/2 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 2 relays (wss://healthy, wss://bad)... +# {"event":"lock_publish_quorum_met","correlationId":"f6cb8ea1-7018-494e-b95f-ccf871d25290","attemptId":"90425f41-9232-4bd2-8737-e23af63c6cca","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":0}],"totalElapsedMs":0} +# Published to 1/2 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://healthy)... +# {"event":"lock_publish_quorum_met","correlationId":"0653cd99-dc4b-491d-8296-d5fbf1098d56","attemptId":"3a8e03f3-3f62-47d7-91a9-1356f04325aa","publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"elapsedMs":0}],"totalElapsedMs":0} +# Published to 1/1 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://healthy)... +# {"event":"lock_publish_quorum_met","correlationId":"c583e756-c761-415c-95b7-0f27db02a6da","attemptId":"2134b272-4bc4-4352-8b26-2d93d91da61d","publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"elapsedMs":0}],"totalElapsedMs":0} +# Published to 1/1 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 2 relays (wss://primary-a, wss://primary-b)... +# [publish:fallback] Publishing to 1 relays (wss://fallback-healthy)... +# {"event":"lock_publish_quorum_met","correlationId":"18823cfa-5352-451b-b4b9-209536a47470","attemptId":"ccc982fa-5fa8-439b-96ba-abd8290e5293","publishAttempt":1,"successCount":1,"relayAttemptedCount":3,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":3,"elapsedMs":1}],"totalElapsedMs":1} +# Published to 1/3 relays (required=1, timeout=200ms) + # Subtest: queryLocks + # Subtest: falls back to fallback relays when primary query fails + ok 1 - falls back to fallback relays when primary query fails + --- + duration_ms: 30.105455 + type: 'test' + ... + 1..1 + ok 2 - queryLocks + --- + duration_ms: 30.561649 + type: 'suite' + ... + # Subtest: publishLock + # Subtest: retries transient failures and succeeds on a later attempt + ok 1 - retries transient failures and succeeds on a later attempt + --- + duration_ms: 5.186576 + type: 'test' + ... + # Subtest: fails after retry budget is exhausted for persistent transient failures + ok 2 - fails after retry budget is exhausted for persistent transient failures + --- + duration_ms: 3.539703 + type: 'test' + ... + # Subtest: fails without retry for persistent validation failures + ok 3 - fails without retry for persistent validation failures + --- + duration_ms: 1.225372 + type: 'test' + ... + # Subtest: includes per-relay reason categories and retry metadata in failure diagnostics + ok 4 - includes per-relay reason categories and retry metadata in failure diagnostics + --- + duration_ms: 4.392404 + type: 'test' + ... + # Subtest: returns success when mixed relay outcomes still satisfy quorum + ok 5 - returns success when mixed relay outcomes still satisfy quorum + --- + duration_ms: 1.454214 + type: 'test' + ... + # Subtest: uses fallback relays to satisfy min success quorum + ok 6 - uses fallback relays to satisfy min success quorum + --- + duration_ms: 1.334297 + type: 'test' + ... + # Subtest: quarantines repeatedly failing relays and still reaches quorum with one healthy relay + ok 7 - quarantines repeatedly failing relays and still reaches quorum with one healthy relay + --- + duration_ms: 2.443104 + type: 'test' + ... + # Subtest: uses fallback and min active pool to reintroduce quarantined relay when needed + ok 8 - uses fallback and min active pool to reintroduce quarantined relay when needed + --- + duration_ms: 1.150907 + type: 'test' + ... + 1..8 + ok 3 - publishLock + --- + duration_ms: 21.551215 + type: 'suite' + ... + 1..3 +ok 40 - lock-ops + --- + duration_ms: 57.632651 + type: 'suite' + ... +# Warning: Failed to read log dir logs/daily: Permission denied +# Subtest: getCompletedAgents + # Subtest: returns empty set if directory read fails (non-ENOENT) + ok 1 - returns empty set if directory read fails (non-ENOENT) + --- + duration_ms: 2.31976 + type: 'test' + ... + # Subtest: returns empty set if directory does not exist (ENOENT) + ok 2 - returns empty set if directory does not exist (ENOENT) + --- + duration_ms: 0.408129 + type: 'test' + ... + # Subtest: identifies daily completed agents correctly + ok 3 - identifies daily completed agents correctly + --- + duration_ms: 0.573138 + type: 'test' + ... + # Subtest: identifies weekly completed agents correctly + ok 4 - identifies weekly completed agents correctly + --- + duration_ms: 0.418574 + type: 'test' + ... + 1..4 +ok 41 - getCompletedAgents + --- + duration_ms: 5.544867 + type: 'test' + ... +# Subtest: main dispatch + # Subtest: should exit with code 1 if no command provided + not ok 1 - should exit with code 1 if no command provided + --- + duration_ms: 0 + type: 'test' + location: '/app/test/main-dispatch.test.mjs:47:3' + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: should exit with code 1 if unknown command provided + not ok 2 - should exit with code 1 if unknown command provided + --- + duration_ms: 0 + type: 'test' + location: '/app/test/main-dispatch.test.mjs:54:3' + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: should exit with code 1 if check command misses cadence + not ok 3 - should exit with code 1 if check command misses cadence + --- + duration_ms: 0 + type: 'test' + location: '/app/test/main-dispatch.test.mjs:63:3' + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: should exit with code 1 if lock command misses agent + not ok 4 - should exit with code 1 if lock command misses agent + --- + duration_ms: 0 + type: 'test' + location: '/app/test/main-dispatch.test.mjs:72:3' + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: should exit with code 1 if complete command misses agent + not ok 5 - should exit with code 1 if complete command misses agent + --- + duration_ms: 0 + type: 'test' + location: '/app/test/main-dispatch.test.mjs:81:3' + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: should exit with code 1 if proposal command misses subcommand + not ok 6 - should exit with code 1 if proposal command misses subcommand + --- + duration_ms: 0 + type: 'test' + location: '/app/test/main-dispatch.test.mjs:90:3' + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + 1..6 +not ok 42 - main dispatch + --- + duration_ms: 109.617043 + type: 'suite' + location: '/app/test/main-dispatch.test.mjs:14:1' + failureType: 'hookFailed' + error: "The requested module './utils.mjs' does not provide an export named 'withTimeout'" + code: 'ERR_TEST_FAILURE' + name: 'SyntaxError' + stack: |- + ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) + async ModuleJob.run (node:internal/modules/esm/module_job:335:5) + async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) + async SuiteContext. (file:///app/test/main-dispatch.test.mjs:30:17) + async TestHook.run (node:internal/test_runner/test:1054:7) + async Suite.runHook (node:internal/test_runner/test:965:9) + async Suite.run (node:internal/test_runner/test:1436:7) + async startSubtestAfterBootstrap (node:internal/test_runner/harness:296:3) + ... +# Subtest: listMemories, inspectMemory, pinMemory, and unpinMemory support admin hooks +ok 43 - listMemories, inspectMemory, pinMemory, and unpinMemory support admin hooks + --- + duration_ms: 2.714803 + type: 'test' + ... +# Subtest: triggerPruneDryRun returns candidate metadata without deleting records +ok 44 - triggerPruneDryRun returns candidate metadata without deleting records + --- + duration_ms: 0.549063 + type: 'test' + ... +# Subtest: memoryStats reports counts/rates and retrieval telemetry remains redaction-safe +ok 45 - memoryStats reports counts/rates and retrieval telemetry remains redaction-safe + --- + duration_ms: 15.486483 + type: 'test' + ... +# Subtest: runPruneCycle respects prune feature-flag modes +ok 46 - runPruneCycle respects prune feature-flag modes + --- + duration_ms: 0.836908 + type: 'test' + ... +# Subtest: markMemoryMerged delegates to repository and clears cache +ok 47 - markMemoryMerged delegates to repository and clears cache + --- + duration_ms: 0.636453 + type: 'test' + ... +# Subtest: stores runtime events in signer/session namespace and clears scope +ok 48 - stores runtime events in signer/session namespace and clears scope + --- + duration_ms: 2.810961 + type: 'test' + ... +# Subtest: expires runtime events and records expiration metrics +ok 49 - expires runtime events and records expiration metrics + --- + duration_ms: 0.534676 + type: 'test' + ... +# Subtest: enforces LRU bounds and tracks eviction metrics +ok 50 - enforces LRU bounds and tracks eviction metrics + --- + duration_ms: 0.568056 + type: 'test' + ... +# Subtest: blocks decrypted/session-sensitive data from durable promotion without sanitizer pass +ok 51 - blocks decrypted/session-sensitive data from durable promotion without sanitizer pass + --- + duration_ms: 1.62237 + type: 'test' + ... +# Subtest: createEmbedderAdapter selects in-memory backend and supports vector CRUD +ok 52 - createEmbedderAdapter selects in-memory backend and supports vector CRUD + --- + duration_ms: 1.887751 + type: 'test' + ... +# Subtest: createEmbedderAdapter reads backend from environment +ok 53 - createEmbedderAdapter reads backend from environment + --- + duration_ms: 0.57043 + type: 'test' + ... +# Subtest: memory feature flags parse defaults and canary allow-lists +ok 54 - memory feature flags parse defaults and canary allow-lists + --- + duration_ms: 1.472048 + type: 'test' + ... +# Subtest: memory prune flag supports off, dry-run, and active modes +ok 55 - memory prune flag supports off, dry-run, and active modes + --- + duration_ms: 0.356414 + type: 'test' + ... +# Subtest: estimateTokenCount returns heuristic count +ok 56 - estimateTokenCount returns heuristic count + --- + duration_ms: 1.636378 + type: 'test' + ... +# Subtest: formatMemoryBlock converts memory record to display block +ok 57 - formatMemoryBlock converts memory record to display block + --- + duration_ms: 0.875703 + type: 'test' + ... +# Subtest: formatMemoryBlock handles missing optional fields and default clamping +ok 58 - formatMemoryBlock handles missing optional fields and default clamping + --- + duration_ms: 0.233249 + type: 'test' + ... +# Subtest: formatMemoryBlock respects custom clamping options +ok 59 - formatMemoryBlock respects custom clamping options + --- + duration_ms: 0.233063 + type: 'test' + ... +# Subtest: formatMemoryBlock handles edge cases for clamping +ok 60 - formatMemoryBlock handles edge cases for clamping + --- + duration_ms: 0.337525 + type: 'test' + ... +# Subtest: formatMemoriesForPrompt enforces token budget and k limit +ok 61 - formatMemoriesForPrompt enforces token budget and k limit + --- + duration_ms: 0.912353 + type: 'test' + ... +# Subtest: formatMemoriesForPrompt handles aggressive budget fitting +ok 62 - formatMemoriesForPrompt handles aggressive budget fitting + --- + duration_ms: 0.480635 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext injects context when enabled +ok 63 - renderPromptWithMemoryContext injects context when enabled + --- + duration_ms: 0.841214 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext returns base prompt when disabled +ok 64 - renderPromptWithMemoryContext returns base prompt when disabled + --- + duration_ms: 0.567868 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles missing query or service +ok 65 - renderPromptWithMemoryContext handles missing query or service + --- + duration_ms: 0.618548 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles circular agentContext gracefully +ok 66 - renderPromptWithMemoryContext handles circular agentContext gracefully + --- + duration_ms: 0.433038 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles agentContext as array of strings +ok 67 - renderPromptWithMemoryContext handles agentContext as array of strings + --- + duration_ms: 0.356952 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles agentContext as plain object +ok 68 - renderPromptWithMemoryContext handles agentContext as plain object + --- + duration_ms: 0.277902 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles agentContext as primitives +ok 69 - renderPromptWithMemoryContext handles agentContext as primitives + --- + duration_ms: 0.235567 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext calls updateMemoryUsage for retrieved memories +ok 70 - renderPromptWithMemoryContext calls updateMemoryUsage for retrieved memories + --- + duration_ms: 2.812224 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles empty memories gracefully +ok 71 - renderPromptWithMemoryContext handles empty memories gracefully + --- + duration_ms: 0.225862 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles null/undefined memories gracefully +ok 72 - renderPromptWithMemoryContext handles null/undefined memories gracefully + --- + duration_ms: 0.271779 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext respects TORCH_MEMORY_ENABLED=false +ok 73 - renderPromptWithMemoryContext respects TORCH_MEMORY_ENABLED=false + --- + duration_ms: 0.146629 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext respects retrieval allowlist +ok 74 - renderPromptWithMemoryContext respects retrieval allowlist + --- + duration_ms: 0.425053 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext passes k and tokenBudget +ok 75 - renderPromptWithMemoryContext passes k and tokenBudget + --- + duration_ms: 0.437116 + type: 'test' + ... +# Subtest: getRelevantMemories uses cached results when available +ok 76 - getRelevantMemories uses cached results when available + --- + duration_ms: 2.141833 + type: 'test' + ... +# Subtest: getRelevantMemories calls ranker and updates cache on miss +ok 77 - getRelevantMemories calls ranker and updates cache on miss + --- + duration_ms: 1.123964 + type: 'test' + ... +# Subtest: getRelevantMemories passes correct parameters to ranker +ok 78 - getRelevantMemories passes correct parameters to ranker + --- + duration_ms: 0.921431 + type: 'test' + ... +# Subtest: getRelevantMemories triggers updateMemoryUsage on repository +ok 79 - getRelevantMemories triggers updateMemoryUsage on repository + --- + duration_ms: 0.592846 + type: 'test' + ... +# Subtest: ingestEvents + # Subtest: happy path: successfully ingests events + ok 1 - happy path: successfully ingests events + --- + duration_ms: 6.931638 + type: 'test' + ... + # Subtest: skips ingestion when feature flag is disabled + ok 2 - skips ingestion when feature flag is disabled + --- + duration_ms: 0.591809 + type: 'test' + ... + # Subtest: clears cache after ingestion + ok 3 - clears cache after ingestion + --- + duration_ms: 2.049489 + type: 'test' + ... + # Subtest: skips duplicate windows + ok 4 - skips duplicate windows + --- + duration_ms: 1.249989 + type: 'test' + ... + # Subtest: propagates repository errors + ok 5 - propagates repository errors + --- + duration_ms: 2.092469 + type: 'test' + ... + 1..5 +ok 80 - ingestEvents + --- + duration_ms: 14.934174 + type: 'suite' + ... +# Subtest: ingestMemoryWindow gathers sources, redacts pii, chunks, embeds, links, and emits telemetry +ok 81 - ingestMemoryWindow gathers sources, redacts pii, chunks, embeds, links, and emits telemetry + --- + duration_ms: 6.215335 + type: 'test' + ... +# Subtest: ingestMemoryWindow dedupes overlapping windows by hashed content + agent + timestamp bucket +ok 82 - ingestMemoryWindow dedupes overlapping windows by hashed content + agent + timestamp bucket + --- + duration_ms: 0.942617 + type: 'test' + ... +# Subtest: pinMemory pins the memory and clears the cache +ok 83 - pinMemory pins the memory and clears the cache + --- + duration_ms: 4.768444 + type: 'test' + ... +# Subtest: pinMemory returns null for non-existent ID but still clears cache +ok 84 - pinMemory returns null for non-existent ID but still clears cache + --- + duration_ms: 0.519012 + type: 'test' + ... +# Subtest: unpinMemory unpins the memory and clears the cache +ok 85 - unpinMemory unpins the memory and clears the cache + --- + duration_ms: 0.708707 + type: 'test' + ... +# Subtest: unpinMemory returns null for non-existent ID but still clears cache +ok 86 - unpinMemory returns null for non-existent ID but still clears cache + --- + duration_ms: 0.653487 + type: 'test' + ... +# Subtest: createLifecyclePlan respects delete safety constraints and logs reasons +ok 87 - createLifecyclePlan respects delete safety constraints and logs reasons + --- + duration_ms: 4.059161 + type: 'test' + ... +# Subtest: createLifecyclePlan condenses near-duplicates and archives merged source records +ok 88 - createLifecyclePlan condenses near-duplicates and archives merged source records + --- + duration_ms: 1.138433 + type: 'test' + ... +# Subtest: applyLifecycleActions executes keep/archive/delete and merge markers +ok 89 - applyLifecycleActions executes keep/archive/delete and merge markers + --- + duration_ms: 14.721698 + type: 'test' + ... +# Subtest: filterAndRankMemories applies metadata filters and composite score +ok 90 - filterAndRankMemories applies metadata filters and composite score + --- + duration_ms: 3.103525 + type: 'test' + ... +# Subtest: formatMemoriesForPrompt returns prompt blocks and enforces token budget trimming +ok 91 - formatMemoriesForPrompt returns prompt blocks and enforces token budget trimming + --- + duration_ms: 1.435463 + type: 'test' + ... +# Subtest: isMemoryRetrievalEnabled supports global toggle and agent canary list +ok 92 - isMemoryRetrievalEnabled supports global toggle and agent canary list + --- + duration_ms: 0.408337 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext injects bounded memory block before base prompt +ok 93 - renderPromptWithMemoryContext injects bounded memory block before base prompt + --- + duration_ms: 0.917259 + type: 'test' + ... +# Subtest: runPruneCycle respects off mode +ok 94 - runPruneCycle respects off mode + --- + duration_ms: 19.289885 + type: 'test' + ... +# Subtest: runPruneCycle respects dry-run mode +ok 95 - runPruneCycle respects dry-run mode + --- + duration_ms: 0.565401 + type: 'test' + ... +# Subtest: runPruneCycle removes stale unpinned memories in active mode +ok 96 - runPruneCycle removes stale unpinned memories in active mode + --- + duration_ms: 4.178294 + type: 'test' + ... +# Subtest: runPruneCycle starts scheduler if requested +ok 97 - runPruneCycle starts scheduler if requested + --- + duration_ms: 1003.228908 + type: 'test' + ... +# (node:9775) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time +# (Use `node --trace-warnings ...` to show where the warning was created) +# Subtest: createDbAdvisoryLockProvider acquires and releases postgres advisory locks +ok 98 - createDbAdvisoryLockProvider acquires and releases postgres advisory locks + --- + duration_ms: 2.423492 + type: 'test' + ... +# Subtest: startMemoryMaintenanceScheduler runs all jobs and emits metrics including retries +ok 99 - startMemoryMaintenanceScheduler runs all jobs and emits metrics including retries + --- + duration_ms: 10.612954 + type: 'test' + ... +# Subtest: startMemoryMaintenanceScheduler skips jobs when feature flags disable memory +ok 100 - startMemoryMaintenanceScheduler skips jobs when feature flags disable memory + --- + duration_ms: 1.885524 + type: 'test' + ... +# Subtest: normalizeMemoryItem applies durable schema defaults and coercions +ok 101 - normalizeMemoryItem applies durable schema defaults and coercions + --- + duration_ms: 2.741217 + type: 'test' + ... +# Subtest: validateMemoryItem reports field-level errors +ok 102 - validateMemoryItem reports field-level errors + --- + duration_ms: 0.543399 + type: 'test' + ... +# Subtest: ingestEvents rejects invalid writes and logs structured validation details +ok 103 - ingestEvents rejects invalid writes and logs structured validation details + --- + duration_ms: 4.586844 + type: 'test' + ... +# (node:9793) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time +# (Use `node --trace-warnings ...` to show where the warning was created) +# Subtest: memoryStats with empty repository returns zero counts and rates +ok 104 - memoryStats with empty repository returns zero counts and rates + --- + duration_ms: 2.342332 + type: 'test' + ... +# Subtest: memoryStats with populated repository returns correct counts and totals +ok 105 - memoryStats with populated repository returns correct counts and totals + --- + duration_ms: 0.490695 + type: 'test' + ... +# Subtest: memoryStats calculates ingest throughput based on window +ok 106 - memoryStats calculates ingest throughput based on window + --- + duration_ms: 6.60405 + type: 'test' + ... +# Subtest: memoryStats reflects deleted count from prune cycle +ok 107 - memoryStats reflects deleted count from prune cycle + --- + duration_ms: 9.783742 + type: 'test' + ... +# Subtest: memoryStats handles windowMs parameter correctly +ok 108 - memoryStats handles windowMs parameter correctly + --- + duration_ms: 0.541452 + type: 'test' + ... +# Subtest: loadMemoryPromptTemplates loads all memory prompt templates from disk +ok 109 - loadMemoryPromptTemplates loads all memory prompt templates from disk + --- + duration_ms: 1.721299 + type: 'test' + ... +# Subtest: summarizeEvents retries with repair prompt when first response is malformed JSON +ok 110 - summarizeEvents retries with repair prompt when first response is malformed JSON + --- + duration_ms: 2.247334 + type: 'test' + ... +# Subtest: summarizeEvents falls back to deterministic minimal summary with conservative importance when parsing fails twice +ok 111 - summarizeEvents falls back to deterministic minimal summary with conservative importance when parsing fails twice + --- + duration_ms: 0.58707 + type: 'test' + ... +# Subtest: telemetry should not log to stdout or stderr by default +ok 112 - telemetry should not log to stdout or stderr by default + --- + duration_ms: 70.233887 + type: 'test' + ... +# Subtest: telemetry should log to stderr when NODE_DEBUG=torch-memory is set +ok 113 - telemetry should log to stderr when NODE_DEBUG=torch-memory is set + --- + duration_ms: 66.647395 + type: 'test' + ... +# Subtest: schema validation covers required fields, coercion, and rejection paths +ok 114 - schema validation covers required fields, coercion, and rejection paths + --- + duration_ms: 2.972686 + type: 'test' + ... +# Subtest: summarizer parser accepts valid json and recovers after malformed json response +ok 115 - summarizer parser accepts valid json and recovers after malformed json response + --- + duration_ms: 4.081166 + type: 'test' + ... +# Subtest: ingest integration persists memory records and links embeddings from event batches +ok 116 - ingest integration persists memory records and links embeddings from event batches + --- + duration_ms: 2.625075 + type: 'test' + ... +# Subtest: retrieval ranking blends semantic, importance, and recency signals +ok 117 - retrieval ranking blends semantic, importance, and recency signals + --- + duration_ms: 1.012978 + type: 'test' + ... +# Subtest: pruner policy protects pins, merges duplicates, and picks archive/delete outcomes +ok 118 - pruner policy protects pins, merges duplicates, and picks archive/delete outcomes + --- + duration_ms: 1.476763 + type: 'test' + ... +# Subtest: scheduler smoke test handles mocked clock and lock contention +ok 119 - scheduler smoke test handles mocked clock and lock contention + --- + duration_ms: 9.309718 + type: 'test' + ... +# Subtest: CLI Smoke Test + # Subtest: should print usage when no args provided + not ok 1 - should print usage when no args provided + --- + duration_ms: 154.697152 + type: 'test' + location: '/app/test/nostr-lock.test.mjs:8:3' + failureType: 'testCodeFailure' + error: |- + The input did not match the regular expression /Usage:/. Input: + + 'file:///app/src/relay-health.mjs:7\n' + + "import { withTimeout } from './utils.mjs';\n" + + ' ^^^^^^^^^^^\n' + + "SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout'\n" + + ' at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21)\n' + + ' at async ModuleJob.run (node:internal/modules/esm/module_job:335:5)\n' + + ' at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26)\n' + + ' at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)\n' + + '\n' + + 'Node.js v22.22.0\n' + + code: 'ERR_ASSERTION' + name: 'AssertionError' + expected: + actual: |- + file:///app/src/relay-health.mjs:7 + import { withTimeout } from './utils.mjs'; + ^^^^^^^^^^^ + SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout' + at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) + at async ModuleJob.run (node:internal/modules/esm/module_job:335:5) + at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) + at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) + + Node.js v22.22.0 + + operator: 'match' + stack: |- + TestContext. (file:///app/test/nostr-lock.test.mjs:11:12) + Test.runInAsyncScope (node:async_hooks:214:14) + Test.run (node:internal/test_runner/test:1047:25) + Test.start (node:internal/test_runner/test:944:17) + node:internal/test_runner/test:1440:71 + node:internal/per_context/primordials:464:82 + new Promise () + new SafePromise (node:internal/per_context/primordials:433:3) + node:internal/per_context/primordials:464:9 + Array.map () + ... + # Subtest: should fail when checking without cadence + not ok 2 - should fail when checking without cadence + --- + duration_ms: 150.147825 + type: 'test' + location: '/app/test/nostr-lock.test.mjs:14:3' + failureType: 'testCodeFailure' + error: |- + The input did not match the regular expression /--cadence is required/. Input: + + 'file:///app/src/relay-health.mjs:7\n' + + "import { withTimeout } from './utils.mjs';\n" + + ' ^^^^^^^^^^^\n' + + "SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout'\n" + + ' at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21)\n' + + ' at async ModuleJob.run (node:internal/modules/esm/module_job:335:5)\n' + + ' at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26)\n' + + ' at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)\n' + + '\n' + + 'Node.js v22.22.0\n' + + code: 'ERR_ASSERTION' + name: 'AssertionError' + expected: + actual: |- + file:///app/src/relay-health.mjs:7 + import { withTimeout } from './utils.mjs'; + ^^^^^^^^^^^ + SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout' + at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) + at async ModuleJob.run (node:internal/modules/esm/module_job:335:5) + at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) + at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) + + Node.js v22.22.0 + + operator: 'match' + stack: |- + TestContext. (file:///app/test/nostr-lock.test.mjs:17:12) + Test.runInAsyncScope (node:async_hooks:214:14) + Test.run (node:internal/test_runner/test:1047:25) + Suite.processPendingSubtests (node:internal/test_runner/test:744:18) + Test.postRun (node:internal/test_runner/test:1173:19) + Test.run (node:internal/test_runner/test:1101:12) + async Promise.all (index 0) + async Suite.run (node:internal/test_runner/test:1442:7) + async startSubtestAfterBootstrap (node:internal/test_runner/harness:296:3) + ... + # Subtest: should include paused agents in check output + not ok 3 - should include paused agents in check output + --- + duration_ms: 159.397468 + type: 'test' + location: '/app/test/nostr-lock.test.mjs:20:3' + failureType: 'testCodeFailure' + error: |- + Expected values to be strictly equal: + + 1 !== 0 + + code: 'ERR_ASSERTION' + name: 'AssertionError' + expected: 0 + actual: 1 + operator: 'strictEqual' + stack: |- + TestContext. (file:///app/test/nostr-lock.test.mjs:52:14) + async Test.run (node:internal/test_runner/test:1054:7) + async Suite.processPendingSubtests (node:internal/test_runner/test:744:7) + ... + 1..3 +not ok 120 - CLI Smoke Test + --- + duration_ms: 467.252258 + type: 'suite' + location: '/app/test/nostr-lock.test.mjs:7:1' + failureType: 'subtestsFailed' + error: '3 subtests failed' + code: 'ERR_TEST_FAILURE' + ... +# Initializing torch in /app/test-gitignore-pY5P16/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-gitignore-pY5P16/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hash +# - Namespace: test-ns +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hash&namespace=test-ns&relays=wss%3A%2F%2Frelay.damus.io +# No package.json found in host root. Skipping script injection. +# Initializing torch in /app/test-gitignore-existing-ZBxv8n/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Updated test-gitignore-existing-ZBxv8n/torch/.gitignore: added node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# No package.json found in host root. Skipping script injection. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hash +# - Namespace: test-ns +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hash&namespace=test-ns&relays=wss%3A%2F%2Frelay.damus.io +# Subtest: ops.mjs: cmdInit creates .gitignore with node_modules +ok 121 - ops.mjs: cmdInit creates .gitignore with node_modules + --- + duration_ms: 71.868932 + type: 'test' + ... +# Subtest: ops.mjs: cmdInit appends to existing .gitignore +ok 122 - ops.mjs: cmdInit appends to existing .gitignore + --- + duration_ms: 59.129478 + type: 'test' + ... +# Initializing torch in /app/test-ops-yKpLEO/project1/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-yKpLEO/project1/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# No package.json found in host root. Skipping script injection. +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# Initializing torch in /app/test-ops-yKpLEO/project2/torch... +# Initializing torch in /app/test-ops-yKpLEO/project3/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-yKpLEO/project3/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# Updating torch configuration in /app/test-ops-yKpLEO/project3/torch... +# Creating backup at torch/_backups/backup_2026-02-25T16-11-07-459Z... +# No package.json found in host root. Skipping script injection. +# Updating application directories... +# Updated src/ +# Updated bin/ +# Updated dashboard/ +# Updated landing/ +# Updated assets/ +# Updated scripts/ +# Updating application files... +# Updated package.json +# Updated build.mjs +# Updated README.md +# Updated torch-config.example.json +# Updated TORCH.md +# Updating static files... +# Updated META_PROMPTS.md +# Updated scheduler-flow.md +# Updated daily-scheduler.md +# Updated weekly-scheduler.md +# Skipped roster.json (preserved) +# Updating prompts... +# daily/: 0 added, 0 updated, 23 preserved +# weekly/: 0 added, 0 updated, 24 preserved +# Update complete. +# Initializing torch in /app/test-ops-yKpLEO/project4/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-yKpLEO/project4/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# No package.json found in host root. Skipping script injection. +# Updating torch configuration in /app/test-ops-yKpLEO/project4/torch... +# Creating backup at torch/_backups/backup_2026-02-25T16-11-07-587Z... +# Updating application directories... +# Updated src/ +# Updated bin/ +# Updated dashboard/ +# Updated landing/ +# Updated assets/ +# Updated scripts/ +# Updating application files... +# Updated package.json +# Updated build.mjs +# Updated README.md +# Updated torch-config.example.json +# Updated TORCH.md +# Updating static files... +# Updated META_PROMPTS.md +# Updated scheduler-flow.md +# Updated daily-scheduler.md +# Updated weekly-scheduler.md +# Overwrote roster.json (forced) +# Updating prompts... +# daily/: 0 added, 23 updated, 0 preserved +# weekly/: 0 added, 24 updated, 0 preserved +# Update complete. +# Initializing torch in /app/test-ops-yKpLEO/project5/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-yKpLEO/project5/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# No package.json found in host root. Skipping script injection. +# Updating torch configuration in /app/test-ops-yKpLEO/project5/torch... +# Creating backup at torch/_backups/backup_2026-02-25T16-11-07-711Z... +# Updating application directories... +# Updated src/ +# Updated bin/ +# Updated dashboard/ +# Updated landing/ +# Updated assets/ +# Updated scripts/ +# Updating application files... +# Updated package.json +# Updated build.mjs +# Updated README.md +# Updated torch-config.example.json +# Updated TORCH.md +# Updating static files... +# Updated META_PROMPTS.md +# Updated scheduler-flow.md +# Updated daily-scheduler.md +# Updated weekly-scheduler.md +# Skipped roster.json (preserved) +# Updating prompts... +# daily/: 0 added, 0 updated, 23 preserved +# weekly/: 0 added, 0 updated, 24 preserved +# Update complete. +# Initializing torch in /app/test-ops-yKpLEO/project_roster/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-yKpLEO/project_roster/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=ws%3A%2F%2F127.0.0.1%3A46739 +# Subtest: cmdInit creates directory structure and files +ok 123 - cmdInit creates directory structure and files + --- + duration_ms: 48.573008 + type: 'test' + ... +# Subtest: cmdInit fails if directory exists without force +ok 124 - cmdInit fails if directory exists without force + --- + duration_ms: 1.292312 + type: 'test' + ... +# Subtest: cmdUpdate preserves modified prompt +ok 125 - cmdUpdate preserves modified prompt + --- + duration_ms: 130.781595 + type: 'test' + ... +# Subtest: cmdUpdate overwrites prompt with force +ok 126 - cmdUpdate overwrites prompt with force + --- + duration_ms: 121.746031 + type: 'test' + ... +# Subtest: cmdUpdate creates backup +ok 127 - cmdUpdate creates backup + --- + duration_ms: 119.068256 + type: 'test' + ... +# No package.json found in host root. Skipping script injection. +# Initializing torch in /app/test-ops-yKpLEO/project_config_init/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-yKpLEO/project_config_init/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# No package.json found in host root. Skipping script injection. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# Subtest: torch-lock check respects local roster +not ok 128 - torch-lock check respects local roster + --- + duration_ms: 252.657935 + type: 'test' + location: '/app/test/ops.test.mjs:121:1' + failureType: 'testCodeFailure' + error: |- + Command failed: /home/jules/.nvm/versions/node/v22.22.0/bin/node /app/bin/torch-lock.mjs check --cadence daily + file:///app/src/relay-health.mjs:7 + import { withTimeout } from './utils.mjs'; + ^^^^^^^^^^^ + SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout' + at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) + at async ModuleJob.run (node:internal/modules/esm/module_job:335:5) + at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) + at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) + + Node.js v22.22.0 + + code: 1 + stack: |- + ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) + async ModuleJob.run (node:internal/modules/esm/module_job:335:5) + async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) + async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) + genericNodeError (node:internal/errors:983:15) + wrappedFn (node:internal/errors:537:14) + ChildProcess.exithandler (node:child_process:417:12) + ChildProcess.emit (node:events:519:28) + maybeClose (node:internal/child_process:1101:16) + ChildProcess._handle.onexit (node:internal/child_process:304:5) + ... +# Subtest: cmdInit creates torch-config.json with random namespace +ok 129 - cmdInit creates torch-config.json with random namespace + --- + duration_ms: 56.404574 + type: 'test' + ... +# [publish:primary] Publishing to 3 relays (ws://127.0.0.1:35065, ws://127.0.0.1:35071, ws://127.0.0.1:43631)... +# Published to 1/3 relays (required=1, timeout=80ms) +# Subtest: relay fanout quorum integration + # Subtest: passes with required=1 when one relay succeeds and two fail +# [publish:primary] Publishing to 3 relays (ws://127.0.0.1:40239, ws://127.0.0.1:41057, ws://127.0.0.1:43477)... + ok 1 - passes with required=1 when one relay succeeds and two fail + --- + duration_ms: 137.068669 + type: 'test' + ... + # Subtest: fails with quorum error for required=1 when all relays fail + ok 2 - fails with quorum error for required=1 when all relays fail + --- + duration_ms: 96.575577 + type: 'test' + ... +# [publish:primary] Publishing to 3 relays (ws://127.0.0.1:36083, ws://127.0.0.1:36817, ws://127.0.0.1:40673)... + # Subtest: fails with required=2 when only one relay succeeds + ok 3 - fails with required=2 when only one relay succeeds + --- + duration_ms: 91.770667 + type: 'test' + ... +# [publish:primary] Publishing to 3 relays (ws://127.0.0.1:34437, ws://127.0.0.1:34485, ws://127.0.0.1:42925)... +# Published to 2/3 relays (required=2, timeout=80ms) + # Subtest: passes when delayed successes reach quorum before timeout + ok 4 - passes when delayed successes reach quorum before timeout + --- + duration_ms: 99.150267 + type: 'test' + ... + 1..4 +ok 130 - relay fanout quorum integration + --- + duration_ms: 426.466167 + type: 'suite' + ... +# Subtest: RelayHealthManager + # Subtest: should isolate state between instances + ok 1 - should isolate state between instances + --- + duration_ms: 1.169504 + type: 'test' + ... + # Subtest: should prioritize relays based on health + ok 2 - should prioritize relays based on health + --- + duration_ms: 2.123736 + type: 'test' + ... + # Subtest: should reset state correctly + ok 3 - should reset state correctly + --- + duration_ms: 0.242917 + type: 'test' + ... + # Subtest: should cache ranked results and invalidate on outcome + ok 4 - should cache ranked results and invalidate on outcome + --- + duration_ms: 1.027105 + type: 'test' + ... + # Subtest: should invalidate cache when time passes quarantine expiry + ok 5 - should invalidate cache when time passes quarantine expiry + --- + duration_ms: 1.150677 + type: 'test' + ... + 1..5 +ok 131 - RelayHealthManager + --- + duration_ms: 7.651672 + type: 'suite' + ... +# file:///app/src/relay-health.mjs:7 +# import { withTimeout } from './utils.mjs'; +# ^^^^^^^^^^^ +# SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout' +# at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) +# at async ModuleJob.run (node:internal/modules/esm/module_job:335:5) +# at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) +# at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) +# Node.js v22.22.0 +# Subtest: test/relay-health-thresholds.test.mjs +not ok 44 - test/relay-health-thresholds.test.mjs + --- + duration_ms: 130.365748 + type: 'test' + location: '/app/test/relay-health-thresholds.test.mjs:1:1' + failureType: 'testCodeFailure' + exitCode: 1 + signal: ~ + error: 'test failed' + code: 'ERR_TEST_FAILURE' + ... +# file:///app/src/relay-health.mjs:7 +# import { withTimeout } from './utils.mjs'; +# ^^^^^^^^^^^ +# SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout' +# at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) +# at async ModuleJob.run (node:internal/modules/esm/module_job:335:5) +# at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) +# at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) +# Node.js v22.22.0 +# Subtest: test/relay-health.test.mjs +not ok 45 - test/relay-health.test.mjs + --- + duration_ms: 148.593439 + type: 'test' + location: '/app/test/relay-health.test.mjs:1:1' + failureType: 'testCodeFailure' + exitCode: 1 + signal: ~ + error: 'test failed' + code: 'ERR_TEST_FAILURE' + ... +# Subtest: Roster (Unit Tests with Dependency Injection) + # Subtest: returns fallback roster when no configuration or files exist + ok 1 - returns fallback roster when no configuration or files exist + --- + duration_ms: 2.660109 + type: 'test' + ... + # Subtest: loads internal module roster if user/cwd rosters are missing + ok 2 - loads internal module roster if user/cwd rosters are missing + --- + duration_ms: 2.373433 + type: 'test' + ... + # Subtest: loads roster from torch/roster.json (User Roster) if present + ok 3 - loads roster from torch/roster.json (User Roster) if present + --- + duration_ms: 1.984046 + type: 'test' + ... + # Subtest: loads roster from roster.json (CWD Roster) if present and torch/roster.json is missing + ok 4 - loads roster from roster.json (CWD Roster) if present and torch/roster.json is missing + --- + duration_ms: 1.111278 + type: 'test' + ... + # Subtest: falls back to default if roster file is malformed + ok 5 - falls back to default if roster file is malformed + --- + duration_ms: 0.580294 + type: 'test' + ... + # Subtest: falls back to default if roster file is missing daily/weekly arrays + ok 6 - falls back to default if roster file is missing daily/weekly arrays + --- + duration_ms: 0.788747 + type: 'test' + ... + # Subtest: prioritizes environment variables over file and config + ok 7 - prioritizes environment variables over file and config + --- + duration_ms: 3.944692 + type: 'test' + ... + # Subtest: prioritizes config over file + ok 8 - prioritizes config over file + --- + duration_ms: 1.10664 + type: 'test' + ... + # Subtest: handles multiple items in env var roster + ok 9 - handles multiple items in env var roster + --- + duration_ms: 1.399636 + type: 'test' + ... + 1..9 +ok 134 - Roster (Unit Tests with Dependency Injection) + --- + duration_ms: 18.848204 + type: 'suite' + ... +# Subtest: fails required memory policy when retrieval/storage evidence is missing +ok 135 - fails required memory policy when retrieval/storage evidence is missing + --- + duration_ms: 910.188245 + type: 'test' + ... +# Subtest: accepts required memory policy when markers or artifacts are produced +ok 136 - accepts required memory policy when markers or artifacts are produced + --- + duration_ms: 957.194208 + type: 'test' + ... +# Subtest: records backend failure metadata when lock command exits with code 2 +ok 137 - records backend failure metadata when lock command exits with code 2 + --- + duration_ms: 881.724752 + type: 'test' + ... +# Subtest: defers backend failures in non-strict mode and reuses idempotency key on successful retry +ok 138 - defers backend failures in non-strict mode and reuses idempotency key on successful retry + --- + duration_ms: 602.775284 + type: 'test' + ... +# Subtest: fails after exceeding non-strict deferral budget +ok 139 - fails after exceeding non-strict deferral budget + --- + duration_ms: 192.748295 + type: 'test' + ... +# Subtest: strict lock mode fails immediately without deferral +ok 140 - strict lock mode fails immediately without deferral + --- + duration_ms: 98.879082 + type: 'test' + ... +# Subtest: skips lock health preflight by default when not enabled +ok 141 - skips lock health preflight by default when not enabled + --- + duration_ms: 390.793571 + type: 'test' + ... +# Subtest: fails scheduler with preflight metadata when lock health preflight is enabled +ok 142 - fails scheduler with preflight metadata when lock health preflight is enabled + --- + duration_ms: 146.491975 + type: 'test' + ... +# Subtest: categorizes unreadable prompt files as prompt_parse_error +ok 143 - categorizes unreadable prompt files as prompt_parse_error + --- + duration_ms: 97.406578 + type: 'test' + ... +# Subtest: categorizes invalid prompt schema as prompt_schema_error +ok 144 - categorizes invalid prompt schema as prompt_schema_error + --- + duration_ms: 94.930485 + type: 'test' + ... +# Subtest: categorizes handoff runtime failures as execution_error +ok 145 - categorizes handoff runtime failures as execution_error + --- + duration_ms: 358.974588 + type: 'test' + ... +# Subtest: retries lock acquisition for backend error and succeeds on a later attempt +ok 146 - retries lock acquisition for backend error and succeeds on a later attempt + --- + duration_ms: 412.115124 + type: 'test' + ... +# Subtest: stops retrying after configured lock backend retries are exhausted +ok 147 - stops retrying after configured lock backend retries are exhausted + --- + duration_ms: 115.888672 + type: 'test' + ... +# Subtest: does not use backend retry flow for exit code 3 lock conflicts +ok 148 - does not use backend retry flow for exit code 3 lock conflicts + --- + duration_ms: 413.729061 + type: 'test' + ... +# Subtest: retries handoff command for retryable network failures and succeeds +ok 149 - retries handoff command for retryable network failures and succeeds + --- + duration_ms: 647.556311 + type: 'test' + ... +# Subtest: uses fallback platform for handoff when primary platform fails +ok 150 - uses fallback platform for handoff when primary platform fails + --- + duration_ms: 648.492297 + type: 'test' + ... +# Subtest: fails before lock acquisition when runner health preflight command fails +ok 151 - fails before lock acquisition when runner health preflight command fails + --- + duration_ms: 352.990752 + type: 'test' + ... +# Subtest: uses exclusion payload from mixed JSON lock:check output +ok 152 - uses exclusion payload from mixed JSON lock:check output + --- + duration_ms: 427.907489 + type: 'test' + ... +# Subtest: runs selected scheduler prompt through configured runner command +ok 153 - runs selected scheduler prompt through configured runner command + --- + duration_ms: 361.035324 + type: 'test' + ... +# Subtest: propagates non-zero runner exit code +ok 154 - propagates non-zero runner exit code + --- + duration_ms: 343.108702 + type: 'test' + ... +# Subtest: scheduler lock backend failure artifact matches required frontmatter schema +ok 155 - scheduler lock backend failure artifact matches required frontmatter schema + --- + duration_ms: 114.917281 + type: 'test' + ... +# Subtest: schema contract catches missing required lock-backend field +ok 156 - schema contract catches missing required lock-backend field + --- + duration_ms: 2.007794 + type: 'test' + ... +# Subtest: schema contract catches misnamed lock-backend key +ok 157 - schema contract catches misnamed lock-backend key + --- + duration_ms: 0.550506 + type: 'test' + ... +# Subtest: lock preflight e2e: successful lock writes completed status snapshot +ok 158 - lock preflight e2e: successful lock writes completed status snapshot + --- + duration_ms: 435.12156 + type: 'test' + ... +# Subtest: lock preflight e2e: exit code 2 quorum failure persists failed backend status and prompt-not-started marker +ok 159 - lock preflight e2e: exit code 2 quorum failure persists failed backend status and prompt-not-started marker + --- + duration_ms: 109.514957 + type: 'test' + ... +# Subtest: lock preflight e2e: non-lock failure exits failed without prompt parse/schema classification +ok 160 - lock preflight e2e: non-lock failure exits failed without prompt parse/schema classification + --- + duration_ms: 110.692622 + type: 'test' + ... +# file:///app/src/relay-health.mjs:7 +# import { withTimeout } from './utils.mjs'; +# ^^^^^^^^^^^ +# SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout' +# at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) +# at async ModuleJob.run (node:internal/modules/esm/module_job:335:5) +# at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) +# at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) +# Node.js v22.22.0 +# Subtest: test/scheduler-ratchet.test.mjs +not ok 51 - test/scheduler-ratchet.test.mjs + --- + duration_ms: 152.994218 + type: 'test' + location: '/app/test/scheduler-ratchet.test.mjs:1:1' + failureType: 'testCodeFailure' + exitCode: 1 + signal: ~ + error: 'test failed' + code: 'ERR_TEST_FAILURE' + ... +# Subtest: parseDateValue + # Subtest: parses a valid ISO string + ok 1 - parses a valid ISO string + --- + duration_ms: 1.078963 + type: 'test' + ... + # Subtest: returns null for empty input + ok 2 - returns null for empty input + --- + duration_ms: 0.272943 + type: 'test' + ... + # Subtest: returns null for invalid date strings + ok 3 - returns null for invalid date strings + --- + duration_ms: 0.181113 + type: 'test' + ... + 1..3 +ok 162 - parseDateValue + --- + duration_ms: 3.068318 + type: 'suite' + ... +# Subtest: isStrictSchedulerLogFilename + # Subtest: accepts valid completed log + ok 1 - accepts valid completed log + --- + duration_ms: 0.619832 + type: 'test' + ... + # Subtest: accepts valid failed log + ok 2 - accepts valid failed log + --- + duration_ms: 0.259416 + type: 'test' + ... + # Subtest: rejects deferred logs + ok 3 - rejects deferred logs + --- + duration_ms: 0.199392 + type: 'test' + ... + # Subtest: rejects filenames without timestamp + ok 4 - rejects filenames without timestamp + --- + duration_ms: 0.277678 + type: 'test' + ... + # Subtest: rejects plain text files + ok 5 - rejects plain text files + --- + duration_ms: 0.399728 + type: 'test' + ... + # Subtest: rejects .scheduler-run-state.json + ok 6 - rejects .scheduler-run-state.json + --- + duration_ms: 0.335419 + type: 'test' + ... + 1..6 +ok 163 - isStrictSchedulerLogFilename + --- + duration_ms: 2.955802 + type: 'suite' + ... +# Subtest: parseAgentFromFilename + # Subtest: extracts agent name from completed log + ok 1 - extracts agent name from completed log + --- + duration_ms: 2.03026 + type: 'test' + ... + # Subtest: extracts agent name from failed log + ok 2 - extracts agent name from failed log + --- + duration_ms: 0.234614 + type: 'test' + ... + # Subtest: returns null for invalid filename + ok 3 - returns null for invalid filename + --- + duration_ms: 0.11456 + type: 'test' + ... + 1..3 +ok 164 - parseAgentFromFilename + --- + duration_ms: 2.626542 + type: 'suite' + ... +# Subtest: parseTimestampFromFilename + # Subtest: parses timestamp from canonical filename + ok 1 - parses timestamp from canonical filename + --- + duration_ms: 0.260263 + type: 'test' + ... + # Subtest: returns null for non-canonical filename + ok 2 - returns null for non-canonical filename + --- + duration_ms: 0.157925 + type: 'test' + ... + 1..2 +ok 165 - parseTimestampFromFilename + --- + duration_ms: 0.549596 + type: 'suite' + ... +# Subtest: parseFrontmatterCreatedAt / parseFrontmatterAgent + # Subtest: reads created_at from frontmatter + ok 1 - reads created_at from frontmatter + --- + duration_ms: 0.455924 + type: 'test' + ... + # Subtest: reads agent from frontmatter + ok 2 - reads agent from frontmatter + --- + duration_ms: 0.270481 + type: 'test' + ... + # Subtest: returns null when no frontmatter + ok 3 - returns null when no frontmatter + --- + duration_ms: 0.146314 + type: 'test' + ... + 1..3 +ok 166 - parseFrontmatterCreatedAt / parseFrontmatterAgent + --- + duration_ms: 1.107835 + type: 'suite' + ... +# Subtest: buildRecentlyRunExclusionSet — scenarios + # Subtest: SCN-TWG-01: excludes agents with completed logs within 24-hour daily window + ok 1 - SCN-TWG-01: excludes agents with completed logs within 24-hour daily window + --- + duration_ms: 8.230043 + type: 'test' + ... + # Subtest: SCN-TWG-02: does NOT exclude agents whose last run is outside the 24-hour window + ok 2 - SCN-TWG-02: does NOT exclude agents whose last run is outside the 24-hour window + --- + duration_ms: 6.026619 + type: 'test' + ... + # Subtest: SCN-TWG-03: excludes agents with failed logs within the window + ok 3 - SCN-TWG-03: excludes agents with failed logs within the window + --- + duration_ms: 2.91866 + type: 'test' + ... + # Subtest: SCN-TWG-04: cross-midnight scenario — agent ran 10 min before midnight, checked 10 min after + ok 4 - SCN-TWG-04: cross-midnight scenario — agent ran 10 min before midnight, checked 10 min after + --- + duration_ms: 5.34029 + type: 'test' + ... + # Subtest: SCN-TWG-05: uses frontmatter created_at over filename timestamp when both present + ok 5 - SCN-TWG-05: uses frontmatter created_at over filename timestamp when both present + --- + duration_ms: 2.762713 + type: 'test' + ... + # Subtest: SCN-TWG-06: weekly window uses 7-day threshold + ok 6 - SCN-TWG-06: weekly window uses 7-day threshold + --- + duration_ms: 7.590235 + type: 'test' + ... + # Subtest: SCN-TWG-07: empty log directory returns empty set + ok 7 - SCN-TWG-07: empty log directory returns empty set + --- + duration_ms: 1.579726 + type: 'test' + ... + # Subtest: SCN-TWG-08: non-existent directory returns empty set without throwing + ok 8 - SCN-TWG-08: non-existent directory returns empty set without throwing + --- + duration_ms: 1.088888 + type: 'test' + ... + # Subtest: SCN-TWG-09: only the most recent log matters — agent excluded if any log is within window + ok 9 - SCN-TWG-09: only the most recent log matters — agent excluded if any log is within window + --- + duration_ms: 3.244988 + type: 'test' + ... + # Subtest: SCN-TWG-10: mixed roster — correctly partitions in-window vs out-of-window agents + ok 10 - SCN-TWG-10: mixed roster — correctly partitions in-window vs out-of-window agents + --- + duration_ms: 6.44766 + type: 'test' + ... + # Subtest: SCN-TWG-11: non-log files in directory are ignored + ok 11 - SCN-TWG-11: non-log files in directory are ignored + --- + duration_ms: 2.99432 + type: 'test' + ... + 1..11 +ok 167 - buildRecentlyRunExclusionSet — scenarios + --- + duration_ms: 74.759231 + type: 'suite' + ... +# Subtest: CADENCE_WINDOW_MS constants + # Subtest: daily window is exactly 24 hours + ok 1 - daily window is exactly 24 hours + --- + duration_ms: 0.242925 + type: 'test' + ... + # Subtest: weekly window is exactly 7 days + ok 2 - weekly window is exactly 7 days + --- + duration_ms: 0.116568 + type: 'test' + ... + 1..2 +ok 168 - CADENCE_WINDOW_MS constants + --- + duration_ms: 0.516837 + type: 'suite' + ... +# Subtest: secureRandom + # Subtest: returns values in [0, 1) + ok 1 - returns values in [0, 1) + --- + duration_ms: 2.911365 + type: 'test' + ... + # Subtest: returns varied values + ok 2 - returns varied values + --- + duration_ms: 0.377554 + type: 'test' + ... + 1..2 +ok 169 - secureRandom + --- + duration_ms: 4.773856 + type: 'suite' + ... +# Subtest: summarizes recent lock reliability by platform/cadence/backend/relay +ok 170 - summarizes recent lock reliability by platform/cadence/backend/relay + --- + duration_ms: 86.52357 + type: 'test' + ... +# Subtest: run-flaky-check reports pass/fail counts from TAP output files +ok 171 - run-flaky-check reports pass/fail counts from TAP output files + --- + duration_ms: 825.277941 + type: 'test' + ... +# Subtest: loadTorchConfig (Unit Tests with Mocked FS) + # Subtest: loads valid config correctly + ok 1 - loads valid config correctly + --- + duration_ms: 3.816771 + type: 'test' + ... + # Subtest: returns default config when file is missing + ok 2 - returns default config when file is missing + --- + duration_ms: 0.739645 + type: 'test' + ... + # Subtest: throws error on malformed JSON + ok 3 - throws error on malformed JSON + --- + duration_ms: 0.988987 + type: 'test' + ... + # Subtest: caches the config and ignores subsequent fs calls + ok 4 - caches the config and ignores subsequent fs calls + --- + duration_ms: 0.750495 + type: 'test' + ... + # Subtest: returns null for empty string lists (new consistent behavior) + ok 5 - returns null for empty string lists (new consistent behavior) + --- + duration_ms: 0.864434 + type: 'test' + ... + 1..5 +ok 172 - loadTorchConfig (Unit Tests with Mocked FS) + --- + duration_ms: 8.960725 + type: 'suite' + ... +# Subtest: torch-config + # Subtest: getTorchConfigPath + # Subtest: returns default path when env var is not set + ok 1 - returns default path when env var is not set + --- + duration_ms: 1.105197 + type: 'test' + ... + # Subtest: returns custom path when env var is set + ok 2 - returns custom path when env var is set + --- + duration_ms: 0.258341 + type: 'test' + ... + 1..2 + ok 1 - getTorchConfigPath + --- + duration_ms: 2.846819 + type: 'suite' + ... + # Subtest: parseTorchConfig + # Subtest: parses new lock backend knobs + ok 1 - parses new lock backend knobs + --- + duration_ms: 1.373377 + type: 'test' + ... + 1..1 + ok 2 - parseTorchConfig + --- + duration_ms: 1.700227 + type: 'suite' + ... + # Subtest: loadTorchConfig + # Subtest: throws fatal error for invalid relay URL + ok 1 - throws fatal error for invalid relay URL + --- + duration_ms: 13.759211 + type: 'test' + ... + # Subtest: throws fatal error for invalid timeout range + ok 2 - throws fatal error for invalid timeout range + --- + duration_ms: 2.262904 + type: 'test' + ... + # Subtest: throws error for malformed JSON + ok 3 - throws error for malformed JSON + --- + duration_ms: 2.070921 + type: 'test' + ... + 1..3 + ok 3 - loadTorchConfig + --- + duration_ms: 19.035252 + type: 'suite' + ... + # Subtest: backend getters + # Subtest: returns default relays + ok 1 - returns default relays + --- + duration_ms: 3.618601 + type: 'test' + ... + # Subtest: validates env knob values + ok 2 - validates env knob values + --- + duration_ms: 2.22804 + type: 'test' + ... + 1..2 + ok 4 - backend getters + --- + duration_ms: 6.364916 + type: 'suite' + ... + 1..4 +ok 173 - torch-config + --- + duration_ms: 30.902532 + type: 'suite' + ... +# Subtest: Async Utilities + # Subtest: withTimeout + # Subtest: resolves when promise completes before timeout + ok 1 - resolves when promise completes before timeout + --- + duration_ms: 11.691141 + type: 'test' + ... + # Subtest: rejects when promise times out + ok 2 - rejects when promise times out + --- + duration_ms: 10.862335 + type: 'test' + ... + # Subtest: clears timeout on success + ok 3 - clears timeout on success + --- + duration_ms: 0.502381 + type: 'test' + ... + # Subtest: propagates original promise rejection + ok 4 - propagates original promise rejection + --- + duration_ms: 0.420744 + type: 'test' + ... + 1..4 + ok 1 - withTimeout + --- + duration_ms: 24.698483 + type: 'suite' + ... + 1..1 +ok 174 - Async Utilities + --- + duration_ms: 25.396639 + type: 'suite' + ... +# (node:11847) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time +# (Use `node --trace-warnings ...` to show where the warning was created) +# Subtest: Date Utilities + # Subtest: todayDateStr + # Subtest: returns current date in YYYY-MM-DD format + ok 1 - returns current date in YYYY-MM-DD format + --- + duration_ms: 3.450478 + type: 'test' + ... + 1..1 + ok 1 - todayDateStr + --- + duration_ms: 4.4712 + type: 'suite' + ... + # Subtest: nowUnix + # Subtest: returns current unix timestamp + ok 1 - returns current unix timestamp + --- + duration_ms: 0.346221 + type: 'test' + ... + 1..1 + ok 2 - nowUnix + --- + duration_ms: 0.622117 + type: 'suite' + ... + # Subtest: getIsoWeekStr + # Subtest: returns correct ISO week for simple cases + ok 1 - returns correct ISO week for simple cases + --- + duration_ms: 0.374406 + type: 'test' + ... + # Subtest: handles year boundaries correctly + ok 2 - handles year boundaries correctly + --- + duration_ms: 0.165426 + type: 'test' + ... + # Subtest: handles leap years + ok 3 - handles leap years + --- + duration_ms: 0.342573 + type: 'test' + ... + # Subtest: handles empty input (defaults to today) + ok 4 - handles empty input (defaults to today) + --- + duration_ms: 0.359545 + type: 'test' + ... + # Subtest: handles invalid input gracefully + ok 5 - handles invalid input gracefully + --- + duration_ms: 0.49671 + type: 'test' + ... + 1..5 + ok 3 - getIsoWeekStr + --- + duration_ms: 2.407765 + type: 'suite' + ... + 1..3 +ok 175 - Date Utilities + --- + duration_ms: 8.32929 + type: 'suite' + ... +# Subtest: Relay Utilities + # Subtest: mergeRelayList + # Subtest: merges two lists of relays without duplicates + ok 1 - merges two lists of relays without duplicates + --- + duration_ms: 1.093362 + type: 'test' + ... + # Subtest: handles empty lists + ok 2 - handles empty lists + --- + duration_ms: 0.329062 + type: 'test' + ... + 1..2 + ok 1 - mergeRelayList + --- + duration_ms: 1.714001 + type: 'suite' + ... + 1..1 +ok 176 - Relay Utilities + --- + duration_ms: 1.915073 + type: 'suite' + ... +# Subtest: Platform Utilities + # Subtest: detectPlatform + # Subtest: detects jules + ok 1 - detects jules + --- + duration_ms: 0.540977 + type: 'test' + ... + # Subtest: detects codex + ok 2 - detects codex + --- + duration_ms: 0.169909 + type: 'test' + ... + # Subtest: detects goose + ok 3 - detects goose + --- + duration_ms: 0.190539 + type: 'test' + ... + # Subtest: detects claude via CLAUDE_API_KEY + ok 4 - detects claude via CLAUDE_API_KEY + --- + duration_ms: 0.219473 + type: 'test' + ... + # Subtest: detects claude via ANTHROPIC_API_KEY + ok 5 - detects claude via ANTHROPIC_API_KEY + --- + duration_ms: 0.149507 + type: 'test' + ... + # Subtest: detects gemini via GEMINI_API_KEY + ok 6 - detects gemini via GEMINI_API_KEY + --- + duration_ms: 0.193199 + type: 'test' + ... + # Subtest: detects gemini via GOOGLE_API_KEY + ok 7 - detects gemini via GOOGLE_API_KEY + --- + duration_ms: 0.130806 + type: 'test' + ... + # Subtest: detects antigravity via ANTIGRAVITY_API_KEY + ok 8 - detects antigravity via ANTIGRAVITY_API_KEY + --- + duration_ms: 0.121383 + type: 'test' + ... + # Subtest: detects antigravity via ANTIGRAVITY_SESSION_ID + ok 9 - detects antigravity via ANTIGRAVITY_SESSION_ID + --- + duration_ms: 0.209194 + type: 'test' + ... + # Subtest: detects qwen via QWEN_API_KEY + ok 10 - detects qwen via QWEN_API_KEY + --- + duration_ms: 0.158006 + type: 'test' + ... + # Subtest: returns null if no platform detected + ok 11 - returns null if no platform detected + --- + duration_ms: 0.172277 + type: 'test' + ... + 1..11 + ok 1 - detectPlatform + --- + duration_ms: 2.888545 + type: 'suite' + ... + 1..1 +ok 177 - Platform Utilities + --- + duration_ms: 3.017492 + type: 'suite' + ... +# Subtest: File Utilities + # Subtest: ensureDir + # Subtest: creates directory if it does not exist + ok 1 - creates directory if it does not exist + --- + duration_ms: 1.946359 + type: 'test' + ... + # Subtest: does nothing if directory already exists + ok 2 - does nothing if directory already exists + --- + duration_ms: 0.411573 + type: 'test' + ... + # Subtest: creates nested directories recursively + ok 3 - creates nested directories recursively + --- + duration_ms: 0.317158 + type: 'test' + ... + 1..3 + ok 1 - ensureDir + --- + duration_ms: 4.196738 + type: 'suite' + ... + 1..1 +ok 178 - File Utilities + --- + duration_ms: 4.453123 + type: 'suite' + ... +# Subtest: String Utilities + # Subtest: relayListLabel + # Subtest: joins relay URLs with comma and space + ok 1 - joins relay URLs with comma and space + --- + duration_ms: 0.192083 + type: 'test' + ... + # Subtest: handles single relay + ok 2 - handles single relay + --- + duration_ms: 0.121251 + type: 'test' + ... + # Subtest: handles empty array + ok 3 - handles empty array + --- + duration_ms: 0.108345 + type: 'test' + ... + 1..3 + ok 1 - relayListLabel + --- + duration_ms: 0.563226 + type: 'suite' + ... + 1..1 +ok 179 - String Utilities + --- + duration_ms: 0.70462 + type: 'suite' + ... +# Subtest: passes when artifacts include metadata and failure IDs map to unresolved known issue entries +ok 180 - passes when artifacts include metadata and failure IDs map to unresolved known issue entries + --- + duration_ms: 83.055153 + type: 'test' + ... +# Subtest: fails when required metadata is missing from artifacts +ok 181 - fails when required metadata is missing from artifacts + --- + duration_ms: 68.262013 + type: 'test' + ... +# Subtest: fails when failure identifiers are not cross-linked to known issues or incidents +ok 182 - fails when failure identifiers are not cross-linked to known issues or incidents + --- + duration_ms: 70.681035 + type: 'test' + ... +1..182 +# tests 333 +# suites 42 +# pass 318 +# fail 8 +# cancelled 6 +# skipped 1 +# todo 0 +# duration_ms 16535.236708 diff --git a/test_output_2.txt b/test_output_2.txt new file mode 100644 index 0000000..378500b --- /dev/null +++ b/test_output_2.txt @@ -0,0 +1,3590 @@ + +> torch-lock@0.1.0 test +> npm run validate:scheduler && npm run test:integration:e2e && node --test --test-timeout=30000 test/*.test.mjs test/*.test.js + + +> torch-lock@0.1.0 validate:scheduler +> node scripts/validate-scheduler-roster.mjs && node scripts/validate-prompt-contract.mjs && node scripts/validate-scheduler-flow-parity.mjs && npm run validate:scheduler-failure-schema + +Scheduler tables, roster, and prompt filenames are in sync. +Prompt contract validated for all daily/weekly prompts. +Scheduler flow parity validated for prompts and scheduler implementation. + +> torch-lock@0.1.0 validate:scheduler-failure-schema +> node --test test/scheduler-lock-failure-schema.contract.test.mjs + +TAP version 13 +# Subtest: scheduler lock backend failure artifact matches required frontmatter schema +ok 1 - scheduler lock backend failure artifact matches required frontmatter schema + --- + duration_ms: 112.503691 + type: 'test' + ... +# Subtest: schema contract catches missing required lock-backend field +ok 2 - schema contract catches missing required lock-backend field + --- + duration_ms: 1.997963 + type: 'test' + ... +# Subtest: schema contract catches misnamed lock-backend key +ok 3 - schema contract catches misnamed lock-backend key + --- + duration_ms: 0.520114 + type: 'test' + ... +1..3 +# tests 3 +# suites 0 +# pass 3 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 200.335426 + +> torch-lock@0.1.0 test:integration:e2e +> node --test test/scheduler-preflight-lock.e2e.test.mjs + +TAP version 13 +# Subtest: lock preflight e2e: successful lock writes completed status snapshot +ok 1 - lock preflight e2e: successful lock writes completed status snapshot + --- + duration_ms: 401.068236 + type: 'test' + ... +# Subtest: lock preflight e2e: exit code 2 quorum failure persists failed backend status and prompt-not-started marker +ok 2 - lock preflight e2e: exit code 2 quorum failure persists failed backend status and prompt-not-started marker + --- + duration_ms: 103.171124 + type: 'test' + ... +# Subtest: lock preflight e2e: non-lock failure exits failed without prompt parse/schema classification +ok 3 - lock preflight e2e: non-lock failure exits failed without prompt parse/schema classification + --- + duration_ms: 98.765487 + type: 'test' + ... +1..3 +# tests 3 +# suites 0 +# pass 3 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 687.914117 +TAP version 13 +# Subtest: Build artifacts verification +ok 1 - Build artifacts verification # SKIP dist/ not found — run npm run build first + --- + duration_ms: 0.876534 + type: 'test' + ... +# Subtest: parseArgs should parse basic command +ok 2 - parseArgs should parse basic command + --- + duration_ms: 1.699098 + type: 'test' + ... +# Subtest: parseArgs should parse agent and cadence +ok 3 - parseArgs should parse agent and cadence + --- + duration_ms: 0.292794 + type: 'test' + ... +# Subtest: parseArgs should parse equals sign syntax +ok 4 - parseArgs should parse equals sign syntax + --- + duration_ms: 1.868723 + type: 'test' + ... +# Subtest: parseArgs should parse dry-run flag +ok 5 - parseArgs should parse dry-run flag + --- + duration_ms: 0.429824 + type: 'test' + ... +# Subtest: parseArgs should parse port with default +ok 6 - parseArgs should parse port with default + --- + duration_ms: 0.244597 + type: 'test' + ... +# Subtest: parseArgs should parse custom port +ok 7 - parseArgs should parse custom port + --- + duration_ms: 0.17927 + type: 'test' + ... +# Subtest: parseArgs should parse ignore-logs flag +ok 8 - parseArgs should parse ignore-logs flag + --- + duration_ms: 0.309812 + type: 'test' + ... +# Subtest: parseArgs should parse memory flags +ok 9 - parseArgs should parse memory flags + --- + duration_ms: 1.208132 + type: 'test' + ... +# Subtest: parseArgs should parse memory flags with equals +ok 10 - parseArgs should parse memory flags with equals + --- + duration_ms: 0.579477 + type: 'test' + ... +# Subtest: cmdList + # Subtest: should list active locks and identify unknown agents + ok 1 - should list active locks and identify unknown agents + --- + duration_ms: 3.344474 + type: 'test' + ... + 1..1 +ok 11 - cmdList + --- + duration_ms: 5.37821 + type: 'suite' + ... +# No TORCH installation detected in this directory. +# Looked for: +# - A torch/ subdirectory containing roster.json or bin/ +# - A package.json with name "torch-lock" (root install) +# Initializing torch in /app/test-ops-remove-fAr50s/project-force/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-fAr50s/project-force/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - src/proposals/ (governance proposals) +# - torch-lock npm package (via npm uninstall) +# Removing TORCH... +# No package.json found in host root. Skipping script injection. +# Removed torch/ (TORCH install directory) +# Removed torch-config.json +# Removed .torch/ (prompt history) +# Removed src/proposals/ (governance proposals) +# Removed empty src/ directory +# Running npm uninstall torch-lock... +# Uninstalled torch-lock package. +# TORCH has been completely removed from this project. +# If you used TORCH environment variables (NOSTR_LOCK_*, TORCH_*), +# remember to remove them from your shell profile or CI configuration. +# Initializing torch in /app/test-ops-remove-fAr50s/project-runtime/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-fAr50s/project-runtime/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# No package.json found in host root. Skipping script injection. +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - .scheduler-memory/ (memory store) +# - task-logs/ (scheduler logs) +# - src/proposals/ (governance proposals) +# - torch-lock npm package (via npm uninstall) +# Removing TORCH... +# Removed torch/ (TORCH install directory) +# Removed torch-config.json +# Removed .torch/ (prompt history) +# Removed .scheduler-memory/ (memory store) +# Removed task-logs/ (scheduler logs) +# Removed src/proposals/ (governance proposals) +# Removed empty src/ directory +# Running npm uninstall torch-lock... +# Uninstalled torch-lock package. +# TORCH has been completely removed from this project. +# If you used TORCH environment variables (NOSTR_LOCK_*, TORCH_*), +# remember to remove them from your shell profile or CI configuration. +# Initializing torch in /app/test-ops-remove-fAr50s/project-proposals/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-fAr50s/project-proposals/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# No package.json found in host root. Skipping script injection. +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - src/proposals/ (governance proposals) +# - torch-lock npm package (via npm uninstall) +# Removing TORCH... +# Removed torch/ (TORCH install directory) +# Removed torch-config.json +# Removed .torch/ (prompt history) +# Removed src/proposals/ (governance proposals) +# Removed empty src/ directory +# Running npm uninstall torch-lock... +# Uninstalled torch-lock package. +# TORCH has been completely removed from this project. +# If you used TORCH environment variables (NOSTR_LOCK_*, TORCH_*), +# remember to remove them from your shell profile or CI configuration. +# Initializing torch in /app/test-ops-remove-fAr50s/project-scripts/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-fAr50s/project-scripts/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Added script: "torch:dashboard" +# Added script: "torch:check" +# Added script: "torch:lock" +# Added script: "torch:health" +# Added script: "torch:memory:list" +# Added script: "torch:memory:inspect" +# Updated package.json with convenience scripts. +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - src/proposals/ (governance proposals) +# - torch:* scripts from package.json +# - torch-lock npm package (via npm uninstall) +# Removing TORCH... +# Removed torch/ (TORCH install directory) +# Removed torch-config.json +# Removed .torch/ (prompt history) +# Removed src/proposals/ (governance proposals) +# Removed empty src/ directory +# Removed script: "torch:dashboard" +# Removed script: "torch:check" +# Removed script: "torch:lock" +# Removed script: "torch:health" +# Removed script: "torch:memory:list" +# Removed script: "torch:memory:inspect" +# Updated package.json. +# Running npm uninstall torch-lock... +# Uninstalled torch-lock package. +# TORCH has been completely removed from this project. +# If you used TORCH environment variables (NOSTR_LOCK_*, TORCH_*), +# remember to remove them from your shell profile or CI configuration. +# Initializing torch in /app/test-ops-remove-fAr50s/project-cancel/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-fAr50s/project-cancel/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# No package.json found in host root. Skipping script injection. +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - src/proposals/ (governance proposals) +# - torch-lock npm package (via npm uninstall) +# Removal cancelled. +# Initializing torch in /app/test-ops-remove-fAr50s/project-confirm/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-fAr50s/project-confirm/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# No package.json found in host root. Skipping script injection. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - src/proposals/ (governance proposals) +# - torch-lock npm package (via npm uninstall) +# Removing TORCH... +# Removed torch/ (TORCH install directory) +# Removed torch-config.json +# Removed .torch/ (prompt history) +# Removed src/proposals/ (governance proposals) +# Removed empty src/ directory +# Running npm uninstall torch-lock... +# Uninstalled torch-lock package. +# TORCH has been completely removed from this project. +# If you used TORCH environment variables (NOSTR_LOCK_*, TORCH_*), +# remember to remove them from your shell profile or CI configuration. +# Subtest: cmdRemove reports nothing when no TORCH installation exists +ok 12 - cmdRemove reports nothing when no TORCH installation exists + --- + duration_ms: 2.914224 + type: 'test' + ... +# Subtest: cmdRemove with --force removes torch/ directory +ok 13 - cmdRemove with --force removes torch/ directory + --- + duration_ms: 1002.625355 + type: 'test' + ... +# Subtest: cmdRemove removes runtime artifacts (task-logs, .scheduler-memory) +ok 14 - cmdRemove removes runtime artifacts (task-logs, .scheduler-memory) + --- + duration_ms: 891.047212 + type: 'test' + ... +# Subtest: cmdRemove removes src/proposals/ and cleans empty src/ +ok 15 - cmdRemove removes src/proposals/ and cleans empty src/ + --- + duration_ms: 893.929927 + type: 'test' + ... +# Subtest: cmdRemove cleans torch:* scripts from host package.json +ok 16 - cmdRemove cleans torch:* scripts from host package.json + --- + duration_ms: 482.625626 + type: 'test' + ... +# Subtest: cmdRemove cancels when user declines confirmation +ok 17 - cmdRemove cancels when user declines confirmation + --- + duration_ms: 33.342227 + type: 'test' + ... +# Subtest: cmdRemove confirmed via mockAnswers removes artifacts +ok 18 - cmdRemove confirmed via mockAnswers removes artifacts + --- + duration_ms: 999.272394 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: enabled (Basic Auth) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Subtest: Dashboard Authentication + # Subtest: returns 401 when auth is required but missing + ok 1 - returns 401 when auth is required but missing + --- + duration_ms: 34.762615 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: enabled (Basic Auth) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: returns 401 when malformed auth header is provided + ok 2 - returns 401 when malformed auth header is provided + --- + duration_ms: 10.906274 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: enabled (Basic Auth) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: returns 200 when valid credentials are provided + ok 3 - returns 200 when valid credentials are provided + --- + duration_ms: 8.134352 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: enabled (Basic Auth) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: returns 401 when password has different byte length than stored credential + ok 4 - returns 401 when password has different byte length than stored credential + --- + duration_ms: 14.496535 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: returns 200 when auth is disabled + ok 5 - returns 200 when auth is disabled + --- + duration_ms: 5.555415 + type: 'test' + ... + 1..5 +ok 19 - Dashboard Authentication + --- + duration_ms: 77.162473 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Subtest: Dashboard Configuration Exposure Security +ok 20 - Dashboard Configuration Exposure Security + --- + duration_ms: 40.217866 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Subtest: Dashboard Configuration Security + # Subtest: sanitizes config when auth is disabled + ok 1 - sanitizes config when auth is disabled + --- + duration_ms: 34.997269 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: enabled (Basic Auth) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: sanitizes auth credentials even when authenticated + ok 2 - sanitizes auth credentials even when authenticated + --- + duration_ms: 11.355856 + type: 'test' + ... + 1..2 +ok 21 - Dashboard Configuration Security + --- + duration_ms: 48.977792 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# Authentication: DISABLED (Dashboard is public) +# NODE_V8_COVERAGE: undefined +# Subtest: Dashboard Path Traversal Security Fix + # Subtest: allows access to valid dashboard index + ok 1 - allows access to valid dashboard index + --- + duration_ms: 33.242594 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /../../etc/passwd + ok 2 - blocks traversal attempt: /../../etc/passwd + --- + duration_ms: 8.232942 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /dashboard/../../etc/passwd + ok 3 - blocks traversal attempt: /dashboard/../../etc/passwd + --- + duration_ms: 4.816203 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /dashboard/../../../etc/passwd + ok 4 - blocks traversal attempt: /dashboard/../../../etc/passwd + --- + duration_ms: 4.567576 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /../package.json + ok 5 - blocks traversal attempt: /../package.json + --- + duration_ms: 6.462213 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /dashboard/../package.json + ok 6 - blocks traversal attempt: /dashboard/../package.json + --- + duration_ms: 4.170153 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /dashboard/%2e%2e/package.json + ok 7 - blocks traversal attempt: /dashboard/%2e%2e/package.json + --- + duration_ms: 3.730948 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /dashboard/%2e%2e%2fpackage.json + ok 8 - blocks traversal attempt: /dashboard/%2e%2e%2fpackage.json + --- + duration_ms: 3.285607 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# Authentication: DISABLED (Dashboard is public) +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /..%2fpackage.json + ok 9 - blocks traversal attempt: /..%2fpackage.json + --- + duration_ms: 5.053712 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) +# (node:14125) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added to [process]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit +# (Use `node --trace-warnings ...` to show where the warning was created) +# (node:14125) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added to [process]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit + # Subtest: blocks traversal attempt: /%2e%2e%2fpackage.json + ok 10 - blocks traversal attempt: /%2e%2e%2fpackage.json + --- + duration_ms: 4.528165 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /dashboard/..%5cpackage.json + ok 11 - blocks traversal attempt: /dashboard/..%5cpackage.json + --- + duration_ms: 4.317237 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /dashboard/..%252fpackage.json + ok 12 - blocks traversal attempt: /dashboard/..%252fpackage.json + --- + duration_ms: 4.834175 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /dashboard/....//package.json + ok 13 - blocks traversal attempt: /dashboard/....//package.json + --- + duration_ms: 3.967392 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /dashboard/.../package.json + ok 14 - blocks traversal attempt: /dashboard/.../package.json + --- + duration_ms: 3.167547 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: //etc/passwd + ok 15 - blocks traversal attempt: //etc/passwd + --- + duration_ms: 2.442763 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /dashboard//../../etc/passwd + ok 16 - blocks traversal attempt: /dashboard//../../etc/passwd + --- + duration_ms: 2.673241 + type: 'test' + ... + # Subtest: allows traversal within allowed paths + ok 17 - allows traversal within allowed paths + --- + duration_ms: 3.867742 + type: 'test' + ... + 1..17 +ok 22 - Dashboard Path Traversal Security Fix + --- + duration_ms: 109.296946 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Authentication: DISABLED (Dashboard is public) +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Subtest: Dashboard File Access Security + # Subtest: allows access to dashboard assets + ok 1 - allows access to dashboard assets + --- + duration_ms: 32.201177 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: allows access to global assets + ok 2 - allows access to global assets + --- + duration_ms: 11.723712 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: allows access to landing page + ok 3 - allows access to landing page + --- + duration_ms: 7.432312 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks access to package.json + ok 4 - blocks access to package.json + --- + duration_ms: 7.994246 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks access to src/dashboard.mjs + ok 5 - blocks access to src/dashboard.mjs + --- + duration_ms: 6.147004 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks access to random root files + ok 6 - blocks access to random root files + --- + duration_ms: 3.832802 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Authentication: DISABLED (Dashboard is public) +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: allows access to torch-config.json via special handler + ok 7 - allows access to torch-config.json via special handler + --- + duration_ms: 4.615411 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks directory traversal attempts + ok 8 - blocks directory traversal attempts + --- + duration_ms: 3.581146 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: responses include security headers + ok 9 - responses include security headers + --- + duration_ms: 6.559519 + type: 'test' + ... + # Subtest: error responses include security headers + ok 10 - error responses include security headers + --- + duration_ms: 5.075616 + type: 'test' + ... + 1..10 +ok 23 - Dashboard File Access Security + --- + duration_ms: 94.102754 + type: 'test' + ... +# Subtest: ExitError + # Subtest: should capture the code and message correctly + ok 1 - should capture the code and message correctly + --- + duration_ms: 1.007425 + type: 'test' + ... + # Subtest: should be an instance of Error and ExitError + ok 2 - should be an instance of Error and ExitError + --- + duration_ms: 0.28056 + type: 'test' + ... + # Subtest: should have a stack trace + ok 3 - should have a stack trace + --- + duration_ms: 0.566292 + type: 'test' + ... + # Subtest: should have the correct name + ok 4 - should have the correct name + --- + duration_ms: 0.187627 + type: 'test' + ... + 1..4 +ok 24 - ExitError + --- + duration_ms: 3.552883 + type: 'suite' + ... +# Subtest: createProposal should throw error for disallowed target +ok 25 - createProposal should throw error for disallowed target + --- + duration_ms: 6.912075 + type: 'test' + ... +# Subtest: validateProposal should return invalid for disallowed target +ok 26 - validateProposal should return invalid for disallowed target + --- + duration_ms: 10.277232 + type: 'test' + ... +# Subtest: validateProposal should return valid for allowed target +ok 27 - validateProposal should return valid for allowed target + --- + duration_ms: 6.587953 + type: 'test' + ... +# Subtest: Governance Service Security: Command Injection Prevention +ok 28 - Governance Service Security: Command Injection Prevention + --- + duration_ms: 175.469593 + type: 'test' + ... +# Subtest: SCN-proposal-create: createProposal writes meta.json, new.md, change.diff +ok 29 - SCN-proposal-create: createProposal writes meta.json, new.md, change.diff + --- + duration_ms: 19.800448 + type: 'test' + ... +# Subtest: SCN-proposal-list: listProposals returns created proposal; status filter works +ok 30 - SCN-proposal-list: listProposals returns created proposal; status filter works + --- + duration_ms: 3.06789 + type: 'test' + ... +# Subtest: SCN-proposal-reject: rejectProposal marks proposal with rejected status and reason +ok 31 - SCN-proposal-reject: rejectProposal marks proposal with rejected status and reason + --- + duration_ms: 17.930191 + type: 'test' + ... +# Subtest: SCN-archive-naming: applyProposal archives with timestamp_hash filename and sidecar +ok 32 - SCN-archive-naming: applyProposal archives with timestamp_hash filename and sidecar + --- + duration_ms: 46.707983 + type: 'test' + ... +# Subtest: SCN-version-list: listPromptVersions returns versions newest-first with metadata +ok 33 - SCN-version-list: listPromptVersions returns versions newest-first with metadata + --- + duration_ms: 16.441999 + type: 'test' + ... +# Subtest: SCN-rollback-latest: rollbackPrompt restores the most recently archived content +ok 34 - SCN-rollback-latest: rollbackPrompt restores the most recently archived content + --- + duration_ms: 7.004725 + type: 'test' + ... +# Subtest: SCN-rollback-hash: rollbackPrompt --strategy restores matching archive +ok 35 - SCN-rollback-hash: rollbackPrompt --strategy restores matching archive + --- + duration_ms: 5.622313 + type: 'test' + ... +# Initializing torch in /app/test_validation_env/valid-dir_123... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created valid-dir_123/roster.json +# Created valid-dir_123/META_PROMPTS.md +# Created valid-dir_123/scheduler-flow.md +# Created valid-dir_123/daily-scheduler.md +# Created valid-dir_123/weekly-scheduler.md +# Created 23 files in valid-dir_123/prompts/daily/ +# Created 24 files in valid-dir_123/prompts/weekly/ +# Created test_validation_env/valid-dir_123/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created valid-dir_123/TORCH_DASHBOARD.md +# Added script: "torch:dashboard" +# Added script: "torch:check" +# Added script: "torch:lock" +# Added script: "torch:health" +# Added script: "torch:memory:list" +# Added script: "torch:memory:inspect" +# Updated package.json with convenience scripts. +# Initialization complete. +# You can now customize the files in valid-dir_123/ +# ● From torch-config.json: +# - Hashtag: ns-agent-lock +# - Namespace: ns +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=ns-agent-lock&namespace=ns&relays= +# Initializing torch in /app/test_validation_env... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Skipping package.json to avoid overwriting host package.json (installing to root). +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created roster.json +# Created META_PROMPTS.md +# Created scheduler-flow.md +# Created daily-scheduler.md +# Created weekly-scheduler.md +# Created 23 files in prompts/daily/ +# Created 24 files in prompts/weekly/ +# Created test_validation_env/.gitignore with node_modules +# Updating existing torch-config.json... +# Saved configuration to torch-config.json +# Created TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in / +# ● From torch-config.json: +# - Hashtag: ns-agent-lock +# - Namespace: ns +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=ns-agent-lock&namespace=ns&relays= +# Initializing torch in /app/test_validation_env/path/to/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created path/to/torch/roster.json +# Created path/to/torch/META_PROMPTS.md +# Created path/to/torch/scheduler-flow.md +# Created path/to/torch/daily-scheduler.md +# Created path/to/torch/weekly-scheduler.md +# Created 23 files in path/to/torch/prompts/daily/ +# Created 24 files in path/to/torch/prompts/weekly/ +# Created test_validation_env/path/to/torch/.gitignore with node_modules +# Updating existing torch-config.json... +# Saved configuration to torch-config.json +# Created path/to/torch/TORCH_DASHBOARD.md +# Script "torch:dashboard" already exists, skipping. +# Script "torch:check" already exists, skipping. +# Script "torch:lock" already exists, skipping. +# Script "torch:health" already exists, skipping. +# Script "torch:memory:list" already exists, skipping. +# Script "torch:memory:inspect" already exists, skipping. +# Initialization complete. +# You can now customize the files in path/to/torch/ +# ● From torch-config.json: +# - Hashtag: ns-agent-lock +# - Namespace: ns +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=ns-agent-lock&namespace=ns&relays= +# Subtest: cmdInit should validate install directory name + # Subtest: should reject directory with semicolon + ok 1 - should reject directory with semicolon + --- + duration_ms: 1.648571 + type: 'test' + ... + # Subtest: should reject directory with spaces + ok 2 - should reject directory with spaces + --- + duration_ms: 0.412829 + type: 'test' + ... + # Subtest: should reject directory with quotes + ok 3 - should reject directory with quotes + --- + duration_ms: 0.35902 + type: 'test' + ... + # Subtest: should reject directory with backticks + ok 4 - should reject directory with backticks + --- + duration_ms: 0.365956 + type: 'test' + ... + # Subtest: should reject directory with $ + ok 5 - should reject directory with $ + --- + duration_ms: 0.271567 + type: 'test' + ... + # Subtest: should accept valid directory names + ok 6 - should accept valid directory names + --- + duration_ms: 43.903373 + type: 'test' + ... + # Subtest: should accept "." + ok 7 - should accept "." + --- + duration_ms: 35.730113 + type: 'test' + ... + # Subtest: should accept nested paths with slashes + ok 8 - should accept nested paths with slashes + --- + duration_ms: 34.454813 + type: 'test' + ... + 1..8 +ok 36 - cmdInit should validate install directory name + --- + duration_ms: 177.310563 + type: 'test' + ... +# file:///app/src/relay-health.mjs:7 +# import { withTimeout } from './utils.mjs'; +# ^^^^^^^^^^^ +# SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout' +# at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) +# at async ModuleJob.run (node:internal/modules/esm/module_job:335:5) +# at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) +# at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) +# Node.js v22.22.0 +# Subtest: test/lib.test.mjs +not ok 15 - test/lib.test.mjs + --- + duration_ms: 151.489996 + type: 'test' + location: '/app/test/lib.test.mjs:1:1' + failureType: 'testCodeFailure' + exitCode: 1 + signal: ~ + error: 'test failed' + code: 'ERR_TEST_FAILURE' + ... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# Published to 1/3 relays (required=1, timeout=25ms) +# [publish:primary] Publishing to 2 relays (wss://relay-a, wss://relay-b)... +# [publish:primary] Publishing to 2 relays (wss://relay-a, wss://relay-b)... +# Published to 2/2 relays (required=2, timeout=25ms) +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# Published to 2/3 relays (required=2, timeout=25ms) +# (node:14284) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time +# (Use `node --trace-warnings ...` to show where the warning was created) +# Subtest: ci-resilience lock acquisition under unstable relays + # Subtest: recovers after all relays are down for an initial outage window + ok 1 - recovers after all relays are down for an initial outage window + --- + duration_ms: 23.562251 + type: 'test' + ... + # Subtest: survives intermittent timeout spikes and reaches quorum with bounded retries + ok 2 - survives intermittent timeout spikes and reaches quorum with bounded retries + --- + duration_ms: 2.159553 + type: 'test' + ... + # Subtest: handles staggered relay recovery and never exceeds retry budget + ok 3 - handles staggered relay recovery and never exceeds retry budget + --- + duration_ms: 3.65465 + type: 'test' + ... + 1..3 +ok 38 - ci-resilience lock acquisition under unstable relays + --- + duration_ms: 31.268634 + type: 'suite' + ... +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# Published to 1/1 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# Published to 1/1 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# (node:14291) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time +# (Use `node --trace-warnings ...` to show where the warning was created) +# Subtest: publishLock retry behavior + # Subtest: succeeds immediately on first attempt without retries + ok 1 - succeeds immediately on first attempt without retries + --- + duration_ms: 6.422437 + type: 'test' + ... + # Subtest: retries a transient failure then succeeds within retry budget with bounded jitter + ok 2 - retries a transient failure then succeeds within retry budget with bounded jitter + --- + duration_ms: 3.149548 + type: 'test' + ... + # Subtest: returns terminal relay_publish_quorum_failure after exhausting retry budget + ok 3 - returns terminal relay_publish_quorum_failure after exhausting retry budget + --- + duration_ms: 3.503316 + type: 'test' + ... + # Subtest: short-circuits non-retryable failures without extra attempts + ok 4 - short-circuits non-retryable failures without extra attempts + --- + duration_ms: 2.052731 + type: 'test' + ... + 1..4 +ok 39 - publishLock retry behavior + --- + duration_ms: 16.964175 + type: 'suite' + ... +# Subtest: lock-ops + # Subtest: parseLockEvent + # Subtest: parses a valid lock event correctly + ok 1 - parses a valid lock event correctly + --- + duration_ms: 1.925466 + type: 'test' + ... + # Subtest: returns nulls when content is invalid JSON + ok 2 - returns nulls when content is invalid JSON + --- + duration_ms: 0.5459 + type: 'test' + ... + # Subtest: returns nulls when required content fields are missing + ok 3 - returns nulls when required content fields are missing + --- + duration_ms: 0.378491 + type: 'test' + ... + # Subtest: returns nulls when content is an array (not object) + ok 4 - returns nulls when content is an array (not object) + --- + duration_ms: 0.551868 + type: 'test' + ... + 1..4 + ok 1 - parseLockEvent + --- + duration_ms: 4.570151 + type: 'suite' + ... +# [publish:primary] Publishing to 2 relays (wss://primary-a, wss://primary-b)... +# [publish:primary] Publishing to 2 relays (wss://primary-a, wss://primary-b)... +# Published to 2/2 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://primary-down)... +# [publish:primary] Publishing to 1 relays (wss://primary-down)... +# [publish:primary] Publishing to 1 relays (wss://primary-down)... +# [publish:primary] Publishing to 1 relays (wss://primary-bad)... +# [publish:primary] Publishing to 5 relays (relay-timeout, wss://dns, wss://tcp, wss://tls, wss://ws)... +# [publish:primary] Publishing to 2 relays (wss://relay-bad, wss://relay-ok)... +# {"event":"lock_publish_quorum_met","correlationId":"9ab8671c-8b92-40e4-922f-f9de83e3b4ee","attemptId":"a8374b2a-8e80-4e65-9904-6d53d79123e6","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":1}],"totalElapsedMs":1} +# Published to 1/2 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://primary-bad)... +# [publish:fallback] Publishing to 1 relays (wss://fallback-ok)... +# {"event":"lock_publish_quorum_met","correlationId":"70d5e345-46fa-423c-b196-1d3027f5d001","attemptId":"a14c3e1f-6fdd-4f6a-b2e4-8f0acc75adce","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":1}],"totalElapsedMs":1} +# Published to 1/2 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 2 relays (wss://bad, wss://healthy)... +# {"event":"lock_publish_quorum_met","correlationId":"359d992a-a624-4e17-8a31-5ec854f27ee9","attemptId":"413255a5-86c0-40ef-9502-8a6909e265bf","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":0}],"totalElapsedMs":0} +# Published to 1/2 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 2 relays (wss://healthy, wss://bad)... +# {"event":"lock_publish_quorum_met","correlationId":"5052901d-4c32-4df6-b9bd-fb6b46e54718","attemptId":"ef071541-0a5f-4202-ab5d-e0be4edab78c","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":1}],"totalElapsedMs":1} +# Published to 1/2 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://healthy)... +# {"event":"lock_publish_quorum_met","correlationId":"0cc0b9dd-f990-48a6-8299-1c2c29c2d888","attemptId":"c15c75a8-f0bf-47c0-a8ab-7d21ba6e1d2b","publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"elapsedMs":0}],"totalElapsedMs":0} +# Published to 1/1 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://healthy)... +# {"event":"lock_publish_quorum_met","correlationId":"4af31f78-178f-44ef-b9b4-acc57c045e7f","attemptId":"6cadf99a-7b2f-4d94-8fee-c82cf8a29391","publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"elapsedMs":1}],"totalElapsedMs":1} +# Published to 1/1 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 2 relays (wss://primary-a, wss://primary-b)... +# [publish:fallback] Publishing to 1 relays (wss://fallback-healthy)... +# {"event":"lock_publish_quorum_met","correlationId":"1b155e0c-6344-4364-a67c-a3a326f12ff0","attemptId":"1c0a01dd-63bf-4224-972a-303c387d3491","publishAttempt":1,"successCount":1,"relayAttemptedCount":3,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":3,"elapsedMs":1}],"totalElapsedMs":1} +# Published to 1/3 relays (required=1, timeout=200ms) + # Subtest: queryLocks + # Subtest: falls back to fallback relays when primary query fails + ok 1 - falls back to fallback relays when primary query fails + --- + duration_ms: 28.161499 + type: 'test' + ... + 1..1 + ok 2 - queryLocks + --- + duration_ms: 28.675587 + type: 'suite' + ... + # Subtest: publishLock + # Subtest: retries transient failures and succeeds on a later attempt + ok 1 - retries transient failures and succeeds on a later attempt + --- + duration_ms: 5.41029 + type: 'test' + ... + # Subtest: fails after retry budget is exhausted for persistent transient failures + ok 2 - fails after retry budget is exhausted for persistent transient failures + --- + duration_ms: 3.611169 + type: 'test' + ... + # Subtest: fails without retry for persistent validation failures + ok 3 - fails without retry for persistent validation failures + --- + duration_ms: 1.718899 + type: 'test' + ... + # Subtest: includes per-relay reason categories and retry metadata in failure diagnostics + ok 4 - includes per-relay reason categories and retry metadata in failure diagnostics + --- + duration_ms: 4.166992 + type: 'test' + ... + # Subtest: returns success when mixed relay outcomes still satisfy quorum + ok 5 - returns success when mixed relay outcomes still satisfy quorum + --- + duration_ms: 1.53237 + type: 'test' + ... + # Subtest: uses fallback relays to satisfy min success quorum + ok 6 - uses fallback relays to satisfy min success quorum + --- + duration_ms: 1.22949 + type: 'test' + ... + # Subtest: quarantines repeatedly failing relays and still reaches quorum with one healthy relay + ok 7 - quarantines repeatedly failing relays and still reaches quorum with one healthy relay + --- + duration_ms: 2.456511 + type: 'test' + ... + # Subtest: uses fallback and min active pool to reintroduce quarantined relay when needed + ok 8 - uses fallback and min active pool to reintroduce quarantined relay when needed + --- + duration_ms: 1.18479 + type: 'test' + ... + 1..8 + ok 3 - publishLock + --- + duration_ms: 22.164954 + type: 'suite' + ... + 1..3 +ok 40 - lock-ops + --- + duration_ms: 56.487828 + type: 'suite' + ... +# Warning: Failed to read log dir logs/daily: Permission denied +# Subtest: getCompletedAgents + # Subtest: returns empty set if directory read fails (non-ENOENT) + ok 1 - returns empty set if directory read fails (non-ENOENT) + --- + duration_ms: 2.53566 + type: 'test' + ... + # Subtest: returns empty set if directory does not exist (ENOENT) + ok 2 - returns empty set if directory does not exist (ENOENT) + --- + duration_ms: 0.348451 + type: 'test' + ... + # Subtest: identifies daily completed agents correctly + ok 3 - identifies daily completed agents correctly + --- + duration_ms: 0.640237 + type: 'test' + ... + # Subtest: identifies weekly completed agents correctly + ok 4 - identifies weekly completed agents correctly + --- + duration_ms: 0.496827 + type: 'test' + ... + 1..4 +ok 41 - getCompletedAgents + --- + duration_ms: 5.949139 + type: 'test' + ... +# Subtest: main dispatch + # Subtest: should exit with code 1 if no command provided + not ok 1 - should exit with code 1 if no command provided + --- + duration_ms: 0 + type: 'test' + location: '/app/test/main-dispatch.test.mjs:47:3' + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: should exit with code 1 if unknown command provided + not ok 2 - should exit with code 1 if unknown command provided + --- + duration_ms: 0 + type: 'test' + location: '/app/test/main-dispatch.test.mjs:54:3' + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: should exit with code 1 if check command misses cadence + not ok 3 - should exit with code 1 if check command misses cadence + --- + duration_ms: 0 + type: 'test' + location: '/app/test/main-dispatch.test.mjs:63:3' + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: should exit with code 1 if lock command misses agent + not ok 4 - should exit with code 1 if lock command misses agent + --- + duration_ms: 0 + type: 'test' + location: '/app/test/main-dispatch.test.mjs:72:3' + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: should exit with code 1 if complete command misses agent + not ok 5 - should exit with code 1 if complete command misses agent + --- + duration_ms: 0 + type: 'test' + location: '/app/test/main-dispatch.test.mjs:81:3' + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + # Subtest: should exit with code 1 if proposal command misses subcommand + not ok 6 - should exit with code 1 if proposal command misses subcommand + --- + duration_ms: 0 + type: 'test' + location: '/app/test/main-dispatch.test.mjs:90:3' + failureType: 'cancelledByParent' + error: 'test did not finish before its parent and was cancelled' + code: 'ERR_TEST_FAILURE' + ... + 1..6 +not ok 42 - main dispatch + --- + duration_ms: 120.251049 + type: 'suite' + location: '/app/test/main-dispatch.test.mjs:14:1' + failureType: 'hookFailed' + error: "The requested module './utils.mjs' does not provide an export named 'withTimeout'" + code: 'ERR_TEST_FAILURE' + name: 'SyntaxError' + stack: |- + ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) + async ModuleJob.run (node:internal/modules/esm/module_job:335:5) + async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) + async SuiteContext. (file:///app/test/main-dispatch.test.mjs:30:17) + async TestHook.run (node:internal/test_runner/test:1054:7) + async Suite.runHook (node:internal/test_runner/test:965:9) + async Suite.run (node:internal/test_runner/test:1436:7) + async startSubtestAfterBootstrap (node:internal/test_runner/harness:296:3) + ... +# Subtest: listMemories, inspectMemory, pinMemory, and unpinMemory support admin hooks +ok 43 - listMemories, inspectMemory, pinMemory, and unpinMemory support admin hooks + --- + duration_ms: 4.29121 + type: 'test' + ... +# Subtest: triggerPruneDryRun returns candidate metadata without deleting records +ok 44 - triggerPruneDryRun returns candidate metadata without deleting records + --- + duration_ms: 0.605917 + type: 'test' + ... +# Subtest: memoryStats reports counts/rates and retrieval telemetry remains redaction-safe +ok 45 - memoryStats reports counts/rates and retrieval telemetry remains redaction-safe + --- + duration_ms: 16.914167 + type: 'test' + ... +# Subtest: runPruneCycle respects prune feature-flag modes +ok 46 - runPruneCycle respects prune feature-flag modes + --- + duration_ms: 0.910098 + type: 'test' + ... +# Subtest: markMemoryMerged delegates to repository and clears cache +ok 47 - markMemoryMerged delegates to repository and clears cache + --- + duration_ms: 0.827764 + type: 'test' + ... +# Subtest: stores runtime events in signer/session namespace and clears scope +ok 48 - stores runtime events in signer/session namespace and clears scope + --- + duration_ms: 2.861868 + type: 'test' + ... +# Subtest: expires runtime events and records expiration metrics +ok 49 - expires runtime events and records expiration metrics + --- + duration_ms: 0.610462 + type: 'test' + ... +# Subtest: enforces LRU bounds and tracks eviction metrics +ok 50 - enforces LRU bounds and tracks eviction metrics + --- + duration_ms: 0.538013 + type: 'test' + ... +# Subtest: blocks decrypted/session-sensitive data from durable promotion without sanitizer pass +ok 51 - blocks decrypted/session-sensitive data from durable promotion without sanitizer pass + --- + duration_ms: 1.681096 + type: 'test' + ... +# Subtest: createEmbedderAdapter selects in-memory backend and supports vector CRUD +ok 52 - createEmbedderAdapter selects in-memory backend and supports vector CRUD + --- + duration_ms: 1.821874 + type: 'test' + ... +# Subtest: createEmbedderAdapter reads backend from environment +ok 53 - createEmbedderAdapter reads backend from environment + --- + duration_ms: 0.597593 + type: 'test' + ... +# Subtest: memory feature flags parse defaults and canary allow-lists +ok 54 - memory feature flags parse defaults and canary allow-lists + --- + duration_ms: 1.581226 + type: 'test' + ... +# Subtest: memory prune flag supports off, dry-run, and active modes +ok 55 - memory prune flag supports off, dry-run, and active modes + --- + duration_ms: 0.328008 + type: 'test' + ... +# Subtest: estimateTokenCount returns heuristic count +ok 56 - estimateTokenCount returns heuristic count + --- + duration_ms: 1.760405 + type: 'test' + ... +# Subtest: formatMemoryBlock converts memory record to display block +ok 57 - formatMemoryBlock converts memory record to display block + --- + duration_ms: 0.803762 + type: 'test' + ... +# Subtest: formatMemoryBlock handles missing optional fields and default clamping +ok 58 - formatMemoryBlock handles missing optional fields and default clamping + --- + duration_ms: 0.254333 + type: 'test' + ... +# Subtest: formatMemoryBlock respects custom clamping options +ok 59 - formatMemoryBlock respects custom clamping options + --- + duration_ms: 0.229306 + type: 'test' + ... +# Subtest: formatMemoryBlock handles edge cases for clamping +ok 60 - formatMemoryBlock handles edge cases for clamping + --- + duration_ms: 0.366084 + type: 'test' + ... +# Subtest: formatMemoriesForPrompt enforces token budget and k limit +ok 61 - formatMemoriesForPrompt enforces token budget and k limit + --- + duration_ms: 0.945759 + type: 'test' + ... +# Subtest: formatMemoriesForPrompt handles aggressive budget fitting +ok 62 - formatMemoriesForPrompt handles aggressive budget fitting + --- + duration_ms: 0.564382 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext injects context when enabled +ok 63 - renderPromptWithMemoryContext injects context when enabled + --- + duration_ms: 0.893241 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext returns base prompt when disabled +ok 64 - renderPromptWithMemoryContext returns base prompt when disabled + --- + duration_ms: 0.534948 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles missing query or service +ok 65 - renderPromptWithMemoryContext handles missing query or service + --- + duration_ms: 0.608754 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles circular agentContext gracefully +ok 66 - renderPromptWithMemoryContext handles circular agentContext gracefully + --- + duration_ms: 0.440221 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles agentContext as array of strings +ok 67 - renderPromptWithMemoryContext handles agentContext as array of strings + --- + duration_ms: 0.280854 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles agentContext as plain object +ok 68 - renderPromptWithMemoryContext handles agentContext as plain object + --- + duration_ms: 0.320573 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles agentContext as primitives +ok 69 - renderPromptWithMemoryContext handles agentContext as primitives + --- + duration_ms: 0.267322 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext calls updateMemoryUsage for retrieved memories +ok 70 - renderPromptWithMemoryContext calls updateMemoryUsage for retrieved memories + --- + duration_ms: 2.921745 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles empty memories gracefully +ok 71 - renderPromptWithMemoryContext handles empty memories gracefully + --- + duration_ms: 0.239969 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles null/undefined memories gracefully +ok 72 - renderPromptWithMemoryContext handles null/undefined memories gracefully + --- + duration_ms: 0.305388 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext respects TORCH_MEMORY_ENABLED=false +ok 73 - renderPromptWithMemoryContext respects TORCH_MEMORY_ENABLED=false + --- + duration_ms: 0.247255 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext respects retrieval allowlist +ok 74 - renderPromptWithMemoryContext respects retrieval allowlist + --- + duration_ms: 0.530647 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext passes k and tokenBudget +ok 75 - renderPromptWithMemoryContext passes k and tokenBudget + --- + duration_ms: 0.415774 + type: 'test' + ... +# Subtest: getRelevantMemories uses cached results when available +ok 76 - getRelevantMemories uses cached results when available + --- + duration_ms: 2.411668 + type: 'test' + ... +# Subtest: getRelevantMemories calls ranker and updates cache on miss +ok 77 - getRelevantMemories calls ranker and updates cache on miss + --- + duration_ms: 1.152118 + type: 'test' + ... +# Subtest: getRelevantMemories passes correct parameters to ranker +ok 78 - getRelevantMemories passes correct parameters to ranker + --- + duration_ms: 0.932603 + type: 'test' + ... +# Subtest: getRelevantMemories triggers updateMemoryUsage on repository +ok 79 - getRelevantMemories triggers updateMemoryUsage on repository + --- + duration_ms: 0.676443 + type: 'test' + ... +# Subtest: ingestEvents + # Subtest: happy path: successfully ingests events + ok 1 - happy path: successfully ingests events + --- + duration_ms: 8.155567 + type: 'test' + ... + # Subtest: skips ingestion when feature flag is disabled + ok 2 - skips ingestion when feature flag is disabled + --- + duration_ms: 0.541044 + type: 'test' + ... + # Subtest: clears cache after ingestion + ok 3 - clears cache after ingestion + --- + duration_ms: 2.077391 + type: 'test' + ... + # Subtest: skips duplicate windows + ok 4 - skips duplicate windows + --- + duration_ms: 1.147672 + type: 'test' + ... + # Subtest: propagates repository errors + ok 5 - propagates repository errors + --- + duration_ms: 1.711581 + type: 'test' + ... + 1..5 +ok 80 - ingestEvents + --- + duration_ms: 15.222981 + type: 'suite' + ... +# Subtest: ingestMemoryWindow gathers sources, redacts pii, chunks, embeds, links, and emits telemetry +ok 81 - ingestMemoryWindow gathers sources, redacts pii, chunks, embeds, links, and emits telemetry + --- + duration_ms: 6.541272 + type: 'test' + ... +# Subtest: ingestMemoryWindow dedupes overlapping windows by hashed content + agent + timestamp bucket +ok 82 - ingestMemoryWindow dedupes overlapping windows by hashed content + agent + timestamp bucket + --- + duration_ms: 0.886044 + type: 'test' + ... +# Subtest: pinMemory pins the memory and clears the cache +ok 83 - pinMemory pins the memory and clears the cache + --- + duration_ms: 2.899363 + type: 'test' + ... +# Subtest: pinMemory returns null for non-existent ID but still clears cache +ok 84 - pinMemory returns null for non-existent ID but still clears cache + --- + duration_ms: 0.581315 + type: 'test' + ... +# Subtest: unpinMemory unpins the memory and clears the cache +ok 85 - unpinMemory unpins the memory and clears the cache + --- + duration_ms: 0.712355 + type: 'test' + ... +# Subtest: unpinMemory returns null for non-existent ID but still clears cache +ok 86 - unpinMemory returns null for non-existent ID but still clears cache + --- + duration_ms: 0.628514 + type: 'test' + ... +# Subtest: createLifecyclePlan respects delete safety constraints and logs reasons +ok 87 - createLifecyclePlan respects delete safety constraints and logs reasons + --- + duration_ms: 4.201639 + type: 'test' + ... +# Subtest: createLifecyclePlan condenses near-duplicates and archives merged source records +ok 88 - createLifecyclePlan condenses near-duplicates and archives merged source records + --- + duration_ms: 1.123057 + type: 'test' + ... +# Subtest: applyLifecycleActions executes keep/archive/delete and merge markers +ok 89 - applyLifecycleActions executes keep/archive/delete and merge markers + --- + duration_ms: 14.495462 + type: 'test' + ... +# Subtest: filterAndRankMemories applies metadata filters and composite score +ok 90 - filterAndRankMemories applies metadata filters and composite score + --- + duration_ms: 3.282421 + type: 'test' + ... +# Subtest: formatMemoriesForPrompt returns prompt blocks and enforces token budget trimming +ok 91 - formatMemoriesForPrompt returns prompt blocks and enforces token budget trimming + --- + duration_ms: 1.572375 + type: 'test' + ... +# Subtest: isMemoryRetrievalEnabled supports global toggle and agent canary list +ok 92 - isMemoryRetrievalEnabled supports global toggle and agent canary list + --- + duration_ms: 0.539766 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext injects bounded memory block before base prompt +ok 93 - renderPromptWithMemoryContext injects bounded memory block before base prompt + --- + duration_ms: 1.077677 + type: 'test' + ... +# Subtest: runPruneCycle respects off mode +ok 94 - runPruneCycle respects off mode + --- + duration_ms: 22.816708 + type: 'test' + ... +# Subtest: runPruneCycle respects dry-run mode +ok 95 - runPruneCycle respects dry-run mode + --- + duration_ms: 0.648055 + type: 'test' + ... +# Subtest: runPruneCycle removes stale unpinned memories in active mode +ok 96 - runPruneCycle removes stale unpinned memories in active mode + --- + duration_ms: 4.597645 + type: 'test' + ... +# Subtest: runPruneCycle starts scheduler if requested +ok 97 - runPruneCycle starts scheduler if requested + --- + duration_ms: 1001.72363 + type: 'test' + ... +# (node:14415) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time +# (Use `node --trace-warnings ...` to show where the warning was created) +# Subtest: createDbAdvisoryLockProvider acquires and releases postgres advisory locks +ok 98 - createDbAdvisoryLockProvider acquires and releases postgres advisory locks + --- + duration_ms: 2.512326 + type: 'test' + ... +# Subtest: startMemoryMaintenanceScheduler runs all jobs and emits metrics including retries +ok 99 - startMemoryMaintenanceScheduler runs all jobs and emits metrics including retries + --- + duration_ms: 9.650967 + type: 'test' + ... +# Subtest: startMemoryMaintenanceScheduler skips jobs when feature flags disable memory +ok 100 - startMemoryMaintenanceScheduler skips jobs when feature flags disable memory + --- + duration_ms: 1.63384 + type: 'test' + ... +# Subtest: normalizeMemoryItem applies durable schema defaults and coercions +ok 101 - normalizeMemoryItem applies durable schema defaults and coercions + --- + duration_ms: 4.212358 + type: 'test' + ... +# Subtest: validateMemoryItem reports field-level errors +ok 102 - validateMemoryItem reports field-level errors + --- + duration_ms: 0.61447 + type: 'test' + ... +# Subtest: ingestEvents rejects invalid writes and logs structured validation details +ok 103 - ingestEvents rejects invalid writes and logs structured validation details + --- + duration_ms: 4.94647 + type: 'test' + ... +# (node:14428) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time +# (Use `node --trace-warnings ...` to show where the warning was created) +# Subtest: memoryStats with empty repository returns zero counts and rates +ok 104 - memoryStats with empty repository returns zero counts and rates + --- + duration_ms: 4.413623 + type: 'test' + ... +# Subtest: memoryStats with populated repository returns correct counts and totals +ok 105 - memoryStats with populated repository returns correct counts and totals + --- + duration_ms: 0.673534 + type: 'test' + ... +# Subtest: memoryStats calculates ingest throughput based on window +ok 106 - memoryStats calculates ingest throughput based on window + --- + duration_ms: 7.195495 + type: 'test' + ... +# Subtest: memoryStats reflects deleted count from prune cycle +ok 107 - memoryStats reflects deleted count from prune cycle + --- + duration_ms: 11.129081 + type: 'test' + ... +# Subtest: memoryStats handles windowMs parameter correctly +ok 108 - memoryStats handles windowMs parameter correctly + --- + duration_ms: 0.574289 + type: 'test' + ... +# Subtest: loadMemoryPromptTemplates loads all memory prompt templates from disk +ok 109 - loadMemoryPromptTemplates loads all memory prompt templates from disk + --- + duration_ms: 1.649481 + type: 'test' + ... +# Subtest: summarizeEvents retries with repair prompt when first response is malformed JSON +ok 110 - summarizeEvents retries with repair prompt when first response is malformed JSON + --- + duration_ms: 2.171307 + type: 'test' + ... +# Subtest: summarizeEvents falls back to deterministic minimal summary with conservative importance when parsing fails twice +ok 111 - summarizeEvents falls back to deterministic minimal summary with conservative importance when parsing fails twice + --- + duration_ms: 0.754182 + type: 'test' + ... +# Subtest: telemetry should not log to stdout or stderr by default +ok 112 - telemetry should not log to stdout or stderr by default + --- + duration_ms: 81.331285 + type: 'test' + ... +# Subtest: telemetry should log to stderr when NODE_DEBUG=torch-memory is set +ok 113 - telemetry should log to stderr when NODE_DEBUG=torch-memory is set + --- + duration_ms: 78.772353 + type: 'test' + ... +# Subtest: schema validation covers required fields, coercion, and rejection paths +ok 114 - schema validation covers required fields, coercion, and rejection paths + --- + duration_ms: 2.945412 + type: 'test' + ... +# Subtest: summarizer parser accepts valid json and recovers after malformed json response +ok 115 - summarizer parser accepts valid json and recovers after malformed json response + --- + duration_ms: 2.451351 + type: 'test' + ... +# Subtest: ingest integration persists memory records and links embeddings from event batches +ok 116 - ingest integration persists memory records and links embeddings from event batches + --- + duration_ms: 4.464413 + type: 'test' + ... +# Subtest: retrieval ranking blends semantic, importance, and recency signals +ok 117 - retrieval ranking blends semantic, importance, and recency signals + --- + duration_ms: 1.018859 + type: 'test' + ... +# Subtest: pruner policy protects pins, merges duplicates, and picks archive/delete outcomes +ok 118 - pruner policy protects pins, merges duplicates, and picks archive/delete outcomes + --- + duration_ms: 1.56178 + type: 'test' + ... +# Subtest: scheduler smoke test handles mocked clock and lock contention +ok 119 - scheduler smoke test handles mocked clock and lock contention + --- + duration_ms: 9.551447 + type: 'test' + ... +# Subtest: CLI Smoke Test + # Subtest: should print usage when no args provided + not ok 1 - should print usage when no args provided + --- + duration_ms: 203.325093 + type: 'test' + location: '/app/test/nostr-lock.test.mjs:8:3' + failureType: 'testCodeFailure' + error: |- + The input did not match the regular expression /Usage:/. Input: + + 'file:///app/src/relay-health.mjs:7\n' + + "import { withTimeout } from './utils.mjs';\n" + + ' ^^^^^^^^^^^\n' + + "SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout'\n" + + ' at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21)\n' + + ' at async ModuleJob.run (node:internal/modules/esm/module_job:335:5)\n' + + ' at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26)\n' + + ' at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)\n' + + '\n' + + 'Node.js v22.22.0\n' + + code: 'ERR_ASSERTION' + name: 'AssertionError' + expected: + actual: |- + file:///app/src/relay-health.mjs:7 + import { withTimeout } from './utils.mjs'; + ^^^^^^^^^^^ + SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout' + at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) + at async ModuleJob.run (node:internal/modules/esm/module_job:335:5) + at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) + at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) + + Node.js v22.22.0 + + operator: 'match' + stack: |- + TestContext. (file:///app/test/nostr-lock.test.mjs:11:12) + Test.runInAsyncScope (node:async_hooks:214:14) + Test.run (node:internal/test_runner/test:1047:25) + Test.start (node:internal/test_runner/test:944:17) + node:internal/test_runner/test:1440:71 + node:internal/per_context/primordials:464:82 + new Promise () + new SafePromise (node:internal/per_context/primordials:433:3) + node:internal/per_context/primordials:464:9 + Array.map () + ... + # Subtest: should fail when checking without cadence + not ok 2 - should fail when checking without cadence + --- + duration_ms: 198.026508 + type: 'test' + location: '/app/test/nostr-lock.test.mjs:14:3' + failureType: 'testCodeFailure' + error: |- + The input did not match the regular expression /--cadence is required/. Input: + + 'file:///app/src/relay-health.mjs:7\n' + + "import { withTimeout } from './utils.mjs';\n" + + ' ^^^^^^^^^^^\n' + + "SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout'\n" + + ' at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21)\n' + + ' at async ModuleJob.run (node:internal/modules/esm/module_job:335:5)\n' + + ' at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26)\n' + + ' at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)\n' + + '\n' + + 'Node.js v22.22.0\n' + + code: 'ERR_ASSERTION' + name: 'AssertionError' + expected: + actual: |- + file:///app/src/relay-health.mjs:7 + import { withTimeout } from './utils.mjs'; + ^^^^^^^^^^^ + SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout' + at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) + at async ModuleJob.run (node:internal/modules/esm/module_job:335:5) + at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) + at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) + + Node.js v22.22.0 + + operator: 'match' + stack: |- + TestContext. (file:///app/test/nostr-lock.test.mjs:17:12) + Test.runInAsyncScope (node:async_hooks:214:14) + Test.run (node:internal/test_runner/test:1047:25) + Suite.processPendingSubtests (node:internal/test_runner/test:744:18) + Test.postRun (node:internal/test_runner/test:1173:19) + Test.run (node:internal/test_runner/test:1101:12) + async Promise.all (index 0) + async Suite.run (node:internal/test_runner/test:1442:7) + async startSubtestAfterBootstrap (node:internal/test_runner/harness:296:3) + ... + # Subtest: should include paused agents in check output + not ok 3 - should include paused agents in check output + --- + duration_ms: 174.3203 + type: 'test' + location: '/app/test/nostr-lock.test.mjs:20:3' + failureType: 'testCodeFailure' + error: |- + Expected values to be strictly equal: + + 1 !== 0 + + code: 'ERR_ASSERTION' + name: 'AssertionError' + expected: 0 + actual: 1 + operator: 'strictEqual' + stack: |- + TestContext. (file:///app/test/nostr-lock.test.mjs:52:14) + async Test.run (node:internal/test_runner/test:1054:7) + async Suite.processPendingSubtests (node:internal/test_runner/test:744:7) + ... + 1..3 +not ok 120 - CLI Smoke Test + --- + duration_ms: 577.83431 + type: 'suite' + location: '/app/test/nostr-lock.test.mjs:7:1' + failureType: 'subtestsFailed' + error: '3 subtests failed' + code: 'ERR_TEST_FAILURE' + ... +# Initializing torch in /app/test-gitignore-8eRKlj/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-gitignore-8eRKlj/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# No package.json found in host root. Skipping script injection. +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hash +# - Namespace: test-ns +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hash&namespace=test-ns&relays=wss%3A%2F%2Frelay.damus.io +# Initializing torch in /app/test-gitignore-existing-trTjzM/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Updated test-gitignore-existing-trTjzM/torch/.gitignore: added node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hash +# - Namespace: test-ns +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hash&namespace=test-ns&relays=wss%3A%2F%2Frelay.damus.io +# No package.json found in host root. Skipping script injection. +# Subtest: ops.mjs: cmdInit creates .gitignore with node_modules +ok 121 - ops.mjs: cmdInit creates .gitignore with node_modules + --- + duration_ms: 78.586846 + type: 'test' + ... +# Subtest: ops.mjs: cmdInit appends to existing .gitignore +ok 122 - ops.mjs: cmdInit appends to existing .gitignore + --- + duration_ms: 71.870279 + type: 'test' + ... +# Initializing torch in /app/test-ops-swrlvL/project1/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-swrlvL/project1/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# No package.json found in host root. Skipping script injection. +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# Initializing torch in /app/test-ops-swrlvL/project2/torch... +# Initializing torch in /app/test-ops-swrlvL/project3/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-swrlvL/project3/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# No package.json found in host root. Skipping script injection. +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# Updating torch configuration in /app/test-ops-swrlvL/project3/torch... +# Creating backup at torch/_backups/backup_2026-02-25T16-12-54-723Z... +# Updating application directories... +# Updated src/ +# Updated bin/ +# Updated dashboard/ +# Updated landing/ +# Updated assets/ +# Updated scripts/ +# Updating application files... +# Updated package.json +# Updated build.mjs +# Updated README.md +# Updated torch-config.example.json +# Updated TORCH.md +# Updating static files... +# Updated META_PROMPTS.md +# Updated scheduler-flow.md +# Updated daily-scheduler.md +# Updated weekly-scheduler.md +# Skipped roster.json (preserved) +# Updating prompts... +# daily/: 0 added, 0 updated, 23 preserved +# weekly/: 0 added, 0 updated, 24 preserved +# Update complete. +# Initializing torch in /app/test-ops-swrlvL/project4/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-swrlvL/project4/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# No package.json found in host root. Skipping script injection. +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# Updating torch configuration in /app/test-ops-swrlvL/project4/torch... +# Creating backup at torch/_backups/backup_2026-02-25T16-12-54-876Z... +# Updating application directories... +# Updated src/ +# Updated bin/ +# Updated dashboard/ +# Updated landing/ +# Updated assets/ +# Updated scripts/ +# Updating application files... +# Updated package.json +# Updated build.mjs +# Updated README.md +# Updated torch-config.example.json +# Updated TORCH.md +# Updating static files... +# Updated META_PROMPTS.md +# Updated scheduler-flow.md +# Updated daily-scheduler.md +# Updated weekly-scheduler.md +# Overwrote roster.json (forced) +# Updating prompts... +# daily/: 0 added, 23 updated, 0 preserved +# weekly/: 0 added, 24 updated, 0 preserved +# Update complete. +# Initializing torch in /app/test-ops-swrlvL/project5/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-swrlvL/project5/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# Updating torch configuration in /app/test-ops-swrlvL/project5/torch... +# Creating backup at torch/_backups/backup_2026-02-25T16-12-55-005Z... +# No package.json found in host root. Skipping script injection. +# Updating application directories... +# Updated src/ +# Updated bin/ +# Updated dashboard/ +# Updated landing/ +# Updated assets/ +# Updated scripts/ +# Updating application files... +# Updated package.json +# Updated build.mjs +# Updated README.md +# Updated torch-config.example.json +# Updated TORCH.md +# Updating static files... +# Updated META_PROMPTS.md +# Updated scheduler-flow.md +# Updated daily-scheduler.md +# Updated weekly-scheduler.md +# Skipped roster.json (preserved) +# Updating prompts... +# daily/: 0 added, 0 updated, 23 preserved +# weekly/: 0 added, 0 updated, 24 preserved +# Update complete. +# Initializing torch in /app/test-ops-swrlvL/project_roster/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-swrlvL/project_roster/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# No package.json found in host root. Skipping script injection. +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=ws%3A%2F%2F127.0.0.1%3A33003 +# Subtest: cmdInit creates directory structure and files +ok 123 - cmdInit creates directory structure and files + --- + duration_ms: 47.452726 + type: 'test' + ... +# Subtest: cmdInit fails if directory exists without force +ok 124 - cmdInit fails if directory exists without force + --- + duration_ms: 1.131353 + type: 'test' + ... +# Subtest: cmdUpdate preserves modified prompt +ok 125 - cmdUpdate preserves modified prompt + --- + duration_ms: 148.230339 + type: 'test' + ... +# Subtest: cmdUpdate overwrites prompt with force +ok 126 - cmdUpdate overwrites prompt with force + --- + duration_ms: 137.270922 + type: 'test' + ... +# Subtest: cmdUpdate creates backup +ok 127 - cmdUpdate creates backup + --- + duration_ms: 119.375366 + type: 'test' + ... +# Initializing torch in /app/test-ops-swrlvL/project_config_init/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-swrlvL/project_config_init/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# No package.json found in host root. Skipping script injection. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# Subtest: torch-lock check respects local roster +not ok 128 - torch-lock check respects local roster + --- + duration_ms: 215.731151 + type: 'test' + location: '/app/test/ops.test.mjs:121:1' + failureType: 'testCodeFailure' + error: |- + Command failed: /home/jules/.nvm/versions/node/v22.22.0/bin/node /app/bin/torch-lock.mjs check --cadence daily + file:///app/src/relay-health.mjs:7 + import { withTimeout } from './utils.mjs'; + ^^^^^^^^^^^ + SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout' + at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) + at async ModuleJob.run (node:internal/modules/esm/module_job:335:5) + at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) + at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) + + Node.js v22.22.0 + + code: 1 + stack: |- + ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) + async ModuleJob.run (node:internal/modules/esm/module_job:335:5) + async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) + async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) + genericNodeError (node:internal/errors:983:15) + wrappedFn (node:internal/errors:537:14) + ChildProcess.exithandler (node:child_process:417:12) + ChildProcess.emit (node:events:519:28) + maybeClose (node:internal/child_process:1101:16) + ChildProcess._handle.onexit (node:internal/child_process:304:5) + ... +# Subtest: cmdInit creates torch-config.json with random namespace +ok 129 - cmdInit creates torch-config.json with random namespace + --- + duration_ms: 49.937128 + type: 'test' + ... +# [publish:primary] Publishing to 3 relays (ws://127.0.0.1:32783, ws://127.0.0.1:33761, ws://127.0.0.1:37831)... +# Published to 1/3 relays (required=1, timeout=80ms) +# Subtest: relay fanout quorum integration + # Subtest: passes with required=1 when one relay succeeds and two fail +# [publish:primary] Publishing to 3 relays (ws://127.0.0.1:37313, ws://127.0.0.1:37793, ws://127.0.0.1:42909)... + ok 1 - passes with required=1 when one relay succeeds and two fail + --- + duration_ms: 153.209413 + type: 'test' + ... + # Subtest: fails with quorum error for required=1 when all relays fail + ok 2 - fails with quorum error for required=1 when all relays fail + --- + duration_ms: 91.826273 + type: 'test' + ... +# [publish:primary] Publishing to 3 relays (ws://127.0.0.1:34281, ws://127.0.0.1:43941, ws://127.0.0.1:45085)... + # Subtest: fails with required=2 when only one relay succeeds + ok 3 - fails with required=2 when only one relay succeeds + --- + duration_ms: 91.900479 + type: 'test' + ... +# [publish:primary] Publishing to 3 relays (ws://127.0.0.1:34275, ws://127.0.0.1:34285, ws://127.0.0.1:41077)... +# Published to 2/3 relays (required=2, timeout=80ms) + # Subtest: passes when delayed successes reach quorum before timeout + ok 4 - passes when delayed successes reach quorum before timeout + --- + duration_ms: 88.655729 + type: 'test' + ... + 1..4 +ok 130 - relay fanout quorum integration + --- + duration_ms: 427.402551 + type: 'suite' + ... +# Subtest: RelayHealthManager + # Subtest: should isolate state between instances + ok 1 - should isolate state between instances + --- + duration_ms: 1.197229 + type: 'test' + ... + # Subtest: should prioritize relays based on health + ok 2 - should prioritize relays based on health + --- + duration_ms: 3.076812 + type: 'test' + ... + # Subtest: should reset state correctly + ok 3 - should reset state correctly + --- + duration_ms: 0.276516 + type: 'test' + ... + # Subtest: should cache ranked results and invalidate on outcome + ok 4 - should cache ranked results and invalidate on outcome + --- + duration_ms: 0.67823 + type: 'test' + ... + # Subtest: should invalidate cache when time passes quarantine expiry + ok 5 - should invalidate cache when time passes quarantine expiry + --- + duration_ms: 0.484297 + type: 'test' + ... + 1..5 +ok 131 - RelayHealthManager + --- + duration_ms: 7.448923 + type: 'suite' + ... +# file:///app/src/relay-health.mjs:7 +# import { withTimeout } from './utils.mjs'; +# ^^^^^^^^^^^ +# SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout' +# at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) +# at async ModuleJob.run (node:internal/modules/esm/module_job:335:5) +# at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) +# at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) +# Node.js v22.22.0 +# Subtest: test/relay-health-thresholds.test.mjs +not ok 44 - test/relay-health-thresholds.test.mjs + --- + duration_ms: 122.603196 + type: 'test' + location: '/app/test/relay-health-thresholds.test.mjs:1:1' + failureType: 'testCodeFailure' + exitCode: 1 + signal: ~ + error: 'test failed' + code: 'ERR_TEST_FAILURE' + ... +# file:///app/src/relay-health.mjs:7 +# import { withTimeout } from './utils.mjs'; +# ^^^^^^^^^^^ +# SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout' +# at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) +# at async ModuleJob.run (node:internal/modules/esm/module_job:335:5) +# at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) +# at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) +# Node.js v22.22.0 +# Subtest: test/relay-health.test.mjs +not ok 45 - test/relay-health.test.mjs + --- + duration_ms: 117.293557 + type: 'test' + location: '/app/test/relay-health.test.mjs:1:1' + failureType: 'testCodeFailure' + exitCode: 1 + signal: ~ + error: 'test failed' + code: 'ERR_TEST_FAILURE' + ... +# Subtest: Roster (Unit Tests with Dependency Injection) + # Subtest: returns fallback roster when no configuration or files exist + ok 1 - returns fallback roster when no configuration or files exist + --- + duration_ms: 2.488669 + type: 'test' + ... + # Subtest: loads internal module roster if user/cwd rosters are missing + ok 2 - loads internal module roster if user/cwd rosters are missing + --- + duration_ms: 1.591945 + type: 'test' + ... + # Subtest: loads roster from torch/roster.json (User Roster) if present + ok 3 - loads roster from torch/roster.json (User Roster) if present + --- + duration_ms: 1.281367 + type: 'test' + ... + # Subtest: loads roster from roster.json (CWD Roster) if present and torch/roster.json is missing + ok 4 - loads roster from roster.json (CWD Roster) if present and torch/roster.json is missing + --- + duration_ms: 1.480801 + type: 'test' + ... + # Subtest: falls back to default if roster file is malformed + ok 5 - falls back to default if roster file is malformed + --- + duration_ms: 0.597229 + type: 'test' + ... + # Subtest: falls back to default if roster file is missing daily/weekly arrays + ok 6 - falls back to default if roster file is missing daily/weekly arrays + --- + duration_ms: 0.664851 + type: 'test' + ... + # Subtest: prioritizes environment variables over file and config + ok 7 - prioritizes environment variables over file and config + --- + duration_ms: 2.355193 + type: 'test' + ... + # Subtest: prioritizes config over file + ok 8 - prioritizes config over file + --- + duration_ms: 0.62773 + type: 'test' + ... + # Subtest: handles multiple items in env var roster + ok 9 - handles multiple items in env var roster + --- + duration_ms: 0.704371 + type: 'test' + ... + 1..9 +ok 134 - Roster (Unit Tests with Dependency Injection) + --- + duration_ms: 13.976478 + type: 'suite' + ... +# Subtest: fails required memory policy when retrieval/storage evidence is missing +ok 135 - fails required memory policy when retrieval/storage evidence is missing + --- + duration_ms: 829.018004 + type: 'test' + ... +# Subtest: accepts required memory policy when markers or artifacts are produced +ok 136 - accepts required memory policy when markers or artifacts are produced + --- + duration_ms: 892.516872 + type: 'test' + ... +# Subtest: records backend failure metadata when lock command exits with code 2 +ok 137 - records backend failure metadata when lock command exits with code 2 + --- + duration_ms: 935.675431 + type: 'test' + ... +# Subtest: defers backend failures in non-strict mode and reuses idempotency key on successful retry +ok 138 - defers backend failures in non-strict mode and reuses idempotency key on successful retry + --- + duration_ms: 611.677434 + type: 'test' + ... +# Subtest: fails after exceeding non-strict deferral budget +ok 139 - fails after exceeding non-strict deferral budget + --- + duration_ms: 194.677954 + type: 'test' + ... +# Subtest: strict lock mode fails immediately without deferral +ok 140 - strict lock mode fails immediately without deferral + --- + duration_ms: 106.959226 + type: 'test' + ... +# Subtest: skips lock health preflight by default when not enabled +ok 141 - skips lock health preflight by default when not enabled + --- + duration_ms: 402.92941 + type: 'test' + ... +# Subtest: fails scheduler with preflight metadata when lock health preflight is enabled +ok 142 - fails scheduler with preflight metadata when lock health preflight is enabled + --- + duration_ms: 143.176678 + type: 'test' + ... +# Subtest: categorizes unreadable prompt files as prompt_parse_error +ok 143 - categorizes unreadable prompt files as prompt_parse_error + --- + duration_ms: 102.428652 + type: 'test' + ... +# Subtest: categorizes invalid prompt schema as prompt_schema_error +ok 144 - categorizes invalid prompt schema as prompt_schema_error + --- + duration_ms: 105.47974 + type: 'test' + ... +# Subtest: categorizes handoff runtime failures as execution_error +ok 145 - categorizes handoff runtime failures as execution_error + --- + duration_ms: 357.076153 + type: 'test' + ... +# Subtest: retries lock acquisition for backend error and succeeds on a later attempt +ok 146 - retries lock acquisition for backend error and succeeds on a later attempt + --- + duration_ms: 406.086983 + type: 'test' + ... +# Subtest: stops retrying after configured lock backend retries are exhausted +ok 147 - stops retrying after configured lock backend retries are exhausted + --- + duration_ms: 111.584021 + type: 'test' + ... +# Subtest: does not use backend retry flow for exit code 3 lock conflicts +ok 148 - does not use backend retry flow for exit code 3 lock conflicts + --- + duration_ms: 417.631242 + type: 'test' + ... +# Subtest: retries handoff command for retryable network failures and succeeds +ok 149 - retries handoff command for retryable network failures and succeeds + --- + duration_ms: 673.258284 + type: 'test' + ... +# Subtest: uses fallback platform for handoff when primary platform fails +ok 150 - uses fallback platform for handoff when primary platform fails + --- + duration_ms: 668.858934 + type: 'test' + ... +# Subtest: fails before lock acquisition when runner health preflight command fails +ok 151 - fails before lock acquisition when runner health preflight command fails + --- + duration_ms: 353.817532 + type: 'test' + ... +# Subtest: uses exclusion payload from mixed JSON lock:check output +ok 152 - uses exclusion payload from mixed JSON lock:check output + --- + duration_ms: 400.494993 + type: 'test' + ... +# Subtest: runs selected scheduler prompt through configured runner command +ok 153 - runs selected scheduler prompt through configured runner command + --- + duration_ms: 334.704622 + type: 'test' + ... +# Subtest: propagates non-zero runner exit code +ok 154 - propagates non-zero runner exit code + --- + duration_ms: 328.648601 + type: 'test' + ... +# Subtest: scheduler lock backend failure artifact matches required frontmatter schema +ok 155 - scheduler lock backend failure artifact matches required frontmatter schema + --- + duration_ms: 114.256595 + type: 'test' + ... +# Subtest: schema contract catches missing required lock-backend field +ok 156 - schema contract catches missing required lock-backend field + --- + duration_ms: 1.955349 + type: 'test' + ... +# Subtest: schema contract catches misnamed lock-backend key +ok 157 - schema contract catches misnamed lock-backend key + --- + duration_ms: 0.585317 + type: 'test' + ... +# Subtest: lock preflight e2e: successful lock writes completed status snapshot +ok 158 - lock preflight e2e: successful lock writes completed status snapshot + --- + duration_ms: 410.000954 + type: 'test' + ... +# Subtest: lock preflight e2e: exit code 2 quorum failure persists failed backend status and prompt-not-started marker +ok 159 - lock preflight e2e: exit code 2 quorum failure persists failed backend status and prompt-not-started marker + --- + duration_ms: 100.347173 + type: 'test' + ... +# Subtest: lock preflight e2e: non-lock failure exits failed without prompt parse/schema classification +ok 160 - lock preflight e2e: non-lock failure exits failed without prompt parse/schema classification + --- + duration_ms: 100.043139 + type: 'test' + ... +# file:///app/src/relay-health.mjs:7 +# import { withTimeout } from './utils.mjs'; +# ^^^^^^^^^^^ +# SyntaxError: The requested module './utils.mjs' does not provide an export named 'withTimeout' +# at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21) +# at async ModuleJob.run (node:internal/modules/esm/module_job:335:5) +# at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) +# at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) +# Node.js v22.22.0 +# Subtest: test/scheduler-ratchet.test.mjs +not ok 51 - test/scheduler-ratchet.test.mjs + --- + duration_ms: 158.659703 + type: 'test' + location: '/app/test/scheduler-ratchet.test.mjs:1:1' + failureType: 'testCodeFailure' + exitCode: 1 + signal: ~ + error: 'test failed' + code: 'ERR_TEST_FAILURE' + ... +# Subtest: parseDateValue + # Subtest: parses a valid ISO string + ok 1 - parses a valid ISO string + --- + duration_ms: 1.05843 + type: 'test' + ... + # Subtest: returns null for empty input + ok 2 - returns null for empty input + --- + duration_ms: 0.207378 + type: 'test' + ... + # Subtest: returns null for invalid date strings + ok 3 - returns null for invalid date strings + --- + duration_ms: 0.242859 + type: 'test' + ... + 1..3 +ok 162 - parseDateValue + --- + duration_ms: 3.056791 + type: 'suite' + ... +# Subtest: isStrictSchedulerLogFilename + # Subtest: accepts valid completed log + ok 1 - accepts valid completed log + --- + duration_ms: 0.536735 + type: 'test' + ... + # Subtest: accepts valid failed log + ok 2 - accepts valid failed log + --- + duration_ms: 0.260711 + type: 'test' + ... + # Subtest: rejects deferred logs + ok 3 - rejects deferred logs + --- + duration_ms: 0.255241 + type: 'test' + ... + # Subtest: rejects filenames without timestamp + ok 4 - rejects filenames without timestamp + --- + duration_ms: 0.31003 + type: 'test' + ... + # Subtest: rejects plain text files + ok 5 - rejects plain text files + --- + duration_ms: 0.356951 + type: 'test' + ... + # Subtest: rejects .scheduler-run-state.json + ok 6 - rejects .scheduler-run-state.json + --- + duration_ms: 0.376777 + type: 'test' + ... + 1..6 +ok 163 - isStrictSchedulerLogFilename + --- + duration_ms: 2.941778 + type: 'suite' + ... +# Subtest: parseAgentFromFilename + # Subtest: extracts agent name from completed log + ok 1 - extracts agent name from completed log + --- + duration_ms: 1.789684 + type: 'test' + ... + # Subtest: extracts agent name from failed log + ok 2 - extracts agent name from failed log + --- + duration_ms: 0.291541 + type: 'test' + ... + # Subtest: returns null for invalid filename + ok 3 - returns null for invalid filename + --- + duration_ms: 0.168448 + type: 'test' + ... + 1..3 +ok 164 - parseAgentFromFilename + --- + duration_ms: 2.504258 + type: 'suite' + ... +# Subtest: parseTimestampFromFilename + # Subtest: parses timestamp from canonical filename + ok 1 - parses timestamp from canonical filename + --- + duration_ms: 0.258994 + type: 'test' + ... + # Subtest: returns null for non-canonical filename + ok 2 - returns null for non-canonical filename + --- + duration_ms: 0.152504 + type: 'test' + ... + 1..2 +ok 165 - parseTimestampFromFilename + --- + duration_ms: 0.556473 + type: 'suite' + ... +# Subtest: parseFrontmatterCreatedAt / parseFrontmatterAgent + # Subtest: reads created_at from frontmatter + ok 1 - reads created_at from frontmatter + --- + duration_ms: 0.49305 + type: 'test' + ... + # Subtest: reads agent from frontmatter + ok 2 - reads agent from frontmatter + --- + duration_ms: 0.235812 + type: 'test' + ... + # Subtest: returns null when no frontmatter + ok 3 - returns null when no frontmatter + --- + duration_ms: 0.126391 + type: 'test' + ... + 1..3 +ok 166 - parseFrontmatterCreatedAt / parseFrontmatterAgent + --- + duration_ms: 1.100418 + type: 'suite' + ... +# Subtest: buildRecentlyRunExclusionSet — scenarios + # Subtest: SCN-TWG-01: excludes agents with completed logs within 24-hour daily window + ok 1 - SCN-TWG-01: excludes agents with completed logs within 24-hour daily window + --- + duration_ms: 7.829494 + type: 'test' + ... + # Subtest: SCN-TWG-02: does NOT exclude agents whose last run is outside the 24-hour window + ok 2 - SCN-TWG-02: does NOT exclude agents whose last run is outside the 24-hour window + --- + duration_ms: 3.244034 + type: 'test' + ... + # Subtest: SCN-TWG-03: excludes agents with failed logs within the window + ok 3 - SCN-TWG-03: excludes agents with failed logs within the window + --- + duration_ms: 2.373814 + type: 'test' + ... + # Subtest: SCN-TWG-04: cross-midnight scenario — agent ran 10 min before midnight, checked 10 min after + ok 4 - SCN-TWG-04: cross-midnight scenario — agent ran 10 min before midnight, checked 10 min after + --- + duration_ms: 4.127432 + type: 'test' + ... + # Subtest: SCN-TWG-05: uses frontmatter created_at over filename timestamp when both present + ok 5 - SCN-TWG-05: uses frontmatter created_at over filename timestamp when both present + --- + duration_ms: 2.309537 + type: 'test' + ... + # Subtest: SCN-TWG-06: weekly window uses 7-day threshold + ok 6 - SCN-TWG-06: weekly window uses 7-day threshold + --- + duration_ms: 4.716578 + type: 'test' + ... + # Subtest: SCN-TWG-07: empty log directory returns empty set + ok 7 - SCN-TWG-07: empty log directory returns empty set + --- + duration_ms: 1.208874 + type: 'test' + ... + # Subtest: SCN-TWG-08: non-existent directory returns empty set without throwing + ok 8 - SCN-TWG-08: non-existent directory returns empty set without throwing + --- + duration_ms: 1.14117 + type: 'test' + ... + # Subtest: SCN-TWG-09: only the most recent log matters — agent excluded if any log is within window + ok 9 - SCN-TWG-09: only the most recent log matters — agent excluded if any log is within window + --- + duration_ms: 4.122591 + type: 'test' + ... + # Subtest: SCN-TWG-10: mixed roster — correctly partitions in-window vs out-of-window agents + ok 10 - SCN-TWG-10: mixed roster — correctly partitions in-window vs out-of-window agents + --- + duration_ms: 4.236921 + type: 'test' + ... + # Subtest: SCN-TWG-11: non-log files in directory are ignored + ok 11 - SCN-TWG-11: non-log files in directory are ignored + --- + duration_ms: 2.493608 + type: 'test' + ... + 1..11 +ok 167 - buildRecentlyRunExclusionSet — scenarios + --- + duration_ms: 67.704842 + type: 'suite' + ... +# Subtest: CADENCE_WINDOW_MS constants + # Subtest: daily window is exactly 24 hours + ok 1 - daily window is exactly 24 hours + --- + duration_ms: 0.287865 + type: 'test' + ... + # Subtest: weekly window is exactly 7 days + ok 2 - weekly window is exactly 7 days + --- + duration_ms: 0.121614 + type: 'test' + ... + 1..2 +ok 168 - CADENCE_WINDOW_MS constants + --- + duration_ms: 0.560667 + type: 'suite' + ... +# Subtest: secureRandom + # Subtest: returns values in [0, 1) + ok 1 - returns values in [0, 1) + --- + duration_ms: 3.983221 + type: 'test' + ... + # Subtest: returns varied values + ok 2 - returns varied values + --- + duration_ms: 0.424773 + type: 'test' + ... + 1..2 +ok 169 - secureRandom + --- + duration_ms: 5.928844 + type: 'suite' + ... +# Subtest: summarizes recent lock reliability by platform/cadence/backend/relay +ok 170 - summarizes recent lock reliability by platform/cadence/backend/relay + --- + duration_ms: 84.345222 + type: 'test' + ... +# Subtest: run-flaky-check reports pass/fail counts from TAP output files +ok 171 - run-flaky-check reports pass/fail counts from TAP output files + --- + duration_ms: 835.983623 + type: 'test' + ... +# Subtest: loadTorchConfig (Unit Tests with Mocked FS) + # Subtest: loads valid config correctly + ok 1 - loads valid config correctly + --- + duration_ms: 3.68363 + type: 'test' + ... + # Subtest: returns default config when file is missing + ok 2 - returns default config when file is missing + --- + duration_ms: 0.888368 + type: 'test' + ... + # Subtest: throws error on malformed JSON + ok 3 - throws error on malformed JSON + --- + duration_ms: 0.990981 + type: 'test' + ... + # Subtest: caches the config and ignores subsequent fs calls + ok 4 - caches the config and ignores subsequent fs calls + --- + duration_ms: 0.816877 + type: 'test' + ... + # Subtest: returns null for empty string lists (new consistent behavior) + ok 5 - returns null for empty string lists (new consistent behavior) + --- + duration_ms: 1.182864 + type: 'test' + ... + 1..5 +ok 172 - loadTorchConfig (Unit Tests with Mocked FS) + --- + duration_ms: 9.366005 + type: 'suite' + ... +# Subtest: torch-config + # Subtest: getTorchConfigPath + # Subtest: returns default path when env var is not set + ok 1 - returns default path when env var is not set + --- + duration_ms: 1.134864 + type: 'test' + ... + # Subtest: returns custom path when env var is set + ok 2 - returns custom path when env var is set + --- + duration_ms: 0.300161 + type: 'test' + ... + 1..2 + ok 1 - getTorchConfigPath + --- + duration_ms: 2.858216 + type: 'suite' + ... + # Subtest: parseTorchConfig + # Subtest: parses new lock backend knobs + ok 1 - parses new lock backend knobs + --- + duration_ms: 1.445438 + type: 'test' + ... + 1..1 + ok 2 - parseTorchConfig + --- + duration_ms: 1.792486 + type: 'suite' + ... + # Subtest: loadTorchConfig + # Subtest: throws fatal error for invalid relay URL + ok 1 - throws fatal error for invalid relay URL + --- + duration_ms: 15.499031 + type: 'test' + ... + # Subtest: throws fatal error for invalid timeout range + ok 2 - throws fatal error for invalid timeout range + --- + duration_ms: 2.790693 + type: 'test' + ... + # Subtest: throws error for malformed JSON + ok 3 - throws error for malformed JSON + --- + duration_ms: 2.246279 + type: 'test' + ... + 1..3 + ok 3 - loadTorchConfig + --- + duration_ms: 21.624279 + type: 'suite' + ... + # Subtest: backend getters + # Subtest: returns default relays + ok 1 - returns default relays + --- + duration_ms: 4.297962 + type: 'test' + ... + # Subtest: validates env knob values + ok 2 - validates env knob values + --- + duration_ms: 3.830669 + type: 'test' + ... + 1..2 + ok 4 - backend getters + --- + duration_ms: 9.144938 + type: 'suite' + ... + 1..4 +ok 173 - torch-config + --- + duration_ms: 36.391584 + type: 'suite' + ... +# Subtest: Async Utilities + # Subtest: withTimeout + # Subtest: resolves when promise completes before timeout + ok 1 - resolves when promise completes before timeout + --- + duration_ms: 11.087289 + type: 'test' + ... + # Subtest: rejects when promise times out + ok 2 - rejects when promise times out + --- + duration_ms: 11.071564 + type: 'test' + ... + # Subtest: clears timeout on success + ok 3 - clears timeout on success + --- + duration_ms: 0.620619 + type: 'test' + ... + # Subtest: propagates original promise rejection + ok 4 - propagates original promise rejection + --- + duration_ms: 0.455412 + type: 'test' + ... + 1..4 + ok 1 - withTimeout + --- + duration_ms: 24.761983 + type: 'suite' + ... + 1..1 +ok 174 - Async Utilities + --- + duration_ms: 25.647175 + type: 'suite' + ... +# (node:16383) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time +# (Use `node --trace-warnings ...` to show where the warning was created) +# Subtest: Date Utilities + # Subtest: todayDateStr + # Subtest: returns current date in YYYY-MM-DD format + ok 1 - returns current date in YYYY-MM-DD format + --- + duration_ms: 3.684918 + type: 'test' + ... + 1..1 + ok 1 - todayDateStr + --- + duration_ms: 4.740058 + type: 'suite' + ... + # Subtest: nowUnix + # Subtest: returns current unix timestamp + ok 1 - returns current unix timestamp + --- + duration_ms: 0.346323 + type: 'test' + ... + 1..1 + ok 2 - nowUnix + --- + duration_ms: 0.644359 + type: 'suite' + ... + # Subtest: getIsoWeekStr + # Subtest: returns correct ISO week for simple cases + ok 1 - returns correct ISO week for simple cases + --- + duration_ms: 0.368023 + type: 'test' + ... + # Subtest: handles year boundaries correctly + ok 2 - handles year boundaries correctly + --- + duration_ms: 0.18559 + type: 'test' + ... + # Subtest: handles leap years + ok 3 - handles leap years + --- + duration_ms: 0.294654 + type: 'test' + ... + # Subtest: handles empty input (defaults to today) + ok 4 - handles empty input (defaults to today) + --- + duration_ms: 0.354278 + type: 'test' + ... + # Subtest: handles invalid input gracefully + ok 5 - handles invalid input gracefully + --- + duration_ms: 0.478152 + type: 'test' + ... + 1..5 + ok 3 - getIsoWeekStr + --- + duration_ms: 2.371238 + type: 'suite' + ... + 1..3 +ok 175 - Date Utilities + --- + duration_ms: 8.572528 + type: 'suite' + ... +# Subtest: Relay Utilities + # Subtest: mergeRelayList + # Subtest: merges two lists of relays without duplicates + ok 1 - merges two lists of relays without duplicates + --- + duration_ms: 1.025795 + type: 'test' + ... + # Subtest: handles empty lists + ok 2 - handles empty lists + --- + duration_ms: 0.292356 + type: 'test' + ... + 1..2 + ok 1 - mergeRelayList + --- + duration_ms: 1.64962 + type: 'suite' + ... + 1..1 +ok 176 - Relay Utilities + --- + duration_ms: 1.846319 + type: 'suite' + ... +# Subtest: Platform Utilities + # Subtest: detectPlatform + # Subtest: detects jules + ok 1 - detects jules + --- + duration_ms: 0.582838 + type: 'test' + ... + # Subtest: detects codex + ok 2 - detects codex + --- + duration_ms: 0.163212 + type: 'test' + ... + # Subtest: detects goose + ok 3 - detects goose + --- + duration_ms: 0.191702 + type: 'test' + ... + # Subtest: detects claude via CLAUDE_API_KEY + ok 4 - detects claude via CLAUDE_API_KEY + --- + duration_ms: 0.125856 + type: 'test' + ... + # Subtest: detects claude via ANTHROPIC_API_KEY + ok 5 - detects claude via ANTHROPIC_API_KEY + --- + duration_ms: 0.180114 + type: 'test' + ... + # Subtest: detects gemini via GEMINI_API_KEY + ok 6 - detects gemini via GEMINI_API_KEY + --- + duration_ms: 0.144893 + type: 'test' + ... + # Subtest: detects gemini via GOOGLE_API_KEY + ok 7 - detects gemini via GOOGLE_API_KEY + --- + duration_ms: 0.124789 + type: 'test' + ... + # Subtest: detects antigravity via ANTIGRAVITY_API_KEY + ok 8 - detects antigravity via ANTIGRAVITY_API_KEY + --- + duration_ms: 0.136937 + type: 'test' + ... + # Subtest: detects antigravity via ANTIGRAVITY_SESSION_ID + ok 9 - detects antigravity via ANTIGRAVITY_SESSION_ID + --- + duration_ms: 0.133684 + type: 'test' + ... + # Subtest: detects qwen via QWEN_API_KEY + ok 10 - detects qwen via QWEN_API_KEY + --- + duration_ms: 0.130594 + type: 'test' + ... + # Subtest: returns null if no platform detected + ok 11 - returns null if no platform detected + --- + duration_ms: 0.175707 + type: 'test' + ... + 1..11 + ok 1 - detectPlatform + --- + duration_ms: 2.71301 + type: 'suite' + ... + 1..1 +ok 177 - Platform Utilities + --- + duration_ms: 2.840251 + type: 'suite' + ... +# Subtest: File Utilities + # Subtest: ensureDir + # Subtest: creates directory if it does not exist + ok 1 - creates directory if it does not exist + --- + duration_ms: 1.891832 + type: 'test' + ... + # Subtest: does nothing if directory already exists + ok 2 - does nothing if directory already exists + --- + duration_ms: 0.29094 + type: 'test' + ... + # Subtest: creates nested directories recursively + ok 3 - creates nested directories recursively + --- + duration_ms: 0.35913 + type: 'test' + ... + 1..3 + ok 1 - ensureDir + --- + duration_ms: 4.006293 + type: 'suite' + ... + 1..1 +ok 178 - File Utilities + --- + duration_ms: 4.240699 + type: 'suite' + ... +# Subtest: String Utilities + # Subtest: relayListLabel + # Subtest: joins relay URLs with comma and space + ok 1 - joins relay URLs with comma and space + --- + duration_ms: 0.246214 + type: 'test' + ... + # Subtest: handles single relay + ok 2 - handles single relay + --- + duration_ms: 0.113961 + type: 'test' + ... + # Subtest: handles empty array + ok 3 - handles empty array + --- + duration_ms: 0.094666 + type: 'test' + ... + 1..3 + ok 1 - relayListLabel + --- + duration_ms: 0.584648 + type: 'suite' + ... + 1..1 +ok 179 - String Utilities + --- + duration_ms: 0.718411 + type: 'suite' + ... +# Subtest: passes when artifacts include metadata and failure IDs map to unresolved known issue entries +ok 180 - passes when artifacts include metadata and failure IDs map to unresolved known issue entries + --- + duration_ms: 82.628757 + type: 'test' + ... +# Subtest: fails when required metadata is missing from artifacts +ok 181 - fails when required metadata is missing from artifacts + --- + duration_ms: 69.770196 + type: 'test' + ... +# Subtest: fails when failure identifiers are not cross-linked to known issues or incidents +ok 182 - fails when failure identifiers are not cross-linked to known issues or incidents + --- + duration_ms: 71.778705 + type: 'test' + ... +1..182 +# tests 333 +# suites 42 +# pass 318 +# fail 8 +# cancelled 6 +# skipped 1 +# todo 0 +# duration_ms 17745.481884 diff --git a/test_output_3.txt b/test_output_3.txt new file mode 100644 index 0000000..f6d7886 --- /dev/null +++ b/test_output_3.txt @@ -0,0 +1,3656 @@ + +> torch-lock@0.1.0 test +> npm run validate:scheduler && npm run test:integration:e2e && node --test --test-timeout=30000 test/*.test.mjs test/*.test.js + + +> torch-lock@0.1.0 validate:scheduler +> node scripts/validate-scheduler-roster.mjs && node scripts/validate-prompt-contract.mjs && node scripts/validate-scheduler-flow-parity.mjs && npm run validate:scheduler-failure-schema + +Scheduler tables, roster, and prompt filenames are in sync. +Prompt contract validated for all daily/weekly prompts. +Scheduler flow parity validated for prompts and scheduler implementation. + +> torch-lock@0.1.0 validate:scheduler-failure-schema +> node --test test/scheduler-lock-failure-schema.contract.test.mjs + +TAP version 13 +# Subtest: scheduler lock backend failure artifact matches required frontmatter schema +ok 1 - scheduler lock backend failure artifact matches required frontmatter schema + --- + duration_ms: 110.981548 + type: 'test' + ... +# Subtest: schema contract catches missing required lock-backend field +ok 2 - schema contract catches missing required lock-backend field + --- + duration_ms: 1.922743 + type: 'test' + ... +# Subtest: schema contract catches misnamed lock-backend key +ok 3 - schema contract catches misnamed lock-backend key + --- + duration_ms: 0.579525 + type: 'test' + ... +1..3 +# tests 3 +# suites 0 +# pass 3 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 198.488964 + +> torch-lock@0.1.0 test:integration:e2e +> node --test test/scheduler-preflight-lock.e2e.test.mjs + +TAP version 13 +# Subtest: lock preflight e2e: successful lock writes completed status snapshot +ok 1 - lock preflight e2e: successful lock writes completed status snapshot + --- + duration_ms: 413.645249 + type: 'test' + ... +# Subtest: lock preflight e2e: exit code 2 quorum failure persists failed backend status and prompt-not-started marker +ok 2 - lock preflight e2e: exit code 2 quorum failure persists failed backend status and prompt-not-started marker + --- + duration_ms: 100.001498 + type: 'test' + ... +# Subtest: lock preflight e2e: non-lock failure exits failed without prompt parse/schema classification +ok 3 - lock preflight e2e: non-lock failure exits failed without prompt parse/schema classification + --- + duration_ms: 99.085249 + type: 'test' + ... +1..3 +# tests 3 +# suites 0 +# pass 3 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 703.314215 +TAP version 13 +# Subtest: Build artifacts verification +ok 1 - Build artifacts verification # SKIP dist/ not found — run npm run build first + --- + duration_ms: 0.926242 + type: 'test' + ... +# Subtest: parseArgs should parse basic command +ok 2 - parseArgs should parse basic command + --- + duration_ms: 1.724838 + type: 'test' + ... +# Subtest: parseArgs should parse agent and cadence +ok 3 - parseArgs should parse agent and cadence + --- + duration_ms: 0.360048 + type: 'test' + ... +# Subtest: parseArgs should parse equals sign syntax +ok 4 - parseArgs should parse equals sign syntax + --- + duration_ms: 2.032687 + type: 'test' + ... +# Subtest: parseArgs should parse dry-run flag +ok 5 - parseArgs should parse dry-run flag + --- + duration_ms: 0.379436 + type: 'test' + ... +# Subtest: parseArgs should parse port with default +ok 6 - parseArgs should parse port with default + --- + duration_ms: 0.291568 + type: 'test' + ... +# Subtest: parseArgs should parse custom port +ok 7 - parseArgs should parse custom port + --- + duration_ms: 0.337072 + type: 'test' + ... +# Subtest: parseArgs should parse ignore-logs flag +ok 8 - parseArgs should parse ignore-logs flag + --- + duration_ms: 0.281921 + type: 'test' + ... +# Subtest: parseArgs should parse memory flags +ok 9 - parseArgs should parse memory flags + --- + duration_ms: 1.278981 + type: 'test' + ... +# Subtest: parseArgs should parse memory flags with equals +ok 10 - parseArgs should parse memory flags with equals + --- + duration_ms: 0.545417 + type: 'test' + ... +# Subtest: cmdList + # Subtest: should list active locks and identify unknown agents + ok 1 - should list active locks and identify unknown agents + --- + duration_ms: 3.59888 + type: 'test' + ... + 1..1 +ok 11 - cmdList + --- + duration_ms: 4.913376 + type: 'suite' + ... +# No TORCH installation detected in this directory. +# Looked for: +# - A torch/ subdirectory containing roster.json or bin/ +# - A package.json with name "torch-lock" (root install) +# Initializing torch in /app/test-ops-remove-yhxdKA/project-force/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-yhxdKA/project-force/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# No package.json found in host root. Skipping script injection. +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - src/proposals/ (governance proposals) +# - torch-lock npm package (via npm uninstall) +# Removing TORCH... +# Removed torch/ (TORCH install directory) +# Removed torch-config.json +# Removed .torch/ (prompt history) +# Removed src/proposals/ (governance proposals) +# Removed empty src/ directory +# Running npm uninstall torch-lock... +# Uninstalled torch-lock package. +# TORCH has been completely removed from this project. +# If you used TORCH environment variables (NOSTR_LOCK_*, TORCH_*), +# remember to remove them from your shell profile or CI configuration. +# Initializing torch in /app/test-ops-remove-yhxdKA/project-runtime/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-yhxdKA/project-runtime/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# No package.json found in host root. Skipping script injection. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - .scheduler-memory/ (memory store) +# - task-logs/ (scheduler logs) +# - src/proposals/ (governance proposals) +# - torch-lock npm package (via npm uninstall) +# Removing TORCH... +# Removed torch/ (TORCH install directory) +# Removed torch-config.json +# Removed .torch/ (prompt history) +# Removed .scheduler-memory/ (memory store) +# Removed task-logs/ (scheduler logs) +# Removed src/proposals/ (governance proposals) +# Removed empty src/ directory +# Running npm uninstall torch-lock... +# Uninstalled torch-lock package. +# TORCH has been completely removed from this project. +# If you used TORCH environment variables (NOSTR_LOCK_*, TORCH_*), +# remember to remove them from your shell profile or CI configuration. +# Initializing torch in /app/test-ops-remove-yhxdKA/project-proposals/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-yhxdKA/project-proposals/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# No package.json found in host root. Skipping script injection. +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - src/proposals/ (governance proposals) +# - torch-lock npm package (via npm uninstall) +# Removing TORCH... +# Removed torch/ (TORCH install directory) +# Removed torch-config.json +# Removed .torch/ (prompt history) +# Removed src/proposals/ (governance proposals) +# Removed empty src/ directory +# Running npm uninstall torch-lock... +# Uninstalled torch-lock package. +# TORCH has been completely removed from this project. +# If you used TORCH environment variables (NOSTR_LOCK_*, TORCH_*), +# remember to remove them from your shell profile or CI configuration. +# Initializing torch in /app/test-ops-remove-yhxdKA/project-scripts/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-yhxdKA/project-scripts/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Added script: "torch:dashboard" +# Added script: "torch:check" +# Added script: "torch:lock" +# Added script: "torch:health" +# Added script: "torch:memory:list" +# Added script: "torch:memory:inspect" +# Updated package.json with convenience scripts. +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - src/proposals/ (governance proposals) +# - torch:* scripts from package.json +# - torch-lock npm package (via npm uninstall) +# Removing TORCH... +# Removed torch/ (TORCH install directory) +# Removed torch-config.json +# Removed .torch/ (prompt history) +# Removed src/proposals/ (governance proposals) +# Removed empty src/ directory +# Removed script: "torch:dashboard" +# Removed script: "torch:check" +# Removed script: "torch:lock" +# Removed script: "torch:health" +# Removed script: "torch:memory:list" +# Removed script: "torch:memory:inspect" +# Updated package.json. +# Running npm uninstall torch-lock... +# Uninstalled torch-lock package. +# TORCH has been completely removed from this project. +# If you used TORCH environment variables (NOSTR_LOCK_*, TORCH_*), +# remember to remove them from your shell profile or CI configuration. +# Initializing torch in /app/test-ops-remove-yhxdKA/project-cancel/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-yhxdKA/project-cancel/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# No package.json found in host root. Skipping script injection. +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - src/proposals/ (governance proposals) +# - torch-lock npm package (via npm uninstall) +# Removal cancelled. +# Initializing torch in /app/test-ops-remove-yhxdKA/project-confirm/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-remove-yhxdKA/project-confirm/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-namespace-agent-lock +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-namespace-agent-lock&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# No package.json found in host root. Skipping script injection. +# The following TORCH artifacts will be removed: +# - torch/ (TORCH install directory) +# - torch-config.json +# - .torch/ (prompt history) +# - src/proposals/ (governance proposals) +# - torch-lock npm package (via npm uninstall) +# Removing TORCH... +# Removed torch/ (TORCH install directory) +# Removed torch-config.json +# Removed .torch/ (prompt history) +# Removed src/proposals/ (governance proposals) +# Removed empty src/ directory +# Running npm uninstall torch-lock... +# Uninstalled torch-lock package. +# TORCH has been completely removed from this project. +# If you used TORCH environment variables (NOSTR_LOCK_*, TORCH_*), +# remember to remove them from your shell profile or CI configuration. +# Subtest: cmdRemove reports nothing when no TORCH installation exists +ok 12 - cmdRemove reports nothing when no TORCH installation exists + --- + duration_ms: 3.038379 + type: 'test' + ... +# Subtest: cmdRemove with --force removes torch/ directory +ok 13 - cmdRemove with --force removes torch/ directory + --- + duration_ms: 989.504145 + type: 'test' + ... +# Subtest: cmdRemove removes runtime artifacts (task-logs, .scheduler-memory) +ok 14 - cmdRemove removes runtime artifacts (task-logs, .scheduler-memory) + --- + duration_ms: 907.601118 + type: 'test' + ... +# Subtest: cmdRemove removes src/proposals/ and cleans empty src/ +ok 15 - cmdRemove removes src/proposals/ and cleans empty src/ + --- + duration_ms: 920.981955 + type: 'test' + ... +# Subtest: cmdRemove cleans torch:* scripts from host package.json +ok 16 - cmdRemove cleans torch:* scripts from host package.json + --- + duration_ms: 470.439286 + type: 'test' + ... +# Subtest: cmdRemove cancels when user declines confirmation +ok 17 - cmdRemove cancels when user declines confirmation + --- + duration_ms: 33.744468 + type: 'test' + ... +# Subtest: cmdRemove confirmed via mockAnswers removes artifacts +ok 18 - cmdRemove confirmed via mockAnswers removes artifacts + --- + duration_ms: 948.239051 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: enabled (Basic Auth) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Subtest: Dashboard Authentication + # Subtest: returns 401 when auth is required but missing + ok 1 - returns 401 when auth is required but missing + --- + duration_ms: 29.238901 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: enabled (Basic Auth) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: returns 401 when malformed auth header is provided + ok 2 - returns 401 when malformed auth header is provided + --- + duration_ms: 9.100462 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: enabled (Basic Auth) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: returns 200 when valid credentials are provided + ok 3 - returns 200 when valid credentials are provided + --- + duration_ms: 8.364816 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: enabled (Basic Auth) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: returns 401 when password has different byte length than stored credential + ok 4 - returns 401 when password has different byte length than stored credential + --- + duration_ms: 13.761832 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: returns 200 when auth is disabled + ok 5 - returns 200 when auth is disabled + --- + duration_ms: 5.662333 + type: 'test' + ... + 1..5 +ok 19 - Dashboard Authentication + --- + duration_ms: 69.348832 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Subtest: Dashboard Configuration Exposure Security +ok 20 - Dashboard Configuration Exposure Security + --- + duration_ms: 37.14911 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Subtest: Dashboard Configuration Security + # Subtest: sanitizes config when auth is disabled + ok 1 - sanitizes config when auth is disabled + --- + duration_ms: 32.622951 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: enabled (Basic Auth) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: sanitizes auth credentials even when authenticated + ok 2 - sanitizes auth credentials even when authenticated + --- + duration_ms: 11.95121 + type: 'test' + ... + 1..2 +ok 21 - Dashboard Configuration Security + --- + duration_ms: 47.363299 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Authentication: DISABLED (Dashboard is public) +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Subtest: Dashboard Path Traversal Security Fix + # Subtest: allows access to valid dashboard index + ok 1 - allows access to valid dashboard index + --- + duration_ms: 34.895447 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Authentication: DISABLED (Dashboard is public) +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /../../etc/passwd + ok 2 - blocks traversal attempt: /../../etc/passwd + --- + duration_ms: 9.150152 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Authentication: DISABLED (Dashboard is public) +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /dashboard/../../etc/passwd + ok 3 - blocks traversal attempt: /dashboard/../../etc/passwd + --- + duration_ms: 6.146083 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Authentication: DISABLED (Dashboard is public) +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /dashboard/../../../etc/passwd + ok 4 - blocks traversal attempt: /dashboard/../../../etc/passwd + --- + duration_ms: 5.195854 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /../package.json + ok 5 - blocks traversal attempt: /../package.json + --- + duration_ms: 6.907551 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /dashboard/../package.json + ok 6 - blocks traversal attempt: /dashboard/../package.json + --- + duration_ms: 4.660111 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /dashboard/%2e%2e/package.json + ok 7 - blocks traversal attempt: /dashboard/%2e%2e/package.json + --- + duration_ms: 3.099613 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /dashboard/%2e%2e%2fpackage.json + ok 8 - blocks traversal attempt: /dashboard/%2e%2e%2fpackage.json + --- + duration_ms: 3.083442 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /..%2fpackage.json + ok 9 - blocks traversal attempt: /..%2fpackage.json + --- + duration_ms: 5.47504 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) +# (node:18917) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added to [process]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit +# (Use `node --trace-warnings ...` to show where the warning was created) +# (node:18917) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added to [process]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit + # Subtest: blocks traversal attempt: /%2e%2e%2fpackage.json + ok 10 - blocks traversal attempt: /%2e%2e%2fpackage.json + --- + duration_ms: 4.507203 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /dashboard/..%5cpackage.json + ok 11 - blocks traversal attempt: /dashboard/..%5cpackage.json + --- + duration_ms: 3.84075 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /dashboard/..%252fpackage.json + ok 12 - blocks traversal attempt: /dashboard/..%252fpackage.json + --- + duration_ms: 4.498108 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /dashboard/....//package.json + ok 13 - blocks traversal attempt: /dashboard/....//package.json + --- + duration_ms: 2.872265 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks traversal attempt: /dashboard/.../package.json + ok 14 - blocks traversal attempt: /dashboard/.../package.json + --- + duration_ms: 2.580478 + type: 'test' + ... +# Authentication: DISABLED (Dashboard is public) +# Authentication: DISABLED (Dashboard is public) +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: //etc/passwd + ok 15 - blocks traversal attempt: //etc/passwd + --- + duration_ms: 3.54083 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined + # Subtest: blocks traversal attempt: /dashboard//../../etc/passwd + ok 16 - blocks traversal attempt: /dashboard//../../etc/passwd + --- + duration_ms: 2.70972 + type: 'test' + ... + # Subtest: allows traversal within allowed paths + ok 17 - allows traversal within allowed paths + --- + duration_ms: 3.853124 + type: 'test' + ... + 1..17 +ok 22 - Dashboard Path Traversal Security Fix + --- + duration_ms: 113.028128 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Authentication: DISABLED (Dashboard is public) +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Authentication: DISABLED (Dashboard is public) +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Subtest: Dashboard File Access Security + # Subtest: allows access to dashboard assets + ok 1 - allows access to dashboard assets + --- + duration_ms: 31.361991 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: allows access to global assets + ok 2 - allows access to global assets + --- + duration_ms: 10.741249 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: allows access to landing page + ok 3 - allows access to landing page + --- + duration_ms: 6.503968 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks access to package.json + ok 4 - blocks access to package.json + --- + duration_ms: 7.037387 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks access to src/dashboard.mjs + ok 5 - blocks access to src/dashboard.mjs + --- + duration_ms: 5.457275 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks access to random root files + ok 6 - blocks access to random root files + --- + duration_ms: 3.720411 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: allows access to torch-config.json via special handler + ok 7 - allows access to torch-config.json via special handler + --- + duration_ms: 5.136288 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# NODE_V8_COVERAGE: undefined +# Authentication: DISABLED (Dashboard is public) + # Subtest: blocks directory traversal attempts + ok 8 - blocks directory traversal attempts + --- + duration_ms: 4.660551 + type: 'test' + ... +# Dashboard running at http://127.0.0.1:0/dashboard/ +# Serving files from /app +# Using configuration from /app +# Authentication: DISABLED (Dashboard is public) +# NODE_V8_COVERAGE: undefined + # Subtest: responses include security headers + ok 9 - responses include security headers + --- + duration_ms: 6.033087 + type: 'test' + ... + # Subtest: error responses include security headers + ok 10 - error responses include security headers + --- + duration_ms: 5.761243 + type: 'test' + ... + 1..10 +ok 23 - Dashboard File Access Security + --- + duration_ms: 90.977137 + type: 'test' + ... +# Subtest: ExitError + # Subtest: should capture the code and message correctly + ok 1 - should capture the code and message correctly + --- + duration_ms: 1.057514 + type: 'test' + ... + # Subtest: should be an instance of Error and ExitError + ok 2 - should be an instance of Error and ExitError + --- + duration_ms: 0.271255 + type: 'test' + ... + # Subtest: should have a stack trace + ok 3 - should have a stack trace + --- + duration_ms: 0.497301 + type: 'test' + ... + # Subtest: should have the correct name + ok 4 - should have the correct name + --- + duration_ms: 0.186978 + type: 'test' + ... + 1..4 +ok 24 - ExitError + --- + duration_ms: 3.705897 + type: 'suite' + ... +# Subtest: createProposal should throw error for disallowed target +ok 25 - createProposal should throw error for disallowed target + --- + duration_ms: 6.836596 + type: 'test' + ... +# Subtest: validateProposal should return invalid for disallowed target +ok 26 - validateProposal should return invalid for disallowed target + --- + duration_ms: 9.17598 + type: 'test' + ... +# Subtest: validateProposal should return valid for allowed target +ok 27 - validateProposal should return valid for allowed target + --- + duration_ms: 4.914563 + type: 'test' + ... +# Subtest: Governance Service Security: Command Injection Prevention +ok 28 - Governance Service Security: Command Injection Prevention + --- + duration_ms: 170.736934 + type: 'test' + ... +# Subtest: SCN-proposal-create: createProposal writes meta.json, new.md, change.diff +ok 29 - SCN-proposal-create: createProposal writes meta.json, new.md, change.diff + --- + duration_ms: 20.541985 + type: 'test' + ... +# Subtest: SCN-proposal-list: listProposals returns created proposal; status filter works +ok 30 - SCN-proposal-list: listProposals returns created proposal; status filter works + --- + duration_ms: 2.576162 + type: 'test' + ... +# Subtest: SCN-proposal-reject: rejectProposal marks proposal with rejected status and reason +ok 31 - SCN-proposal-reject: rejectProposal marks proposal with rejected status and reason + --- + duration_ms: 17.210683 + type: 'test' + ... +# Subtest: SCN-archive-naming: applyProposal archives with timestamp_hash filename and sidecar +ok 32 - SCN-archive-naming: applyProposal archives with timestamp_hash filename and sidecar + --- + duration_ms: 46.543266 + type: 'test' + ... +# Subtest: SCN-version-list: listPromptVersions returns versions newest-first with metadata +ok 33 - SCN-version-list: listPromptVersions returns versions newest-first with metadata + --- + duration_ms: 16.904293 + type: 'test' + ... +# Subtest: SCN-rollback-latest: rollbackPrompt restores the most recently archived content +ok 34 - SCN-rollback-latest: rollbackPrompt restores the most recently archived content + --- + duration_ms: 6.96187 + type: 'test' + ... +# Subtest: SCN-rollback-hash: rollbackPrompt --strategy restores matching archive +ok 35 - SCN-rollback-hash: rollbackPrompt --strategy restores matching archive + --- + duration_ms: 6.091025 + type: 'test' + ... +# Initializing torch in /app/test_validation_env/valid-dir_123... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created valid-dir_123/roster.json +# Created valid-dir_123/META_PROMPTS.md +# Created valid-dir_123/scheduler-flow.md +# Created valid-dir_123/daily-scheduler.md +# Created valid-dir_123/weekly-scheduler.md +# Created 23 files in valid-dir_123/prompts/daily/ +# Created 24 files in valid-dir_123/prompts/weekly/ +# Created test_validation_env/valid-dir_123/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created valid-dir_123/TORCH_DASHBOARD.md +# Added script: "torch:dashboard" +# Added script: "torch:check" +# Added script: "torch:lock" +# Added script: "torch:health" +# Added script: "torch:memory:list" +# Added script: "torch:memory:inspect" +# Updated package.json with convenience scripts. +# Initialization complete. +# You can now customize the files in valid-dir_123/ +# ● From torch-config.json: +# - Hashtag: ns-agent-lock +# - Namespace: ns +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=ns-agent-lock&namespace=ns&relays= +# Initializing torch in /app/test_validation_env... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Skipping package.json to avoid overwriting host package.json (installing to root). +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created roster.json +# Created META_PROMPTS.md +# Created scheduler-flow.md +# Created daily-scheduler.md +# Created weekly-scheduler.md +# Created 23 files in prompts/daily/ +# Created 24 files in prompts/weekly/ +# Created test_validation_env/.gitignore with node_modules +# Updating existing torch-config.json... +# Saved configuration to torch-config.json +# Created TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in / +# ● From torch-config.json: +# - Hashtag: ns-agent-lock +# - Namespace: ns +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=ns-agent-lock&namespace=ns&relays= +# Initializing torch in /app/test_validation_env/path/to/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created path/to/torch/roster.json +# Created path/to/torch/META_PROMPTS.md +# Created path/to/torch/scheduler-flow.md +# Created path/to/torch/daily-scheduler.md +# Created path/to/torch/weekly-scheduler.md +# Created 23 files in path/to/torch/prompts/daily/ +# Created 24 files in path/to/torch/prompts/weekly/ +# Created test_validation_env/path/to/torch/.gitignore with node_modules +# Updating existing torch-config.json... +# Saved configuration to torch-config.json +# Created path/to/torch/TORCH_DASHBOARD.md +# Script "torch:dashboard" already exists, skipping. +# Script "torch:check" already exists, skipping. +# Script "torch:lock" already exists, skipping. +# Script "torch:health" already exists, skipping. +# Script "torch:memory:list" already exists, skipping. +# Script "torch:memory:inspect" already exists, skipping. +# Initialization complete. +# You can now customize the files in path/to/torch/ +# ● From torch-config.json: +# - Hashtag: ns-agent-lock +# - Namespace: ns +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=ns-agent-lock&namespace=ns&relays= +# Subtest: cmdInit should validate install directory name + # Subtest: should reject directory with semicolon + ok 1 - should reject directory with semicolon + --- + duration_ms: 3.011317 + type: 'test' + ... + # Subtest: should reject directory with spaces + ok 2 - should reject directory with spaces + --- + duration_ms: 0.375458 + type: 'test' + ... + # Subtest: should reject directory with quotes + ok 3 - should reject directory with quotes + --- + duration_ms: 0.369175 + type: 'test' + ... + # Subtest: should reject directory with backticks + ok 4 - should reject directory with backticks + --- + duration_ms: 0.285067 + type: 'test' + ... + # Subtest: should reject directory with $ + ok 5 - should reject directory with $ + --- + duration_ms: 0.274244 + type: 'test' + ... + # Subtest: should accept valid directory names + ok 6 - should accept valid directory names + --- + duration_ms: 41.855143 + type: 'test' + ... + # Subtest: should accept "." + ok 7 - should accept "." + --- + duration_ms: 34.88762 + type: 'test' + ... + # Subtest: should accept nested paths with slashes + ok 8 - should accept nested paths with slashes + --- + duration_ms: 34.377425 + type: 'test' + ... + 1..8 +ok 36 - cmdInit should validate install directory name + --- + duration_ms: 175.595343 + type: 'test' + ... +# Subtest: src/lib.mjs + # Subtest: cmdCheck + # Subtest: returns correct structure with empty locks + ok 1 - returns correct structure with empty locks + --- + duration_ms: 2.838803 + type: 'test' + ... + # Subtest: identifies locked agents + ok 2 - identifies locked agents + --- + duration_ms: 0.594157 + type: 'test' + ... + # Subtest: excludes paused agents + ok 3 - excludes paused agents + --- + duration_ms: 0.767145 + type: 'test' + ... + # Subtest: identifies unknown locked agents + ok 4 - identifies unknown locked agents + --- + duration_ms: 0.783834 + type: 'test' + ... + # Subtest: suppresses relay query loggers when quiet mode is enabled + ok 5 - suppresses relay query loggers when quiet mode is enabled + --- + duration_ms: 0.855328 + type: 'test' + ... + 1..5 + ok 1 - cmdCheck + --- + duration_ms: 7.180024 + type: 'suite' + ... + # Subtest: cmdLock + # Subtest: successfully locks an available agent + ok 1 - successfully locks an available agent + --- + duration_ms: 24.471388 + type: 'test' + ... + # Subtest: fails if agent is not in roster + ok 2 - fails if agent is not in roster + --- + duration_ms: 9.676137 + type: 'test' + ... + # Subtest: fails if agent is already locked + ok 3 - fails if agent is already locked + --- + duration_ms: 9.034972 + type: 'test' + ... + # Subtest: fails if agent is already completed + ok 4 - fails if agent is already completed + --- + duration_ms: 10.153814 + type: 'test' + ... + # Subtest: fails if race check is lost + ok 5 - fails if race check is lost + --- + duration_ms: 12.941646 + type: 'test' + ... + # Subtest: handles race condition with identical timestamps using eventId tie-breaker (we win) + ok 6 - handles race condition with identical timestamps using eventId tie-breaker (we win) + --- + duration_ms: 23.999932 + type: 'test' + ... + # Subtest: handles race condition with identical timestamps using eventId tie-breaker (we lose) + ok 7 - handles race condition with identical timestamps using eventId tie-breaker (we lose) + --- + duration_ms: 12.323615 + type: 'test' + ... + # Subtest: dry run does not publish + ok 8 - dry run does not publish + --- + duration_ms: 9.529054 + type: 'test' + ... + 1..8 + ok 2 - cmdLock + --- + duration_ms: 113.57017 + type: 'suite' + ... + # Subtest: cmdList + # Subtest: lists active locks + ok 1 - lists active locks + --- + duration_ms: 1.130929 + type: 'test' + ... + # Subtest: warns about unknown agents + ok 2 - warns about unknown agents + --- + duration_ms: 0.497456 + type: 'test' + ... + # Subtest: handles no locks + ok 3 - handles no locks + --- + duration_ms: 0.330373 + type: 'test' + ... + 1..3 + ok 3 - cmdList + --- + duration_ms: 2.19462 + type: 'suite' + ... + # Subtest: cmdComplete + # Subtest: successfully completes an active lock + ok 1 - successfully completes an active lock + --- + duration_ms: 1.13006 + type: 'test' + ... + # Subtest: fails if no active lock found + ok 2 - fails if no active lock found + --- + duration_ms: 0.634843 + type: 'test' + ... + # Subtest: detects already completed task + ok 3 - detects already completed task + --- + duration_ms: 0.428571 + type: 'test' + ... + 1..3 + ok 4 - cmdComplete + --- + duration_ms: 2.42024 + type: 'suite' + ... + 1..4 +ok 37 - src/lib.mjs + --- + duration_ms: 126.396378 + type: 'suite' + ... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# Published to 1/3 relays (required=1, timeout=25ms) +# [publish:primary] Publishing to 2 relays (wss://relay-a, wss://relay-b)... +# [publish:primary] Publishing to 2 relays (wss://relay-a, wss://relay-b)... +# Published to 2/2 relays (required=2, timeout=25ms) +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# [publish:primary] Publishing to 3 relays (wss://relay-a, wss://relay-b, wss://relay-c)... +# Published to 2/3 relays (required=2, timeout=25ms) +# (node:19096) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time +# (Use `node --trace-warnings ...` to show where the warning was created) +# Subtest: ci-resilience lock acquisition under unstable relays + # Subtest: recovers after all relays are down for an initial outage window + ok 1 - recovers after all relays are down for an initial outage window + --- + duration_ms: 24.358184 + type: 'test' + ... + # Subtest: survives intermittent timeout spikes and reaches quorum with bounded retries + ok 2 - survives intermittent timeout spikes and reaches quorum with bounded retries + --- + duration_ms: 2.242697 + type: 'test' + ... + # Subtest: handles staggered relay recovery and never exceeds retry budget + ok 3 - handles staggered relay recovery and never exceeds retry budget + --- + duration_ms: 3.534892 + type: 'test' + ... + 1..3 +ok 38 - ci-resilience lock acquisition under unstable relays + --- + duration_ms: 31.918494 + type: 'suite' + ... +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# Published to 1/1 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# Published to 1/1 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# [publish:primary] Publishing to 1 relays (wss://relay-a)... +# (node:19103) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time +# (Use `node --trace-warnings ...` to show where the warning was created) +# Subtest: publishLock retry behavior + # Subtest: succeeds immediately on first attempt without retries + ok 1 - succeeds immediately on first attempt without retries + --- + duration_ms: 6.695212 + type: 'test' + ... + # Subtest: retries a transient failure then succeeds within retry budget with bounded jitter + ok 2 - retries a transient failure then succeeds within retry budget with bounded jitter + --- + duration_ms: 3.058739 + type: 'test' + ... + # Subtest: returns terminal relay_publish_quorum_failure after exhausting retry budget + ok 3 - returns terminal relay_publish_quorum_failure after exhausting retry budget + --- + duration_ms: 3.520858 + type: 'test' + ... + # Subtest: short-circuits non-retryable failures without extra attempts + ok 4 - short-circuits non-retryable failures without extra attempts + --- + duration_ms: 2.219272 + type: 'test' + ... + 1..4 +ok 39 - publishLock retry behavior + --- + duration_ms: 17.592441 + type: 'suite' + ... +# Subtest: lock-ops + # Subtest: parseLockEvent + # Subtest: parses a valid lock event correctly + ok 1 - parses a valid lock event correctly + --- + duration_ms: 1.797119 + type: 'test' + ... + # Subtest: returns nulls when content is invalid JSON + ok 2 - returns nulls when content is invalid JSON + --- + duration_ms: 0.581361 + type: 'test' + ... + # Subtest: returns nulls when required content fields are missing + ok 3 - returns nulls when required content fields are missing + --- + duration_ms: 0.29189 + type: 'test' + ... + # Subtest: returns nulls when content is an array (not object) + ok 4 - returns nulls when content is an array (not object) + --- + duration_ms: 0.530541 + type: 'test' + ... + 1..4 + ok 1 - parseLockEvent + --- + duration_ms: 4.243173 + type: 'suite' + ... +# [publish:primary] Publishing to 2 relays (wss://primary-a, wss://primary-b)... +# [publish:primary] Publishing to 2 relays (wss://primary-a, wss://primary-b)... +# Published to 2/2 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://primary-down)... +# [publish:primary] Publishing to 1 relays (wss://primary-down)... +# [publish:primary] Publishing to 1 relays (wss://primary-down)... +# [publish:primary] Publishing to 1 relays (wss://primary-bad)... +# [publish:primary] Publishing to 5 relays (relay-timeout, wss://dns, wss://tcp, wss://tls, wss://ws)... +# [publish:primary] Publishing to 2 relays (wss://relay-bad, wss://relay-ok)... +# {"event":"lock_publish_quorum_met","correlationId":"ef2696f4-2592-4901-9c63-5d08cfbea79b","attemptId":"77bfcec1-3fc0-49b3-a693-e9703659f206","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":1}],"totalElapsedMs":1} +# Published to 1/2 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://primary-bad)... +# [publish:fallback] Publishing to 1 relays (wss://fallback-ok)... +# {"event":"lock_publish_quorum_met","correlationId":"48dc40b2-0510-4ccb-8d8a-9a0156eccba9","attemptId":"9f6a8553-1305-4641-ab39-8cf63b88c0e2","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":0}],"totalElapsedMs":0} +# Published to 1/2 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 2 relays (wss://bad, wss://healthy)... +# {"event":"lock_publish_quorum_met","correlationId":"b050dc7e-efff-4ae3-b609-38693302ef4c","attemptId":"1933c198-f9ad-4d31-86b3-b3e630166579","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":1}],"totalElapsedMs":1} +# Published to 1/2 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 2 relays (wss://healthy, wss://bad)... +# {"event":"lock_publish_quorum_met","correlationId":"da358fb7-c592-4125-b1fb-45cd5f34be37","attemptId":"520343a4-e876-4548-8c54-43381fd9e4a0","publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":2,"elapsedMs":0}],"totalElapsedMs":0} +# Published to 1/2 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://healthy)... +# {"event":"lock_publish_quorum_met","correlationId":"910d741f-fed8-4102-8163-9a65422733fe","attemptId":"e46252bb-646d-43d0-93e3-9b173cc039a0","publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"elapsedMs":1}],"totalElapsedMs":1} +# Published to 1/1 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 1 relays (wss://healthy)... +# {"event":"lock_publish_quorum_met","correlationId":"be0b2e38-ddee-4800-aa93-84c24ac746ba","attemptId":"4b9bab18-4d9a-48a1-813c-8bba197e5125","publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":1,"elapsedMs":0}],"totalElapsedMs":0} +# Published to 1/1 relays (required=1, timeout=200ms) +# [publish:primary] Publishing to 2 relays (wss://primary-a, wss://primary-b)... +# [publish:fallback] Publishing to 1 relays (wss://fallback-healthy)... +# {"event":"lock_publish_quorum_met","correlationId":"3d5efcfe-65a0-4625-8a3a-f7c5bb24d2c3","attemptId":"74ad48aa-e3d9-4deb-b5c9-9c2660fbb80d","publishAttempt":1,"successCount":1,"relayAttemptedCount":3,"requiredSuccesses":1,"timeoutMs":200,"retryTimeline":[{"publishAttempt":1,"successCount":1,"relayAttemptedCount":3,"elapsedMs":0}],"totalElapsedMs":0} +# Published to 1/3 relays (required=1, timeout=200ms) + # Subtest: queryLocks + # Subtest: falls back to fallback relays when primary query fails + ok 1 - falls back to fallback relays when primary query fails + --- + duration_ms: 27.242181 + type: 'test' + ... + 1..1 + ok 2 - queryLocks + --- + duration_ms: 27.744678 + type: 'suite' + ... + # Subtest: publishLock + # Subtest: retries transient failures and succeeds on a later attempt + ok 1 - retries transient failures and succeeds on a later attempt + --- + duration_ms: 4.877242 + type: 'test' + ... + # Subtest: fails after retry budget is exhausted for persistent transient failures + ok 2 - fails after retry budget is exhausted for persistent transient failures + --- + duration_ms: 3.530609 + type: 'test' + ... + # Subtest: fails without retry for persistent validation failures + ok 3 - fails without retry for persistent validation failures + --- + duration_ms: 1.177681 + type: 'test' + ... + # Subtest: includes per-relay reason categories and retry metadata in failure diagnostics + ok 4 - includes per-relay reason categories and retry metadata in failure diagnostics + --- + duration_ms: 4.313412 + type: 'test' + ... + # Subtest: returns success when mixed relay outcomes still satisfy quorum + ok 5 - returns success when mixed relay outcomes still satisfy quorum + --- + duration_ms: 1.472768 + type: 'test' + ... + # Subtest: uses fallback relays to satisfy min success quorum + ok 6 - uses fallback relays to satisfy min success quorum + --- + duration_ms: 1.184148 + type: 'test' + ... + # Subtest: quarantines repeatedly failing relays and still reaches quorum with one healthy relay + ok 7 - quarantines repeatedly failing relays and still reaches quorum with one healthy relay + --- + duration_ms: 2.509373 + type: 'test' + ... + # Subtest: uses fallback and min active pool to reintroduce quarantined relay when needed + ok 8 - uses fallback and min active pool to reintroduce quarantined relay when needed + --- + duration_ms: 1.143984 + type: 'test' + ... + 1..8 + ok 3 - publishLock + --- + duration_ms: 21.044457 + type: 'suite' + ... + 1..3 +ok 40 - lock-ops + --- + duration_ms: 54.074318 + type: 'suite' + ... +# Warning: Failed to read log dir logs/daily: Permission denied +# Subtest: getCompletedAgents + # Subtest: returns empty set if directory read fails (non-ENOENT) + ok 1 - returns empty set if directory read fails (non-ENOENT) + --- + duration_ms: 2.352042 + type: 'test' + ... + # Subtest: returns empty set if directory does not exist (ENOENT) + ok 2 - returns empty set if directory does not exist (ENOENT) + --- + duration_ms: 0.332722 + type: 'test' + ... + # Subtest: identifies daily completed agents correctly + ok 3 - identifies daily completed agents correctly + --- + duration_ms: 0.63139 + type: 'test' + ... + # Subtest: identifies weekly completed agents correctly + ok 4 - identifies weekly completed agents correctly + --- + duration_ms: 0.483786 + type: 'test' + ... + 1..4 +ok 41 - getCompletedAgents + --- + duration_ms: 5.68349 + type: 'test' + ... +# Subtest: main dispatch + # Subtest: should exit with code 1 if no command provided + ok 1 - should exit with code 1 if no command provided + --- + duration_ms: 1.873936 + type: 'test' + ... + # Subtest: should exit with code 1 if unknown command provided + ok 2 - should exit with code 1 if unknown command provided + --- + duration_ms: 0.704123 + type: 'test' + ... + # Subtest: should exit with code 1 if check command misses cadence + ok 3 - should exit with code 1 if check command misses cadence + --- + duration_ms: 0.908549 + type: 'test' + ... + # Subtest: should exit with code 1 if lock command misses agent + ok 4 - should exit with code 1 if lock command misses agent + --- + duration_ms: 0.780926 + type: 'test' + ... + # Subtest: should exit with code 1 if complete command misses agent + ok 5 - should exit with code 1 if complete command misses agent + --- + duration_ms: 0.764702 + type: 'test' + ... + # Subtest: should exit with code 1 if proposal command misses subcommand + ok 6 - should exit with code 1 if proposal command misses subcommand + --- + duration_ms: 0.441158 + type: 'test' + ... + 1..6 +ok 42 - main dispatch + --- + duration_ms: 132.443001 + type: 'suite' + ... +# Subtest: listMemories, inspectMemory, pinMemory, and unpinMemory support admin hooks +ok 43 - listMemories, inspectMemory, pinMemory, and unpinMemory support admin hooks + --- + duration_ms: 2.74099 + type: 'test' + ... +# Subtest: triggerPruneDryRun returns candidate metadata without deleting records +ok 44 - triggerPruneDryRun returns candidate metadata without deleting records + --- + duration_ms: 0.498817 + type: 'test' + ... +# Subtest: memoryStats reports counts/rates and retrieval telemetry remains redaction-safe +ok 45 - memoryStats reports counts/rates and retrieval telemetry remains redaction-safe + --- + duration_ms: 21.863892 + type: 'test' + ... +# Subtest: runPruneCycle respects prune feature-flag modes +ok 46 - runPruneCycle respects prune feature-flag modes + --- + duration_ms: 0.79477 + type: 'test' + ... +# Subtest: markMemoryMerged delegates to repository and clears cache +ok 47 - markMemoryMerged delegates to repository and clears cache + --- + duration_ms: 0.682886 + type: 'test' + ... +# Subtest: stores runtime events in signer/session namespace and clears scope +ok 48 - stores runtime events in signer/session namespace and clears scope + --- + duration_ms: 2.788206 + type: 'test' + ... +# Subtest: expires runtime events and records expiration metrics +ok 49 - expires runtime events and records expiration metrics + --- + duration_ms: 0.46791 + type: 'test' + ... +# Subtest: enforces LRU bounds and tracks eviction metrics +ok 50 - enforces LRU bounds and tracks eviction metrics + --- + duration_ms: 0.463855 + type: 'test' + ... +# Subtest: blocks decrypted/session-sensitive data from durable promotion without sanitizer pass +ok 51 - blocks decrypted/session-sensitive data from durable promotion without sanitizer pass + --- + duration_ms: 1.709317 + type: 'test' + ... +# Subtest: createEmbedderAdapter selects in-memory backend and supports vector CRUD +ok 52 - createEmbedderAdapter selects in-memory backend and supports vector CRUD + --- + duration_ms: 1.969886 + type: 'test' + ... +# Subtest: createEmbedderAdapter reads backend from environment +ok 53 - createEmbedderAdapter reads backend from environment + --- + duration_ms: 0.572821 + type: 'test' + ... +# Subtest: memory feature flags parse defaults and canary allow-lists +ok 54 - memory feature flags parse defaults and canary allow-lists + --- + duration_ms: 1.446142 + type: 'test' + ... +# Subtest: memory prune flag supports off, dry-run, and active modes +ok 55 - memory prune flag supports off, dry-run, and active modes + --- + duration_ms: 0.321774 + type: 'test' + ... +# Subtest: estimateTokenCount returns heuristic count +ok 56 - estimateTokenCount returns heuristic count + --- + duration_ms: 1.664486 + type: 'test' + ... +# Subtest: formatMemoryBlock converts memory record to display block +ok 57 - formatMemoryBlock converts memory record to display block + --- + duration_ms: 0.831254 + type: 'test' + ... +# Subtest: formatMemoryBlock handles missing optional fields and default clamping +ok 58 - formatMemoryBlock handles missing optional fields and default clamping + --- + duration_ms: 0.235992 + type: 'test' + ... +# Subtest: formatMemoryBlock respects custom clamping options +ok 59 - formatMemoryBlock respects custom clamping options + --- + duration_ms: 0.223364 + type: 'test' + ... +# Subtest: formatMemoryBlock handles edge cases for clamping +ok 60 - formatMemoryBlock handles edge cases for clamping + --- + duration_ms: 0.422517 + type: 'test' + ... +# Subtest: formatMemoriesForPrompt enforces token budget and k limit +ok 61 - formatMemoriesForPrompt enforces token budget and k limit + --- + duration_ms: 1.037583 + type: 'test' + ... +# Subtest: formatMemoriesForPrompt handles aggressive budget fitting +ok 62 - formatMemoriesForPrompt handles aggressive budget fitting + --- + duration_ms: 0.458307 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext injects context when enabled +ok 63 - renderPromptWithMemoryContext injects context when enabled + --- + duration_ms: 0.959876 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext returns base prompt when disabled +ok 64 - renderPromptWithMemoryContext returns base prompt when disabled + --- + duration_ms: 0.570024 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles missing query or service +ok 65 - renderPromptWithMemoryContext handles missing query or service + --- + duration_ms: 0.661394 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles circular agentContext gracefully +ok 66 - renderPromptWithMemoryContext handles circular agentContext gracefully + --- + duration_ms: 0.433982 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles agentContext as array of strings +ok 67 - renderPromptWithMemoryContext handles agentContext as array of strings + --- + duration_ms: 0.403986 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles agentContext as plain object +ok 68 - renderPromptWithMemoryContext handles agentContext as plain object + --- + duration_ms: 0.254155 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles agentContext as primitives +ok 69 - renderPromptWithMemoryContext handles agentContext as primitives + --- + duration_ms: 0.241106 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext calls updateMemoryUsage for retrieved memories +ok 70 - renderPromptWithMemoryContext calls updateMemoryUsage for retrieved memories + --- + duration_ms: 2.773934 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles empty memories gracefully +ok 71 - renderPromptWithMemoryContext handles empty memories gracefully + --- + duration_ms: 0.233915 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext handles null/undefined memories gracefully +ok 72 - renderPromptWithMemoryContext handles null/undefined memories gracefully + --- + duration_ms: 0.302865 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext respects TORCH_MEMORY_ENABLED=false +ok 73 - renderPromptWithMemoryContext respects TORCH_MEMORY_ENABLED=false + --- + duration_ms: 0.146265 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext respects retrieval allowlist +ok 74 - renderPromptWithMemoryContext respects retrieval allowlist + --- + duration_ms: 0.409698 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext passes k and tokenBudget +ok 75 - renderPromptWithMemoryContext passes k and tokenBudget + --- + duration_ms: 0.550039 + type: 'test' + ... +# Subtest: getRelevantMemories uses cached results when available +ok 76 - getRelevantMemories uses cached results when available + --- + duration_ms: 2.284702 + type: 'test' + ... +# Subtest: getRelevantMemories calls ranker and updates cache on miss +ok 77 - getRelevantMemories calls ranker and updates cache on miss + --- + duration_ms: 1.227146 + type: 'test' + ... +# Subtest: getRelevantMemories passes correct parameters to ranker +ok 78 - getRelevantMemories passes correct parameters to ranker + --- + duration_ms: 0.946375 + type: 'test' + ... +# Subtest: getRelevantMemories triggers updateMemoryUsage on repository +ok 79 - getRelevantMemories triggers updateMemoryUsage on repository + --- + duration_ms: 0.583389 + type: 'test' + ... +# Subtest: ingestEvents + # Subtest: happy path: successfully ingests events + ok 1 - happy path: successfully ingests events + --- + duration_ms: 7.095413 + type: 'test' + ... + # Subtest: skips ingestion when feature flag is disabled + ok 2 - skips ingestion when feature flag is disabled + --- + duration_ms: 0.590503 + type: 'test' + ... + # Subtest: clears cache after ingestion + ok 3 - clears cache after ingestion + --- + duration_ms: 2.00366 + type: 'test' + ... + # Subtest: skips duplicate windows + ok 4 - skips duplicate windows + --- + duration_ms: 1.291315 + type: 'test' + ... + # Subtest: propagates repository errors + ok 5 - propagates repository errors + --- + duration_ms: 1.618219 + type: 'test' + ... + 1..5 +ok 80 - ingestEvents + --- + duration_ms: 14.453031 + type: 'suite' + ... +# Subtest: ingestMemoryWindow gathers sources, redacts pii, chunks, embeds, links, and emits telemetry +ok 81 - ingestMemoryWindow gathers sources, redacts pii, chunks, embeds, links, and emits telemetry + --- + duration_ms: 6.79983 + type: 'test' + ... +# Subtest: ingestMemoryWindow dedupes overlapping windows by hashed content + agent + timestamp bucket +ok 82 - ingestMemoryWindow dedupes overlapping windows by hashed content + agent + timestamp bucket + --- + duration_ms: 0.942909 + type: 'test' + ... +# Subtest: pinMemory pins the memory and clears the cache +ok 83 - pinMemory pins the memory and clears the cache + --- + duration_ms: 3.24941 + type: 'test' + ... +# Subtest: pinMemory returns null for non-existent ID but still clears cache +ok 84 - pinMemory returns null for non-existent ID but still clears cache + --- + duration_ms: 0.598168 + type: 'test' + ... +# Subtest: unpinMemory unpins the memory and clears the cache +ok 85 - unpinMemory unpins the memory and clears the cache + --- + duration_ms: 0.733725 + type: 'test' + ... +# Subtest: unpinMemory returns null for non-existent ID but still clears cache +ok 86 - unpinMemory returns null for non-existent ID but still clears cache + --- + duration_ms: 0.855241 + type: 'test' + ... +# Subtest: createLifecyclePlan respects delete safety constraints and logs reasons +ok 87 - createLifecyclePlan respects delete safety constraints and logs reasons + --- + duration_ms: 4.390828 + type: 'test' + ... +# Subtest: createLifecyclePlan condenses near-duplicates and archives merged source records +ok 88 - createLifecyclePlan condenses near-duplicates and archives merged source records + --- + duration_ms: 1.052104 + type: 'test' + ... +# Subtest: applyLifecycleActions executes keep/archive/delete and merge markers +ok 89 - applyLifecycleActions executes keep/archive/delete and merge markers + --- + duration_ms: 14.812916 + type: 'test' + ... +# Subtest: filterAndRankMemories applies metadata filters and composite score +ok 90 - filterAndRankMemories applies metadata filters and composite score + --- + duration_ms: 3.255639 + type: 'test' + ... +# Subtest: formatMemoriesForPrompt returns prompt blocks and enforces token budget trimming +ok 91 - formatMemoriesForPrompt returns prompt blocks and enforces token budget trimming + --- + duration_ms: 1.387174 + type: 'test' + ... +# Subtest: isMemoryRetrievalEnabled supports global toggle and agent canary list +ok 92 - isMemoryRetrievalEnabled supports global toggle and agent canary list + --- + duration_ms: 0.396505 + type: 'test' + ... +# Subtest: renderPromptWithMemoryContext injects bounded memory block before base prompt +ok 93 - renderPromptWithMemoryContext injects bounded memory block before base prompt + --- + duration_ms: 0.877424 + type: 'test' + ... +# Subtest: runPruneCycle respects off mode +ok 94 - runPruneCycle respects off mode + --- + duration_ms: 21.990312 + type: 'test' + ... +# Subtest: runPruneCycle respects dry-run mode +ok 95 - runPruneCycle respects dry-run mode + --- + duration_ms: 0.666801 + type: 'test' + ... +# Subtest: runPruneCycle removes stale unpinned memories in active mode +ok 96 - runPruneCycle removes stale unpinned memories in active mode + --- + duration_ms: 4.524149 + type: 'test' + ... +# Subtest: runPruneCycle starts scheduler if requested +ok 97 - runPruneCycle starts scheduler if requested + --- + duration_ms: 1002.53747 + type: 'test' + ... +# (node:19227) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time +# (Use `node --trace-warnings ...` to show where the warning was created) +# Subtest: createDbAdvisoryLockProvider acquires and releases postgres advisory locks +ok 98 - createDbAdvisoryLockProvider acquires and releases postgres advisory locks + --- + duration_ms: 2.366652 + type: 'test' + ... +# Subtest: startMemoryMaintenanceScheduler runs all jobs and emits metrics including retries +ok 99 - startMemoryMaintenanceScheduler runs all jobs and emits metrics including retries + --- + duration_ms: 9.805076 + type: 'test' + ... +# Subtest: startMemoryMaintenanceScheduler skips jobs when feature flags disable memory +ok 100 - startMemoryMaintenanceScheduler skips jobs when feature flags disable memory + --- + duration_ms: 2.035566 + type: 'test' + ... +# Subtest: normalizeMemoryItem applies durable schema defaults and coercions +ok 101 - normalizeMemoryItem applies durable schema defaults and coercions + --- + duration_ms: 4.643052 + type: 'test' + ... +# Subtest: validateMemoryItem reports field-level errors +ok 102 - validateMemoryItem reports field-level errors + --- + duration_ms: 0.533112 + type: 'test' + ... +# Subtest: ingestEvents rejects invalid writes and logs structured validation details +ok 103 - ingestEvents rejects invalid writes and logs structured validation details + --- + duration_ms: 4.515963 + type: 'test' + ... +# (node:19241) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time +# (Use `node --trace-warnings ...` to show where the warning was created) +# Subtest: memoryStats with empty repository returns zero counts and rates +ok 104 - memoryStats with empty repository returns zero counts and rates + --- + duration_ms: 2.271636 + type: 'test' + ... +# Subtest: memoryStats with populated repository returns correct counts and totals +ok 105 - memoryStats with populated repository returns correct counts and totals + --- + duration_ms: 0.43379 + type: 'test' + ... +# Subtest: memoryStats calculates ingest throughput based on window +ok 106 - memoryStats calculates ingest throughput based on window + --- + duration_ms: 6.486388 + type: 'test' + ... +# Subtest: memoryStats reflects deleted count from prune cycle +ok 107 - memoryStats reflects deleted count from prune cycle + --- + duration_ms: 9.421645 + type: 'test' + ... +# Subtest: memoryStats handles windowMs parameter correctly +ok 108 - memoryStats handles windowMs parameter correctly + --- + duration_ms: 0.542729 + type: 'test' + ... +# Subtest: loadMemoryPromptTemplates loads all memory prompt templates from disk +ok 109 - loadMemoryPromptTemplates loads all memory prompt templates from disk + --- + duration_ms: 1.578857 + type: 'test' + ... +# Subtest: summarizeEvents retries with repair prompt when first response is malformed JSON +ok 110 - summarizeEvents retries with repair prompt when first response is malformed JSON + --- + duration_ms: 2.261287 + type: 'test' + ... +# Subtest: summarizeEvents falls back to deterministic minimal summary with conservative importance when parsing fails twice +ok 111 - summarizeEvents falls back to deterministic minimal summary with conservative importance when parsing fails twice + --- + duration_ms: 0.523248 + type: 'test' + ... +# Subtest: telemetry should not log to stdout or stderr by default +ok 112 - telemetry should not log to stdout or stderr by default + --- + duration_ms: 69.660975 + type: 'test' + ... +# Subtest: telemetry should log to stderr when NODE_DEBUG=torch-memory is set +ok 113 - telemetry should log to stderr when NODE_DEBUG=torch-memory is set + --- + duration_ms: 80.454939 + type: 'test' + ... +# Subtest: schema validation covers required fields, coercion, and rejection paths +ok 114 - schema validation covers required fields, coercion, and rejection paths + --- + duration_ms: 3.012316 + type: 'test' + ... +# Subtest: summarizer parser accepts valid json and recovers after malformed json response +ok 115 - summarizer parser accepts valid json and recovers after malformed json response + --- + duration_ms: 2.37764 + type: 'test' + ... +# Subtest: ingest integration persists memory records and links embeddings from event batches +ok 116 - ingest integration persists memory records and links embeddings from event batches + --- + duration_ms: 3.952477 + type: 'test' + ... +# Subtest: retrieval ranking blends semantic, importance, and recency signals +ok 117 - retrieval ranking blends semantic, importance, and recency signals + --- + duration_ms: 1.008534 + type: 'test' + ... +# Subtest: pruner policy protects pins, merges duplicates, and picks archive/delete outcomes +ok 118 - pruner policy protects pins, merges duplicates, and picks archive/delete outcomes + --- + duration_ms: 1.480513 + type: 'test' + ... +# Subtest: scheduler smoke test handles mocked clock and lock contention +ok 119 - scheduler smoke test handles mocked clock and lock contention + --- + duration_ms: 8.609616 + type: 'test' + ... +# Subtest: CLI Smoke Test + # Subtest: should print usage when no args provided + ok 1 - should print usage when no args provided + --- + duration_ms: 203.070686 + type: 'test' + ... + # Subtest: should fail when checking without cadence + ok 2 - should fail when checking without cadence + --- + duration_ms: 201.853024 + type: 'test' + ... + # Subtest: should include paused agents in check output + ok 3 - should include paused agents in check output + --- + duration_ms: 264.964181 + type: 'test' + ... + 1..3 +ok 120 - CLI Smoke Test + --- + duration_ms: 675.89556 + type: 'suite' + ... +# Initializing torch in /app/test-gitignore-ictZv0/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-gitignore-ictZv0/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# No package.json found in host root. Skipping script injection. +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hash +# - Namespace: test-ns +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hash&namespace=test-ns&relays=wss%3A%2F%2Frelay.damus.io +# Initializing torch in /app/test-gitignore-existing-GBtVtx/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Updated test-gitignore-existing-GBtVtx/torch/.gitignore: added node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# No package.json found in host root. Skipping script injection. +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hash +# - Namespace: test-ns +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hash&namespace=test-ns&relays=wss%3A%2F%2Frelay.damus.io +# Subtest: ops.mjs: cmdInit creates .gitignore with node_modules +ok 121 - ops.mjs: cmdInit creates .gitignore with node_modules + --- + duration_ms: 68.247448 + type: 'test' + ... +# Subtest: ops.mjs: cmdInit appends to existing .gitignore +ok 122 - ops.mjs: cmdInit appends to existing .gitignore + --- + duration_ms: 69.824412 + type: 'test' + ... +# Initializing torch in /app/test-ops-dy6aLL/project1/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-dy6aLL/project1/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# No package.json found in host root. Skipping script injection. +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# Initializing torch in /app/test-ops-dy6aLL/project2/torch... +# Initializing torch in /app/test-ops-dy6aLL/project3/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-dy6aLL/project3/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# Updating torch configuration in /app/test-ops-dy6aLL/project3/torch... +# Creating backup at torch/_backups/backup_2026-02-25T16-14-35-943Z... +# No package.json found in host root. Skipping script injection. +# Updating application directories... +# Updated src/ +# Updated bin/ +# Updated dashboard/ +# Updated landing/ +# Updated assets/ +# Updated scripts/ +# Updating application files... +# Updated package.json +# Updated build.mjs +# Updated README.md +# Updated torch-config.example.json +# Updated TORCH.md +# Updating static files... +# Updated META_PROMPTS.md +# Updated scheduler-flow.md +# Updated daily-scheduler.md +# Updated weekly-scheduler.md +# Skipped roster.json (preserved) +# Updating prompts... +# daily/: 0 added, 0 updated, 23 preserved +# weekly/: 0 added, 0 updated, 24 preserved +# Update complete. +# Initializing torch in /app/test-ops-dy6aLL/project4/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-dy6aLL/project4/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# No package.json found in host root. Skipping script injection. +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# Updating torch configuration in /app/test-ops-dy6aLL/project4/torch... +# Creating backup at torch/_backups/backup_2026-02-25T16-14-36-059Z... +# Updating application directories... +# Updated src/ +# Updated bin/ +# Updated dashboard/ +# Updated landing/ +# Updated assets/ +# Updated scripts/ +# Updating application files... +# Updated package.json +# Updated build.mjs +# Updated README.md +# Updated torch-config.example.json +# Updated TORCH.md +# Updating static files... +# Updated META_PROMPTS.md +# Updated scheduler-flow.md +# Updated daily-scheduler.md +# Updated weekly-scheduler.md +# Overwrote roster.json (forced) +# Updating prompts... +# daily/: 0 added, 23 updated, 0 preserved +# weekly/: 0 added, 24 updated, 0 preserved +# Update complete. +# Initializing torch in /app/test-ops-dy6aLL/project5/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-dy6aLL/project5/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# No package.json found in host root. Skipping script injection. +# Initialization complete. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# Updating torch configuration in /app/test-ops-dy6aLL/project5/torch... +# Creating backup at torch/_backups/backup_2026-02-25T16-14-36-188Z... +# Updating application directories... +# Updated src/ +# Updated bin/ +# Updated dashboard/ +# Updated landing/ +# Updated assets/ +# Updated scripts/ +# Updating application files... +# Updated package.json +# Updated build.mjs +# Updated README.md +# Updated torch-config.example.json +# Updated TORCH.md +# Updating static files... +# Updated META_PROMPTS.md +# Updated scheduler-flow.md +# Updated daily-scheduler.md +# Updated weekly-scheduler.md +# Skipped roster.json (preserved) +# Updating prompts... +# daily/: 0 added, 0 updated, 23 preserved +# weekly/: 0 added, 0 updated, 24 preserved +# Update complete. +# Initializing torch in /app/test-ops-dy6aLL/project_roster/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-dy6aLL/project_roster/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# No package.json found in host root. Skipping script injection. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=ws%3A%2F%2F127.0.0.1%3A41691 +# Subtest: cmdInit creates directory structure and files +ok 123 - cmdInit creates directory structure and files + --- + duration_ms: 47.268772 + type: 'test' + ... +# Subtest: cmdInit fails if directory exists without force +ok 124 - cmdInit fails if directory exists without force + --- + duration_ms: 1.315311 + type: 'test' + ... +# Subtest: cmdUpdate preserves modified prompt +ok 125 - cmdUpdate preserves modified prompt + --- + duration_ms: 116.876343 + type: 'test' + ... +# Subtest: cmdUpdate overwrites prompt with force +ok 126 - cmdUpdate overwrites prompt with force + --- + duration_ms: 124.218842 + type: 'test' + ... +# Subtest: cmdUpdate creates backup +ok 127 - cmdUpdate creates backup + --- + duration_ms: 136.560015 + type: 'test' + ... +# Initializing torch in /app/test-ops-dy6aLL/project_config_init/torch... +# Copying application directories... +# Copied src/ +# Copied bin/ +# Copied dashboard/ +# Copied landing/ +# Copied assets/ +# Copied scripts/ +# Copying application files... +# Copied package.json +# Copied build.mjs +# Copied README.md +# Copied torch-config.example.json +# Copied TORCH.md +# Created torch/roster.json +# Created torch/META_PROMPTS.md +# Created torch/scheduler-flow.md +# Created torch/daily-scheduler.md +# Created torch/weekly-scheduler.md +# Created 23 files in torch/prompts/daily/ +# Created 24 files in torch/prompts/weekly/ +# Created test-ops-dy6aLL/project_config_init/torch/.gitignore with node_modules +# Saved configuration to torch-config.json +# Created torch/TORCH_DASHBOARD.md +# Initialization complete. +# No package.json found in host root. Skipping script injection. +# You can now customize the files in torch/ +# ● From torch-config.json: +# - Hashtag: test-hashtag +# - Namespace: test-namespace +# https://torch.thepr0m3th3an.net/dashboard/?hashtag=test-hashtag&namespace=test-namespace&relays=wss%3A%2F%2Frelay.damus.io +# Subtest: torch-lock check respects local roster +ok 128 - torch-lock check respects local roster + --- + duration_ms: 325.821901 + type: 'test' + ... +# Subtest: cmdInit creates torch-config.json with random namespace +ok 129 - cmdInit creates torch-config.json with random namespace + --- + duration_ms: 41.919248 + type: 'test' + ... +# [publish:primary] Publishing to 3 relays (ws://127.0.0.1:37107, ws://127.0.0.1:40575, ws://127.0.0.1:42933)... +# Published to 1/3 relays (required=1, timeout=80ms) +# Subtest: relay fanout quorum integration + # Subtest: passes with required=1 when one relay succeeds and two fail +# [publish:primary] Publishing to 3 relays (ws://127.0.0.1:40781, ws://127.0.0.1:44447, ws://127.0.0.1:46871)... + ok 1 - passes with required=1 when one relay succeeds and two fail + --- + duration_ms: 139.60531 + type: 'test' + ... + # Subtest: fails with quorum error for required=1 when all relays fail + ok 2 - fails with quorum error for required=1 when all relays fail + --- + duration_ms: 94.772254 + type: 'test' + ... +# [publish:primary] Publishing to 3 relays (ws://127.0.0.1:36941, ws://127.0.0.1:41111, ws://127.0.0.1:44679)... + # Subtest: fails with required=2 when only one relay succeeds + ok 3 - fails with required=2 when only one relay succeeds + --- + duration_ms: 96.419907 + type: 'test' + ... +# [publish:primary] Publishing to 3 relays (ws://127.0.0.1:36771, ws://127.0.0.1:37747, ws://127.0.0.1:44517)... +# Published to 2/3 relays (required=2, timeout=80ms) + # Subtest: passes when delayed successes reach quorum before timeout + ok 4 - passes when delayed successes reach quorum before timeout + --- + duration_ms: 88.03596 + type: 'test' + ... + 1..4 +ok 130 - relay fanout quorum integration + --- + duration_ms: 424.718909 + type: 'suite' + ... +# Subtest: RelayHealthManager + # Subtest: should isolate state between instances + ok 1 - should isolate state between instances + --- + duration_ms: 1.233584 + type: 'test' + ... + # Subtest: should prioritize relays based on health + ok 2 - should prioritize relays based on health + --- + duration_ms: 1.892563 + type: 'test' + ... + # Subtest: should reset state correctly + ok 3 - should reset state correctly + --- + duration_ms: 0.241311 + type: 'test' + ... + # Subtest: should cache ranked results and invalidate on outcome + ok 4 - should cache ranked results and invalidate on outcome + --- + duration_ms: 0.648218 + type: 'test' + ... + # Subtest: should invalidate cache when time passes quarantine expiry + ok 5 - should invalidate cache when time passes quarantine expiry + --- + duration_ms: 0.531433 + type: 'test' + ... + 1..5 +ok 131 - RelayHealthManager + --- + duration_ms: 8.53901 + type: 'suite' + ... +# Subtest: evaluateAlertThresholds + # Subtest: Happy Path: No alerts when thresholds are not met + ok 1 - Happy Path: No alerts when thresholds are not met + --- + duration_ms: 1.528691 + type: 'test' + ... + # Subtest: All Relays Down: Triggers alert when duration equals threshold + ok 2 - All Relays Down: Triggers alert when duration equals threshold + --- + duration_ms: 0.392533 + type: 'test' + ... + # Subtest: All Relays Down: Does NOT trigger alert just below threshold + ok 3 - All Relays Down: Does NOT trigger alert just below threshold + --- + duration_ms: 0.414754 + type: 'test' + ... + # Subtest: Success Rate: Triggers alert when rate is strictly below threshold + ok 4 - Success Rate: Triggers alert when rate is strictly below threshold + --- + duration_ms: 0.307967 + type: 'test' + ... + # Subtest: Success Rate: Does NOT trigger alert when rate equals threshold + ok 5 - Success Rate: Does NOT trigger alert when rate equals threshold + --- + duration_ms: 0.349925 + type: 'test' + ... + # Subtest: Success Rate: Does NOT trigger alert when rate is above threshold + ok 6 - Success Rate: Does NOT trigger alert when rate is above threshold + --- + duration_ms: 0.362611 + type: 'test' + ... + # Subtest: Multiple Alerts: Both conditions met + ok 7 - Multiple Alerts: Both conditions met + --- + duration_ms: 0.639745 + type: 'test' + ... + # Subtest: Edge Case: Empty history (should not crash) + ok 8 - Edge Case: Empty history (should not crash) + --- + duration_ms: 0.363318 + type: 'test' + ... + # Subtest: Edge Case: Empty history but current result is unhealthy + ok 9 - Edge Case: Empty history but current result is unhealthy + --- + duration_ms: 0.520131 + type: 'test' + ... + 1..9 +ok 132 - evaluateAlertThresholds + --- + duration_ms: 9.694285 + type: 'test' + ... +# Subtest: summarizeHistory - basic statistics calculation +ok 133 - summarizeHistory - basic statistics calculation + --- + duration_ms: 1.817154 + type: 'test' + ... +# Subtest: summarizeHistory - handles empty history +ok 134 - summarizeHistory - handles empty history + --- + duration_ms: 0.332402 + type: 'test' + ... +# Subtest: summarizeHistory - respects time window for stats +ok 135 - summarizeHistory - respects time window for stats + --- + duration_ms: 0.244192 + type: 'test' + ... +# Subtest: summarizeHistory - allDownDurationMinutes considers outside window entries +ok 136 - summarizeHistory - allDownDurationMinutes considers outside window entries + --- + duration_ms: 0.220848 + type: 'test' + ... +# Subtest: summarizeHistory - allDownDurationMinutes is null if never healthy +ok 137 - summarizeHistory - allDownDurationMinutes is null if never healthy + --- + duration_ms: 0.354489 + type: 'test' + ... +# Subtest: summarizeHistory - allDownDurationMinutes is 0 if currently healthy +ok 138 - summarizeHistory - allDownDurationMinutes is 0 if currently healthy + --- + duration_ms: 0.201779 + type: 'test' + ... +# Subtest: summarizeHistory - handles malformed entries gracefully +ok 139 - summarizeHistory - handles malformed entries gracefully + --- + duration_ms: 0.615578 + type: 'test' + ... +# Subtest: summarizeHistory - handles valid timestamp but missing summary +ok 140 - summarizeHistory - handles valid timestamp but missing summary + --- + duration_ms: 1.926885 + type: 'test' + ... +# Subtest: summarizeHistory - healthy entry with invalid timestamp results in NaN duration +ok 141 - summarizeHistory - healthy entry with invalid timestamp results in NaN duration + --- + duration_ms: 0.537937 + type: 'test' + ... +# Subtest: Roster (Unit Tests with Dependency Injection) + # Subtest: returns fallback roster when no configuration or files exist + ok 1 - returns fallback roster when no configuration or files exist + --- + duration_ms: 2.570709 + type: 'test' + ... + # Subtest: loads internal module roster if user/cwd rosters are missing + ok 2 - loads internal module roster if user/cwd rosters are missing + --- + duration_ms: 1.878408 + type: 'test' + ... + # Subtest: loads roster from torch/roster.json (User Roster) if present + ok 3 - loads roster from torch/roster.json (User Roster) if present + --- + duration_ms: 1.182625 + type: 'test' + ... + # Subtest: loads roster from roster.json (CWD Roster) if present and torch/roster.json is missing + ok 4 - loads roster from roster.json (CWD Roster) if present and torch/roster.json is missing + --- + duration_ms: 1.029422 + type: 'test' + ... + # Subtest: falls back to default if roster file is malformed + ok 5 - falls back to default if roster file is malformed + --- + duration_ms: 0.567377 + type: 'test' + ... + # Subtest: falls back to default if roster file is missing daily/weekly arrays + ok 6 - falls back to default if roster file is missing daily/weekly arrays + --- + duration_ms: 0.593051 + type: 'test' + ... + # Subtest: prioritizes environment variables over file and config + ok 7 - prioritizes environment variables over file and config + --- + duration_ms: 2.196618 + type: 'test' + ... + # Subtest: prioritizes config over file + ok 8 - prioritizes config over file + --- + duration_ms: 0.552911 + type: 'test' + ... + # Subtest: handles multiple items in env var roster + ok 9 - handles multiple items in env var roster + --- + duration_ms: 0.646731 + type: 'test' + ... + 1..9 +ok 142 - Roster (Unit Tests with Dependency Injection) + --- + duration_ms: 13.523165 + type: 'suite' + ... +# Subtest: fails required memory policy when retrieval/storage evidence is missing +ok 143 - fails required memory policy when retrieval/storage evidence is missing + --- + duration_ms: 844.116287 + type: 'test' + ... +# Subtest: accepts required memory policy when markers or artifacts are produced +ok 144 - accepts required memory policy when markers or artifacts are produced + --- + duration_ms: 882.84852 + type: 'test' + ... +# Subtest: records backend failure metadata when lock command exits with code 2 +ok 145 - records backend failure metadata when lock command exits with code 2 + --- + duration_ms: 929.286075 + type: 'test' + ... +# Subtest: defers backend failures in non-strict mode and reuses idempotency key on successful retry +ok 146 - defers backend failures in non-strict mode and reuses idempotency key on successful retry + --- + duration_ms: 590.734334 + type: 'test' + ... +# Subtest: fails after exceeding non-strict deferral budget +ok 147 - fails after exceeding non-strict deferral budget + --- + duration_ms: 186.980135 + type: 'test' + ... +# Subtest: strict lock mode fails immediately without deferral +ok 148 - strict lock mode fails immediately without deferral + --- + duration_ms: 97.105113 + type: 'test' + ... +# Subtest: skips lock health preflight by default when not enabled +ok 149 - skips lock health preflight by default when not enabled + --- + duration_ms: 393.560037 + type: 'test' + ... +# Subtest: fails scheduler with preflight metadata when lock health preflight is enabled +ok 150 - fails scheduler with preflight metadata when lock health preflight is enabled + --- + duration_ms: 136.090233 + type: 'test' + ... +# Subtest: categorizes unreadable prompt files as prompt_parse_error +ok 151 - categorizes unreadable prompt files as prompt_parse_error + --- + duration_ms: 102.984404 + type: 'test' + ... +# Subtest: categorizes invalid prompt schema as prompt_schema_error +ok 152 - categorizes invalid prompt schema as prompt_schema_error + --- + duration_ms: 99.368975 + type: 'test' + ... +# Subtest: categorizes handoff runtime failures as execution_error +ok 153 - categorizes handoff runtime failures as execution_error + --- + duration_ms: 338.222469 + type: 'test' + ... +# Subtest: retries lock acquisition for backend error and succeeds on a later attempt +ok 154 - retries lock acquisition for backend error and succeeds on a later attempt + --- + duration_ms: 396.354624 + type: 'test' + ... +# Subtest: stops retrying after configured lock backend retries are exhausted +ok 155 - stops retrying after configured lock backend retries are exhausted + --- + duration_ms: 104.278413 + type: 'test' + ... +# Subtest: does not use backend retry flow for exit code 3 lock conflicts +ok 156 - does not use backend retry flow for exit code 3 lock conflicts + --- + duration_ms: 405.872722 + type: 'test' + ... +# Subtest: retries handoff command for retryable network failures and succeeds +ok 157 - retries handoff command for retryable network failures and succeeds + --- + duration_ms: 648.847097 + type: 'test' + ... +# Subtest: uses fallback platform for handoff when primary platform fails +ok 158 - uses fallback platform for handoff when primary platform fails + --- + duration_ms: 647.68349 + type: 'test' + ... +# Subtest: fails before lock acquisition when runner health preflight command fails +ok 159 - fails before lock acquisition when runner health preflight command fails + --- + duration_ms: 337.762955 + type: 'test' + ... +# Subtest: uses exclusion payload from mixed JSON lock:check output +ok 160 - uses exclusion payload from mixed JSON lock:check output + --- + duration_ms: 401.956074 + type: 'test' + ... +# Subtest: runs selected scheduler prompt through configured runner command +ok 161 - runs selected scheduler prompt through configured runner command + --- + duration_ms: 341.975713 + type: 'test' + ... +# Subtest: propagates non-zero runner exit code +ok 162 - propagates non-zero runner exit code + --- + duration_ms: 327.572646 + type: 'test' + ... +# Subtest: scheduler lock backend failure artifact matches required frontmatter schema +ok 163 - scheduler lock backend failure artifact matches required frontmatter schema + --- + duration_ms: 110.421136 + type: 'test' + ... +# Subtest: schema contract catches missing required lock-backend field +ok 164 - schema contract catches missing required lock-backend field + --- + duration_ms: 2.042181 + type: 'test' + ... +# Subtest: schema contract catches misnamed lock-backend key +ok 165 - schema contract catches misnamed lock-backend key + --- + duration_ms: 0.608666 + type: 'test' + ... +# Subtest: lock preflight e2e: successful lock writes completed status snapshot +ok 166 - lock preflight e2e: successful lock writes completed status snapshot + --- + duration_ms: 402.603914 + type: 'test' + ... +# Subtest: lock preflight e2e: exit code 2 quorum failure persists failed backend status and prompt-not-started marker +ok 167 - lock preflight e2e: exit code 2 quorum failure persists failed backend status and prompt-not-started marker + --- + duration_ms: 98.728376 + type: 'test' + ... +# Subtest: lock preflight e2e: non-lock failure exits failed without prompt parse/schema classification +ok 168 - lock preflight e2e: non-lock failure exits failed without prompt parse/schema classification + --- + duration_ms: 97.631377 + type: 'test' + ... +# Subtest: Scheduler Ratchet Logic (Log Checking) + # Subtest: excludes agents completed today (daily) + ok 1 - excludes agents completed today (daily) + --- + duration_ms: 2.772896 + type: 'test' + ... + # Subtest: excludes agents completed this week (weekly) + ok 2 - excludes agents completed this week (weekly) + --- + duration_ms: 0.517797 + type: 'test' + ... + # Subtest: combines locked and completed agents in exclusion list + ok 3 - combines locked and completed agents in exclusion list + --- + duration_ms: 0.740407 + type: 'test' + ... + # Subtest: ignores logs when --ignore-logs is set + ok 4 - ignores logs when --ignore-logs is set + --- + duration_ms: 0.389162 + type: 'test' + ... + # Subtest: handles missing log directory gracefully + ok 5 - handles missing log directory gracefully + --- + duration_ms: 0.404146 + type: 'test' + ... + 1..5 +ok 169 - Scheduler Ratchet Logic (Log Checking) + --- + duration_ms: 8.737857 + type: 'suite' + ... +# Subtest: Scheduler cycle ordering guarantees + # Subtest: keeps optional preflight before lock-acquire and preserves handoff/artifact/validation/complete ordering + ok 1 - keeps optional preflight before lock-acquire and preserves handoff/artifact/validation/complete ordering + --- + duration_ms: 11.045443 + type: 'test' + ... + # Subtest: includes lock backend failure metadata and classifier checkpoints + ok 2 - includes lock backend failure metadata and classifier checkpoints + --- + duration_ms: 2.749125 + type: 'test' + ... + 1..2 +ok 170 - Scheduler cycle ordering guarantees + --- + duration_ms: 14.582582 + type: 'suite' + ... +# Subtest: parseDateValue + # Subtest: parses a valid ISO string + ok 1 - parses a valid ISO string + --- + duration_ms: 1.211959 + type: 'test' + ... + # Subtest: returns null for empty input + ok 2 - returns null for empty input + --- + duration_ms: 0.229036 + type: 'test' + ... + # Subtest: returns null for invalid date strings + ok 3 - returns null for invalid date strings + --- + duration_ms: 0.241291 + type: 'test' + ... + 1..3 +ok 171 - parseDateValue + --- + duration_ms: 3.334953 + type: 'suite' + ... +# Subtest: isStrictSchedulerLogFilename + # Subtest: accepts valid completed log + ok 1 - accepts valid completed log + --- + duration_ms: 0.522722 + type: 'test' + ... + # Subtest: accepts valid failed log + ok 2 - accepts valid failed log + --- + duration_ms: 0.253812 + type: 'test' + ... + # Subtest: rejects deferred logs + ok 3 - rejects deferred logs + --- + duration_ms: 0.1867 + type: 'test' + ... + # Subtest: rejects filenames without timestamp + ok 4 - rejects filenames without timestamp + --- + duration_ms: 0.340046 + type: 'test' + ... + # Subtest: rejects plain text files + ok 5 - rejects plain text files + --- + duration_ms: 0.365863 + type: 'test' + ... + # Subtest: rejects .scheduler-run-state.json + ok 6 - rejects .scheduler-run-state.json + --- + duration_ms: 0.409579 + type: 'test' + ... + 1..6 +ok 172 - isStrictSchedulerLogFilename + --- + duration_ms: 2.918289 + type: 'suite' + ... +# Subtest: parseAgentFromFilename + # Subtest: extracts agent name from completed log + ok 1 - extracts agent name from completed log + --- + duration_ms: 1.739041 + type: 'test' + ... + # Subtest: extracts agent name from failed log + ok 2 - extracts agent name from failed log + --- + duration_ms: 0.27588 + type: 'test' + ... + # Subtest: returns null for invalid filename + ok 3 - returns null for invalid filename + --- + duration_ms: 0.145621 + type: 'test' + ... + 1..3 +ok 173 - parseAgentFromFilename + --- + duration_ms: 2.367384 + type: 'suite' + ... +# Subtest: parseTimestampFromFilename + # Subtest: parses timestamp from canonical filename + ok 1 - parses timestamp from canonical filename + --- + duration_ms: 0.313659 + type: 'test' + ... + # Subtest: returns null for non-canonical filename + ok 2 - returns null for non-canonical filename + --- + duration_ms: 0.107205 + type: 'test' + ... + 1..2 +ok 174 - parseTimestampFromFilename + --- + duration_ms: 0.549908 + type: 'suite' + ... +# Subtest: parseFrontmatterCreatedAt / parseFrontmatterAgent + # Subtest: reads created_at from frontmatter + ok 1 - reads created_at from frontmatter + --- + duration_ms: 0.484091 + type: 'test' + ... + # Subtest: reads agent from frontmatter + ok 2 - reads agent from frontmatter + --- + duration_ms: 0.234936 + type: 'test' + ... + # Subtest: returns null when no frontmatter + ok 3 - returns null when no frontmatter + --- + duration_ms: 0.114246 + type: 'test' + ... + 1..3 +ok 175 - parseFrontmatterCreatedAt / parseFrontmatterAgent + --- + duration_ms: 1.070386 + type: 'suite' + ... +# Subtest: buildRecentlyRunExclusionSet — scenarios + # Subtest: SCN-TWG-01: excludes agents with completed logs within 24-hour daily window + ok 1 - SCN-TWG-01: excludes agents with completed logs within 24-hour daily window + --- + duration_ms: 7.489847 + type: 'test' + ... + # Subtest: SCN-TWG-02: does NOT exclude agents whose last run is outside the 24-hour window + ok 2 - SCN-TWG-02: does NOT exclude agents whose last run is outside the 24-hour window + --- + duration_ms: 3.250029 + type: 'test' + ... + # Subtest: SCN-TWG-03: excludes agents with failed logs within the window + ok 3 - SCN-TWG-03: excludes agents with failed logs within the window + --- + duration_ms: 4.606525 + type: 'test' + ... + # Subtest: SCN-TWG-04: cross-midnight scenario — agent ran 10 min before midnight, checked 10 min after + ok 4 - SCN-TWG-04: cross-midnight scenario — agent ran 10 min before midnight, checked 10 min after + --- + duration_ms: 2.555346 + type: 'test' + ... + # Subtest: SCN-TWG-05: uses frontmatter created_at over filename timestamp when both present + ok 5 - SCN-TWG-05: uses frontmatter created_at over filename timestamp when both present + --- + duration_ms: 2.76318 + type: 'test' + ... + # Subtest: SCN-TWG-06: weekly window uses 7-day threshold + ok 6 - SCN-TWG-06: weekly window uses 7-day threshold + --- + duration_ms: 5.590173 + type: 'test' + ... + # Subtest: SCN-TWG-07: empty log directory returns empty set + ok 7 - SCN-TWG-07: empty log directory returns empty set + --- + duration_ms: 1.172637 + type: 'test' + ... + # Subtest: SCN-TWG-08: non-existent directory returns empty set without throwing + ok 8 - SCN-TWG-08: non-existent directory returns empty set without throwing + --- + duration_ms: 0.967417 + type: 'test' + ... + # Subtest: SCN-TWG-09: only the most recent log matters — agent excluded if any log is within window + ok 9 - SCN-TWG-09: only the most recent log matters — agent excluded if any log is within window + --- + duration_ms: 3.448839 + type: 'test' + ... + # Subtest: SCN-TWG-10: mixed roster — correctly partitions in-window vs out-of-window agents + ok 10 - SCN-TWG-10: mixed roster — correctly partitions in-window vs out-of-window agents + --- + duration_ms: 6.371519 + type: 'test' + ... + # Subtest: SCN-TWG-11: non-log files in directory are ignored + ok 11 - SCN-TWG-11: non-log files in directory are ignored + --- + duration_ms: 2.224644 + type: 'test' + ... + 1..11 +ok 176 - buildRecentlyRunExclusionSet — scenarios + --- + duration_ms: 66.725479 + type: 'suite' + ... +# Subtest: CADENCE_WINDOW_MS constants + # Subtest: daily window is exactly 24 hours + ok 1 - daily window is exactly 24 hours + --- + duration_ms: 0.226624 + type: 'test' + ... + # Subtest: weekly window is exactly 7 days + ok 2 - weekly window is exactly 7 days + --- + duration_ms: 0.137429 + type: 'test' + ... + 1..2 +ok 177 - CADENCE_WINDOW_MS constants + --- + duration_ms: 0.558604 + type: 'suite' + ... +# Subtest: secureRandom + # Subtest: returns values in [0, 1) + ok 1 - returns values in [0, 1) + --- + duration_ms: 4.170319 + type: 'test' + ... + # Subtest: returns varied values + ok 2 - returns varied values + --- + duration_ms: 0.424808 + type: 'test' + ... + 1..2 +ok 178 - secureRandom + --- + duration_ms: 6.152353 + type: 'suite' + ... +# Subtest: summarizes recent lock reliability by platform/cadence/backend/relay +ok 179 - summarizes recent lock reliability by platform/cadence/backend/relay + --- + duration_ms: 86.760042 + type: 'test' + ... +# Subtest: run-flaky-check reports pass/fail counts from TAP output files +ok 180 - run-flaky-check reports pass/fail counts from TAP output files + --- + duration_ms: 824.330891 + type: 'test' + ... +# Subtest: loadTorchConfig (Unit Tests with Mocked FS) + # Subtest: loads valid config correctly + ok 1 - loads valid config correctly + --- + duration_ms: 3.841662 + type: 'test' + ... + # Subtest: returns default config when file is missing + ok 2 - returns default config when file is missing + --- + duration_ms: 0.871552 + type: 'test' + ... + # Subtest: throws error on malformed JSON + ok 3 - throws error on malformed JSON + --- + duration_ms: 0.98411 + type: 'test' + ... + # Subtest: caches the config and ignores subsequent fs calls + ok 4 - caches the config and ignores subsequent fs calls + --- + duration_ms: 0.810668 + type: 'test' + ... + # Subtest: returns null for empty string lists (new consistent behavior) + ok 5 - returns null for empty string lists (new consistent behavior) + --- + duration_ms: 0.878861 + type: 'test' + ... + 1..5 +ok 181 - loadTorchConfig (Unit Tests with Mocked FS) + --- + duration_ms: 9.156425 + type: 'suite' + ... +# Subtest: torch-config + # Subtest: getTorchConfigPath + # Subtest: returns default path when env var is not set + ok 1 - returns default path when env var is not set + --- + duration_ms: 1.120552 + type: 'test' + ... + # Subtest: returns custom path when env var is set + ok 2 - returns custom path when env var is set + --- + duration_ms: 0.262524 + type: 'test' + ... + 1..2 + ok 1 - getTorchConfigPath + --- + duration_ms: 2.893899 + type: 'suite' + ... + # Subtest: parseTorchConfig + # Subtest: parses new lock backend knobs + ok 1 - parses new lock backend knobs + --- + duration_ms: 1.338331 + type: 'test' + ... + 1..1 + ok 2 - parseTorchConfig + --- + duration_ms: 1.671414 + type: 'suite' + ... + # Subtest: loadTorchConfig + # Subtest: throws fatal error for invalid relay URL + ok 1 - throws fatal error for invalid relay URL + --- + duration_ms: 13.709618 + type: 'test' + ... + # Subtest: throws fatal error for invalid timeout range + ok 2 - throws fatal error for invalid timeout range + --- + duration_ms: 2.286894 + type: 'test' + ... + # Subtest: throws error for malformed JSON + ok 3 - throws error for malformed JSON + --- + duration_ms: 2.019454 + type: 'test' + ... + 1..3 + ok 3 - loadTorchConfig + --- + duration_ms: 18.949925 + type: 'suite' + ... + # Subtest: backend getters + # Subtest: returns default relays + ok 1 - returns default relays + --- + duration_ms: 3.943491 + type: 'test' + ... + # Subtest: validates env knob values + ok 2 - validates env knob values + --- + duration_ms: 2.602505 + type: 'test' + ... + 1..2 + ok 4 - backend getters + --- + duration_ms: 7.005275 + type: 'suite' + ... + 1..4 +ok 182 - torch-config + --- + duration_ms: 31.479085 + type: 'suite' + ... +# Subtest: Async Utilities + # Subtest: withTimeout + # Subtest: resolves when promise completes before timeout + ok 1 - resolves when promise completes before timeout + --- + duration_ms: 11.326204 + type: 'test' + ... + # Subtest: rejects when promise times out + ok 2 - rejects when promise times out + --- + duration_ms: 10.699508 + type: 'test' + ... + # Subtest: clears timeout on success + ok 3 - clears timeout on success + --- + duration_ms: 0.449564 + type: 'test' + ... + # Subtest: propagates original promise rejection + ok 4 - propagates original promise rejection + --- + duration_ms: 0.510847 + type: 'test' + ... + 1..4 + ok 1 - withTimeout + --- + duration_ms: 24.308701 + type: 'suite' + ... + 1..1 +ok 183 - Async Utilities + --- + duration_ms: 24.930387 + type: 'suite' + ... +# (node:21219) ExperimentalWarning: The MockTimers API is an experimental feature and might change at any time +# (Use `node --trace-warnings ...` to show where the warning was created) +# Subtest: Date Utilities + # Subtest: todayDateStr + # Subtest: returns current date in YYYY-MM-DD format + ok 1 - returns current date in YYYY-MM-DD format + --- + duration_ms: 3.778893 + type: 'test' + ... + 1..1 + ok 1 - todayDateStr + --- + duration_ms: 4.762204 + type: 'suite' + ... + # Subtest: nowUnix + # Subtest: returns current unix timestamp + ok 1 - returns current unix timestamp + --- + duration_ms: 0.431267 + type: 'test' + ... + 1..1 + ok 2 - nowUnix + --- + duration_ms: 0.717135 + type: 'suite' + ... + # Subtest: getIsoWeekStr + # Subtest: returns correct ISO week for simple cases + ok 1 - returns correct ISO week for simple cases + --- + duration_ms: 0.440556 + type: 'test' + ... + # Subtest: handles year boundaries correctly + ok 2 - handles year boundaries correctly + --- + duration_ms: 0.185126 + type: 'test' + ... + # Subtest: handles leap years + ok 3 - handles leap years + --- + duration_ms: 0.276393 + type: 'test' + ... + # Subtest: handles empty input (defaults to today) + ok 4 - handles empty input (defaults to today) + --- + duration_ms: 0.452023 + type: 'test' + ... + # Subtest: handles invalid input gracefully + ok 5 - handles invalid input gracefully + --- + duration_ms: 0.431115 + type: 'test' + ... + 1..5 + ok 3 - getIsoWeekStr + --- + duration_ms: 2.430233 + type: 'suite' + ... + 1..3 +ok 184 - Date Utilities + --- + duration_ms: 8.903569 + type: 'suite' + ... +# Subtest: Relay Utilities + # Subtest: mergeRelayList + # Subtest: merges two lists of relays without duplicates + ok 1 - merges two lists of relays without duplicates + --- + duration_ms: 1.060797 + type: 'test' + ... + # Subtest: handles empty lists + ok 2 - handles empty lists + --- + duration_ms: 0.28466 + type: 'test' + ... + 1..2 + ok 1 - mergeRelayList + --- + duration_ms: 1.669697 + type: 'suite' + ... + 1..1 +ok 185 - Relay Utilities + --- + duration_ms: 1.889995 + type: 'suite' + ... +# Subtest: Platform Utilities + # Subtest: detectPlatform + # Subtest: detects jules + ok 1 - detects jules + --- + duration_ms: 0.463389 + type: 'test' + ... + # Subtest: detects codex + ok 2 - detects codex + --- + duration_ms: 0.164256 + type: 'test' + ... + # Subtest: detects goose + ok 3 - detects goose + --- + duration_ms: 0.305091 + type: 'test' + ... + # Subtest: detects claude via CLAUDE_API_KEY + ok 4 - detects claude via CLAUDE_API_KEY + --- + duration_ms: 0.153162 + type: 'test' + ... + # Subtest: detects claude via ANTHROPIC_API_KEY + ok 5 - detects claude via ANTHROPIC_API_KEY + --- + duration_ms: 0.122255 + type: 'test' + ... + # Subtest: detects gemini via GEMINI_API_KEY + ok 6 - detects gemini via GEMINI_API_KEY + --- + duration_ms: 0.11975 + type: 'test' + ... + # Subtest: detects gemini via GOOGLE_API_KEY + ok 7 - detects gemini via GOOGLE_API_KEY + --- + duration_ms: 0.17313 + type: 'test' + ... + # Subtest: detects antigravity via ANTIGRAVITY_API_KEY + ok 8 - detects antigravity via ANTIGRAVITY_API_KEY + --- + duration_ms: 0.205973 + type: 'test' + ... + # Subtest: detects antigravity via ANTIGRAVITY_SESSION_ID + ok 9 - detects antigravity via ANTIGRAVITY_SESSION_ID + --- + duration_ms: 0.131262 + type: 'test' + ... + # Subtest: detects qwen via QWEN_API_KEY + ok 10 - detects qwen via QWEN_API_KEY + --- + duration_ms: 0.127916 + type: 'test' + ... + # Subtest: returns null if no platform detected + ok 11 - returns null if no platform detected + --- + duration_ms: 0.113369 + type: 'test' + ... + 1..11 + ok 1 - detectPlatform + --- + duration_ms: 2.749673 + type: 'suite' + ... + 1..1 +ok 186 - Platform Utilities + --- + duration_ms: 2.918858 + type: 'suite' + ... +# Subtest: File Utilities + # Subtest: ensureDir + # Subtest: creates directory if it does not exist + ok 1 - creates directory if it does not exist + --- + duration_ms: 1.647298 + type: 'test' + ... + # Subtest: does nothing if directory already exists + ok 2 - does nothing if directory already exists + --- + duration_ms: 0.310089 + type: 'test' + ... + # Subtest: creates nested directories recursively + ok 3 - creates nested directories recursively + --- + duration_ms: 0.280517 + type: 'test' + ... + 1..3 + ok 1 - ensureDir + --- + duration_ms: 3.695582 + type: 'suite' + ... + 1..1 +ok 187 - File Utilities + --- + duration_ms: 3.989125 + type: 'suite' + ... +# Subtest: String Utilities + # Subtest: relayListLabel + # Subtest: joins relay URLs with comma and space + ok 1 - joins relay URLs with comma and space + --- + duration_ms: 0.179761 + type: 'test' + ... + # Subtest: handles single relay + ok 2 - handles single relay + --- + duration_ms: 0.099923 + type: 'test' + ... + # Subtest: handles empty array + ok 3 - handles empty array + --- + duration_ms: 0.089158 + type: 'test' + ... + 1..3 + ok 1 - relayListLabel + --- + duration_ms: 0.48864 + type: 'suite' + ... + 1..1 +ok 188 - String Utilities + --- + duration_ms: 0.608697 + type: 'suite' + ... +# Subtest: passes when artifacts include metadata and failure IDs map to unresolved known issue entries +ok 189 - passes when artifacts include metadata and failure IDs map to unresolved known issue entries + --- + duration_ms: 79.349676 + type: 'test' + ... +# Subtest: fails when required metadata is missing from artifacts +ok 190 - fails when required metadata is missing from artifacts + --- + duration_ms: 67.925652 + type: 'test' + ... +# Subtest: fails when failure identifiers are not cross-linked to known issues or incidents +ok 191 - fails when failure identifiers are not cross-linked to known issues or incidents + --- + duration_ms: 75.697725 + type: 'test' + ... +1..191 +# tests 374 +# suites 49 +# pass 373 +# fail 0 +# cancelled 0 +# skipped 1 +# todo 0 +# duration_ms 17707.941596