This guide details the PyApp onefile binary packaging, container builds, release CI pipeline, and Sphinx documentation.
The project ships a self-contained onefile binary named coffee built via PyApp.
- Workflow: We use a custom Bundle-Patch-Compile path rather than standard
[tool.pyapp]oruvx pyapp build. - Execution Script:
tools/bundler.pycoordinates:- Compiles frontend assets into
src/app/domain/web/static/. - Builds the Python application wheel.
- Bundles Python 3.13 dependencies.
- Patches PyApp to install runtime files under the XDG configuration directory (
~/.config/cymbal-coffeeby default). - Compiles launcher binaries using
cargo zigbuild --target <arch>-unknown-linux-gnu.2.17to target GLIBC 2.17 compatibility.
- Compiles frontend assets into
- Python Version Override: Development uses Python 3.12 (set in
.python-version), but the onefile target runs Python 3.13.make build-onefileoverridesUV_PYTHON/PYAPP_BUILD_PYTHONto force CPython 3.13 compilation. - GLIBC Compatibility Check: Validate the resulting launcher to verify no higher GLIBC symbols are resolved:
readelf -Ws dist/coffee | rg -o 'GLIBC_[0-9.]+' | sort -Vu | tail
The production container is defined in tools/deploy/docker/Dockerfile.
- Distroless Base: It wraps the onefile binary on top of a distroless runtime, avoiding standard Python image overhead.
- Context: The build requires access to the compiled onefile launcher under
dist/. Ensure.dockerignorewhitelistsdist/coffee-*-linux-gnuagainst the globaldist/*ignore rule. - Wallet Mounts: Oracle Wallets are mounted at
/app/wallet. The Dockerfile configures:TNS_ADMIN=/app/walletWALLET_LOCATION=/app/walletThe container must be run with a read-only wallet volume mount:
docker run -v /local/wallet:/app/wallet:ro ...
The GitHub Action workflows under .github/workflows/ automate release creation:
- Native Matrix: Cross-compilation via QEMU is rejected. Builds run on native architecture runners:
ubuntu-24.04foramd64/x86_64ubuntu-24.04-armforarm64/aarch64
- Release Artifacts: Uploads attach specific binaries:
dist/coffee-linux-x86_64,dist/coffee-linux-aarch64, plus checksums. Do not upload internaldist/python-dist-*.tar.gzbundles. - Smoke Check: The release verification test triggers
coffee upgrade --help(notcoffee run) to verify installation functionality.
The developer learning portal is built via Sphinx.
- Theme: Uses
sphinx-immaterialtheme (notshibuya) with custom admonitionstour-stop,oracle-internals, andagent-detaildefined inconf.py. - Information Architecture: A locked, three-tier structure:
- Hero:
index.md+ walkthroughtour.md. - Concepts: exactly 3 pages under
concepts/(vector-search, rag, agent-flow). - Reference:
reference/(quickstart, cli, api, internals, developers).
- Hero:
- Code Embeds: Always embed code using
literalincludewith anchors in source files (e.g.# docs:start-<name>and# docs:end-<name>). Do not copy-paste code inline. Include a short framing sentence naming the file and class. - Autodoc Scope: Restricted to public entrypoints:
ADKRunner,CacheService,MetricsService,ProductService, and domain schemas packages. Do not auto-document settings, CLI command definitions, or IoC providers.