Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

ci(persistence-validation): Postgres arm files write executed-test receipts, so master-red names the failing test and carries stress exemptions

garrytana8654c8a6440
diff --git a/.github/workflows/persistence-validation.yml b/.github/workflows/persistence-validation.yml
index 6b74bca089..31625d28db 100644
--- a/.github/workflows/persistence-validation.yml
+++ b/.github/workflows/persistence-validation.yml
@@ -200,8 +200,15 @@ jobs:
DATABASE_URL: postgres://gbrain_test:[email protected]:5432/gbrain_test
GBRAIN_TEST_ALLOW_DATABASE_URL: '1'
SHARD: ${{ matrix.shard }}
+ GBRAIN_TEST_RECEIPT_DIR: ${{ runner.temp }}/receipts
+ GBRAIN_TEST_RECEIPT_LANE: pg-arms-bun-${{ matrix.bun }}
run: |
: "${DATABASE_URL:?unit-lane PostgreSQL arms require the explicit test database}"
+ # Executed-test receipts (one per file, JUnit included) feed the
+ # executed-receipts ledger and nightly-watch's failure manifest, so a
+ # master-red issue from this lane names the failing test.
+ . scripts/lib/test-env.sh
+ receipts_init pg-arms || exit 2
# The list lives in test/postgres-unit-arms.txt (one path per line);
# shards balance by measured runtime (scripts/postgres-arm-weights.json).
selected=$(bun scripts/postgres-unit-arms.ts shard "$SHARD" 2)
@@ -219,13 +226,26 @@ jobs:
failed=()
for file in "${files[@]}"; do
echo "::group::$file"
- bun --no-env-file test --timeout=120000 "$file" || failed+=("$file")
+ receipt_begin primary "s$SHARD-$(basename "$file" .ts)" "$SHARD" 2 postgres "$file"
+ rc=0
+ bun --no-env-file test --timeout=120000 ${RECEIPT_ARGS[@]+"${RECEIPT_ARGS[@]}"} "$file" || rc=$?
+ receipt_end "$rc"
+ [ "$rc" -eq 0 ] || failed+=("$file")
echo "::endgroup::"
done
for file in ${failed[@]+"${failed[@]}"}; do
echo "::error file=$file::PostgreSQL arm failed. Reproduce: DATABASE_URL=<pgvector test database> GBRAIN_TEST_ALLOW_DATABASE_URL=1 bun test --timeout=120000 $file"
done
[ "${#failed[@]}" -eq 0 ]
+ - name: Upload receipts
+ if: always()
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
+ with:
+ name: receipts-pg-arms-${{ matrix.shard }}-bun-${{ matrix.bun }}
+ path: ${{ runner.temp }}/receipts
+ retention-days: 14
+ if-no-files-found: warn
+ overwrite: true
invariants:
name: ${{ matrix.engine }} / Bun ${{ matrix.bun }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index a9f2201a9c..a195839472 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -892,7 +892,7 @@ jobs:
# comparison against a baseline run is the parent's local call:
# bun scripts/ci-executed-counts.ts --base-run <id> --head-run <id>
executed-receipts:
- needs: [verify, serial-tests, slow-entity-resolve-perf, slow-brainbench-e2e, test, shared-skills-compatibility]
+ needs: [verify, serial-tests, slow-entity-resolve-perf, slow-brainbench-e2e, test, shared-skills-compatibility, persistence-validation]
if: ${{ always() && (github.event_name != 'workflow_dispatch' || (inputs.native_only != true && inputs.race_hunt != true && !inputs.stress_files && !inputs.stress_base)) }}
runs-on: ubicloud-standard-2-ubuntu-2404
timeout-minutes: 10