# Checkpoint 289 — BE-132 project archive includes permission-checked DMS files (2026-10-27)

## Change

- The project archive exporter now detects OCA DMS when it is installed, discovers DMS attachment IDs only to exclude them from the generic project-attachment path, and reads DMS metadata/content only through the active user's DMS access.
- Export is refused when the active user cannot read every active DMS file linked to the selected project. This avoids silently producing an incomplete handover and prevents DMS-backed `ir.attachment` records from bypassing directory permissions.
- Included DMS files receive a sanitized `dms-files/` path and manifest entry with file/directory IDs and a SHA-256 checksum. They share the existing 500-file and 55 MB caps.
- The native archive lifecycle test now conditionally exercises this path when DMS is installed, including byte/checksum verification, proof that the backing attachment is not duplicated as an ordinary project attachment, and a denial for a project owner who cannot read a separate group-restricted DMS directory. The denied request created no additional archive.

## Verification

- On a disposable clone of `namaa_ksa`, installed OCA DMS, upgraded `namaa_ai_bridge`, and ran `TestCrmTechnicalProposal.test_project_archive_pack_requires_approved_proposal_and_confirmed_boq_and_stores_private_pdfs`: **1 test passed, 0 failures, 0 errors**. The test covered both attachment-backed and database-backed DMS storage.
- The test confirmed the DMS file bytes and manifest checksum in the ZIP, and confirmed its backing attachment ID was absent from generic project attachment entries.
- The clone was dropped after the run; shared `namaa_ksa` was not upgraded or modified. See [machine-readable QA](DMS_ARCHIVE_EXPORT_QA.json) and [updated native regression](../../addons/namaa_ai_bridge/tests/test_crm_technical_proposal.py).
- The vendored OCA DMS suite report records **77/77 passed** with the dedicated HTTP test port; see [DMS suite QA](OCA_DMS_ACL_QA.json). This suite result is separate from the one-test archive integration result.
- Python compilation and `git diff --check` passed. BFF/browser journeys were not rerun in this slice.

## Status and remaining work

- BRS totals remain **18 DONE, 124 PARTIAL, 12 MISSING, 10 BLOCKED**. BE-132 remains PARTIAL pending broader role/company acceptance, knowledge-item export, React-first A1–A4, and deployment of the DMS addon into the intended runtime.
- DMS is not installed in shared `namaa_ksa` and is not on the running production Odoo container's configured addon path. This checkpoint verifies the optional integration in isolation; it does not claim shared-runtime availability.

