fix(dbt-tools): say when schema-verify's verdict rests on a stale manifest
RA
13h ago+170+170+012345678901234567890123456789-12-12-01234567890123456789
Issue for this PR
Closes AltimateAI/altimate-code#1367 (follow-ups from the review of AltimateAI/altimate-code#1368).
Type of change
- Bug fix
What does this PR do?
For when the dbt project check fails and dbt-tools answers from the manifest of the last successful parse:
- The schema-verify validator says so. Its message to the agent leads with that note; only the parse time comes from the answer, quoted through
sanitizeForPrompt. USAGEgives the stale shape ofchildrenandparents:{ stale_manifest, models }instead of a list.- The lineage check reads the started adapter when there is one, so a dbt-integration that defines
getModelLineageas an instance field isn't mistaken for one without it.
The next @altimateai/dbt-integration bump joins this PR once it clears the 3-day minimum release age.
Claims:
- C1: When the validator fails and any answer carries
stale_manifest,fixHintopens with the note. When none does,reasonandfixHintare as on main. - C2: Of
stale_manifest, onlywritten_atreaches the message, flattened and quoted. - C3:
dbtAdapterHasLineage()starts nothing, and is true for a started adapter whosegetModelLineageis an own property. - R1: before any adapter starts, an instance-field
getModelLineagegoes unseen: only the prototype can be read.
How did you verify your code works?
Each change has a test that fails on main. Locally: bun turbo typecheck 13/13; dbt-tools 114 pass; opencode validators, dbt lineage and sql-query-deadline 868 pass, 0 fail. Tracker-leak check clean.
Cost side effects
None.
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"
Complexity delta (touched functions): cognitive unchanged; dbtAdapterHasLineage CCN 3 → 5; one new helper, cognitive 2.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VEmKQx8gR7vd6ettA3mWjP
Summary by CodeRabbit
- Improvements
- Lineage support is now detected against the active dbt integration, including integrations that expose support at runtime.
- Clarity
- Help for the
childrenandparentscommands explains when results may include stale-manifest data. - Schema verification results now flag when they use the last successful parse’s manifest and include its timestamp when available. Current-manifest results remain unchanged.
- Help for the