fix: shared fixes so the dbt Power User tool PRs merge in any order
Issue for this PR
None
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
This is one change to the files that the nine dbt Power User tool PRs share (#1729, #1730, #1731, #1732, #1733, #1734, #1735, #1737, #1738). With it, those PRs can merge in any order with green tests, and none of them needs to touch a shared file.
-
Placeholder tests no longer assume every tool is a stub (
test/altimate/dbt-adapter-access.test.ts). A tool counts as a placeholder only while its source file still contains the stub's sentence "is not implemented in this build of altimate-code yet." The not-implemented checks run over those tools only, and zero placeholders is allowed. New tests check that:- every feature tool has its source file, so a renamed file can't silently drop out of the check;
- every tool, built or not, is registered under its own id;
- the marker agrees with what each tool actually answers.
The argument-check test still covers all nine tools, because real tools also reject a non-object.
-
dbt_sql_graphanswers as MCP structured content (mcp-server/server.ts):model,nodes,edgesanderror, the same pattern asdbt_lineage. Before this, an MCP client got the graph as text only. The test sits next to the otherstructuredResulttests incolumn-reach.test.ts. -
Run-results readers can take a target folder (
validators/validator-utils.ts):resolveDbtTargetPath(dbtRoot, targetPath?): a folder the caller names wins over the project's own.readRunResults(dbtRoot, targetPathOverride?)also returnsinvocationId,elapsedSecand each node'sexecutionTimeSec. It refuses a file that is rewritten while it is being read, checked by its bigint stat identity.
Existing callers are unchanged. Tests are in
dbt-build-green.test.tsanddbt-nothing-built.test.ts.
Not included: exporting sessionProject from dbt-lineage.ts, because nothing outside the file uses it.
Merge this PR before the nine tool PRs.
How did you verify your code works?
git merge-tree --write-treeagainst each of the nine tool branches: no conflicts.tsgo --noEmitandbun test test/altimate test/tool-clion four setups: main plus this branch; that plus each tool branch alone; and that plus all nine together.- Typecheck passed in every setup.
- The only test failures were 5-second timeouts in suites this PR doesn't touch, mostly
carry-forward/agent-safety.test.ts. They pass when rerun alone (52/52 in the all-nine checkout).
- With all nine merged, the touched suites (
dbt-adapter-access,column-reach,validators) pass 1056/1056.
Cost side effects
None. These are test changes, one more MCP structured-content entry, and a local file read.
Screenshots / recordings
Not a UI change.
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
- I checked for cost side effects (model calls, queries or cloud resources that grow with user data) and described them, or wrote "none"
🤖 Generated with Claude Code
Summary by CodeRabbit
- New Features
- SQL graph results now include structured model and graph details. Successful results show a brief report, while failed results retain the full report and error details.
- Build results now include invocation, elapsed-time, and per-model execution-time details. A custom target location can be used to find build results.
- Bug Fixes
- Build freshness checks correctly handle matching timestamps.
- Results that change while being read are treated as unavailable.