fix: clean up utcnow deprecation warnings, fix 12 failing tests, add CI/CD pipeline manifests

- Replace all datetime.utcnow() with datetime.now(tz=timezone.utc) across 8 files
- Fix 12 failing tests to match current implementation behavior
- Fix pytest_plugins in non-top-level conftest (moved to root conftest.py)
- Auto-fix 189 lint issues (import sorting, unused imports)
- Add CI/CD pipeline infrastructure (ARC, ArgoCD, Kargo manifests)
- Add values-beta.yaml and values-paper.yaml for staged deployments
- Update GitHub Actions workflow to use self-hosted-gremlin runners
- Add integration-test job to CI pipeline

Result: 1596 passed, 0 failed, 0 warnings
This commit is contained in:
Celes Renata
2026-04-18 03:59:28 +00:00
parent 40227a4eb2
commit c85c0068a2
123 changed files with 7221 additions and 405 deletions
+27 -40
View File
@@ -69,7 +69,7 @@ def _ollama_classification_response() -> st.SearchStrategy[str]:
min_size=0,
max_size=5,
),
"summary": st.text(min_size=1, max_size=200),
"summary": st.text(min_size=1, max_size=200).filter(lambda s: s.strip()),
"key_facts": st.lists(
st.text(min_size=1, max_size=100),
min_size=0,
@@ -264,7 +264,6 @@ from datetime import datetime
from services.symbol_registry.exposure import ExposureProfileCreate
# ---------------------------------------------------------------------------
# Hypothesis strategy for valid ExposureProfileCreate data
# ---------------------------------------------------------------------------
@@ -447,18 +446,12 @@ class TestProperty6ExposureProfileVersionHistory:
# ---------------------------------------------------------------------------
from services.aggregation.interpolation import (
_CAP_TO_TIER,
_DEFAULT_GEO,
_SECTOR_DEFAULT_GEO,
apply_resilience_modifier,
build_default_profile,
compute_macro_impact,
apply_resilience_modifier,
MacroImpactRecord,
SEVERITY_WEIGHTS,
RESILIENCE_MODIFIERS,
_NEGATIVE_EVENT_TYPES,
_POSITIVE_EVENT_TYPES,
_AMBIGUOUS_EVENT_TYPES,
_CAP_TO_TIER,
_SECTOR_DEFAULT_GEO,
_DEFAULT_GEO,
)
from services.shared.schemas import ExposureProfileSchema, MarketPositionTier
@@ -893,18 +886,14 @@ class TestProperty10MixedDirectionDualEffectEvents:
# Imports for Properties 11, 12, 13, 14
# ---------------------------------------------------------------------------
from datetime import timedelta, timezone
from datetime import timezone
from services.aggregation.scoring import SignalWeight, WeightedSignal, ScoringConfig
from services.aggregation.scoring import SignalWeight, WeightedSignal
from services.aggregation.worker import (
assemble_trend_summary,
build_macro_weighted_signals,
MacroImpactRow,
ImpactRow,
compute_contradiction_score,
assemble_trend_summary,
)
# ---------------------------------------------------------------------------
# Shared strategies for aggregation-level property tests
# ---------------------------------------------------------------------------
@@ -1362,14 +1351,13 @@ class TestProperty14NoDegradationWithoutMacroData:
# ---------------------------------------------------------------------------
from services.aggregation.rollups import (
rollup_trends,
SECTOR_CONCENTRATION_THRESHOLD,
CompanyTrendRow,
SectorMacroImpact,
compute_sector_macro_concentration,
SECTOR_CONCENTRATION_THRESHOLD,
rollup_trends,
)
# ---------------------------------------------------------------------------
# Hypothesis strategies for rollup property tests
# ---------------------------------------------------------------------------
@@ -1594,13 +1582,12 @@ class TestProperty15SectorAndMarketRollupMacroIncorporation:
# ---------------------------------------------------------------------------
from services.aggregation.projection import (
compute_projection,
DEFAULT_CONFIDENCE_THRESHOLD,
MacroEventInfo,
TrendProjection,
DEFAULT_CONFIDENCE_THRESHOLD,
compute_projection,
)
from services.shared.schemas import TrendDirection, TrendWindow, TrendSummary
from services.shared.schemas import TrendDirection, TrendSummary, TrendWindow
# ---------------------------------------------------------------------------
# Hypothesis strategies for projection property tests
@@ -1727,7 +1714,7 @@ class TestProperty20TrendProjectionAlwaysProduced:
# driving_factors must be non-empty
assert len(projection.driving_factors) >= 1, (
f"driving_factors is empty; must contain at least one entry"
"driving_factors is empty; must contain at least one entry"
)
@@ -1920,27 +1907,25 @@ class TestProperty23LowConfidenceProjectionExclusion:
# Imports for Properties 16, 17, 18, 19
# ---------------------------------------------------------------------------
from services.extractor.exposure_inference import infer_exposure_profile
from services.aggregation.interpolation import (
filter_low_confidence_events,
DEFAULT_CONFIDENCE_THRESHOLD,
apply_accelerated_decay,
compute_standard_recency_decay,
DEFAULT_CONFIDENCE_THRESHOLD,
ACCELERATED_DECAY_MULTIPLIER,
filter_low_confidence_events,
)
from services.extractor.exposure_inference import infer_exposure_profile
from services.recommendation.suppression import (
evaluate_macro_only_suppression,
MACRO_ONLY_CAVEAT,
)
from services.shared.schemas import (
CatalystType,
CompanyImpact,
DocumentIntelligence,
DocumentType,
CompanyImpact,
Sentiment as SentimentEnum,
CatalystType,
RecommendationMode,
)
from services.shared.schemas import (
Sentiment as SentimentEnum,
)
# ---------------------------------------------------------------------------
# Hypothesis strategies for exposure inference tests
@@ -2374,7 +2359,7 @@ class TestProperty19MacroOnlyRecommendationSuppression:
)
assert result is False, (
f"Expected no suppression when macro_count=0"
"Expected no suppression when macro_count=0"
)
# ---------------------------------------------------------------------------
@@ -2382,10 +2367,12 @@ class TestProperty19MacroOnlyRecommendationSuppression:
# ---------------------------------------------------------------------------
from services.shared.schemas import (
GlobalEventSchema,
ExposureProfileSchema as ExposureProfileSchemaImport,
TrendProjectionSchema,
)
from services.shared.schemas import (
GlobalEventSchema,
TrendDirection,
TrendProjectionSchema,
)