Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,8 @@ are resolved to chunks, then assembled like classic. Map-nav is archived at
`hydration.result_assembly.assemble_retrieval_results()`:

1. Filters by `exclude_document_ids` and `exclude_sections`
2. Filters by `allowed_chunk_types` (data_type parameter)
3. Hydrates `connect_to` targets (related table chunks inlined into text)
2. Hydrates `connect_to` targets
3. Filters by `allowed_chunk_types` while retaining body chunks connected to a requested image/table
4. Cleans asset path references from content
5. Public projection builds `source`: `{document_id, source_file_name, section_path}` plus `page_nums` for `chunk_type=page` when present

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
"""Add demo materialization claim state."""

from __future__ import annotations

from collections.abc import Sequence

from alembic import op
import sqlalchemy as sa


revision: str = "0b1c2d3e4f5a"
down_revision: str | Sequence[str] | None = "e4f5a6b7c8d9"
branch_labels: Sequence[str] | None = None
depends_on: Sequence[str] | None = None


def upgrade() -> None:
op.add_column(
"demo_materializations",
sa.Column("status", sa.String(length=32), nullable=True),
)
op.add_column(
"demo_materializations",
sa.Column("claimed_at", sa.DateTime(), nullable=True),
)
op.execute(
"UPDATE demo_materializations SET status = 'ready' WHERE status IS NULL"
)
op.alter_column(
"demo_materializations",
"status",
existing_type=sa.String(length=32),
nullable=False,
server_default="ready",
)
op.alter_column(
"demo_materializations",
"document_id",
existing_type=sa.String(length=36),
nullable=True,
)


def downgrade() -> None:
op.alter_column(
"demo_materializations",
"document_id",
existing_type=sa.String(length=36),
nullable=False,
)
op.drop_column("demo_materializations", "claimed_at")
op.drop_column("demo_materializations", "status")
Loading
Loading