Skip to content

fix(cli): name the Kreuzberg install command when knowledge ingest cannot load it - #5684

Merged
kojiwakayama merged 6 commits into
mainfrom
fix/m125-4948-kreuzberg-install-hint
Dec 5, 2026
Merged

kojiwakayama merged 6 commits into
mainfrom
fix/m125-4948-kreuzberg-install-hint

Conversation

@kwakayama

@kwakayama kwakayama commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

knowledge ingest now prints an install command that works when it cannot load the optional Kreuzberg package.

  • PDF, Office, EPUB, HTML and RTF parsing needs @veryfront/ext-document-kreuzberg. The standalone binary bundles it. The veryfront npm package does not include it, by the native-dependency policy.
  • The error names the pinned package (@veryfront/ext-document-kreuzberg@<running version>), says to install it in the same place as the running veryfront, and gives the command for the project's package manager (via formatInstallCommand, detected from --project-dir when given). Global and npx installs are covered in the guide. The original error stays as cause.
  • Only a missing Kreuzberg package gets the hint. A broken dependency inside an installed extension passes through unchanged (negative-control tests).
  • Command help, cli/README.md and the ingestion guide now say the standalone binary includes the extension and that npm-package installs need it at the same version. The guide shows project, npm-global and npx installs.
  • Not covered: Yarn Plug'n'Play, where veryfront does not declare Kreuzberg as an optional peer. That is a packaging change for a separate PR.
  • A hermetic unit test (cli/commands/knowledge/parser-install-hint.test.ts) covers the hint; the integration tests cover the full parser path.

Refs veryfront/veryfront-issue-inbox#4948

…nnot load it

PDF, Office, EPUB, HTML and RTF parsing needs the optional
@veryfront/ext-document-kreuzberg package. The npm package does not
include it, and the error only said to install it alongside veryfront.
The parser now names the npm install and npx commands, and the help and
docs no longer call the parser built-in.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-05T10:38:52.802467Z dcaebfb Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown

📦 Client bundle boundary

Entrypoint Modules Source size Server leaks
src/index.client.ts 66 371 KiB ✅ 0
src/react/components/Head.tsx 5 74 KiB ✅ 0
src/react/router/index.tsx 5 74 KiB ✅ 0
src/react/context/index.tsx 5 74 KiB ✅ 0
src/react/fonts/index.ts 6 81 KiB ✅ 0
src/react/components/ui/index.ts 111 720 KiB ✅ 0
src/react/components/ui/adapter/contract.ts 1 18 KiB ✅ 0
src/react/components/ui/icons/index.ts 3 17 KiB ✅ 0
src/chat/index.ts 305 2055 KiB ✅ 0
src/chat/ag-ui.ts 61 464 KiB ✅ 0
src/chat/protocol.ts 1 11 KiB ✅ 0
src/chat/types.ts 46 248 KiB ✅ 0
src/chat/message-prep.ts 68 519 KiB ✅ 0
src/markdown/index.ts 6 30 KiB ✅ 0
src/mdx/index.ts 2 2 KiB ✅ 0
src/agent/identity-contracts.ts 1 3 KiB ✅ 0
src/schemas/index.ts 43 222 KiB ✅ 0
src/platform/env.ts 5 55 KiB ✅ 0
src/workflow/claude-code/react/index.ts 9 91 KiB ✅ 0
src/events/index.ts 37 631 KiB ✅ 0
src/events/ag-ui/public.ts 36 624 KiB ✅ 0
src/run-events/index.ts 54 323 KiB ✅ 0

A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in scripts/lint/client-bundle-baseline.json to burn down.

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown

@codex review

Copy link
Copy Markdown
Contributor Author

Review score: 80/100

Focused, well-tested fix that turns an opaque missing-module error into an actionable install hint. A few small gaps in hint accuracy remain.

  • Strength: narrow classification. Reuses isMissingFirstPartyExtensionModule(error, [KREUZBERG_PACKAGE]), so only a missing Kreuzberg package gets the hint. The negative-control test (jose missing inside an installed extension) shows that unrelated resolution failures still pass through unchanged. The injectable loadDocumentExtractor dep is minimal and only affects tests.
  • Strength: copy is consistent everywhere. The "built-in" wording is removed from the help text, cli/README.md and the guide, and the help test now asserts the install command.
  • Concern: the hint doesn't cover global installs. docs/getting-started/installation.md documents npm install -g veryfront. For those users, npm install @veryfront/ext-document-kreuzberg in the cwd won't make the package resolvable from the global veryfront. The guide suggests npm install veryfront @veryfront/ext-document-kreuzberg, which works because the global binary delegates to a project-local veryfront, but the runtime error and help omit veryfront. Either use the guide's two-package form in the error and help, or add npm install -g @veryfront/ext-document-kreuzberg for global installs.
  • Concern: the PR says "the original error stays as cause", but the CLI drops it. runKnowledgeParsers sends the error through throwParserFailure (cli/commands/knowledge/parser.ts, the knowledge ingest parser failed: ... wrapper). That wrapper builds a new Error from message alone and doesn't pass { cause }, so the cause is gone by the time the error reaches the caller. Either forward cause in throwParserFailure (a one-line fix that also helps other parser failures) or reword the PR description.
  • Nit: this is a plain Error rather than a defineError registry error. That matches the surrounding parser code, but a registry slug such as knowledge-document-extension-missing would let --json consumers key on this case instead of matching message text. This is optional and can be a follow-up.

I couldn't verify this locally because Deno isn't available in my environment. CI was still running when I reviewed.


Generated by Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 438202272d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@codecov

codecov Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.13208% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli/commands/knowledge/parser.ts 80.00% 10 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c8d3756487

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cli/commands/knowledge/command-help.ts Resolved
Comment thread cli/commands/knowledge/parser.ts Resolved
Comment thread cli/commands/knowledge/parser.ts Resolved
@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea3e1401de

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cli/commands/knowledge/parser.ts Resolved
Comment thread cli/commands/knowledge/parser.ts Resolved
Comment thread cli/commands/knowledge/parser.ts Resolved
@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 1f9e60c531

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c4386f8cd7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cli/commands/knowledge/parser.ts Resolved
Comment thread cli/commands/knowledge/parser.ts Resolved
Comment thread cli/commands/knowledge/parser.ts Resolved
@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: dcaebfbc46

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@kojiwakayama
kojiwakayama added this pull request to the merge queue Dec 5, 2026
@sonarqubecloud

sonarqubecloud Bot commented Dec 5, 2026

Copy link
Copy Markdown

Merged via the queue into main with commit 2069d8e Dec 5, 2026
446 checks passed
@kojiwakayama
kojiwakayama deleted the fix/m125-4948-kreuzberg-install-hint branch December 5, 2026 11:35
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