Skip to content

fix(runner): wrap training entry import() with error context - #223

Open
KinjalGoswami68 wants to merge 1 commit into
arkorlab:mainfrom
KinjalGoswami68:fix/runner-import-error-context
Open

fix(runner): wrap training entry import() with error context#223
KinjalGoswami68 wants to merge 1 commit into
arkorlab:mainfrom
KinjalGoswami68:fix/runner-import-error-context

Conversation

@KinjalGoswami68

@KinjalGoswami68 KinjalGoswami68 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #221.

If the training entry file exists but fails during import() (a broken dependency, a syntax error in an imported module, etc.), the original error bubbled up with no indication that it happened while loading the training entry, before training ever started.

Wrap only the import() call (not extractTrainer, which already has its own clear error message) in try/catch, and re-throw with context using the standard Error cause option so the original error is preserved, not hidden:

Failed to load training entry:
Cause:

Added a test that writes a real entry file importing a genuinely nonexistent module, letting Node's real ESM loader throw, and asserts both the new wrapper message and that the original error is still reachable via err.cause.

Testing

pnpm format:check, pnpm --filter arkor typecheck, pnpm --filter arkor lint, and pnpm --filter arkor exec vitest run src/core/runner.test.ts all pass (12/12 tests).


Summary by cubic

Clarifies errors when loading the training entry by wrapping the import() with context and preserving the original error via Error cause. Fixes #221.

  • Bug Fixes
    • Wrap training entry import() in try/catch and rethrow as Failed to load training entry: <path> with cause.
    • Add test that imports a missing module and asserts the wrapper message and preserved err.cause.

Written for commit 5faa0f6. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Improved error messages when a training entry fails to load by including the entry path.
    • Preserved the original loading error for easier troubleshooting.
  • Tests
    • Added coverage to verify contextual error reporting and preservation of the underlying cause.

Fixes arkorlab#221.

If the training entry file exists but fails during import() (a
broken dependency, a syntax error in an imported module, etc.), the
original error bubbled up with no indication that it happened while
loading the training entry, before training ever started.

Wrap only the import() call (not extractTrainer, which already has
its own clear error message) in try/catch, and re-throw with context
using the standard Error cause option so the original error is
preserved, not hidden:

  Failed to load training entry: <path>
  Cause: <original error>

Added a test that writes a real entry file importing a genuinely
nonexistent module, letting Node's real ESM loader throw, and asserts
both the new wrapper message and that the original error is still
reachable via err.cause.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: fb2e9ab9-028a-4687-9fe6-6b556625b5bf

📥 Commits

Reviewing files that changed from the base of the PR and between 314c6e3 and 5faa0f6.

📒 Files selected for processing (2)
  • packages/arkor/src/core/runner.test.ts
  • packages/arkor/src/core/runner.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Seer Code Review
  • GitHub Check: cubic · AI code reviewer
🧰 Additional context used
📓 Path-based instructions (9)
packages/arkor/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Preserve Studio CSRF protections: send the token in X-Arkor-Studio-Token for fetch, use studioToken for EventSource, enforce the localhost host-header allow-list, do not configure CORS, and compare tokens with timingSafeEqual.

Files:

  • packages/arkor/src/core/runner.test.ts
  • packages/arkor/src/core/runner.ts
packages/*/src/**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

Add Vitest tests in the same change for SDK, CLI, scaffolder, schema, or other package logic changes; consider an e2e/cli scenario for CLI flow changes.

Files:

  • packages/arkor/src/core/runner.test.ts
**/*.{js,ts,jsx,tsx,json,css,html}

📄 CodeRabbit inference engine (AGENTS.md)

Use oxfmt for formatting with the repository configuration; do not manually override its whitespace, wrapping, quotes, or trailing-comma decisions.

Files:

  • packages/arkor/src/core/runner.test.ts
  • packages/arkor/src/core/runner.ts
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Run both linters through the root configurations: oxlint --deny-warnings . followed by eslint .; add configuration overrides at the root rather than per-package configs.

Files:

  • packages/arkor/src/core/runner.test.ts
  • packages/arkor/src/core/runner.ts
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Do not use the em dash character (U+2014) in code comments, string literals, or template literals, including CLI messages, generated template bodies, and test names.

