You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: dbt adapter refusal for a read-only target path, unchecked altimate-dbt doc examples, dbt_cost_estimate scanner #1796
Found during the v0.12.12 release review of #1779 and #1781. Deferred because none of these is a regression and each needs more than a quick fix.
A read-only target_path gives a misleading refusal. The tools that start the dbt adapter create <target-path>/.altimate-code/ (dbtToolTargetPath in packages/opencode/src/altimate/native/connections/register.ts). When target_path points to a shared or read-only folder, the adapter fails to start, and the refusal from dbtAdapterFor names the Python dbt ran with rather than the folder it could not write. It should say the folder is not writable.
dbt_cost_estimate's SQL scanner is dense.scanSql and readsFiles in packages/opencode/src/altimate/tools/dbt-cost-estimate.ts hold many regex rules. A mistake today only means no estimate, never a missed file read, but each change is risky. Consider moving them onto the shared tokenizer planned in refactor: one SQL tokenizer and shared helpers for the dbt Power User tools #1783.
Three more small items from the v0.12.12 E2E (jaffle-shop on DuckDB):
dbt_run_results prints raw float seconds, e.g. 0.3465549945831299s. Round to two decimals or milliseconds.
dbt_map_relations reports partial for tables named exactly like their models (stg_orders -> {{ ref('stg_orders') }}). Say why it is not exact, or match it as exact.
dbt_defer_state requires project_dir even when run inside the dbt project; other tools default to the session's project directory.
Two more from the bot reviews of the v0.12.12 release PR (#1798):
readRunResults checks the 256 MiB cap with stat, then calls readFile. If dbt replaces or grows the file in between, the read can still buffer more than the cap. Read from an opened handle with a hard byte limit (packages/opencode/src/altimate/validators/validator-utils.ts).
A run_results.json over the cap returns null, so callers report it as missing or invalid. Return a distinct "too large" result and say so.
Activity
sahrizvi commentedon Nov 20, 2026
Three more small items from the v0.12.12 E2E (jaffle-shop on DuckDB):
dbt_run_resultsprints raw float seconds, e.g.0.3465549945831299s. Round to two decimals or milliseconds.dbt_map_relationsreportspartialfor tables named exactly like their models (stg_orders->{{ ref('stg_orders') }}). Say why it is notexact, or match it as exact.dbt_defer_staterequiresproject_direven when run inside the dbt project; other tools default to the session's project directory.sahrizvi commentedon Nov 20, 2026
Two more from the bot reviews of the v0.12.12 release PR (#1798):
readRunResultschecks the 256 MiB cap withstat, then callsreadFile. If dbt replaces or grows the file in between, the read can still buffer more than the cap. Read from an opened handle with a hard byte limit (packages/opencode/src/altimate/validators/validator-utils.ts).run_results.jsonover the cap returnsnull, so callers report it as missing or invalid. Return a distinct "too large" result and say so.