mirror of
https://github.com/hanzoai/replicate.git
synced 2026-10-30 18:23:20 +00:00
A version written into a manifest is written into every manifest that wants it, which is how eslint came to exist in a hundred and four forms across this estate and how a package came to resolve twice at run time. The catalog moves the number out of the manifest: a manifest names the package, the workspace names the version. Four are held below their latest because the newer release cannot be used, and the reason is recorded rather than the version alone: @noble/hashes 2 renamed every subpath the web3 stack imports, @splinetool/runtime 2 depends on a package that was never published, @dynamic-labs 5.4.1 the same, and react-resizable-panels 3 points its types condition at the bundle.
92 lines
2.5 KiB
Bash
Executable File
92 lines
2.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Local nightly soak test runner for Replicate.
|
|
# Usage:
|
|
# ./scripts/local-soak.sh # 30m per profile (default)
|
|
# ./scripts/local-soak.sh 2h # 2h per profile
|
|
# ./scripts/local-soak.sh 30m high-volume # single profile
|
|
|
|
REPO_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
DURATION="${1:-30m}"
|
|
PROFILE_FILTER="${2:-}"
|
|
LOG_DIR="$REPO_DIR/tmp/soak-logs"
|
|
TIMESTAMP="$(date +%Y%m%d-%H%M%S)"
|
|
LOG_FILE="$LOG_DIR/soak-$TIMESTAMP.log"
|
|
|
|
mkdir -p "$LOG_DIR"
|
|
|
|
log() { echo "[$(date '+%H:%M:%S')] $*" | tee -a "$LOG_FILE"; }
|
|
|
|
log "Replicate local soak test"
|
|
log "Duration per profile: $DURATION"
|
|
log "Log: $LOG_FILE"
|
|
log ""
|
|
|
|
cd "$REPO_DIR"
|
|
|
|
# Clean up old test artifacts so results are unambiguous.
|
|
# Every error in the run is guaranteed to be from THIS run.
|
|
log "Cleaning old test artifacts..."
|
|
rm -rf /tmp/replicate-ltx-behavior-* /tmp/replicate-s3-soak-* /tmp/replicate-comprehensive-soak-*
|
|
go clean -testcache
|
|
log "Clean complete."
|
|
log ""
|
|
|
|
# Build binaries
|
|
log "Building binaries..."
|
|
go build -o bin/replicate ./cmd/replicate
|
|
go build -o bin/replicate-test ./cmd/replicate-test
|
|
log "Build complete."
|
|
log ""
|
|
|
|
# Determine test filter
|
|
RUN_FILTER='TestLTXBehavior$'
|
|
if [[ -n "$PROFILE_FILTER" ]]; then
|
|
RUN_FILTER="TestLTXBehavior\$/$PROFILE_FILTER"
|
|
log "Running single profile: $PROFILE_FILTER"
|
|
else
|
|
log "Running all profiles: low-volume, high-volume, burst-volume"
|
|
fi
|
|
|
|
# Disable errexit around test commands so we always reach the summary.
|
|
set +e
|
|
|
|
# Run LTX behavioral tests
|
|
log "Starting LTX behavioral tests..."
|
|
SOAK_DURATION="$DURATION" SOAK_KEEP_TEMP=1 go test -tags 'integration,soak' \
|
|
-run "$RUN_FILTER" \
|
|
-v -timeout 8h \
|
|
./tests/integration/ 2>&1 | tee -a "$LOG_FILE"
|
|
|
|
LTX_EXIT=${PIPESTATUS[0]}
|
|
|
|
# Run snapshot regression test
|
|
log ""
|
|
log "Starting snapshot regression test..."
|
|
SOAK_KEEP_TEMP=1 go test -tags 'integration,soak' \
|
|
-run 'TestLTXBehavior_NoExcessiveSnapshots' \
|
|
-v -timeout 20m \
|
|
./tests/integration/ 2>&1 | tee -a "$LOG_FILE"
|
|
|
|
SNAP_EXIT=${PIPESTATUS[0]}
|
|
|
|
set -e
|
|
|
|
# Summary
|
|
log ""
|
|
log "================================================"
|
|
log "Soak Test Summary"
|
|
log "================================================"
|
|
log "LTX Behavioral: $([ $LTX_EXIT -eq 0 ] && echo 'PASS' || echo 'FAIL')"
|
|
log "Snapshot Regression: $([ $SNAP_EXIT -eq 0 ] && echo 'PASS' || echo 'FAIL')"
|
|
log "Full log: $LOG_FILE"
|
|
log "Artifacts: /tmp/replicate-ltx-behavior-*/"
|
|
|
|
if [[ $LTX_EXIT -ne 0 || $SNAP_EXIT -ne 0 ]]; then
|
|
log "FAILURES DETECTED — review log for details"
|
|
exit 1
|
|
fi
|
|
|
|
log "All tests passed."
|