Files:

  • packages/arkor/src/core/runner.test.ts
  • packages/arkor/src/core/runner.ts
packages/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.ja.md)

TypeScript/TSX のコード、コメント、文字列、テンプレートリテラルではエムダッシュ (U+2014) またはその HTML エンティティを使用しない。

Files:

  • packages/arkor/src/core/runner.test.ts
  • packages/arkor/src/core/runner.ts
**/*

📄 CodeRabbit inference engine (CONTRIBUTING.ja.md)

リポジトリ内の追跡対象ファイルでは、エムダッシュまたはその HTML エンティティを使用しない。Markdown、YAML、JSON、HTML、設定ファイル、生成テンプレートも含む。

Files:

  • packages/arkor/src/core/runner.test.ts
  • packages/arkor/src/core/runner.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.ja.md)

SDK、CLI、スキャフォルダーのロジックには Vitest のテストを追加し、Studio コンポーネントには jsdom と Testing Library ベースのテストを使用する。ただしテスト追加自体は PR の必須条件ではない。

Files:

  • packages/arkor/src/core/runner.test.ts
  • packages/arkor/src/core/runner.ts
packages/arkor/src/core/runner.ts

📄 CodeRabbit inference engine (AGENTS.md)

User project entry-point discovery must support, in order: a named arkor export from createArkor, a bare trainer export, a default Arkor manifest or Trainer, and a nested default.trainer.

Files:

  • packages/arkor/src/core/runner.ts
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: arkorlab/arkor PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-07-24T09:55:04.181Z
Learning: Applies to packages/arkor/src/core/runner.ts : User project entry-point discovery must support, in order: a named `arkor` export from `createArkor`, a bare `trainer` export, a default Arkor manifest or Trainer, and a nested `default.trainer`.
📚 Learning: 2026-07-24T09:55:04.181Z
Learnt from: CR
Repo: arkorlab/arkor PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-07-24T09:55:04.181Z
Learning: Applies to packages/arkor/src/core/runner.ts : User project entry-point discovery must support, in order: a named `arkor` export from `createArkor`, a bare `trainer` export, a default Arkor manifest or Trainer, and a nested `default.trainer`.

Applied to files:

  • packages/arkor/src/core/runner.test.ts
  • packages/arkor/src/core/runner.ts
📚 Learning: 2026-08-07T08:54:17.077Z
Learnt from: CR
Repo: arkorlab/arkor PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2026-08-07T08:54:17.077Z
Learning: Applies to e2e/cli/**/*.{ts,tsx} : CLI E2E tests should cover the `arkor` and `create-arkor` CLI surfaces, including spawning, scaffolding, builds, exit codes, and stdout/stderr, using Vitest against built `dist/bin.mjs` artifacts.

Applied to files:

  • packages/arkor/src/core/runner.test.ts
📚 Learning: 2026-07-24T09:55:04.181Z
Learnt from: CR
Repo: arkorlab/arkor PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-07-24T09:55:04.181Z
Learning: Applies to packages/*/src/**/*.test.ts : Add Vitest tests in the same change for SDK, CLI, scaffolder, schema, or other package logic changes; consider an `e2e/cli` scenario for CLI flow changes.

Applied to files:

  • packages/arkor/src/core/runner.test.ts
📚 Learning: 2026-08-07T08:54:17.077Z
Learnt from: CR
Repo: arkorlab/arkor PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2026-08-07T08:54:17.077Z
Learning: Applies to packages/studio-app/**/*.{ts,tsx} : Studio component tests may use jsdom-based Testing Library tests, run with `pnpm --filter arkor/studio-app test`.

Applied to files:

  • packages/arkor/src/core/runner.test.ts
📚 Learning: 2026-07-24T09:55:04.181Z
Learnt from: CR
Repo: arkorlab/arkor PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-07-24T09:55:04.181Z
Learning: Applies to packages/arkor/src/cli/commands/build.ts : `arkor build` must emit `.arkor/build/index.mjs` with esbuild while keeping bare specifiers and `node_modules` dependencies external.

