Skip to content

fix(validators): stop reading backticked columns and variables as required models - #1422

Open
anandgupta42 wants to merge 10 commits into
mainfrom
feat/requested-deliverables-check
Open

anandgupta42 wants to merge 10 commits into
mainfrom
feat/requested-deliverables-check

Conversation

@anandgupta42

@anandgupta42 anandgupta42 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #1421

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Why. I was asked whether a deterministic finish-time check that "the models and columns the request names explicitly exist" is worth adding to the validator lane. The offline evidence says no new blocking check is worth adding (numbers below), so this PR is the smaller deliverable: fix the known bug in dbt-deliverable-names that the investigation touched.

Root cause. extractRequiredDeliverables accepts every inline code span on a line that has a requirement verb and a data-artifact noun as a required model. A column or a dbt variable written in backticks on such a line was therefore required as a model, and the validator reported it as a missing deliverable. Run on the 73 benchmark requests that the earlier replay used, the unfixed extractor requires, besides real models: is_currently_superhost, acct_age_before_achieving_superhost, status_change_count, last_status_change_at (a column list), answer ("one column called answer") and surrogate_key_treat_nulls_as_empty_strings (a dbt variable).

What changed. A new modelCandidateSpans in validator-utils.ts drops a span only on explicit wording that the line itself uses for something that is not a model:

  • "column/field/variable/macro called x" or "column: x" (one clause, no deliverable noun in it);
  • "x column" / "x variable" ending the noun phrase ("x column names" does not count);
  • "should have / contain / expose a, b" and the list that continues it, only after an earlier span of the line was kept;
  • the target of "to"/"as" on a rename line (rename read from the clause, not only the first verb);
  • a trailing "columns" applies to the whole list it ends ("a and b columns").

It errs toward keeping the name; path-shaped spans (macros/x.sql) are never dropped. A span introduced or followed by a deliverable noun ("the model x", "x table") is never dropped, because dropping the only model name on a line would make the contract read as absent and silence both dbt-deliverable-names and dbt-nothing-built. The independent review found exactly that regression in my first version; the second commit fixes it, and the third and fourth address two rounds of automated review (file paths, trailing kinds, sentence and clause boundaries, rename context).

Before and after, same input, TASK.md = Create a \dim_superhost_evolution` model. It should have `is_currently_superhost`, `status_change_count` and `last_status_change_at`.withmodels/dim_superhost_evolution.sql` present:

  • before: required models = all four names, the check fails with "the task names 3 deliverable(s) this project does not define";
  • after: required models = dim_superhost_evolution, the check passes; with the model absent it still fails and names only that model.

Why not the broader check (the investigation). Offline, on the 818 rebuilt cases of requirement-check (74 gold, 242 passing and 138 failing faithful rebuilds, plus unfaithful and unverifiable ones), a strictly conservative rule (only identifiers the request names explicitly as a model or column to create, matched exactly, no model call, request text and built facts only) was tried in four variants:

