tdfs4ds.genai.view_fingerprint¶
tdfs4ds.genai.view_fingerprint
¶
When is an upstream view documented again? (0.3.7.34)
A process documentation pass walks the views below the process view. Each of them used to be
regenerated whenever a pass could not read an object-level description for it - so the same
access-layer view was documented by the model once per process. The decision now comes from
the store: a view is documented again only when it has no documentation, when its SQL changed
since the model last described it, or with force_update=True.
The SQL the model described is remembered as a fingerprint (sha256 of the normalised view text,
as process_sql hashes a chain) in the reserved business-dictionary section DOC_FINGERPRINT
(no new table; left out of every documentation reader like EXPOSES / ATTACHED).
logger_safe
¶
Wrapper around the global logger that only emits logs when
tdfs4ds.DISPLAY_LOGS is True. level is a string like "info", "error", etc.
fingerprint
¶
sha256 of the normalised view text ('' for no text). Pure.
decide
¶
decide(documented: bool, stored_hash: Optional[str], current_hash: str, force: bool = False) -> Tuple[bool, str]
(document again?, reason). Pure.
force -> yes; no documentation -> yes; documented with no fingerprint (written before it existed, imported, or by hand) -> no; fingerprint equal -> no; the SQL changed -> yes. An unreadable view text (empty hash) never triggers a regeneration by itself.
write
¶
Remember the SQL the model has just described. Fail-open.
needs_documentation
¶
The pipeline's decision for an upstream view (see module doc). A read failure never regenerates (it is logged): a model call overwrites documentation, so doubt means keep.