Applied to files:

  • packages/arkor/src/core/runner.test.ts
  • packages/arkor/src/core/runner.ts
🔇 Additional comments (2)
packages/arkor/src/core/runner.ts (1)

57-62: LGTM!

packages/arkor/src/core/runner.test.ts (1)

61-87: LGTM!


Walkthrough

runTrainer now adds training entry path context to dynamic import failures and preserves the original error as cause. Tests cover an existing entry whose import fails.

Changes

Training entry error handling

Layer / File(s) Summary
Wrap and test import failures
packages/arkor/src/core/runner.ts, packages/arkor/src/core/runner.test.ts
runTrainer wraps dynamic import failures with Failed to load training entry: <path> and preserves the original error as cause. Tests verify both values.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • arkorlab/arkor#222: This PR directly overlaps by changing runTrainer and its tests for contextual dynamic import errors.

Suggested reviewers: k-taro56

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding context when training entry imports fail.
Linked Issues check ✅ Passed The implementation wraps entry imports, identifies the failed path, preserves the original error as cause, and adds a regression test for issue #221.
Out of Scope Changes check ✅ Passed The changes are limited to runner import error handling and its corresponding test, with no unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

fix(runner): add contextual error (with cause) for training entry import failures

🐞 Bug fix 🧪 Tests 🕐 10-20 Minutes

Grey Divider

AI Description

• Wrap training entry dynamic import() failures with a clear, path-specific error message.
• Preserve the original import error via Error cause for debugging.
• Add a vitest case covering real ESM import-time module-not-found behavior.
Diagram

graph TD
  A[Caller] --> B["runTrainer()"] --> C["Resolve path + existsSync"] --> D["dynamic import()"] --> E["extractTrainer()"] --> F["trainer.start()/wait()"]
  D --> G["Throw Error: Failed to load entry"] --> H["cause: original import error"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Custom error class (e.g., TrainingEntryLoadError)
  • ➕ Allows callers to reliably detect entry-load failures via instanceof
  • ➕ Can carry structured fields (path, phase) without parsing message text
  • ➖ Adds API surface area and maintenance overhead for a small ergonomic improvement
  • ➖ May require documenting/handling the new error type across consumers
2. Include context by appending to the original error message only
  • ➕ Very small change; no reliance on Error.cause support/expectations
  • ➖ Loses structured access to the underlying error; harder to debug programmatically
  • ➖ Risk of obscuring the original stack/message formatting

Recommendation: The PR’s approach (wrapping only the dynamic import() and using standard Error({ cause })) is the best tradeoff: it adds clear, user-facing context without hiding the underlying loader failure, and avoids expanding the public API with new error types.

Files changed (2) +33 / -4

Bug fix (1) +6 / -4
runner.tsWrap training entry import() with contextual error and preserved cause +6/-4

Wrap training entry import() with contextual error and preserved cause

• Replaces the direct dynamic import with a try/catch and throws a new error including the entry path when import fails. The original import-time error is preserved via the standard 'cause' option to aid debugging without changing 'extractTrainer()' behavior.

packages/arkor/src/core/runner.ts

Tests (1) +27 / -0
runner.test.tsAdd regression test for import-time failure preserving Error.cause +27/-0

Add regression test for import-time failure preserving Error.cause

• Adds a test that writes a real .mjs entry importing a nonexistent module to force Node’s ESM loader to throw during import. Asserts the new wrapper message and verifies the original error remains accessible via 'err.cause'.

packages/arkor/src/core/runner.test.ts

@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR wraps dynamic training-entry import failures with path context while preserving the loader error as Error.cause.

  • Adds a focused dynamic-import try/catch in runTrainer.
  • Adds a real ESM-loader failure test that verifies the wrapper message and cause.
  • The current CLI and Studio output path does not render the preserved cause.

Confidence Score: 4/5

The import wrapper should be fixed before merging because it removes the actionable loader diagnostic from the CLI and Studio output users actually see.

The original import error remains programmatically reachable, but current entry points render only the wrapper stack and never traverse its cause; the accompanying test does not exercise that user-facing boundary.

Files Needing Attention: packages/arkor/src/core/runner.ts and packages/arkor/src/core/runner.test.ts

Important Files Changed

Filename Overview
packages/arkor/src/core/runner.ts Adds contextual import-error wrapping, but the original diagnostic is hidden by current user-facing error rendering.
packages/arkor/src/core/runner.test.ts Covers the wrapper and cause properties but not the actual CLI or Studio stderr output.

Fix All in Claude Code

Prompt To Fix All With AI
### Issue 1
packages/arkor/src/core/runner.ts:62
**Cause omitted from rendered error**

When a training entry fails during import, the new wrapper stores the loader diagnostic only in `cause`, but the CLI prints only `err.stack` or `err.message` and Studio relays that output. Users therefore see the entry path and wrapper stack without the missing-module or syntax diagnostic needed to fix the entry.

### Issue 2
packages/arkor/src/core/runner.ts:62
**Behavior change lacks documentation**

This changes the CLI and Studio diagnostic produced for training-entry import failures without adding the repository-required English and Japanese documentation, leaving users in both documentation surfaces uninformed about the new error shape and preserved cause.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "fix(runner): wrap training entry import(..." | Re-trigger Greptile

mod = (await import(pathToFileURL(abs).href)) as Record<string, unknown>;
} catch (err) {
throw new Error(`Failed to load training entry: ${abs}`, { cause: err });
}

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.

