Problem
Current ci.yml is a placeholder with two fatal flaws:
pytest tests/ ... || echo "Tests directory not found..." — silently passes when tests don't exist
Only runs flake8 — no type checking, no formatting enforcement, no coverage threshold
This must be completely replaced with a production-grade pipeline that fails hard on any quality regression.
New CI Architecture
Jobs
lint — Ruff + MyPy (fast, runs in parallel with test)
test — pytest + coverage (must hit 100%)
build — pyproject.toml package build verification
smoke — install from wheel and run examples (end-to-end)
New ci.yml
name : CI
on :
push :
branches : [main, develop]
pull_request :
branches : [main]
permissions :
contents : read
jobs :
lint :
name : Lint & Type Check
runs-on : ubuntu-latest
steps :
- uses : actions/checkout@<PIN_SHA>
with :
persist-credentials : false
- uses : actions/setup-python@<PIN_SHA>
with :
python-version : " 3.11"
cache : pip
- name : Install lint tools
run : pip install ruff mypy 'cryptography>=42.0' pydantic
- name : Ruff format check
run : ruff format --check oblisk/ tests/
- name : Ruff lint
run : ruff check oblisk/ tests/
- name : MyPy strict type check
run : mypy oblisk/ --strict --ignore-missing-imports
test :
name : Test (Python ${{ matrix.python-version }})
runs-on : ubuntu-latest
strategy :
matrix :
python-version : ["3.11", "3.12"]
steps :
- uses : actions/checkout@<PIN_SHA>
with :
persist-credentials : false
- uses : actions/setup-python@<PIN_SHA>
with :
python-version : ${{ matrix.python-version }}
cache : pip
- name : Install package + dev deps
run : pip install -e '.[dev]'
- name : Run tests with coverage
run : |
pytest \
--cov=oblisk \
--cov-branch \
--cov-report=xml:coverage.xml \
--cov-report=term-missing \
--cov-fail-under=100 \
-v
- name : Upload coverage to Codecov
uses : codecov/codecov-action@<PIN_SHA>
with :
files : coverage.xml
fail_ci_if_error : true
flags : python-${{ matrix.python-version }}
build :
name : Build & Verify Package
runs-on : ubuntu-latest
steps :
- uses : actions/checkout@<PIN_SHA>
with :
persist-credentials : false
- uses : actions/setup-python@<PIN_SHA>
with :
python-version : " 3.11"
- name : Install build tools
run : pip install build twine
- name : Build wheel and sdist
run : python -m build
- name : Verify package with twine
run : twine check dist/*
- name : Test install from wheel
run : |
pip install dist/*.whl
python -c "import oblisk; from oblisk.vault import Vault; print('Package OK')"
smoke :
name : Smoke Test Examples
runs-on : ubuntu-latest
needs : [build]
steps :
- uses : actions/checkout@<PIN_SHA>
with :
persist-credentials : false
- uses : actions/setup-python@<PIN_SHA>
with :
python-version : " 3.11"
- name : Install
run : pip install -e .
- name : Run all examples
run : |
python examples/simple_agent.py
python examples/vault_demo.py
python examples/governance_demo.py
python examples/multi_agent.py
Tasks
CI Overhaul
Ruff Configuration
Add [tool.ruff] and [tool.ruff.lint] to pyproject.toml:
[tool .ruff ]
target-version = " py311"
line-length = 100
[tool .ruff .lint ]
select = [" E" , " W" , " F" , " I" , " N" , " UP" , " S" , " B" , " ANN" ]
ignore = [" ANN101" , " ANN102" , " S101" ]
[tool .ruff .lint .per-file-ignores ]
"tests/**" = [" S" , " ANN" ] # relax security and annotation rules in tests
Run ruff format oblisk/ to auto-format entire codebase
Fix all ruff check violations
MyPy Configuration
Pre-commit Hooks
Codecov Configuration
README Badges
Acceptance Criteria
✅ ci.yml has 4 jobs: lint, test, build, smoke
✅ pytest --cov-fail-under=100 in CI — fails if coverage drops
✅ ruff format --check fails CI if unformatted code is pushed
✅ ruff check fails CI on any lint violation
✅ mypy --strict fails CI on any type error
✅ Codecov reports 100% coverage on every PR
✅ No || echo fallback patterns anywhere in workflows
✅ Python 3.11 and 3.12 both pass
✅ Pre-commit hooks prevent violations locally before push
✅ All 4 README badges render correctly
Dependencies
Requires: #6 (package layout), #9 (tests exist)
Related: #11 (SHA pinning), #12 (Scorecard workflow)
Estimated effort: 4-6 hours
Priority: P0 — CI quality gate is the foundation of everything
Labels: ci/cd, quality, mypy, ruff, coverage, P0
Problem
Current
ci.ymlis a placeholder with two fatal flaws:pytest tests/ ... || echo "Tests directory not found..."— silently passes when tests don't existflake8— no type checking, no formatting enforcement, no coverage thresholdThis must be completely replaced with a production-grade pipeline that fails hard on any quality regression.
New CI Architecture
Jobs
lint— Ruff + MyPy (fast, runs in parallel with test)test— pytest + coverage (must hit 100%)build— pyproject.toml package build verificationsmoke— install from wheel and run examples (end-to-end)New
ci.ymlTasks
CI Overhaul
.github/workflows/ci.ymlwith new multi-job pipeline aboveuses:lines (see issue [P0][C0+C1+C3] Add OpenSSF Scorecard workflow + SHA-pin all Actions + Dependabot alignment #11 for complete SHA list)|| echo "Tests directory not found"fallback entirelyfail_ci_if_error: trueon Codecov uploadRuff Configuration
[tool.ruff]and[tool.ruff.lint]topyproject.toml:ruff format oblisk/to auto-format entire codebaseruff checkviolationsMyPy Configuration
[tool.mypy]topyproject.tomlwithstrict = trueoblisk/mypy oblisk/ --strictand fix all errorspy.typedmarker file inoblisk/packagePre-commit Hooks
.pre-commit-config.yaml:pre-commit installto CONTRIBUTING.md setup instructionsci.ymlCodecov Configuration
.codecov.yml:README Badges
Acceptance Criteria
ci.ymlhas 4 jobs: lint, test, build, smokepytest --cov-fail-under=100in CI — fails if coverage dropsruff format --checkfails CI if unformatted code is pushedruff checkfails CI on any lint violationmypy --strictfails CI on any type error|| echofallback patterns anywhere in workflowsDependencies
Requires: #6 (package layout), #9 (tests exist)
Related: #11 (SHA pinning), #12 (Scorecard workflow)
Estimated effort: 4-6 hours
Priority: P0 — CI quality gate is the foundation of everything
Labels: ci/cd, quality, mypy, ruff, coverage, P0