feat(vector): compile exact ordered tag programs - #186
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5593064e7d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if column in TAG_COLUMNS and self.nodes[int(value[1:]) - 1]["op"] == "column-read": | ||
| self.nodes[int(value[1:]) - 1]["value_type"] = "string-column" | ||
| self.node_types[value] = "string-column" | ||
| self.required_input_columns.discard(column) |
There was a problem hiding this comment.
When populate_entry_trend reads dataframe['exit_tag'], this branch rewrites the column-read to string-column and removes exit_tag from required_input_columns just because it is a tag column. The tag contract only initializes enter_tag before entry and exit_tag before exit, so a future-phase tag read is either a real input/stale column or should be unsupported; advertising no input lets Native callers omit the column and then fail or diverge at execution. Please only suppress required inputs for tags already initialized by the wrapper, and fail closed otherwise.
AGENTS.md reference: AGENTS.md:L38-L40
Useful? React with 👍 / 👎.
| if isinstance(node.op, ast.Add): | ||
| left = self.expression(node.left) | ||
| right = self.expression(node.right) |
There was a problem hiding this comment.
Avoid emitting numeric-add operands twice
Whenever a tag expression uses numeric + (for example dataframe['a'] + dataframe['b'] > 0 in a tag mask), these calls emit both operands before deciding no string concat is needed, and super().binary then emits the same operands again. Since the runtime walks every node in function['node_ids'], the dead subgraph is still executed and nested additions can blow up the tag program/executor work compared with the source. Reuse the already-emitted operands for numeric add or inspect types without emitting.
Useful? React with 👍 / 👎.
Implements roadmap M21-02.
Intent:
Risk:
Local validation:
Evidence identity: