Repository Guidelines¶
๐ค AI-Generated Content
This documentation was generated with AI assistance and is still being audited. Some, or potentially a lot, of this information may be inaccurate. Learn more.
Project Structure & Modules¶
src/flavor/hosts the Python orchestrator (CLI, packaging, PSPF tooling), whilesrc/flavor-go/andsrc/flavor-rs/hold the launcher/helper implementations; keep helper build artifacts indist/bin/.- Tests live under
tests/with subpackages for helpers, security, integration, and Pretaster fixtures (tests/pretaster); docs and specs reside indocs/. - Release tooling (
tools/), automation scripts (scripts/), and build glue (Makefile,build.sh) are top-level; avoid editing generated assets undersite/ordist/.
Build, Test, and Development Commands¶
uv syncinstalls Python dependencies into.venv; re-run afterpyproject.tomlchanges.make build-helpers(or./build.sh) compiles Go/Rust launchers; required before integration tests.make test,make test-cov, anduv run pytest -m unit|integration|securityexecute the Python suite with or without coverage.- Static analysis:
ruff format src/ tests/,ruff check src/ tests/, andmypy src/flavor; rungofmt -w . && go test ./...insrc/flavor-goandcargo fmt && cargo clippy && cargo testinsrc/flavor-rs. - PSPF validation and cross-language checks live under
tests/pretaster(make validate-pspf,make combo-test).
Coding Style & Naming Conventions¶
- Python uses 4-space indentation and Ruffโs 111-char line limit; prefer absolute imports (
from flavor.utils import ...) and fully-typed public APIs. - Keep CLI modules under
flavor/commands/prefixed with verbs (extract.py,verify.py); helper managers belong inflavor/helpers/. - Run
ruff formatbefore committing; let Ruff, mypy, gofmt, and cargo fmt enforce formatting rather than manual tweaks.
Testing Guidelines¶
- Pytest discovers
tests/test_*.pywith markers (unit,integration,security,requires_helpers, etc.); include meaningful markers on every new test. - Maintain โฅ60% coverage (
coverage fail_under); add regression tests for every bugfix and guard new helpers with Pretaster scenarios. - Integration flows that touch PSPF artifacts must reference fixtures in
tests/pretaster/src/and validate viamake validate-pspfbefore review.
Commit & Pull Request Guidelines¶
- Use Conventional Commits (
feat:,fix:,docs:,test:,refactor:,chore:) in present-tense imperative, mirroring existing history. - Branch from
develop, run the full Python + helper test matrices, and update docs when behavior changes. - Pull requests must describe motivation, list validation commands (
make test,make validate-pspf, etc.), link issues, and attach CLI output or screenshots for UX-facing work.
Security & Configuration Tips¶
- Never commit private keys (
keys/flavor-private.key); useenv.sh/env.ps1to load signing creds locally and restrict distribution tokeys/flavor-public.key. - For debugging, prefer environment toggles (
FLAVOR_LOG_LEVEL=debug,FOUNDATION_LOG_LEVEL=trace) over ad-hoc prints, and document any new env var indocs/.