Skip to content

tdfs4ds.genai.clone_docs

tdfs4ds.genai.clone_docs

A soft clone of a TimeManager takes its manager's documentation (0.3.6.0).

With a domain clock every process reads its own soft clone (<process view>_TM): a view over the clock's table of dates with its own cursor. It means exactly what the clock means, so the documentation pipeline copies the clock's documentation onto it (PROPAGATED, like an exposed view) instead of an LLM call per clone. A clock with no documentation yet leaves the clone to the usual path; a part a person wrote on the clone is kept.

A clone is recognised from its own text: a view whose FROM is <db>.<X>_HIDDEN with a TIME_ID = n cursor, where <db>.<X> is another view than itself (the owner). Holds also while a run has swapped it to a literal date (only its select list changes).

logger_safe

logger_safe(level, message, *args, **kwargs)

Wrapper around the global logger that only emits logs when tdfs4ds.DISPLAY_LOGS is True. level is a string like "info", "error", etc.

clone_owner

clone_owner(db: str, view: str, ddl: str) -> Optional[Tuple[str, str]]

(database, view) of the TimeManager view is a soft clone of, else None. Pure.

plan_clone_copy

plan_clone_copy(clone: Tuple[str, str], owner: Tuple[str, str], docs: dict) -> dict

Rows to write on the clone (pure): objects and columns.

document_clone_view

document_clone_view(db: str, view: str, ddl: Optional[str] = None) -> Optional[bool]

The documentation pipeline's hook: True when view is a soft clone documented from its manager, None to let the usual path document it. Never raises.