Skip to content

feat: expose revision-pinned demo document structure - #467

Merged
suguanYang merged 1 commit into
mainfrom
feat/wangbinqi/demo-document-structure
Oct 22, 2026
Merged

suguanYang merged 1 commit into
mainfrom
feat/wangbinqi/demo-document-structure

Conversation

@suguanYang

Copy link
Copy Markdown
Contributor

Demo readers currently reconstruct outlines from paginated chunks, delaying complete navigation and omitting structural parents without their own chunks.

Add GET /api/v1/demo/sources/{demo_source_id}/structure with optional job_result_id. It returns the complete published section list in persisted order, including parent identities, while preserving existing source/revision readiness checks. Reads are public, use Cache-Control: no-store, and do not load chunk bodies or result archives. The contract covers published sections; it does not recreate TOC entries that were never persisted.

Validation: all 10 shared-demo HTTP/PostgreSQL contracts pass, including sibling order, parents without direct chunks, historical revision pins, current-revision selection, preparing/invalid-revision behavior, and guards against chunk/artifact reads. Ruff and Pyright pass for the changed API modules.

@suguanYang
suguanYang merged commit 9376c56 into main Oct 22, 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