P1 Cause omitted from rendered error

When a training entry fails during import, the new wrapper stores the loader diagnostic only in cause, but the CLI prints only err.stack or err.message and Studio relays that output. Users therefore see the entry path and wrapper stack without the missing-module or syntax diagnostic needed to fix the entry.

Knowledge Base Used: Arkor core runtime (packages/arkor/src/core)

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/arkor/src/core/runner.ts
Line: 62

Comment:
**Cause omitted from rendered error**

When a training entry fails during import, the new wrapper stores the loader diagnostic only in `cause`, but the CLI prints only `err.stack` or `err.message` and Studio relays that output. Users therefore see the entry path and wrapper stack without the missing-module or syntax diagnostic needed to fix the entry.

**Knowledge Base Used:** [Arkor core runtime (`packages/arkor/src/core`)](https://app.greptile.com/arkor/-/custom-context/knowledge-base/arkorlab/arkor/-/docs/arkor-core-runtime.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code

mod = (await import(pathToFileURL(abs).href)) as Record<string, unknown>;
} catch (err) {
throw new Error(`Failed to load training entry: ${abs}`, { cause: err });
}

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.

P2 Behavior change lacks documentation

This changes the CLI and Studio diagnostic produced for training-entry import failures without adding the repository-required English and Japanese documentation, leaving users in both documentation surfaces uninformed about the new error shape and preserved cause.

