fix(ci): keep lineage SQL static at call sites - #647
Conversation
…ance' into feat/global-ask-knowledge-cutoff-current # Conflicts: # docs/product-technical-gap-baseline.md
…ance' into feat/global-ask-knowledge-cutoff-current
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
6b66327
into
fix/global-ask-graph-fact-provenance
| ), | ||
| embedding_factory=_embedding_client, | ||
| claim_verification_factory=lambda: _claim_verification_client(), | ||
| claim_verification_factory=_claim_verification_client, |
There was a problem hiding this comment.
🔴 Claim-verification factory loses late binding
Passing _claim_verification_client directly instead of lambda: _claim_verification_client() binds the original function at lifespan startup, when run_global_ask_worker captures the factory. A later reassignment of the module global no longer reaches the worker, which the neighboring chat_factory lambda deliberately preserves. Tests that swap in a fake verifier after startup (test_ask) are ignored, so external-verification assertions fail.
| claim_verification_factory=_claim_verification_client, | |
| claim_verification_factory=lambda: _claim_verification_client(), |
Was this helpful? React with 👍 or 👎 to provide feedback.
| _RECONSTRUCTION_SOURCE_SQL = ( | ||
| "select post_id, post_title, voc_type_code, created_at, corporate_entity_id, " | ||
| "process_unit_id, thread_group_key, secondary_grouping_key " | ||
| "from source_post where {eligibility}" | ||
| ).format(eligibility=SOURCE_POST_ELIGIBILITY_SQL.format(alias="source_post")) | ||
|
|
||
| _VISIBLE_LINEAGE_SOURCE_SQL = ( | ||
| "select post_id, post_title, voc_type_code, visibility_code, " | ||
| "corporate_entity_id, process_unit_id, thread_group_key, created_at " | ||
| "from source_post where {eligibility}" | ||
| ).format(eligibility=SOURCE_POST_ELIGIBILITY_SQL.format(alias="source_post")) |
There was a problem hiding this comment.
📝 Info: SQL extraction preserves the original queries
The new _RECONSTRUCTION_SOURCE_SQL and _VISIBLE_LINEAGE_SOURCE_SQL reproduce the removed inline queries. SOURCE_POST_ELIGIBILITY_SQL.format(alias="source_post") resolves {alias} to a brace-free string, so the outer .format(eligibility=...) cannot re-interpret braces. Column lists match exactly.
Was this helpful? React with 👍 or 👎 to provide feedback.
Resolves the current #632 review findings without changing behavior:
asyncpgcalls, removing the scanner's dynamic-query finding at both sibling call sitesVerification:
58 passedacross lineage ingestion, Global Ask queue/diagnostics, and public-docstring coverage.