variant failing faithful (138) failing and finished (100) failing, never finished (98) passing (242) gold (74)
A: models named ("model called X", "create a X model") 0 0 25 0 0
B: A + column lists under a named model 1 1 27 0 0
C: B + "add column Y to X", rename targets 1 1 27 0 0
D: C + column named but model not (column must exist in any model) 6 5 27 0 0
  • Only 17 of 73 distinct requests name anything explicitly under A (21 under D).
  • Every hit read. Gold and passing: none in the final rule. One gold hit appeared during development (an MCQ request: bullets describing an analyst's model were bound to the only created model) and was fixed by not binding a list whose header names another model. Because I found it by looking at the evaluation set, the zeros are in-sample. The rule was written after reading all 73 requests, so a held-out family split is not possible and I do not claim one. Four passing submissions of analytics_engineering008 are flagged under C and D (ingestion_timestamp); their rebuild failed (dbt exit 2, nothing built), so the facts are wrong, not the submission.
  • The 25 hits of A are sessions that wrote no model at all and never finished with a final message. Validators only run when the agent declares done, so on sessions where the check could run, A flags 0 of 100 failures. D's 5 finished hits are one task (geo_segment, 4 runs) and one run whose build also failed.
  • Column checks would need warehouse or catalog resolution that this file-based validator does not have.

Conclusion: no rule variant both has zero false alarms and catches a meaningful number of failures that could be reached, so no new check is added. Numbers are tiny (2 tasks behind all finished column hits). The effect on live task success was not measured; no model calls were made.

Behaviour a user could notice, and a known limit. For Add a departmentcolumn to the modelm``, the contract is now m only (before: `m` plus a bogus model named `department`, so the gate failed regardless). `m` merely existing before the session satisfies the name check, as it does for any model named in a modification line that uses `add`; this validator checks names, not whether the column was added. I tried marking such lines as modifications so `dbt-nothing-built` would ask for session work, and removed it: reviewers produced three counterexamples where it would demand edits the task did not require (variables edited in `dbt_project.yml`, `create` verbs, mixed create and add lines).

Which error this validator prefers, and known limits. The costlier error for a finish-time validator is the false alarm: a live comparison showed sessions spending all three retries on false validator messages. So a span that the text marks as a column, field, variable or macro by an explicit cue is not required as a model. A span with no such cue is not ambiguous; it is named like a deliverable ("create model X", "the project should have X") and stays required exactly as before this change, because losing it would empty the contract and silence both completion gates. A test asserts that, over 19 plainly worded requests, the required set equals what origin/main returned.

Known limits. This is pattern matching on English phrasing, not understanding. It does not understand: other languages; pronouns or references across sentences beyond "it/they/that/these/the ... table"; a column named with no cue word at all; phrasing such as "the table now carries x"; negations other than the verb-adjacent ones; lists broken by parentheses, quotes or sub-clauses beyond the ones tested; and column or variable wording outside the kind words column, field, attribute, variable, macro, setting, parameter. Such wording falls on the "required" side. Reviewers' round after round of counterexamples are of this kind; I fixed those that lose a plainly named model or raise a false alarm on plain wording and stop there.

Deployment readiness. TypeScript change in the validator lane only; no migration, flag or config. Rolls back by revert.

User impact. A task document that mentions a column or variable in backticks no longer produces a "missing deliverable" retry turn (up to three) for it. Cost: a name the extractor used to require may now be unrequired when the line also describes it as a column, a variable or a "have/contain/expose" item. A required model on a line that names no earlier model and that follows "have" is still required. Task documents with a missing real model are reported as before.

How did you verify your code works?

  • Unit: bun test test/altimate/validators (1021 tests, 889 pass, 132 skipped, 0 fail; the 2 files changed are validator-utils.ts and dbt-deliverable-names.test.ts). about 85 new test cases through the real DbtDeliverableNamesValidator with an on-disk project and TASK.md: the issue's three shapes, a column list with parenthetical notes, "columns a, b and c", a rename whose column target is the last span, and the "must stay silent / must stay required" cases from the review (model beside a column span, model called, settings model called, attributive "columns", "project should have a and b models"). Run against the unmodified origin/main source, 22 of the 49 tests in the file fail; the others pin behaviour that must not change.
  • Typecheck: bun run typecheck clean. Marker check (script/upstream/analyze.ts --markers --base main --strict) clean.
  • Extractor re-run over the 73 benchmark requests: the column and variable names above are no longer required, the real models (snap__hosts, dim_superhost_evolution, analysis__answer, fct_reviews) still are.
  • Independent review (Claude Opus 5.5): 3 confirmed regressions (dropped the only model on common wordings) and 2 gaps; all fixed in the second commit with tests. Two low items handled: the rename guard test, and contain/expose siblings.
  • Integration with real components / live: Not run. No model or benchmark spend was allowed; the remaining risk is wordings I have not seen that the filter drops or keeps wrongly. The e2e-real-dbt tests in the same directory ran as part of the suite.
  • Pull request fix(validators): stop dbt false alarms and concurrent altimate-dbt package corruption #1420 changes validator-utils.ts near line 242 only (concurrency); this change is near line 780, so no overlap.

Screenshots / recordings

Not applicable (no UI change).

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

🤖 Generated with Claude Code


Note

Medium Risk
Changes finish-time contract parsing for all requirement-line tasks; incorrect filtering could silence the gate or miss a real model, though the implementation biases toward keeping requirements and is heavily regression-tested.

Overview
Fixes false “missing deliverable” failures in dbt-deliverable-names when task prose lists columns, fields, dbt variables, or rename targets in backticks alongside real model names.

extractRequiredDeliverables (tier-3 requirement lines) no longer treats every inline code span as a required model. It calls new modelCandidateSpans, which keeps spans that look like models/tables/files and drops spans only when surrounding English explicitly marks them as columns, variables/macros, “should have/contain/expose” column lists, or rename targets—while erring toward keeping ambiguous names so plainly required models are not stripped (path-shaped spans still count as files).

Adds a large dbt-deliverable-names.test.ts suite (~85 cases) covering benchmark-style phrasing and asserting unchanged required-model sets for plainly worded tasks vs. origin/main.

Reviewed by Cursor Bugbot for commit 086cefa. Bugbot is set up for automated code reviews on this repo. Configure here.

anandgupta42 and others added 2 commits October 7, 2026 11:13
…uired models

`extractRequiredDeliverables` accepted every inline code span on a
requirement line as a model. Spans the line itself introduces as a column,
field, variable or macro ("column called `x`", "`x` column", "should have
`a`, `b`", "variable ... called `v`", "rename column `a` to `b`") are now
dropped; a bare name with no such wording is still required.

Closes #1421

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…de it

Independent review showed the first version of the span filter could drop
the only model name on a line ("Add a `x` column to `m` model"), which makes
the contract read as absent and silences `dbt-deliverable-names` and
`dbt-nothing-built`. A span introduced or followed by a deliverable noun is
now never dropped, "called" only binds to a column word within the same
clause and without an intervening noun, "have/contain/expose" lists drop only
after an earlier kept span, the rename target rule applies only to rename
lines, and "`x` column names" is no longer read as a column.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 1395534d-08a4-4416-9167-b66e99a99d87)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T20:55:32.397145Z 086cefa New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c984a635-abe8-409f-b00c-3cbf411c60e2
📥 Commits

Reviewing files that changed from the base of the PR and between ad6c9e2 and 8fde708.

📒 Files selected for processing (2)
  • packages/opencode/src/altimate/validators/validator-utils.ts
  • packages/opencode/test/altimate/validators/dbt-deliverable-names.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Requirement extraction now filters inline-code spans to identify model names and exclude columns, variables, and other non-model entities. Tests cover varied wording, clause boundaries, file paths, and missing-model results.

Changes

Deliverable Name Filtering

Layer / File(s) Summary
Filter requirement spans to model candidates
packages/opencode/src/altimate/validators/validator-utils.ts, packages/opencode/test/altimate/validators/dbt-deliverable-names.test.ts
Requirement extraction uses modelCandidateSpans to filter inline-code spans. Tests cover column and variable exclusions, model-name retention across varied wording, file paths, clause boundaries, and missing-model results.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 8fde7

The change narrows which backticked names count as required models, and no merge-blocking issue was found. It is ready to merge after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The change satisfies #1421. extractRequiredDeliverables now sends requirement-line spans through modelCandidateSpans. The filter drops spans explicitly identified as columns, fields, variables, or…
Out of Scope Changes check ✅ Passed The changes stay within #1421. The production diff narrows deliverable-name extraction. The test diff covers the reported false-model cases and protects required model retention. The PR does not add t…
Docstring Coverage ✅ Passed Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files.
Title check ✅ Passed The title clearly and concisely describes the main change: preventing backticked columns and variables from being treated as required models.
Description check ✅ Passed The description includes the issue, change type, root cause, implementation details, impact, limitations, verification results, deployment notes, screenshots status, and checklist. It is complete and …
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

A rabbit checks each backticked name,
And keeps model names in the frame.
Columns and variables hop away,
Paths and model names stay.
Tests mark the missing models clear.

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 679021b42e

ℹ️ 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".

Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
@kilo-code-bot

kilo-code-bot Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 5 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 5
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/altimate/validators/validator-utils.ts 698 An add-column task can pass with no session work when the model already exists (previous finding, still present).
packages/opencode/src/altimate/validators/validator-utils.ts 937 A rename on a long single line still triggers quadratic rescanning of code-span prefixes (previous finding, still present).
packages/opencode/src/altimate/validators/validator-utils.ts 952 A column-list item followed by should be is incorrectly required as a model (new inline finding).
packages/opencode/src/altimate/validators/validator-utils.ts 953 An earlier affirmative rename can drop the model targeted by a later add-column clause (previous finding, still present).
packages/opencode/src/altimate/validators/validator-utils.ts 957 A relation-producing file path does not establish model context, so its column is required as a model (previous finding, still present).
Files Reviewed (2 files)
  • packages/opencode/src/altimate/validators/validator-utils.ts - 5 issues
  • packages/opencode/test/altimate/validators/dbt-deliverable-names.test.ts - 0 issues

Fix these issues in Kilo Cloud

Previous Review Summaries (7 snapshots, latest commit 8fde708)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 8fde708)

