Skip to content

refactor: pipeline bug fixes, restored auth package, CI/CD pipeline, and research-grade README overhaul - #2

Merged
Utkarsh-X merged 7 commits into
mainfrom
refactor/pipeline-fixes-and-documentation
Jul 27, 2026
Merged

refactor: pipeline bug fixes, restored auth package, CI/CD pipeline, and research-grade README overhaul#2
Utkarsh-X merged 7 commits into
mainfrom
refactor/pipeline-fixes-and-documentation

Conversation

@Utkarsh-X

Copy link
Copy Markdown
Owner

Summary of Changes

1. Bug Fixes & Test Suite Restoration (100% Pass Rate: 72/72 Tests)

  • Restored trace_aml.auth Package: Implemented GoogleBrowserOAuthClient, GoogleIdentityVerifier, RemoteAuthPolicyClient (open access policy), DesktopSessionManager, and BrowserAuthFlowManager.
  • Fixed Incident Aggregation: Updated IncidentManager.handle_alert() to return (updated, "on_update") for continuous detections on open incidents.
  • Fixed Quality Gating State Machine: Updated decide_person_lifecycle() so candidate profiles with valid images remain in draft state until readiness criteria are met.
  • Fixed Local InsightFace Model Loading: Updated ArcFaceRecognizer._ensure_app() to use ./models/buffalo_l local path when pre-downloaded model assets exist.

2. CI/CD Pipeline Integration

  • Added .github/workflows/ci.yml running pytest and ruff linting across Python 3.11 and 3.12 matrices.
  • Added [tool.ruff] linter configuration to pyproject.toml.

3. Data Sanitization & Security

  • Replaced personal contact info in config/config.demo.yaml with generic standard placeholders.

4. Research-Grade & Formal README.md Overhaul

  • Removed All Emojis: Converted documentation to formal, academic publication style.
  • Interactive GitHub Mermaid Architecture Diagrams: Added End-to-End Pipeline (flowchart LR), Component Topology (flowchart TB), and Identification Sequence (sequenceDiagram).
  • Mathematical & Theoretical Formulations: Formulated similarity metrics, BLAS vector matmul, EMA smoothing, spatial tracking scores, quality gating indices, and Union-Find max-similarity edge conditions.
  • User Interface & Operational Showcase: Added 5 high-resolution captures showcasing the Live Ops Terminal, Incident Triage Center, Global Event Analytics (DuckDB), Database Explorer (LanceDB), and Operator Authorization Checkpoint.
  • Expanded Desktop & Cloud Deployment Section: Detailed Electron + PyInstaller process model, IPC bridges, systemd service units, and Nginx reverse proxy configurations.

Verification

  • Run pytest -v: 72 passed in 14.95s (100% pass rate).

…add python-multipart + httpx, move onnxruntime-gpu to [gpu] extra

- typer 0.12.x has a known regression with click 8.2 ('Secondary flag is not
  valid for non-boolean flag') - downgrade ceiling to <0.12.0
- FastAPI form endpoints require python-multipart at runtime, add to core deps
- httpx is required by starlette TestClient, add to core deps
- onnxruntime-gpu fails on CPU-only CI runners (ubuntu-latest); move to
  optional [gpu] extra, keep CPU onnxruntime in core deps so CI installs clean
- Simplify ci.yml to single pip install -e .[dev] - all version pinning
  is now managed in pyproject.toml (single source of truth)
…None compat

typer 0.11.x (and earlier) cannot introspect 'str | None' union type hints
when from __future__ import annotations is active (it stringifies all
annotations, turning the actual type into a string literal that typer cannot
evaluate). Python 3.11+ supports PEP 604 union syntax natively at runtime so
the __future__ import is not needed.

Root cause: CI installed typer==0.11.1 which calls get_click_type() on the
string 'str | None' and raises RuntimeError: Type not yet supported.

Fix: remove from __future__ import annotations from cli.py — typer now
receives the actual str | None UnionType object (Python 3.10+), which all
tested typer versions handle correctly without the __future__ shim.

Also broadened typer constraint to >=0.9.0,<0.13.0 now that the source
code is compatible with the full range.
click 8.2.0 introduced stricter validation in Option.__init__() that raises
'Secondary flag is not valid for non-boolean flag' when secondary_opts is
set on a non-boolean Option. typer 0.9.x-0.11.x passes secondary_opts
when generating --rebuild/--no-rebuild bool flag pairs via TyperOption
without properly setting is_bool_flag=True first, hitting the new check.

CI was installing click-8.4.2 which introduced this regression vs typer's
TyperOption implementation. Pin click<8.2.0 (8.1.8 is the latest safe version)
until we can upgrade to typer>=0.12.3 which properly handles this.
@Utkarsh-X
Utkarsh-X merged commit 791eb92 into main Jul 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant