Files

134 lines
7.2 KiB
Plaintext

# TMPDIR=/mnt/storage/scratch/tmp/3LlK4H HOME=/mnt/storage/scratch/tmp/3LlK4H/home MOSAIC_CONFIG=/mnt/storage/scratch/tmp/3LlK4H/home/.config/mosaic-dev/config.json nice=19 budget=60s
TAP version 13
# Subtest: row334 proxy uses P1 runner, bus dependencies and proxy bus Console start order
not ok 1 - row334 proxy uses P1 runner, bus dependencies and proxy bus Console start order
---
duration_ms: 139.480123
type: 'test'
location: '/home/jwoltje/.t3/worktrees/mosaic-stack/rockerduck-row334/packages/cli/tests/case2-unit.test.mjs:966:1'
failureType: 'testCodeFailure'
error: |-
The input did not match the regular expression /Description=[^\n]+\nWants=mosaic-proxy.service\nAfter=mosaic-proxy.service\n/. Input:
'# Mosaic bus host, one instance per business: mosaic-bus@<business>.\n' +
'# Rendered by scripts/bus-service.sh from packages/cli/systemd/; /mnt/storage/scratch/tmp/3LlK4H/case2-unit-jxPM4A/home/mosaic/.local/share/mosaic-stack/copies/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n' +
'# /usr/bin:/usr/local/bin:/bin and the claude line below are filled in at install time. Edit the template and reinstall; do\n' +
'# not edit the installed copy. The bus store allows one broker per data\n' +
'# root, so run one instance per data root (packages/cli/README.md).\n' +
'[Unit]\n' +
'Description=Mosaic bus host (%i)\n' +
'Wants=mosaic-proxy.service\n' +
'Documentation=file:///mnt/storage/scratch/tmp/3LlK4H/case2-unit-jxPM4A/home/mosaic/.local/share/mosaic-stack/copies/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/packages/cli/README.md\n' +
'StartLimitIntervalSec=600\n' +
'StartLimitBurst=5\n' +
'\n' +
'[Service]\n' +
'Type=simple\n' +
'WorkingDirectory=/mnt/storage/scratch/tmp/3LlK4H/case2-unit-jxPM4A/home/mosaic/.local/share/mosaic-stack/copies/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n' +
'Environment=PATH=/usr/bin:/usr/local/bin:/bin\n' +
"# The Claude Code binary that managed sessions and the manifest's\n" +
'# claudeVersion run, pinned at install (`--claude PATH`, default\n' +
'# `command -v claude`). Without it they run `claude` from PATH above.\n' +
'Environment=MOSAIC_CLAUDE_BIN=/usr/bin/true\n' +
'# Claude Code sessions log in with what this 0600 file sets, which the\n' +
"# operator writes: CLAUDE_CODE_OAUTH_TOKEN, ANTHROPIC_API_KEY, or a proxy's\n" +
'# ANTHROPIC_AUTH_TOKEN with ANTHROPIC_BASE_URL. The `-` lets the unit start\n' +
'# without it, and a Claude Code launch then refuses.\n' +
'EnvironmentFile=-/mnt/storage/scratch/tmp/3LlK4H/case2-unit-jxPM4A/home/mosaic/.config/mosaic-dev/secrets/claude-session.env\n' +
'# The host reads the system config and the business file, boots the broker\n' +
'# (packages/bus/src/process.mjs) and starts the notifier. Config problems and\n' +
'# refusals exit 3, usage 4, invalid input 2: none of those is retried. A\n' +
'# child that dies takes the host down with exit 1, and the unit restarts\n' +
'# the pair.\n' +
'ExecStart=/mnt/storage/scratch/tmp/3LlK4H/case2-unit-jxPM4A/home/mosaic/.local/share/mosaic-stack/copies/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/scripts/mosaic bus start %i\n' +
'Restart=on-failure\n' +
'RestartSec=15\n' +
'RestartPreventExitStatus=2 3 4\n' +
'# `systemctl --user stop` sends SIGTERM to the host, which stops the\n' +
'# notifier after its poll in flight, then closes the broker.\n' +
'KillSignal=SIGTERM\n' +
'KillMode=mixed\n' +
'TimeoutStopSec=60\n' +
'NoNewPrivileges=yes\n' +
'User=mosaic\n' +
'Group=mosaic\n' +
'ProtectSystem=strict\n' +
'ReadWritePaths=/mnt/storage/scratch/tmp/3LlK4H/case2-unit-jxPM4A/home/mosaic\n' +
'ProtectHome=yes\n' +
'PrivateTmp=yes\n' +
'\n' +
'[Install]\n' +
'WantedBy=multi-user.target\n'
code: 'ERR_ASSERTION'
name: 'AssertionError'
expected:
actual: |-
# Mosaic bus host, one instance per business: mosaic-bus@<business>.
# Rendered by scripts/bus-service.sh from packages/cli/systemd/; /mnt/storage/scratch/tmp/3LlK4H/case2-unit-jxPM4A/home/mosaic/.local/share/mosaic-stack/copies/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
# /usr/bin:/usr/local/bin:/bin and the claude line below are filled in at install time. Edit the template and reinstall; do
# not edit the installed copy. The bus store allows one broker per data
# root, so run one instance per data root (packages/cli/README.md).
[Unit]
Description=Mosaic bus host (%i)
Wants=mosaic-proxy.service
Documentation=file:///mnt/storage/scratch/tmp/3LlK4H/case2-unit-jxPM4A/home/mosaic/.local/share/mosaic-stack/copies/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/packages/cli/README.md
StartLimitIntervalSec=600
StartLimitBurst=5
[Service]
Type=simple
WorkingDirectory=/mnt/storage/scratch/tmp/3LlK4H/case2-unit-jxPM4A/home/mosaic/.local/share/mosaic-stack/copies/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Environment=PATH=/usr/bin:/usr/local/bin:/bin
# The Claude Code binary that managed sessions and the manifest's
# claudeVersion run, pinned at install (`--claude PATH`, default
# `command -v claude`). Without it they run `claude` from PATH above.
Environment=MOSAIC_CLAUDE_BIN=/usr/bin/true
# Claude Code sessions log in with what this 0600 file sets, which the
# operator writes: CLAUDE_CODE_OAUTH_TOKEN, ANTHROPIC_API_KEY, or a proxy's
# ANTHROPIC_AUTH_TOKEN with ANTHROPIC_BASE_URL. The `-` lets the unit start
# without it, and a Claude Code launch then refuses.
EnvironmentFile=-/mnt/storage/scratch/tmp/3LlK4H/case2-unit-jxPM4A/home/mosaic/.config/mosaic-dev/secrets/claude-session.env
# The host reads the system config and the business file, boots the broker
# (packages/bus/src/process.mjs) and starts the notifier. Config problems and
# refusals exit 3, usage 4, invalid input 2: none of those is retried. A
# child that dies takes the host down with exit 1, and the unit restarts
# the pair.
ExecStart=/mnt/storage/scratch/tmp/3LlK4H/case2-unit-jxPM4A/home/mosaic/.local/share/mosaic-stack/copies/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/scripts/mosaic bus start %i
Restart=on-failure
RestartSec=15
RestartPreventExitStatus=2 3 4
# `systemctl --user stop` sends SIGTERM to the host, which stops the
# notifier after its poll in flight, then closes the broker.
KillSignal=SIGTERM
KillMode=mixed
TimeoutStopSec=60
NoNewPrivileges=yes
User=mosaic
Group=mosaic
ProtectSystem=strict
ReadWritePaths=/mnt/storage/scratch/tmp/3LlK4H/case2-unit-jxPM4A/home/mosaic
ProtectHome=yes
PrivateTmp=yes
[Install]
WantedBy=multi-user.target
operator: 'match'
stack: |-
TestContext.<anonymous> (file:///home/jwoltje/.t3/worktrees/mosaic-stack/rockerduck-row334/packages/cli/tests/case2-unit.test.mjs:976:10)
Test.runInAsyncScope (node:async_hooks:226:14)
Test.run (node:internal/test_runner/test:1402:25)
Test.start (node:internal/test_runner/test:1262:17)
startSubtestAfterBootstrap (node:internal/test_runner/harness:387:17)
...
1..1
# tests 1
# suites 0
# pass 0
# fail 1
# cancelled 0
# skipped 0
# todo 0
# duration_ms 259.619391