fix(dev): support native ARM backend setup with pinned Pillow wheels - #309
Conversation
📝 WalkthroughWalkthroughThis change adds Linux aarch64 support for approved Pillow artifacts, expands fail-closed runtime validation, isolates ARM extraction behavior, and documents native Linux and Docker development workflows. ChangesLinux architecture portability
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Developer
participant DockerCompose
participant BackendContainer
participant DependencyValidator
participant ExtractionWorker
Developer->>DockerCompose: Start backend profile
DockerCompose->>BackendContainer: Build and run native image
BackendContainer->>DependencyValidator: Validate locked extractor dependencies
DependencyValidator-->>BackendContainer: Approve CPython/Linux/glibc platform
BackendContainer->>ExtractionWorker: Launch sanitized extraction process
ExtractionWorker-->>BackendContainer: Return extraction result
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Around line 318-322: Update the architecture description in the README to
refer to the Docker host’s native x86_64 or aarch64 architecture instead of
implying Docker always uses a VM. Mention the Docker Desktop VM only as a Docker
Desktop-specific detail, while preserving the guidance about avoiding foreign
platform emulation and clearing DOCKER_DEFAULT_PLATFORM.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 7ed620ce-f0e4-4cb9-b425-18d6d8d4667f
⛔ Files ignored due to path filters (1)
backend/uv.lockis excluded by!**/*.lock
📒 Files selected for processing (15)
.agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B3B1R1-linux-architecture-portability.md.dockerignoreCONTRIBUTING.mdREADME.mdbackend/.env.examplebackend/app/modules/artifacts/guide_extraction.pybackend/config/guide_extractor_dependencies.jsonbackend/pyproject.tomlbackend/scripts/check_guide_extractor_dependencies.pybackend/tests/test_guide_extraction.pybackend/tests/test_guide_extractor_dependencies.pydocker-compose.ymldocker/backend/Dockerfile.devdocs/operations_backend_testing.mddocs/spec_artifact_storage_service.md
Add a native-architecture Docker workflow and approve hash-bound Pillow ARM wheels while preserving the Linux/seccomp extraction boundary.
d8c5ac9 to
b31e0d6
Compare
Workstream PR Trust Bundle
Chunk
WS-ART-001-03B3B1R1- Linux Architecture PortabilityGoal
Give macOS, Windows, Linux ARM, and Linux x86_64 contributors one copy-pasteable backend setup without weakening the Linux-only image-extractor isolation boundary.
Intent And Planning Context
.agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B3B1R1-linux-architecture-portability.mdWhat Changed
OPENSSL_armcap=0ARM Docker Desktop compatibility setting.Why It Changed
The repository approved exact Pillow artifacts only for Linux x86_64. Pillow supports ARM and contributor host platforms, but macOS, Windows, and Linux ARM developers could not install the locked backend directly. Docker is now the portable host workflow, while native installation remains limited to the extractor's real Linux/glibc boundary.
Design Chosen
Use Docker's native VM architecture, reject cross-architecture emulation, preserve exact wheel URLs and hashes, and keep macOS/Windows outside the native parser support claim.
Alternatives Rejected
Scope Control
Allowed Files Changed
Files Outside Stated Scope
Product Behavior
Evidence
Commands Run
docker compose build backend docker run --rm --entrypoint /bin/sh ws-dx-001-portable-backend-setup-backend:latest -c 'python -m pytest -q tests/test_guide_extraction.py tests/test_guide_pdf.py' PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest -q -p pytest_cov.plugin tests/test_guide_extractor_dependencies.py --cov=scripts.check_guide_extractor_dependencies --cov-branch --cov-fail-under=90 python backend/scripts/run_test_lanes.py --collect-only ... python backend/scripts/validate_test_lane_evidence.py ... docker compose up -d --no-deps --wait --force-recreate backend curl --fail --silent http://127.0.0.1:8000/api/v1/health python3 scripts/check_markdown_links.py python3 scripts/check_stale_workstream_wording.py python3 scripts/check_stale_authorization_docs.py python3 scripts/check_stale_artifact_contracts.py python3 -m unittest -v scripts.test_lightweight_agent_gates git diff --check origin/main...HEADResult Summary
Hosted Backend lanes remain authoritative for exact-head custody and the current guide-compilation coverage floor.
Acceptance Criteria Proof
.envremains ignored; tracked values are local-only.Test Delta
Tests Added
Tests Modified
Tests Removed Or Skipped
Internal Reviewer Results
Reviewed code SHA:
b31e0d636e6b5736847c251749469408faeb5f71Reviewed at: 2026-08-10
Reviewer run IDs:
docs_senior_review,qa_ci_review,security_arch_reviewExternal Review
testandagent-gatesCI And Gate Integrity
Remaining Risks
Follow-Up Work
Human Review Focus
Please inspect:
Human Merge Ownership
Summary by CodeRabbit
New Features
Documentation