Repository navigation
fix: the doctor checks the project that installs a package, as compile & validate does - #53
Conversation
…e & validate does A root target linked to the installing project's target made that manifest count as the package's own, so the doctor reported the packages missing and parsed at the root. One check now decides whether a manifest is really the root's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ompile & validate runs in, and the linked-target check resolves real paths Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s check reads that project's file, and its state follows a change of place Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… it works in Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the two projects it reads Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Approved at head 3070920 by two independent reviewer CLI processes: Claude ( |
…ssing-manifest line are asserted exactly Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hat it does Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Approved at head 46bf853 by two independent reviewer CLI processes: Claude ( |
…te linked target-path and a kept view without a place are asserted Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Approved at head e071931 by two independent reviewer CLI processes: Claude ( |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The prior suggestion is resolved in Files Reviewed (2 files, incremental 8eb5459..db5b8b3)
Previous Review Summaries (3 snapshots, latest commit 8eb5459)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 8eb5459)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (2 files, incremental 89f385b..8eb5459)
Fix these issues in Kilo Cloud Previous review (commit 89f385b)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (2 files, incremental e071931..89f385b)
Fix these issues in Kilo Cloud Previous review (commit e071931)Status: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (5 files)
Reviewed by deepseek-v4.1-flash-1017 · Input: 37.9K · Output: 5.6K · Cached: 322.1K |
… reads The second scan was gated on where dbt runs, so a package repo with no manifest of its own and only its own packages installed left the installing project's files unscanned while its manifest was read. It now follows the manifest's owner. The unused file list of the scan is dropped, and the all-checks test gives the installing project's launcher a shebang the harness answers and asserts the rendered check lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Approved at 89f385b by claude -p and codex gpt-6.1-sol (after Kilo's review: the freshness scan follows the manifest owner, dead list removed, every-check test now exercises the success paths). hooks/dbt-mods.test.tsx: 340 pass, 0 fail. |
…s once Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…project name when its dbt_project.yml names none Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Approved at 8eb5459 by claude -p and codex gpt-6.1-sol (after Kilo's suggestion: manifest ownership resolved once per manifest check). hooks/dbt-mods.test.tsx: 342 pass, 0 fail. |
…and shares them with its manifest check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Approved at db5b8b3 by claude -p and codex gpt-6.1-sol (place and manifest ownership resolved once per doctor run). hooks/dbt-mods.test.tsx: 342 pass, 0 fail. |
sahrizvi
left a comment
There was a problem hiding this comment.
Consensus review: APPROVE (panel: Claude as lead, Codex as the independent reviewer; head db5b8b330a).
The PR does what it says. I built real dbt 1.10 + DuckDB fixtures and fed their files and real dbt --version output into the doctor at head and at base. On a package repo whose target links to integration_tests/target:
- Base:
FAIL Packages: packages.yml is not installed, plus a false stale entrymodels/it_model.sql (deleted). Run dbt deps and Run dbt parse ran at the root, and a realdbt parsethere fails with "found 1 package(s) specified in packages.yml, but only 0 package(s) installed". If you follow that advice (deps, then parse at the root), real dbt overwritesintegration_tests/target/manifest.jsonwith the package's own manifest. - Head: every check is OK, the pane shows "dbt runs in integration_tests", the note says "run from integration_tests", and parse and deps run in
integration_tests.
A plain project and a package parsed in itself give identical output at head and base. realPath follows the engine's realpath: a linked folder in the middle of the path, relative links, links to links, /tmp vs /private/tmp and wrong-case spellings on case-insensitive APFS all resolve to the same path. A dangling link is "no manifest". The merge with #54 passes the dbt-mods file (375/375) and matches head on every fixture.
Remaining minors, none blocking:
- The plain-project test does not pin
if (!runner) return true: test-only. - With two installing projects,
runnerOfmay pick one other than the onetargetlinks to: edge layout, keeps base behaviour. - A
statthat cannot resolve falls back to the unresolved spelling: edge input, keeps base behaviour.
Details and nits are in the PR comment.
| await band.unmount() | ||
| }) | ||
|
|
||
| test('a plain project with no package below it: its manifest is its own, the doctor\'s Run dbt parse runs in it', async ($, on) => { |
There was a problem hiding this comment.
Minor (test gap, raised by Codex, confirmed by mutation). Changing if (!runner) return true in ownManifestOf (dbt-mods.tsx:407) to return false still passes all 342 dbt-mods tests. This test still holds after that change because with no runner runPlaceOf returns the root anyway, and the fixture's nodes have no package_name, so the freshness filter gives the same answer. The only behaviour the branch decides is which project name the freshness filter uses (the manifest's project_name or the one in dbt_project.yml). An assertion that tells those apart would pin it, for example a plain project whose dbt_project.yml name differs from its manifest's project_name, or a check that this case makes no resolve stat. Test-only; not blocking.
| async function ownManifestOf($: EngineInterface, root: string): Promise<boolean> { | ||
| const own = `${await targetOf($, root)}/manifest.json` | ||
| if (!(await $.fs.exists(own).catch(() => false))) return false | ||
| const runner = await runnerOf($, root).catch(() => null) |
There was a problem hiding this comment.
Minor (edge layout, not a regression). When two projects below the root both install it with local: ../ (say examples/ and integration_tests/), runnerOf returns the first one in directory-listing order. On APFS that order is not alphabetical. If it returns examples/ while target links to integration_tests/target, the real paths differ, ownManifestOf says "own", and the doctor keeps the base behaviour: FAIL Packages: packages.yml is not installed, and Run dbt deps and parse at the root. I reproduced this at head and base with the same output. A possible follow-up: compare the root's manifest real path against every installer runnerOf could return, not just the first. Not blocking.
| const runner = await runnerOf($, root).catch(() => null) | ||
| if (!runner) return true | ||
| const theirs = `${await targetOf($, runner)}/manifest.json` | ||
| const real = (path: string) => $.fs.stat(path, { resolve: true }).then(one => one.realPath ?? path).catch(() => path) |
There was a problem hiding this comment.
Minor (edge input, keeps base behaviour). The comparison falls back to the unresolved spelling when stat(..., { resolve: true }) throws or answers without realPath. Claude Code 2.1.332's engine gives such an answer ({ kind: 'other', isLink: true }, no realPath) when the stat is not allowed (DENIED / UNHELD / RULES_MOVED). Then target/manifest.json and integration_tests/target/manifest.json compare as different, so a linked target reads as the root's own and the doctor falls back to the old answer. The test at line 1232 accepts this on purpose. It is rare on a project folder the session can read. Not blocking.
|
Consensus review notes for #53 (Claude as lead + Codex, head How it was checked. The live Doctor output, base → head
Real dbt check of where Run dbt parse/deps write. In the linked repo,
Runner pick. Freshness merge. Dedupe and newest-first order across both projects are correct, and so is the Mutations (dbt-mods tests, 342). All caught except
Suites (
Nits
|
…e-runner # Conflicts: # plugins/altimate-code/CHANGELOG.md
…e-runner # Conflicts: # plugins/altimate-code/CHANGELOG.md
Problem
Take a dbt package repo whose root project has
packages.ymland is installed byintegration_tests/(itspackages.ymlhaslocal: ../, and the packages live inintegration_tests/dbt_packages/). If the roottargetis linked tointegration_tests/target, the doctor checks the repo root and reports "FAIL Packages: packages.yml is not installed · fix: dbt deps". It still says so afterdbt depshas run inintegration_tests. Compile & validate on the same repo correctly runs "from integration_tests (the project that installs this package)". The doctor's header also names the repo root.Cause
The doctor's packages check and
parseNow(the doctor's Run dbt parse) each kept their own copy of one shortcut: "there is a manifest in the root's target, so the package was parsed in itself, so skip the runner". With the roottargetlinked to the runner's, that manifest belongs to the runner. The doctor's other checks (dbt, Python, adapter, connection), its freshness scan and Run dbt deps all used the repo root as well.Fix
ownManifestOfdecides whether the root's manifest belongs to the root: no manifest: no; no runner below: yes; otherwise yes only when its real path ($.fs.stat(path, { resolve: true }).realPath, ashealthreads it) differs from the runner'smanifest.json.doctorPlaceOfis the one place the doctor works in: the root when its manifest is its own, else where compile & validate runs dbt (runPlaceOf, unchanged).packages.ymleven if the root has none. The freshness scan usesownManifestOffor whether the manifest is the package's own, and when the doctor works in another project it also looks at that project's files; a missing manifest is named at the file a parse there writes.A package genuinely parsed in itself (a real, unlinked root manifest) and a plain project keep their behaviour: place is the root.
Tests (
hooks/dbt-mods.test.tsx)statreturnsrealPathonly when asked withresolve, as the real engine doesFull suite: all pass except two tests that also fail on
main("a dbt call that starts while another call reads its artifact…" and the timing test "a line with a great many dbt calls is not read call by call"); other timing tests fail now and then under machine load. Shell tests pass.validate --strict ./plugins/altimate-codefails only withICON_MISSING, as onmain.🤖 Generated with Claude Code