Status: 7 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 7
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/altimate/validators/validator-utils.ts 698 Adding a column to an existing model can pass without any session work (previous finding, still present).
packages/opencode/src/altimate/validators/validator-utils.ts 825 Both models should have incorrectly requires the named column as a model (new inline finding).
packages/opencode/src/altimate/validators/validator-utils.ts 847 A backticked non-model subject can cause a separate required model to be dropped (new inline finding).
packages/opencode/src/altimate/validators/validator-utils.ts 927 A rename anywhere on a long single line still makes code spans rescan their growing prefixes (previous finding, still present).
packages/opencode/src/altimate/validators/validator-utils.ts 942 An earlier affirmative rename can drop the target model of a later add-column clause (previous finding, still present).
packages/opencode/src/altimate/validators/validator-utils.ts 943 A column-list continuation can swallow the model subject of a later clause (active existing inline comment; verified).
packages/opencode/src/altimate/validators/validator-utils.ts 946 Excluding relation-producing file paths from model context requires a column of models/orders.sql as a model (previous finding, still present).
Files Reviewed (2 files)
  • packages/opencode/src/altimate/validators/validator-utils.ts - 7 issues
  • packages/opencode/test/altimate/validators/dbt-deliverable-names.test.ts - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit ad6c9e2)

Status: 6 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 6
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/altimate/validators/validator-utils.ts 698 Adding a column to an existing model can pass without session work (previous finding, still present).
packages/opencode/src/altimate/validators/validator-utils.ts 825 A plural model-list subject can cause a second required model to be dropped (active existing comment).
packages/opencode/src/altimate/validators/validator-utils.ts 844 A backticked model subject before should have leaves its column falsely required as a model (new inline finding).
packages/opencode/src/altimate/validators/validator-utils.ts 927 A rename anywhere on a long single line still makes code spans rescan their growing prefixes (previous finding, still present).
packages/opencode/src/altimate/validators/validator-utils.ts 942 An earlier affirmative rename can drop the target model of a later add-column clause (previous finding, still present).
packages/opencode/src/altimate/validators/validator-utils.ts 946 Excluding relation-producing file paths from model context requires a column of models/orders.sql as a model (previous finding, still present).
Files Reviewed (2 files)
  • packages/opencode/src/altimate/validators/validator-utils.ts - 6 issues
  • packages/opencode/test/altimate/validators/dbt-deliverable-names.test.ts - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit af6cdb5)

