Captures uncommitted work that lived in the working tree on
v2-mxgw-integration but was orthogonal to the migration. Stashed
during the v2-mxgw merge to master (2026-04-30) and replanted here on
a feature branch off master so it's git-visible rather than living in
the stash list.
Two distinct buckets:
1. Tracked fixture/config refinements (10 files, ~36 lines):
- scripts/e2e/test-opcuaclient.ps1
- src/ZB.MOM.WW.OtOpcUa.Admin/appsettings.json
- 5 docker-compose.yml under tests/.../IntegrationTests/Docker/
(AbCip, Modbus, OpcUaClient, S7)
- 4 fixture .cs files (AbServerFixture, ModbusSimulatorFixture,
OpcPlcFixture, Snap7ServerFixture)
2. Untracked driver-gaps queue artifacts (~8000 lines):
- docs/plans/{abcip,ablegacy,focas,opcuaclient,s7,twincat}-plan.md
— per-driver gap plans
- docs/featuregaps.md — cross-cutting analysis
- docs/v2/focas-deployment.md, docs/v2/implementation/focas-simulator-plan.md
- followup.md — auto/driver-gaps queue follow-ups
- scripts/queue/ — PR-queue automation tooling (12 files including
pr-manifest.yaml at 1473 lines)
This commit is a snapshot for recoverability — review and split into
focused PRs (or discard) before merging anywhere downstream.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
58 lines
1.6 KiB
Bash
58 lines
1.6 KiB
Bash
#!/usr/bin/env bash
|
|
# Shared helpers for the Gitea-backed plan-execution queue.
|
|
set -euo pipefail
|
|
|
|
GITEA_URL="https://gitea.dohertylan.com"
|
|
GITEA_REPO="dohertj2/lmxopcua"
|
|
GITEA_API="$GITEA_URL/api/v1"
|
|
|
|
if [ -z "${GITEA_TOKEN:-}" ]; then
|
|
TEA_CONFIG="${LOCALAPPDATA:-$HOME/AppData/Local}/tea/config.yml"
|
|
if [ ! -f "$TEA_CONFIG" ]; then
|
|
TEA_CONFIG="$HOME/.config/tea/config.yml"
|
|
fi
|
|
GITEA_TOKEN="$(awk '/token:/{gsub(/[ \t]/,"",$2); print $2; exit}' "$TEA_CONFIG" 2>/dev/null || true)"
|
|
fi
|
|
if [ -z "${GITEA_TOKEN:-}" ]; then
|
|
echo "lib.sh: GITEA_TOKEN not set and tea config not readable" >&2
|
|
exit 1
|
|
fi
|
|
export GITEA_TOKEN
|
|
|
|
INTEGRATION_BRANCH="auto/driver-gaps"
|
|
QUEUE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && { pwd -W 2>/dev/null || pwd; })"
|
|
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && { pwd -W 2>/dev/null || pwd; })"
|
|
MANIFEST="$QUEUE_ROOT/pr-manifest.yaml"
|
|
LABEL_MAP="$QUEUE_ROOT/.label-ids.json"
|
|
|
|
LABEL_QUEUED="queue/queued"
|
|
LABEL_IN_PROGRESS="queue/in-progress"
|
|
LABEL_BLOCKED="queue/blocked"
|
|
LABEL_FAILED="queue/failed"
|
|
LABEL_DONE="queue/done"
|
|
LABEL_AUTO="auto-managed"
|
|
LABEL_CROSS="cross-driver"
|
|
|
|
api() {
|
|
local method="$1" path="$2" data="${3:-}"
|
|
if [ -n "$data" ]; then
|
|
curl -sf -X "$method" \
|
|
-H "Authorization: token $GITEA_TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d "$data" \
|
|
"$GITEA_API/$path"
|
|
else
|
|
curl -sf -X "$method" \
|
|
-H "Authorization: token $GITEA_TOKEN" \
|
|
"$GITEA_API/$path"
|
|
fi
|
|
}
|
|
|
|
api_repo() {
|
|
api "$1" "repos/$GITEA_REPO/$2" "${3:-}"
|
|
}
|
|
|
|
label_id() {
|
|
python -c "import json,sys; m=json.load(open('$LABEL_MAP')); print(m['$1'])"
|
|
}
|