Skip to content

fix: include page citation assets in result zip#210

Merged
suguanYang merged 1 commit into
mainfrom
fix/wangbinqi/include-page-citation-assets-in-result-zip
Jul 7, 2026
Merged

fix: include page citation assets in result zip#210
suguanYang merged 1 commit into
mainfrom
fix/wangbinqi/include-page-citation-assets-in-result-zip

Conversation

@suguanYang

Copy link
Copy Markdown
Contributor

Summary

  • Include referenced page_citation_assets/... files in worker-generated result.zip bundles.
  • Preserve result-relative page citation asset paths so SDK parsed-storage sync can copy them into downstream storage.
  • Add a worker parse contract test that drives the task boundary and verifies the uploaded result ZIP contains referenced page citation assets while excluding unreferenced files.

Verification

  • uv run pytest apps/worker/tests/contract/test_parse_task_contract.py::test_parse_task_result_zip_includes_page_citation_assets -q
  • uv run pytest apps/worker/tests/contract/test_parse_task_contract.py apps/worker/tests/contract/test_page_memory_retrieval_contract.py apps/worker/tests/contract/test_page_memory_node_assembler_contract.py -q
  • uv run ruff check packages/shared-python/shared/services/storage/zip_result_resources.py packages/shared-python/shared/services/storage/zip_package_writer.py packages/shared-python/shared/services/storage/zip_result_service.py apps/worker/tests/contract/test_parse_task_contract.py
  • uv run pyright packages/shared-python/shared/services/storage/zip_result_resources.py packages/shared-python/shared/services/storage/zip_package_writer.py packages/shared-python/shared/services/storage/zip_result_service.py
  • Manual local ZIP probe confirmed page_citation_assets/page-6.png appears in generated ZIP members.

Deployment Notes

  • No new environment variables.
  • No database migration.
  • Storage behavior changes for newly generated result ZIPs only: referenced page citation PNGs are now included inside the ZIP in addition to existing raw artifact upload.
  • Existing completed jobs are not rewritten; reparsing is required for old result ZIPs to include page citation assets.

Checklist

  • Tests were added or updated when behavior changed
  • Public docs, examples, or OpenAPI contracts were updated when needed
  • Database migrations are idempotent and safe to deploy
  • Logs, errors, and validation paths avoid leaking secrets or user data
  • The pull request description explains any breaking or user-visible change

@suguanYang suguanYang merged commit 6c57194 into main Jul 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant