Skip to content

perf: baseline physical visibility phase 6 #290

perf: baseline physical visibility phase 6

perf: baseline physical visibility phase 6 #290

name: Release Hardening
on:
pull_request:
push:
branches:
- main
jobs:
python-310-server-compatibility:
name: Python 3.10 Server Compatibility Gate
runs-on: ubuntu-latest
env:
MOIRA_NO_DOWNLOAD: "1"
MOIRA_TEST_MODE: "1"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up minimum supported Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install optional server
run: python -m pip install -e ".[server]"
- name: Smoke Python 3.10 server contracts
run: |
python - <<'PY'
from pydantic import ValidationError
from moira_server import create_app
from moira_server.models.asteroids import AsteroidSubsetSlug
from moira_server.models.electional import ElectionalPredicateProfileId
from moira_server.models.lord_of_the_orb import LordOfTheOrbCycleKindRequest
from moira_server.models.lord_of_the_turn import LordOfTheTurnMethodRequest
from moira_server.models.manazil import MansionComputationMode
from moira_server.models.nodes import NodeComputationMethod
from moira_server.models.timelords import DecennialNatalRequest
enum_types = (
AsteroidSubsetSlug,
ElectionalPredicateProfileId,
LordOfTheOrbCycleKindRequest,
LordOfTheTurnMethodRequest,
MansionComputationMode,
NodeComputationMethod,
)
assert all(issubclass(enum_type, str) for enum_type in enum_types)
assert all(list(enum_type) for enum_type in enum_types)
accepted = DecennialNatalRequest.model_validate(
{
"dt": "2000-01-01T12:00:00Z",
"is_day_chart": True,
"deep_subdivision_method": None,
}
)
assert accepted.deep_subdivision_method is None
try:
DecennialNatalRequest.model_validate(
{
"dt": "2000-01-01T12:00:00Z",
"is_day_chart": True,
"deep_subdivision_method": "valens",
}
)
except ValidationError:
pass
else:
raise AssertionError("named Decennial deep methods must remain rejected")
schemas = create_app().openapi()["components"]["schemas"]
request_schema = schemas["DecennialNatalRequest"]
deep_method = request_schema["properties"]["deep_subdivision_method"]
assert deep_method["type"] == "null"
assert deep_method["deprecated"] is True
assert "deep_subdivision_method" not in request_schema["required"]
assert "DecennialDeepSubdivisionMethod" not in schemas
PY
release-hardening:
name: Release Hardening Gate
runs-on: ubuntu-latest
env:
MOIRA_NO_DOWNLOAD: "1"
MOIRA_TEST_MODE: "1"
MOIRA_STRICT_KNOWN_ISSUES: "1"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
# Moira's authoritative runtime is the project .venv on Python 3.14.
# Release hardening must validate against the same port baseline.
python-version: "3.14"
- name: Install package and test dependencies
run: python -m pip install -e ".[dev,server]"
- name: Check release-facing doc consistency
run: |
python scripts/check_doc_consistency.py
python scripts/check_release_identity.py
python scripts/generate_hellenistic_inventory.py --check
python scripts/sync_rest_api_reference.py --check
python scripts/sync_git_wiki.py --check
- name: Check tagged website publication bundle
run: |
VERSION="$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')"
if git rev-parse -q --verify "refs/tags/v${VERSION}" >/dev/null; then
python scripts/build_website_docs_bundle.py --check
else
echo "v${VERSION} is an untagged release candidate; the version-pinned publication bundle is generated after the immutable release tag exists."
fi
- name: Run Hellenistic release gates
run: |
python -m pytest \
tests/unit/test_hellenistic_source_goldens.py \
tests/unit/test_hellenistic_inventory_generation.py \
tests/unit/test_hellenistic_contract_parity.py \
tests/unit/test_hellenistic_profile.py \
tests/unit/test_profections.py \
tests/unit/test_timelords_public_api.py \
tests/unit/test_dignities_public_api.py \
tests/unit/test_lots_public_api.py \
tests/unit/test_triplicity.py \
tests/unit/test_egyptian_bounds.py \
tests/unit/test_egyptian_bounds_public_api.py \
tests/unit/test_decanates.py \
tests/unit/test_hermetic_decans.py \
tests/server/test_hellenistic_contract_openapi.py \
tests/server/test_server_hellenistic_profile.py \
tests/server/test_server_hellenistic_aspects_routes.py \
tests/server/test_server_dignities_routes.py \
tests/server/test_server_lots_routes.py \
tests/server/test_server_triplicity_routes.py \
tests/server/test_server_egyptian_bounds_routes.py \
tests/server/test_server_decans_routes.py \
tests/server/test_server_timelord_routes.py \
tests/server/test_server_phase8_timelord_routes.py \
tests/server/test_server_phase8_decennial_routes.py \
-q
python -m pytest tests/server/test_server_route_discoverability.py -q
- name: Run public surface and release hardening suites
run: |
python -m pytest tests/unit/test_website_docs_bundle_generation.py -q
python -m pytest tests/unit/test_public_api_drift.py -q
python -m pytest tests/unit/test_public_doctrine_surfaces.py -q
python -m pytest tests/unit/test_dasha.py -q
python -m pytest tests/unit/test_timelords.py -q
python -m pytest tests/unit/test_cycles.py -q
- name: Run 6.1 contract and catalog gates
run: |
python -m pytest \
tests/unit/test_aspects.py \
tests/unit/test_patterns.py \
tests/unit/test_api_surface_adversarial_audit.py \
tests/unit/test_docstring_governance.py \
tests/unit/test_asteroid_identity_catalog.py \
tests/unit/test_comet_identity_catalog.py \
tests/unit/test_comets.py \
tests/unit/test_small_body_catalog_builder_manifests.py \
tests/unit/test_small_body_catalog_release.py \
tests/unit/test_small_body_release_loader_gate.py \
tests/unit/test_small_body_identity_resolution.py \
tests/unit/test_small_body_packaged_manifest_receipts.py \
tests/unit/test_planet_position_switches.py \
tests/unit/test_moira_progressions.py \
tests/unit/test_void_of_course.py \
tests/server/test_server_small_body_list_routes.py \
tests/server/test_server_chart_routes.py \
tests/server/test_server_astrocartography_routes.py \
tests/server/test_server_aspects_from_longitudes.py \
tests/server/test_server_patterns_policy.py \
-q
- name: Reject real unused imports in source
run: ruff check moira moira_server scripts --select F401 --no-fix