Status: 9 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 9
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/altimate/validators/validator-utils.ts 698 An add-column request can pass without session work when its target model already exists (previous finding, still present).
packages/opencode/src/altimate/validators/validator-utils.ts 812 as a new column is not recognized, so a column is required as a model (active existing comment).
packages/opencode/src/altimate/validators/validator-utils.ts 817 A separate project-level includes requirement after another model can lose its required model (new inline finding).
packages/opencode/src/altimate/validators/validator-utils.ts 819 This project should have is mistaken for a description of the preceding model (active existing comment).
packages/opencode/src/altimate/validators/validator-utils.ts 898 A rename later on a long single line still makes every earlier code span rescan its growing prefix (previous performance finding, still present).
packages/opencode/src/altimate/validators/validator-utils.ts 909 a model column is protected as a model because the model noun vetoes the column kind (active existing comment).
packages/opencode/src/altimate/validators/validator-utils.ts 915 An earlier affirmative rename can drop the target model of a later add-column clause (previous finding, still present).
packages/opencode/src/altimate/validators/validator-utils.ts 919 A retained date stopword can hide a later required model even though date is discarded in final collection (active existing comment).
packages/opencode/src/altimate/validators/validator-utils.ts 919 Excluding relation-producing file paths from model context again requires the column of models/orders.sql as a model (prior outdated discussion; reproduced against current code).
Files Reviewed (2 files)
  • packages/opencode/src/altimate/validators/validator-utils.ts - 9 issues
  • packages/opencode/test/altimate/validators/dbt-deliverable-names.test.ts - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit b76eed6)

