Skip to content

fix(ci): resolve test bootstrap failures by adding missing runtime dependencies for QR verification app#9

Merged
udaycodespace merged 15 commits intomainfrom
feature/qr-verification-app
Mar 25, 2026
Merged

fix(ci): resolve test bootstrap failures by adding missing runtime dependencies for QR verification app#9
udaycodespace merged 15 commits intomainfrom
feature/qr-verification-app

Conversation

@udaycodespace
Copy link
Copy Markdown
Owner

📌 Description

This PR introduces the complete QR verification feature along with major architectural improvements, security enhancements, and CI stabilization.

It includes modularization of the Flask application, enhanced verification flows (QR + credential + blockchain), UI improvements, and fixes for CI test failures caused by missing runtime dependencies.

🚀 Scope of Work

This PR combines multiple improvements across backend, frontend, DevOps, and testing:

  • QR verification system (end-to-end)
  • Credential validation enhancements
  • Application modularization using blueprints
  • CI/CD and dependency fixes
  • UI and architecture refinements

✅ Key Changes

🔐 Verification & Security

  • Improved QR verification flow and reliability
  • Enhanced credential validation logic
  • Strengthened blockchain verification handling
  • Implemented collision-safe hashing and privacy improvements

🧩 Backend Architecture

  • Refactored monolithic app into modular blueprints
  • Extracted core services for better separation of concerns
  • Improved route organization and maintainability

🎨 UI & Product Improvements

  • UI overhaul across portal
  • Improved credential form structure (more realistic academic data)
  • Better verifier and issuer workflows

🧪 Testing & Quality

  • Updated test suite for new modular structure
  • Added smoke test coverage
  • Ensured compatibility with pytest fixture-based app loading

⚙️ DevOps & CI/CD

  • Aligned Docker and docker-compose configurations
  • Updated GitHub Actions workflows
  • Standardized formatting with Black (Python 3.10 target)

🐛 CI Fix (Critical)

  • Added missing runtime dependencies:

    • pyotp (admin OTP routes)
    • PyPDF2 (PDF services)
  • Synced:

    • requirements.txt
    • pyproject.toml
  • Fixed ModuleNotFoundError during CI test bootstrap

🧠 Root Cause (CI Failure)

  • CI test job imports the Flask app during pytest fixture setup
  • Blueprint imports depended on undeclared packages (pyotp, PyPDF2)
  • This caused ModuleNotFoundError, blocking test collection

🛠️ Resolution

  • Declared all required runtime dependencies
  • Ensured clean app initialization during import
  • Stabilized CI pipeline and unblocked test execution

🧪 Validation

  • ✔️ Local test run: 69 passed, 0 failed
  • ✔️ No import errors during test collection
  • ✔️ Verified app startup after dependency installation
  • ✔️ Smoke tests passing for key flows

📦 Commits Overview

Includes major commits such as:

  • feat(portal): UI overhaul, RBAC security, and system improvements
  • feat: implement privacy, hashing, and CI/CD security enhancements
  • refactor(app): modularize routes into blueprints and services
  • feat(verification): improve QR, credential, and blockchain validation
  • test: update suite and add smoke coverage
  • chore(devops): align docker and workflows
  • fix(ci): add missing runtime dependencies

🧾 Notes for Reviewers

  • This is a combined feature + refactor + CI fix PR

  • Recommended review order:

    1. Backend modularization (blueprints/services)
    2. Verification logic
    3. CI/dependency fixes
    4. Tests

…kflow

Redesigned Issuer, Student, and Verifier portals with improved UI consistency.

Implemented role-based navigation restrictions and Email OTP MFA with masked notifications.

Added HTML email templates for authentication and security alerts.

Secured system purge with multi-step verification and encrypted PDF audit reports.

Refactored backend logic across app.py, models.py, mailer.py, and portal templates.
- unify holder, certificate web, and certificate PDF QR links via canonical verify URL builder

- add signed token + compressed payload handling compatibility across generation and verification paths

- improve holder/certificate QR UX (copy/share/download and clearer link metadata)

- add standalone qr-web-app verifier with scan, upload, and link verification

- harden verifier for gzip/plain payload decoding, issuer registry trust checks, and one-time local consume lock

- document architecture and troubleshooting in solution.txt and brainstrom.txt
Add no-cache handling for certificate and PDF responses to prevent stale downloads. Rework certificate PDF generation to better match the certificate view. Rebuild the QR verification web app flow so scan, upload, and link verification paths redirect into result.html with a simplified UI.
@udaycodespace udaycodespace merged commit b6fa175 into main Mar 25, 2026
9 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