[Task] Store source provenance and source revision metadata #6

Closed
opened 2026-07-06 11:36:02 +02:00 by zemion · 1 comment
Owner

Imported from the consolidated GovOPlaN product backlog.

  • Source: /mnt/DATA/Nextcloud/ADD ideas UG/Products/govoplan/backlog.md
  • Line: 119
  • Section: Milestones > Milestone 6 - External Storage Connectors
  • Source status: OPEN.

Imported backlog item:

- [ ] Store source provenance and source revision metadata.
<!-- codex-backlog-fingerprint:94fbced303430a772bbee81f --> Imported from the consolidated GovOPlaN product backlog. - Source: `/mnt/DATA/Nextcloud/ADD ideas UG/Products/govoplan/backlog.md` - Line: `119` - Section: `Milestones > Milestone 6 - External Storage Connectors` - Source status: `OPEN.` Imported backlog item: ```markdown - [ ] Store source provenance and source revision metadata. ```
zemion added this to the Milestone 6 - External Storage Connectors milestone 2026-07-06 13:22:32 +02:00
Author
Owner

Codex State: done

Summary

  • Added a canonical metadata-backed source provenance contract for managed files: uploads accept source_provenance_json/source_revision, responses expose normalized source_provenance/source_revision, and ZIP imports can carry the same metadata.
  • Managed campaign attachment manifests now include source provenance and source revision in managed_matches, so frozen build/job evidence keeps connector origin and revision context.
  • This gives future connector imports a stable no-migration path for provenance while preserving existing API compatibility.

Changed Files

  • README.md
  • src/govoplan_files/backend/schemas.py
  • src/govoplan_files/backend/router.py
  • src/govoplan_files/backend/storage/archives.py
  • src/govoplan_files/backend/storage/campaign_attachments.py
  • src/govoplan_files/backend/storage/provenance.py
  • webui/src/api/files.ts
  • ../govoplan-core/tests/test_api_smoke.py

Verification

  • ./.venv/bin/python -m py_compile /mnt/DATA/git/govoplan-files/src/govoplan_files/backend/router.py /mnt/DATA/git/govoplan-files/src/govoplan_files/backend/schemas.py /mnt/DATA/git/govoplan-files/src/govoplan_files/backend/storage/archives.py /mnt/DATA/git/govoplan-files/src/govoplan_files/backend/storage/campaign_attachments.py /mnt/DATA/git/govoplan-files/src/govoplan_files/backend/storage/provenance.py
  • ./.venv/bin/python -m unittest tests.test_api_smoke.ApiSmokeTests.test_managed_file_runtime_flow tests.test_api_smoke.ApiSmokeTests.test_managed_attachment_patterns_preview_build_and_mock_send tests.test_api_smoke.ApiSmokeTests.test_managed_attachment_send_uses_frozen_build_artifact_after_file_changes tests.test_api_smoke.ApiSmokeTests.test_recipient_zip_archive_with_field_password_and_rule_exclusions
  • PATH=/mnt/DATA/git/govoplan-core/webui/node_modules/.bin:/home/zemion/.nvm/versions/node/v22.22.3/bin:/home/zemion/.local/bin:/home/zemion/.codex/tmp/arg0/codex-arg0EWzbZZ:/app/bin:/app/bin:/app/bin:/usr/bin:/usr/lib/sdk/openjdk25/bin:/home/zemion/.var/app/com.vscodium.codium/data/node/bin:/home/zemion/.var/app/com.vscodium.codium/data/cargo/bin:/home/zemion/.var/app/com.vscodium.codium/data/python/bin:/home/zemion/.var/app/com.vscodium.codium/data/codium/extensions/openai.chatgpt-26.5623.101652-linux-x64/bin/linux-x86_64 /home/zemion/.nvm/versions/node/v22.22.3/bin/npm run build
## Codex State: done ### Summary - Added a canonical metadata-backed source provenance contract for managed files: uploads accept source_provenance_json/source_revision, responses expose normalized source_provenance/source_revision, and ZIP imports can carry the same metadata. - Managed campaign attachment manifests now include source provenance and source revision in managed_matches, so frozen build/job evidence keeps connector origin and revision context. - This gives future connector imports a stable no-migration path for provenance while preserving existing API compatibility. ### Changed Files - `README.md` - `src/govoplan_files/backend/schemas.py` - `src/govoplan_files/backend/router.py` - `src/govoplan_files/backend/storage/archives.py` - `src/govoplan_files/backend/storage/campaign_attachments.py` - `src/govoplan_files/backend/storage/provenance.py` - `webui/src/api/files.ts` - `../govoplan-core/tests/test_api_smoke.py` ### Verification - `./.venv/bin/python -m py_compile /mnt/DATA/git/govoplan-files/src/govoplan_files/backend/router.py /mnt/DATA/git/govoplan-files/src/govoplan_files/backend/schemas.py /mnt/DATA/git/govoplan-files/src/govoplan_files/backend/storage/archives.py /mnt/DATA/git/govoplan-files/src/govoplan_files/backend/storage/campaign_attachments.py /mnt/DATA/git/govoplan-files/src/govoplan_files/backend/storage/provenance.py` - `./.venv/bin/python -m unittest tests.test_api_smoke.ApiSmokeTests.test_managed_file_runtime_flow tests.test_api_smoke.ApiSmokeTests.test_managed_attachment_patterns_preview_build_and_mock_send tests.test_api_smoke.ApiSmokeTests.test_managed_attachment_send_uses_frozen_build_artifact_after_file_changes tests.test_api_smoke.ApiSmokeTests.test_recipient_zip_archive_with_field_password_and_rule_exclusions` - `PATH=/mnt/DATA/git/govoplan-core/webui/node_modules/.bin:/home/zemion/.nvm/versions/node/v22.22.3/bin:/home/zemion/.local/bin:/home/zemion/.codex/tmp/arg0/codex-arg0EWzbZZ:/app/bin:/app/bin:/app/bin:/usr/bin:/usr/lib/sdk/openjdk25/bin:/home/zemion/.var/app/com.vscodium.codium/data/node/bin:/home/zemion/.var/app/com.vscodium.codium/data/cargo/bin:/home/zemion/.var/app/com.vscodium.codium/data/python/bin:/home/zemion/.var/app/com.vscodium.codium/data/codium/extensions/openai.chatgpt-26.5623.101652-linux-x64/bin/linux-x86_64 /home/zemion/.nvm/versions/node/v22.22.3/bin/npm run build`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: add-ideas/govoplan-files#6
No description provided.