Status: 4 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 4
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/altimate/validators/validator-utils.ts 698 An add-column request can pass without any session work when its target model already exists (previous finding, still present).
packages/opencode/src/altimate/validators/validator-utils.ts 896 Rescanning every code-span prefix makes parsing a long task requirement quadratic (new finding).
packages/opencode/src/altimate/validators/validator-utils.ts 915 An earlier affirmative rename can drop the target model of a later add-column clause (previous rename-scope finding, still present in reverse clause order).
packages/opencode/src/altimate/validators/validator-utils.ts 919 A relation-producing path can cause a separate required model on the same line to be dropped (new finding).
Files Reviewed (2 files)
  • packages/opencode/src/altimate/validators/validator-utils.ts - 4 issues
  • packages/opencode/test/altimate/validators/dbt-deliverable-names.test.ts - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit 08cabb7)

Status: 7 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 7
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/altimate/validators/validator-utils.ts 698 Adding a column to an existing model can pass without any session work (previous finding, still present).
packages/opencode/src/altimate/validators/validator-utils.ts 803 A model named as as a table can be dropped after an earlier model (existing comment).
packages/opencode/src/altimate/validators/validator-utils.ts 824 Sentence punctuation before a closing quote drops a separate required model (new finding).
packages/opencode/src/altimate/validators/validator-utils.ts 871 A three-item list ending in columns still requires its first column as a model (existing comment).
packages/opencode/src/altimate/validators/validator-utils.ts 885 A preceding model noun prevents filtering an explicitly named column (existing comment).
packages/opencode/src/altimate/validators/validator-utils.ts 891 A later rename clause drops the target model of an earlier add-column clause (existing comment).
packages/opencode/src/altimate/validators/validator-utils.ts 895 A relation-producing model path does not establish context for its column list (existing comment).
Files Reviewed (2 files)
  • packages/opencode/src/altimate/validators/validator-utils.ts - 7 issues
  • packages/opencode/test/altimate/validators/dbt-deliverable-names.test.ts - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit fbdea40)

Status: 8 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 8
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/altimate/validators/validator-utils.ts 700 A prohibited rename can discard the required model.
packages/opencode/src/altimate/validators/validator-utils.ts 717 Adding a dbt variable wrongly demands a model edit.
packages/opencode/src/altimate/validators/validator-utils.ts 718 Creating a column on an existing model can pass without work (existing comment).
packages/opencode/src/altimate/validators/validator-utils.ts 825 A qualified model subject causes its column to be required as a model.
packages/opencode/src/altimate/validators/validator-utils.ts 871 A semicolon makes a required model look like a trailing column-list item.
packages/opencode/src/altimate/validators/validator-utils.ts 885 The settings-colon heuristic can drop a required model (existing comment).
packages/opencode/src/altimate/validators/validator-utils.ts 887 A required macro path can cause a separate required model to be dropped.
packages/opencode/src/altimate/validators/validator-utils.ts 888 A separate clause after a semicolon can lose its model requirement (existing comment).
Files Reviewed (2 files)
  • packages/opencode/src/altimate/validators/validator-utils.ts - 8 issues
  • packages/opencode/test/altimate/validators/dbt-deliverable-names.test.ts - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit 679021b)

