Merge remote-tracking branch 'origin/main' into codex/ip-cert-lifecycle-6971

This commit is contained in:
Hamed Sanaei
2026-12-02 20:53:48 +03:30
188 changed files with 16618 additions and 3371 deletions
+92 -5
View File
@@ -51,7 +51,8 @@ jobs:
- name: Test
run: |
go list ./... | grep -v '/frontend/node_modules/' > /tmp/go-packages.txt
go test -shuffle=on -count=1 $(cat /tmp/go-packages.txt)
mapfile -t go_packages < /tmp/go-packages.txt
go test -shuffle=on -count=1 "${go_packages[@]}"
postgres-durable-first:
runs-on: ubuntu-latest
@@ -102,6 +103,16 @@ jobs:
exit 1
fi
- name: PostgreSQL sync orphan recovery
run: |
set -o pipefail
go test ./internal/web/service -run '^Test(SyncOrphanRecoveryScope|LegacySyncOrphanMarksAcrossLinkChanges)Postgres$' -count=1 -v | tee /tmp/postgres-sync-orphans.log
passed=$(grep -c -- '^--- PASS' /tmp/postgres-sync-orphans.log || true)
if [ "$passed" -ne 2 ]; then
echo "expected both PostgreSQL sync orphan recovery tests to pass, got $passed" >&2
exit 1
fi
- name: PostgreSQL client traffic lifecycle edits
run: |
set -o pipefail
@@ -124,13 +135,24 @@ jobs:
- name: PostgreSQL client IP sync regressions
run: |
set -o pipefail
go test -p=1 ./internal/web/service ./internal/web/job -run '^TestClientIpSyncPostgres(Scanner)?$' -count=1 -v | tee /tmp/postgres-client-ip-sync.log
go test -p=1 ./internal/web/service ./internal/web/job -run '^TestClientIpSyncPostgres(Scanner|Scheduler)?$' -count=1 -v | tee /tmp/postgres-client-ip-sync.log
passed=$(grep -c -- '^--- PASS' /tmp/postgres-client-ip-sync.log || true)
if [ "$passed" -ne 2 ]; then
echo "expected 2 passing PostgreSQL client IP sync tests, got $passed" >&2
if [ "$passed" -ne 3 ]; then
echo "expected 3 passing PostgreSQL client IP sync tests, got $passed" >&2
exit 1
fi
- name: PostgreSQL IP reporter lock order and lifecycle
run: |
set -o pipefail
go test ./internal/web/service -run '^TestPostgres(NodeIPReporterClientLockOrder|FlatIPReporterLifecycleCommit|PolledAttributionSurvivesConcurrentPrune)$' -count=1 -v | tee /tmp/postgres-ip-reporter-locks.log
for test in NodeIPReporterClientLockOrder FlatIPReporterLifecycleCommit PolledAttributionSurvivesConcurrentPrune; do
if ! grep -q -- "^--- PASS: TestPostgres${test} " /tmp/postgres-ip-reporter-locks.log; then
echo "expected PostgreSQL reporter test TestPostgres${test} to pass" >&2
exit 1
fi
done
- name: PostgreSQL Xray traffic retry
run: |
set -o pipefail
@@ -141,6 +163,16 @@ jobs:
exit 1
fi
- name: PostgreSQL node client push ordering
run: |
set -o pipefail
go test ./internal/web/service -run '^Test(NodeClientMutationsCommitWhileAnEarlierPushIsBlocked|NodeClientQueueTimeoutDefersCommittedDelta|NodeClientCapacityPreservesPermanentDelete|NodeWideDeleteSkipsReattachmentSentByQueuedReconcile|NodeWideDeleteRetriesAfterQueueExpiry|BulkDeleteStopsPushingToAHungNode|ReconcileDoesNotOvertakeCommittedClientState|TrafficDepletionWaitsForEarlierNodeClientPush)$' -count=1 -v | tee /tmp/postgres-node-client-order.log
passed=$(grep -c -- '^--- PASS' /tmp/postgres-node-client-order.log || true)
if [ "$passed" -ne 8 ]; then
echo "expected 8 passing PostgreSQL node client ordering tests, got $passed" >&2
exit 1
fi
- name: PostgreSQL global-traffic heartbeat regressions
run: |
set -o pipefail
@@ -191,6 +223,52 @@ jobs:
exit 1
fi
- name: PostgreSQL node snapshot regressions
run: |
set -o pipefail
go test -p=1 ./internal/database ./internal/web/service -run '^(TestSnapshotRevisionsDirectWritesAndRollback|TestNodeSnapshotUnchangedAvoidsSettingsAndDetectsDirectEdits|TestNodeSnapshotMergeSkipsUnchangedStructureAndPreservesDeltas|TestNodeSnapshotReadDoesNotHoldTrafficWriter|TestNodeSnapshotCanceledReadReleasesConnection|TestNodeSnapshotReopenInvalidatesCatalog|TestNodeSnapshotCachedAliasPreservesTraffic|TestNodeSnapshotAliasInvalidCacheFallsBack|TestNodeSnapshotAliasValidatesEntireMapping|TestNodeSnapshotAliasQuotaDisableAndRenewal|TestSnapshotRevisionPostgresTypeDDL|TestSnapshotRevisionMigrationRecreationAndReopen)$' -count=1 -v | tee /tmp/postgres-node-snapshot.log
passed=$(grep -c -- '^--- PASS' /tmp/postgres-node-snapshot.log || true)
if [ "$passed" -ne 12 ]; then
echo "expected 12 passing node snapshot tests, got $passed" >&2
exit 1
fi
- name: PostgreSQL node client reconciliation
run: |
set -o pipefail
go test ./internal/web/service -run '^Test(NodeFullReconciliation|NodeMerge(BatchesBaselinesForActiveClients|LetsSubscriptionTouchDuringClientReconciliationPostgres)$)' -count=1 -v | tee /tmp/postgres-node-client-reconciliation.log
passed=$(grep -c -- '^--- PASS: TestNodeFullReconciliation' /tmp/postgres-node-client-reconciliation.log || true)
if [ "$passed" -ne 4 ]; then
echo "expected 4 passing node client reconciliation tests, got $passed" >&2
exit 1
fi
for test in TestNodeMergeBatchesBaselinesForActiveClients TestNodeMergeLetsSubscriptionTouchDuringClientReconciliationPostgres; do
if ! grep -q -- "^--- PASS: $test " /tmp/postgres-node-client-reconciliation.log; then
echo "expected PostgreSQL regression to pass: $test" >&2
exit 1
fi
done
- name: PostgreSQL node counter reset regressions
run: |
set -o pipefail
go test -p 1 ./internal/web/service ./internal/database -run '^(TestNodeFrozenDip_|TestMigrateNodeClientTrafficDippedWhileFrozenColumn$)' -count=1 -v | tee /tmp/postgres-node-counter-reset.log
passed=$(grep -c -- '^--- PASS' /tmp/postgres-node-counter-reset.log || true)
if [ "$passed" -ne 4 ]; then
echo "expected 3 node counter regressions and 1 migration test to pass, got $passed" >&2
exit 1
fi
- name: PostgreSQL node merge contention
run: |
set -o pipefail
go test ./internal/web/service -run '^TestNodeMerge(LetsSubscriptionTouchDuringClientReconciliationPostgres|BatchesBaselinesForActiveClients)$' -count=1 -v | tee /tmp/postgres-node-merge-contention.log
passed=$(grep -c -- '^--- PASS' /tmp/postgres-node-merge-contention.log || true)
if [ "$passed" -ne 2 ]; then
echo "expected both PostgreSQL node merge contention tests to pass, got $passed" >&2
exit 1
fi
- name: PostgreSQL schema and migration tests
run: |
set -o pipefail
@@ -321,7 +399,8 @@ jobs:
run: |
go list ./... | grep -v '/frontend/node_modules/' > /tmp/go-packages.txt
# internal/web/service runs ~10x slower under -race and overruns the 10m default.
go test -race -shuffle=on -count=1 -timeout 25m $(cat /tmp/go-packages.txt)
mapfile -t go_packages < /tmp/go-packages.txt
go test -race -shuffle=on -count=1 -timeout 25m "${go_packages[@]}"
# A real master and node panel, each its own process, driven through node sync.
# A SKIP here means the binary was never handed over, so it fails the job.
@@ -333,6 +412,14 @@ jobs:
with:
go-version-file: go.mod
cache: true
- name: Build legacy node protocol baseline
run: |
baseline_ref=c621ba9014a6aa21fd7c9ecf45655e44e24ebf13
git fetch --no-tags --depth=1 origin "$baseline_ref"
baseline_src=$(mktemp -d)
git archive "$baseline_ref" Makefile go.mod go.sum main.go internal scripts/install-amneziawg-kernel.sh | tar -x -C "$baseline_src"
(cd "$baseline_src" && make dist-stub && go build -o "$RUNNER_TEMP/x-ui-node-baseline" .)
echo "XUI_NODE_E2E_OLD_BINARY=$RUNNER_TEMP/x-ui-node-baseline" >> "$GITHUB_ENV"
- name: Master + node end to end
run: |
set -o pipefail
+4 -4
View File
@@ -239,13 +239,13 @@ jobs:
- name: Install MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
msystem: UCRT64
update: true
install: >-
git
mingw-w64-x86_64-gcc
mingw-w64-x86_64-sqlite3
mingw-w64-x86_64-pkg-config
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-sqlite3
mingw-w64-ucrt-x86_64-pkg-config
- name: Build 3X-UI for Windows (CGO)
shell: msys2 {0}