Skip to main content

⬅️ Back to Project Overview

Nox Session Architecture & CI/CD Integration

A comprehensive overview of ShieldCraft AI's Nox-powered automation, session sequencing, and best practices for production-grade MLOps.


Automation Progress

100% Session Review Complete


Overview

ShieldCraft AI leverages a modular, parallel-safe Nox session architecture to automate all aspects of code quality, security, documentation, testing, and deployment. This ensures that every CI/CD run is reproducible, traceable, and production-grade.


Session Table & Responsibilities

Session/FunctionFilePurposeParallel-SafeCI/CDNotes
docker_builddocker.pyBuilds all Docker images (main, api, ingestion)YesYesRun after all quality gates
docker_scandocker.pyScans Docker images for vulnerabilitiesYesYesRun after docker_build
docsdocs.pyBuilds Docusaurus documentationYesYesParallel with other checks
docs_devdocs.pyRuns Docusaurus dev server (local)YesNoLocal only
docs_lintdocs.pyLints Markdown docsYesYesQuality gate
lintlint.pyLint code with ruff and blackYesYesQuality gate
format_checklint.pyCheck code formattingYesYesParallel with lint
formatlint.pyAuto-format code (local)YesNoLocal only
typechecklint.pyRun mypy for static type checkingYesYesQuality gate
precommitlint.pyRun all pre-commit hooksYesYesEnsures local/CI parity
notebooksnotebook.pyTest Jupyter notebooks with nbvalYesYesQuality gate
notebook_lintnotebook.pyLint/format notebooksYesYesParallel with other gates
bump_versionrelease.pyBump project version and commitYesNoManual release only
releaserelease.pyAutomate version bump, changelog, tag, pushYesNoManual release only
checklistrelease.pyUpdate checklist progress barYesNoProject management
securitysecurity.pyRun safety and bandit security checksYesYesQuality gate
safetysecurity.pyRun only safety vulnerability scanYesYesParallel with other gates
teststest.pyRun all tests with pytest and coverageYesYesQuality gate
test_fasttest.pyRun only fast/unit testsYesYesQuick feedback
checktest.pyMeta-session: lint, typecheck, tests, safety, precommitYesYesMeta-session
citest.pyMeta-session: all CI-required sessionsYesYesMeta-session
alltest.pyMeta-session: everything (local/dev)YesNoMeta-session
file_hashutils.pyCompute SHA256 hash of a fileYesYesDependency change detection
nox_session_guardutils.pyDecorator for robust error handlingYesYesAll sessions

Session Sequencing & Best Practices

ShieldCraft AI's Nox sessions are designed for parallel execution, enabling rapid feedback and efficient CI/CD pipelines. Quality gates (lint, typecheck, security, tests) run before build and deploy steps. Meta-sessions (check, ci, all) orchestrate groups of sessions for local and CI workflows. Always ensure session dependencies are explicit and reproducible.


Architectural Insights

  • Modular session design enables easy extension and maintenance.
  • Parallel-safe sessions maximize CI/CD throughput and developer productivity.
  • Integration with pre-commit and coverage tools ensures code quality and security.
  • Robust error handling via decorators and meta-sessions supports reliable automation.

Next Steps

  • Review session definitions and dependencies for completeness.
  • Integrate new quality gates or automation as needed.
  • Document session usage for onboarding and troubleshooting.