Status: 7 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 7
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/altimate/validators/validator-utils.ts 697 Compound update-and-rename requirements retain the column rename target as a required model (existing comment).
packages/opencode/src/altimate/validators/validator-utils.ts 842 A trailing columns label does not classify all preceding listed spans (existing comment).
packages/opencode/src/altimate/validators/validator-utils.ts 846 A preceding unquoted model noun prevents filtering column called spans (existing comment).
packages/opencode/src/altimate/validators/validator-utils.ts 850 Add-column tasks can pass without session work when their model already exists.
packages/opencode/src/altimate/validators/validator-utils.ts 852 A second model after have in a separate sentence is dropped (existing comment).
packages/opencode/src/altimate/validators/validator-utils.ts 854 Filtering a non-model macro path also drops its required-file check (existing comment).
packages/opencode/test/altimate/validators/dbt-deliverable-names.test.ts 277 Two test cases create multiple projects but clean up only the last one.
Files Reviewed (2 files)
  • packages/opencode/src/altimate/validators/validator-utils.ts - 6 issues
  • packages/opencode/test/altimate/validators/dbt-deliverable-names.test.ts - 1 issue

Fix these issues in Kilo Cloud


Reviewed by gpt-6-sol · Input: 18 · Output: 11.9K · Cached: 916K

Review guidance: REVIEW.md from base branch main

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
- a trailing "columns" now applies to the whole list it ends
- a path-shaped span is never dropped, so the file check still sees it
- "a column called `x`" binds on the determiner, a later model noun no longer vetoes it
- "have `x`" in a new sentence drops only when the subject is the model just described
- rename context is read from the clause, not the first requirement verb
- "add a column to a model" is recorded as a modification of that model, so the
  nothing-built gate needs session evidence for it
- tests no longer leave a temp project behind when a case builds two

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 22e19300-23fe-477b-8d1e-90097697d61f)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 77cf6567-2d9a-483a-982e-45ba8d961679)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fbdea405e9

ℹ️ 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".

Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
…ound

- drop the "add a column is a modification" marking: three distinct
  counterexamples (create verbs, variables edited outside the model, mixed
  create and add lines) showed it can ask for work the task did not require
- the kind-word colon form no longer drops a span when the sentence holds a
  deliverable noun
- a semicolon ends the clause for the "have" and trailing-kind rules
- only a plural trailing kind ("columns") reaches back over a list
- a kept file path does not count as the model a "have" list describes
- "the resulting table should have x" counts as describing the model
- a negated rename is not a rename

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 442c725c-e331-4f3f-8b9e-5517d9e13870)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 08cabb79c4

ℹ️ 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".

Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
- a postfix "columns" covers a list of any length
- "add column x" after a model clause drops x (colon form judged on its own clause)
- rename context is scoped to the sentence before the span
- a model file path counts as the model a "have" list describes
- "as a table" after a span marks it as a model
- a closing quote after the sentence end still ends the sentence

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 9f1dc2aa-16a8-42ec-8478-fb5a1c0c87b5)

Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b76eed6aa3

ℹ️ 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".

Comment thread packages/opencode/src/altimate/validators/validator-utils.ts
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
…g filter cases

- a relation path no longer counts as the model a "have" list describes
  (it hid a second required model); only bare identifiers count
- "includes", "these/those models", "as columns" and "as a model column"
- rename context is read per sentence instead of rescanning the prefix

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: ead244a4-1c85-4fae-825c-00072c7098a5)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: af6cdb5bbf

ℹ️ 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".

Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts
… columns

- "This project should have X", "the project includes/contains X" and stopword
  spans such as `date` no longer make a plainly named model disappear: the
  have/include rule needs the model itself as subject, and only spans that
  collection would keep count as the model being described
- "as a new/additional/extra column", "model column" and "table column" mark columns
- state the preference for ambiguous wording in the code and add a test that the
  required set is unchanged from origin/main over plainly worded requests

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 915e08af-0906-4dfa-9bf9-5f15323eec70)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad6c9e29ba

ℹ️ 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".

Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
- "The required models should include X" keeps X required
- "`orders` should have `order_id`" drops order_id

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: c7f6a424-9732-43a7-92e8-fb4543641405)

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8fde7082cd

ℹ️ 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".

Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts Outdated
Comment thread packages/opencode/src/altimate/validators/validator-utils.ts
… trailing noun, clause starts

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: ce575917-3887-4768-9a3b-cf589f6a3a2d)

