Implement apix-registry with IoT sunset/decommission lifecycle and full BDD suite

- REST API: register, patch, O-level, replacements, history, search endpoints
- IoT lifecycle validations: future sunset, lock-before-release, sunset-passed-before-decommission
- DB schema: Liquibase changesets 001–008 (services, versions, replacements, sunset-at column)
- @ColumnTransformer(write="?::jsonb") on bsm_payload fields to avoid JDBC varchar→jsonb rejection
- Jandex plugin on apix-common + quarkus.index-dependency so @NotBlank validators resolve at runtime
- quarkus-logging-json extension added; quarkus.log.console.json=false is now a recognised key
- Fix requireSunsetBeforeLockRelease: Boolean.TRUE.equals instead of !Boolean.FALSE.equals (null guard)
- BDD suite: 27 scenarios / 213 steps across 5 feature files (sunset-lock, decommission, replacement, discovery, anonymity)
- Test infrastructure: JDBC TRUNCATE in @Before for DB isolation, Arc.container() for clock control — no test endpoints in production code
- sunsetAt truncated to microseconds in BDD steps to match Postgres timestamptz precision
- Cucumber step fixes: singular/plural candidate(s), lastResponse propagation in replacementsReturnsNCandidates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Carsten Rehfeld
2026-05-08 09:13:26 +02:00
commit b2a16a8be7
71 changed files with 5480 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env bash
# Tail logs for dev-mode services.
# Usage: logs.sh [registry|portal|spider|all] (default: all)
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
LOG_DIR="$PROJECT_ROOT/.logs"
TARGET="${1:-all}"
# ── tmux mode — attach to the right window ────────────────────────────────────
if command -v tmux &>/dev/null && tmux has-session -t apix-dev 2>/dev/null; then
case "$TARGET" in
registry) tmux select-window -t apix-dev:registry; tmux attach -t apix-dev ;;
portal) tmux select-window -t apix-dev:portal; tmux attach -t apix-dev ;;
spider) tmux select-window -t apix-dev:spider; tmux attach -t apix-dev ;;
all) tmux attach -t apix-dev ;;
*) echo "Usage: logs.sh [registry|portal|spider|all]"; exit 1 ;;
esac
exit 0
fi
# ── Background mode — tail log files ─────────────────────────────────────────
_log() { echo "$LOG_DIR/${1}.log"; }
case "$TARGET" in
registry) tail -f "$(_log apix-registry)" ;;
portal) tail -f "$(_log apix-portal)" ;;
spider) tail -f "$(_log apix-spider)" ;;
all)
FILES=("$(_log apix-registry)" "$(_log apix-portal)" "$(_log apix-spider)")
for f in "${FILES[@]}"; do
[[ -f "$f" ]] || { echo "Log not found: $f (has dev.sh been run?)"; exit 1; }
done
if command -v multitail &>/dev/null; then
multitail -cT ANSI "${FILES[@]}"
else
# Label each line with the service name using sed
tail -f "${FILES[@]}" | \
awk '/==> .+apix-registry/ { svc="registry" } /==> .+apix-portal/ { svc="portal" } /==> .+apix-spider/ { svc="spider" } !/^==>/ { print "[" svc "] " $0 }'
fi
;;
*) echo "Usage: logs.sh [registry|portal|spider|all]"; exit 1 ;;
esac