Skip to content

Test Vectors Drift

Test Vectors Drift #53

# shelterflex-api -> .github/workflows/test-vectors-drift.yml
# Fails if the vendored test-vectors.json drifts from the canonical copy in platform.
#
# Runs on a schedule, NOT on pull requests. The check depends on the state of a
# different repository, so running it per-PR meant an unrelated change here could
# go red because someone edited a file in shelterflex-platform. Drift is a
# slow-moving concern; a daily check catches it without ever blocking a
# contributor on something outside this repo.
#
# When this fails, reconcile the vendored copy deliberately - do not auto-sync.
# The vectors are a shared contract, and a difference may mean platform changed
# something that this repo has not yet accounted for.
name: Test Vectors Drift
on:
schedule:
# 06:00 UTC daily
- cron: "0 6 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
drift:
name: Check test-vectors.json against platform
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch canonical vectors from platform
run: |
curl -sSL --fail \
"https://raw.githubusercontent.com/Shelterflex/shelterflex-platform/main/test-vectors.json" \
-o /tmp/canonical.json
- name: Diff against vendored copy
run: |
if ! diff -u /tmp/canonical.json test-vectors.json; then
echo "::error::test-vectors.json has drifted from the canonical copy in shelterflex-platform."
echo "Update this repo's copy to match, or change the canonical copy in platform first."
exit 1
fi
echo "test-vectors.json is in sync with platform."