Skip to content

fix: shared fixes so the dbt Power User feature PRs merge in any order - #34

Merged
hkaltai merged 7 commits into
mainfrom
feat/pu-mods-shared-fixes
Nov 18, 2026
Merged

hkaltai merged 7 commits into
mainfrom
feat/pu-mods-shared-fixes

Conversation

@hkaltai

@hkaltai hkaltai commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

One change to files shared by the eight dbt Power User feature PRs (#24, #25, #26, #27, #28, #31, #32, #33). With it, each feature PR merges onto main in any order with the shared tests green, and none of them needs to touch a shared file.

What changes

  • Shared tests no longer assume every feature is a stub. A new test helper, hooks/inert-features.ts (nothingToReport), gives each data tool a feature asks the CLI for an empty answer: docs_share_comments, dbt_health, dbt_defer_state, dbt_cost_estimate, dbt_run_results, dbt_docs_coverage.
    • The fake CLIs in lineage.test.tsx, features/sql-graph.test.tsx and task-impact.test.tsx answer those calls first, so the calls they record are only their own.
    • features/index.test.ts drives every phase through a hand-built engine that has what the built features call. It records each failure through ui.log, and a positive control checks that a throwing feature is logged. A separate strict test asserts that no feature fails in any phase. That assertion sits where no feature PR's edit to the file can reach it, so a throwing feature can't go unseen after a merge.
    • In tool-chain.test.ts, a dbt command and a non-dbt command both reach the tool unchanged and neither is refused. The non-dbt one comes back with no added context. A dbt command may get a note from a feature that watches dbt, so that isn't asserted for it.
  • A failed tool call shows what the CLI printed (altimate-cli.ts runTool). A crash or a plain-text failure has no answer object; it now shows its first line (up to 500 characters) instead of empty text. A JSON answer still speaks for itself.
  • A long run of blank lines before a shell command is read in linear time (lineage.tsx). The cd pattern's blanks stop at a newline. A 64,000-line blank run went from about 2.5 s to about 1 ms. There are tests for each kind of cd and for the long run.

Skipped

  • Telling a failed before-read apart from a missing file in tool-chain.ts. It's correct and was tested, but it edits the same lines as feat(runs): record each dbt run's results and show them in /runs #27 and would conflict with it. It can land after feat(runs): record each dbt run's results and show them in /runs #27.
  • Setting descriptions in plugin.json, the README settings and health lines, and a /to-model section. They describe features as working. That is false on main and on most combinations of the feature PRs, so the release package documents each one when its feature ships.
  • Changes that only tidy comments or imports in integrations.tsx and task-impact.tsx, and a comment in altimate-cli.ts that is still true on main. None changes behaviour.

Verification

Merge this PR before the feature PRs.

🤖 Generated with Claude Code

hkaltai and others added 5 commits November 17, 2026 21:48
…ort, so they hold whichever features are built

A fake CLI in a shared test now answers the data tools the features ask for
(comments, health, defer state, cost estimate, run results, docs coverage)
with an empty result before it records its own calls. The chain and feature
index tests check that the call passes through unchanged and is not held,
with no log noise, rather than that every feature is a stub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… what the CLI printed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ar time

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t records their failures

The test now builds its own engine with a recording log, working state, a CLI
that answers only the data tools with an empty result, and the session, clock,
store and ui calls the features make. A control in the same test checks that a
throwing feature function is logged through it, so an empty log means the
features ran without failing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… failure logged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hkaltai

hkaltai commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

review-loop: APPROVED at 6d4e6da (reviewers: gpt-6-astra high, gpt-6.1-sol high)

@hkaltai
hkaltai marked this pull request as ready for review November 17, 2026 19:17
Comment thread plugins/altimate-code/hooks/lineage.tsx Resolved
@kilo-code-bot

kilo-code-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Incremental review of 590a869..267104a (one line changed). The fake process.run in tool-chain.test.ts:96 now returns isStdoutTruncated: false and isStderrTruncated: false alongside the inert/fallback answer. The flags are spread before the nothingToReport(...) ?? fallback value, so no field is overridden, and the shape matches the existing fakes in integrations.test.tsx:464/522/569/594. No new issues; earlier findings remain addressed.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 0
Files Reviewed (1 file in this increment)
  • plugins/altimate-code/hooks/tool-chain.test.ts - no issues
Previous Review Summaries (2 snapshots, latest commit 590a869)

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

Previous review (commit 590a869)

Status: No Issues Found | Recommendation: Merge

Previous findings at 6d4e6da are addressed in 590a869 (cut-off JSON no longer shown as text, inert answers recorded after the guard, failure-log filter, all line terminators excluded from the cd blanks class).

Note: dbt_docs_coverage: { success: false } relies on the docs-coverage feature silently passing over a non-success answer; that feature is a stub on this branch, so the claim could not be verified here.

Files Reviewed (7 files)
  • plugins/altimate-code/hooks/altimate-cli.test.ts
  • plugins/altimate-code/hooks/altimate-cli.ts
  • plugins/altimate-code/hooks/features/index.test.ts
  • plugins/altimate-code/hooks/inert-features.ts
  • plugins/altimate-code/hooks/lineage.test.tsx
  • plugins/altimate-code/hooks/lineage.tsx
  • plugins/altimate-code/hooks/task-impact.test.tsx

Previous review (commit 6d4e6da)

Status: 5 Issues Found | Recommendation: Address before merge

Overview

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

WARNING

File Line Issue
plugins/altimate-code/hooks/inert-features.ts 10 dbt_docs_coverage answers success: false, which this plugin treats as a failed tool call (sql-graph.tsx:178, task-impact.tsx:532, sql-graph.test.tsx:370), not as "nothing to report"; a docs-coverage feature will surface or log a failure and trip the new shared test.
plugins/altimate-code/hooks/altimate-cli.ts 188 The plain-text fallback also fires for JSON that fails to parse, so a cut-off answer ({"status":"ok","out with exit 1, as in lineage.test.tsx:211) is rendered at lineage.tsx:418 as failed: {"status":"ok","out instead of failed: no answer came back; keep the fallback for genuinely text output or prefer stderr.

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/task-impact.test.tsx 148 The inert guard runs after runs.push(argv) (line 144), unlike the other three fakes, so inert data-tool calls are recorded as the test's own and will disturb any future exact/ordered assertion over runs.
plugins/altimate-code/hooks/features/index.test.ts 73 expect(logs).toEqual([]) equates "no failure" with "no logging at all"; filtering on failed: (the only channel failed() writes) keeps the intent and does not fail a correct feature that logs.
plugins/altimate-code/hooks/lineage.tsx 276 [^\\S\\n]* still accepts \\r, \\u2028 and \\u2029 (all line terminators for multi-line ^), so a long run of those stays quadratic; the new test only covers \\n.
Files Reviewed (9 files)
  • plugins/altimate-code/hooks/altimate-cli.test.ts - no issues
  • plugins/altimate-code/hooks/altimate-cli.ts - 1 warning
  • plugins/altimate-code/hooks/features/index.test.ts - 1 suggestion
  • plugins/altimate-code/hooks/features/sql-graph.test.tsx - no issues
  • plugins/altimate-code/hooks/inert-features.ts - 1 warning
  • plugins/altimate-code/hooks/lineage.test.tsx - no issues
  • plugins/altimate-code/hooks/lineage.tsx - 1 suggestion
  • plugins/altimate-code/hooks/task-impact.test.tsx - 1 suggestion
  • plugins/altimate-code/hooks/tool-chain.test.ts - no issues

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash-1017 · Input: 34.7K · Output: 3K · Cached: 341K

… blanks before a cd; fakes answer feature calls before recording; the no-failure test checks failures only

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hkaltai

hkaltai commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

review-loop: APPROVED at 590a869 (reviewers: gpt-6-astra high, gpt-6.1-sol high)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@hkaltai

hkaltai commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

review-loop: APPROVED at 267104a (reviewers: gpt-6-astra high, gpt-6.1-sol high)

@saravmajestic saravmajestic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving. The nothingToReport helper gives each feature's CLI call an empty answer, so the shared tests no longer assume features are stubs. The strict "no feature fails in any phase" test with its positive control is a good guard. The runTool first-line fallback and the linear-time cd pattern both look right.

Merge this before the feature PRs. You already listed the remaining cross-PR test interactions (#27 with #24 in runs.test.tsx, #26 with #33 in comments.test.tsx); those need fixing in the feature PRs' own test files before they're merged together.

@hkaltai
hkaltai merged commit d21abaf into main Nov 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants