Skip to content

fix(genai): SMA join alias resolution and Pass 1 column_aliases - #269

Open
vishpillai123 wants to merge 2 commits into
developfrom
fix/sma-join-alias-resolve-and-pass1-aliases
Open

fix(genai): SMA join alias resolution and Pass 1 column_aliases#269
vishpillai123 wants to merge 2 commits into
developfrom
fix/sma-join-alias-resolve-and-pass1-aliases

Conversation

@vishpillai123

@vishpillai123 vishpillai123 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix validate_manifest join-key alias resolution so canonical join_keys map to physical columns (same direction as the field executor), and bridge checks require both sides to share that canonical name.
  • Allow refinement Pass 1 to emit column_aliases_to_add / column_aliases_to_add_by_entity and merge them into the refined manifest (previously Pass 1 could only rewrite per-field keys and silently dropped alias bridges).

Asana

https://app.asana.com/1/6325821815997/project/1208486153653829/task/1217160064972995?focus=true

Context

A production run hit ExecutionError: student: missing columns ['term_descr'] after Pass 1 “fixed” JOIN_KEY_NOT_IN_BASE_TABLE by renaming term_descterm_descr with refined_by_llm and empty column_aliases. The incomplete fix is addressed here by (1) making the correct alias validate cleanly and (2) letting Pass 1 land the alias.

Test plan

  • pytest tests/genai/mapping/schema_mapping_agent/manifest/test_join_alias_resolution.py
  • pytest tests/genai/mapping/schema_mapping_agent/manifest/test_pass1_column_aliases.py
  • Related existing join / HITL option validation tests
  • Confirm companion PR re-validates after Pass 1 so incomplete JOIN fixes cannot stay refined_by_llm

Made with Cursor

Join-key validation now reverse-maps canonical keys to physical columns
(matching the executor), and Pass 1 can append column_aliases_to_add so
JOIN name bridges are not dropped when refining.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vishpillai123
vishpillai123 requested a review from a team as a code owner August 4, 2026 21:40
@vishpillai123
vishpillai123 requested review from jnolendata and removed request for a team August 4, 2026 21:40
@vishpillai123 vishpillai123 changed the title fix: SMA join alias resolution and Pass 1 column_aliases fix(genai): SMA join alias resolution and Pass 1 column_aliases Aug 4, 2026
@vishpillai123
vishpillai123 removed the request for review from jnolendata August 4, 2026 21:46
@vishpillai123
vishpillai123 marked this pull request as draft August 4, 2026 21:46
@vishpillai123
vishpillai123 marked this pull request as ready for review August 5, 2026 18:32
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