(keptModels > 0 && hasModelDescriptionVerb(before, i > 0 && !nonModel[i - 1] && countsAsModel(matches[i - 1]!.text))) ||
(i > 0 &&
nonModel[i - 1] &&
!CLAUSE_VERB_AFTER_RE.test(gapAfter(i)) &&

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Keep column-list continuations with their own predicates

For Create the model orders. It should have order_id, and status_flag should be nullable., order_id is correctly dropped as a column, but the new guard sees should after status_flag and prevents the list-continuation rule from dropping it. status_flag is then required as a model, so an otherwise correct orders implementation fails the deliverable-name gate. Distinguish a new model-subject clause from a column-list item whose value simply has another property.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The counterexample is real and is not fixed in this PR. Classifying a backticked name as a model, column or variable is done here by matching English phrasing, and several rounds of review have each produced further phrasings that the matcher gets wrong; adding one more rule per phrasing is not converging. The PR body's "Known limits" paragraph states this. Leaving this thread open for the human reviewer to weigh: the choice is between accepting the documented limit and replacing the phrase matcher with a different classifier in a follow-up.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 086cefa8f9

ℹ️ 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".

/\b(?:models?|tables?|views?|seeds?|snapshots?|marts?|files?)\s*(?:(?:called|named)\s*)?:?\s*$/i
/** ... and so is a span followed by one ("`x` model"). */
const FOLLOWED_BY_MODEL_NOUN_RE = new RegExp(
`^\\s*(?:as\\s+(?:an?\\s+|the\\s+)?)?(?:models?|tables?|views?|seeds?|snapshots?|files?)\\b(?!\\s+(?:${NON_MODEL_KIND})\\b)`,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recognize marts in postfix deliverable lists

Fresh evidence after the prior trailing-noun fix is Create model bundle. It should contain dim_aanddim_b marts.: mart is accepted by the general deliverable and leading-model matchers but is absent from this postfix matcher, so the contain heuristic discards both explicitly requested marts and the contract requires only bundle. A submission omitting dim_a and dim_b can therefore pass.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The counterexample is real and is not fixed in this PR. Classifying a backticked name as a model, column or variable is done here by matching English phrasing, and several rounds of review have each produced further phrasings that the matcher gets wrong; adding one more rule per phrasing is not converging. The PR body's "Known limits" paragraph states this. Leaving this thread open for the human reviewer to weigh: the choice is between accepting the documented limit and replacing the phrase matcher with a different classifier in a follow-up.

Comment on lines +816 to +817
const HAS_LIST_RE =
/\b(?:have|has|having|includes?|contains?|containing|exposes?|exposing)\s+(?:the\s+)?(?:following\s+)?(?:(?:new|extra|additional)\s+)?$/i

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recognize copular column lists

When a requirement explicitly says Create model orders. Its columns are order_idandcustomer_id., this matcher does not recognize the columns are construction, and neither span has a kind immediately adjacent to it. Both column names therefore survive as required models, causing the validator to reject a correct orders implementation for missing two nonexistent relations.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The counterexample is real and is not fixed in this PR. Classifying a backticked name as a model, column or variable is done here by matching English phrasing, and several rounds of review have each produced further phrasings that the matcher gets wrong; adding one more rule per phrasing is not converging. The PR body's "Known limits" paragraph states this. Leaving this thread open for the human reviewer to weigh: the choice is between accepting the documented limit and replacing the phrase matcher with a different classifier in a follow-up.

Comment on lines +950 to +953
(i > 0 &&
nonModel[i - 1] &&
!CLAUSE_VERB_AFTER_RE.test(gapAfter(i)) &&
(LIST_SEPARATOR_RE.test(before) || (renameLine && RENAME_TARGET_RE.test(before))))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Track rename targets past the containing model

Fresh evidence beyond the handled adjacent source-to-target form is Rename the old_statuscolumn in the modelorderstonew_status.: because orders sits between the non-model source and its target, this propagation does not mark new_status as a column. The candidate list becomes orders, new_status, after which the outer rename handling keeps only the final span, so the validator requires a model named new_status and discards the actual orders requirement.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The counterexample is real and is not fixed in this PR. Classifying a backticked name as a model, column or variable is done here by matching English phrasing, and several rounds of review have each produced further phrasings that the matcher gets wrong; adding one more rule per phrasing is not converging. The PR body's "Known limits" paragraph states this. Leaving this thread open for the human reviewer to weigh: the choice is between accepting the documented limit and replacing the phrase matcher with a different classifier in a follow-up.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dbt-deliverable-names reports backticked columns and variables as missing models

1 participant