Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 22 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,43 +82,48 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Require live oracle configuration
# Skip-not-fail: live Loomweave conformance is NOT run in remote CI
# (owner decision 2026-06-25 — Legis does not stand up a CI-reachable
# Loomweave oracle). When the live oracle config is absent this job passes
# as a fast no-op so it never blocks the PyPI publish. When the config IS
# present (e.g. a provisioned/self-hosted runner), the oracle runs for
# real and a conformance failure blocks publish — the gate still bites
# where it can. Do NOT reintroduce a fail-on-missing-config check here
# (that was the rc4 publish blocker; re-added in 1.1.1, reverted again
# here per the owner decision above).
- name: Detect live oracle configuration
id: oracle_config
env:
LEGIS_LOOMWEAVE_HMAC_KEY: ${{ secrets.LEGIS_LOOMWEAVE_HMAC_KEY }}
run: |
missing=()
for name in LOOMWEAVE_URL LOOMWEAVE_LIVE_ORACLE_LOCATOR; do
for name in LOOMWEAVE_URL LOOMWEAVE_LIVE_ORACLE_LOCATOR LEGIS_LOOMWEAVE_HMAC_KEY; do
if [ -z "${!name}" ]; then
missing+=("${name}")
fi
done
if [ "${#missing[@]}" -ne 0 ]; then
joined="$(IFS=', '; echo "${missing[*]}")"
echo "::error::Missing required release conformance environment: ${joined}"
exit 1
echo "::notice::Live Loomweave oracle not provisioned (${joined} unset) — skipping conformance, not blocking publish."
echo "configured=false" >> "$GITHUB_OUTPUT"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update the release workflow invariant test

The release build still runs the full offline suite via uv run pytest ..., and tests/test_ci_workflow.py::test_release_publish_requires_live_loomweave_conformance still asserts that the live job does not emit configured=false/true, does not mention not blocking publish, and has no conditional oracle step. With this new output/skip path, that test fails during the build job, so the release remains blocked even when the live oracle is intentionally skipped; please update or remove the stale workflow invariant with this change.

Useful? React with 👍 / 👎.

else
echo "configured=true" >> "$GITHUB_OUTPUT"
fi

- uses: astral-sh/setup-uv@v5
if: steps.oracle_config.outputs.configured == 'true'
with:
enable-cache: true

- name: Install dependencies
if: steps.oracle_config.outputs.configured == 'true'
run: uv sync --dev

- name: Run live Loomweave oracle
if: steps.oracle_config.outputs.configured == 'true'
env:
LEGIS_LOOMWEAVE_HMAC_KEY: ${{ secrets.LEGIS_LOOMWEAVE_HMAC_KEY }}
run: |
missing=()
for name in LOOMWEAVE_URL LOOMWEAVE_LIVE_ORACLE_LOCATOR LEGIS_LOOMWEAVE_HMAC_KEY; do
if [ -z "${!name}" ]; then
missing+=("${name}")
fi
done
if [ "${#missing[@]}" -ne 0 ]; then
joined="$(IFS=', '; echo "${missing[*]}")"
echo "::error::Missing required release conformance environment: ${joined}"
exit 1
fi
uv run pytest tests/conformance/test_live_loomweave_oracle.py
run: uv run pytest tests/conformance/test_live_loomweave_oracle.py

publish:
name: Publish to PyPI
Expand Down
Loading