Context Used: CLAUDE.md (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/arkor/src/core/runner.ts
Line: 62

Comment:
**Behavior change lacks documentation**

This changes the CLI and Studio diagnostic produced for training-entry import failures without adding the repository-required English and Japanese documentation, leaving users in both documentation surfaces uninformed about the new error shape and preserved cause.

**Context Used:** CLAUDE.md ([source](https://github.com/arkorlab/arkor/blob/main/CLAUDE.md))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 2 files

Re-trigger cubic

@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: 5faa0f669c

ℹ️ 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".

try {
mod = (await import(pathToFileURL(abs).href)) as Record<string, unknown>;
} catch (err) {
throw new Error(`Failed to load training entry: ${abs}`, { cause: err });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include the import failure cause in CLI output

When the entry exists but one of its own imports fails, this wrapper is what reaches the CLI, but packages/arkor/src/bin.ts prints only err.stack ?? err.message; Node's stack string does not include Error.cause. In that scenario arkor start now shows only Failed to load training entry: ... and hides the actionable original message such as Cannot find module or a syntax error, which is a regression from the bare import error. Please either include the original error text in this message or update the top-level formatter to print causes.

Useful? React with 👍 / 👎.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 📜 Skill insights (0)

Grey Divider


Action required

1. CLI hides import cause 🐞 Bug ◔ Observability
Description
runTrainer() now throws a new wrapper Error on import() failure with the original error stored
only in cause, but packages/arkor/src/bin.ts prints only err.stack ?? err.message (a string)
and never formats err.cause. As a result, users will typically see only `Failed to load training
entry: ...` and lose the underlying import failure details (e.g. missing module), which is a
regression from the previous behavior where the original import error text was printed.
Code

packages/arkor/src/core/runner.ts[R60-62]

+  } catch (err) {
+    throw new Error(`Failed to load training entry: ${abs}`, { cause: err });
+  }
Evidence
runTrainer() wraps import failures into a new Error with the original failure only stored in
cause. The CLI entrypoint prints only err.stack ?? err.message (not the Error object), and
Error.stack does not include the cause chain, so the underlying import error (e.g.
ERR_MODULE_NOT_FOUND) is dropped from the output users actually see.

packages/arkor/src/core/runner.ts[47-66]
packages/arkor/src/bin.ts[8-43]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`runTrainer()` now wraps import-time failures with a new `Error(..., { cause })`. However, the CLI’s top-level error handler prints only `err.stack ?? err.message` (a string) and does not include `err.cause`, so the original import failure message/stack is not shown in normal CLI output.

### Issue Context
- The PR introduces a wrapper error around `import(pathToFileURL(abs).href)`.
- The CLI intentionally avoids `console.error(err)` because the bundled stack is noisy/minified, but printing only the wrapper’s stack/message loses the actionable underlying cause.

### Fix Focus Areas
- packages/arkor/src/core/runner.ts[57-62]
- packages/arkor/src/bin.ts[14-43]

### What to change
- Update `packages/arkor/src/bin.ts` catch-all printing branch to include `Error.cause` when present.
 - Keep the wrapper context (`err.message`).
 - If `err.cause` is an `Error`, print something like `Cause: ${cause.stack ?? cause.message}` (or recursively print nested causes).
 - If `err.cause` is non-Error, print `Cause: ${String(err.cause)}`.
- (Optional alternative) If you prefer not to change CLI printing behavior, include a `Cause: ...` line in the wrapper error’s `.message` in `runTrainer()` while still setting `{ cause }`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context

Grey Divider

Tip of the day
💡 Did you know, you can enable the Remediation agent and Qodo fixes findings in a dedicated fix PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +60 to +62
} catch (err) {
throw new Error(`Failed to load training entry: ${abs}`, { cause: err });
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Cli hides import cause 🐞 Bug ◔ Observability

runTrainer() now throws a new wrapper Error on import() failure with the original error stored
only in cause, but packages/arkor/src/bin.ts prints only err.stack ?? err.message (a string)
and never formats err.cause. As a result, users will typically see only `Failed to load training
entry: ...` and lose the underlying import failure details (e.g. missing module), which is a
regression from the previous behavior where the original import error text was printed.
Agent Prompt
### Issue description
`runTrainer()` now wraps import-time failures with a new `Error(..., { cause })`. However, the CLI’s top-level error handler prints only `err.stack ?? err.message` (a string) and does not include `err.cause`, so the original import failure message/stack is not shown in normal CLI output.

### Issue Context
- The PR introduces a wrapper error around `import(pathToFileURL(abs).href)`.
- The CLI intentionally avoids `console.error(err)` because the bundled stack is noisy/minified, but printing only the wrapper’s stack/message loses the actionable underlying cause.

### Fix Focus Areas
- packages/arkor/src/core/runner.ts[57-62]
- packages/arkor/src/bin.ts[14-43]

### What to change
- Update `packages/arkor/src/bin.ts` catch-all printing branch to include `Error.cause` when present.
  - Keep the wrapper context (`err.message`).
  - If `err.cause` is an `Error`, print something like `Cause: ${cause.stack ?? cause.message}` (or recursively print nested causes).
  - If `err.cause` is non-Error, print `Cause: ${String(err.cause)}`.
- (Optional alternative) If you prefer not to change CLI printing behavior, include a `Cause: ...` line in the wrapper error’s `.message` in `runTrainer()` while still setting `{ cause }`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@drift-check

drift-check Bot commented Aug 12, 2026

Copy link
Copy Markdown

Code Review Bot

No comment/code divergences or documentation drift detected. Reviewed 2 file(s); skipped 0.

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.

Improve error context when training entry import fails

1 participant