Conversation
…schemas
The docs and every scaffolded template wrote `evalSteps: 25`, but the cloud
API validates that field as a step config (exactly one of `{ steps }` or
`{ ratio }`), so a fresh `create-arkor` project failed at job submission.
Auditing the rest of the SDK against `@orbit/shared`'s schemas turned up
several more divergences, fixed together here.
evalSteps. Templates and docs now send `{ steps: 25 }`. They also set
`datasetSplit: { enabled: true, testSize: 0.1 }`: the trainer only configures
an eval loop when a held-out split exists and `datasetSplit` defaults to
`{ enabled: false }` server-side, so the corrected `evalSteps` alone would
have been accepted and then produced no eval loss at all, leaving the
"eval loss out of the box" promise in the template comment untrue.
model_menu deployments. The server's deployment target union grew a third
variant; the SDK's decoder still had two. `decode()` calls `.parse()` with no
fallback over `z.array(deploymentSchema)`, so a single menu deployment in a
project rejected the whole `listDeployments` response, and Studio's Endpoints
tab returned an opaque 500. Menu deployments are created from the web
dashboard and the one-click app flow, so a project can own one without ever
touching Studio. Reads and writes are now separate types: `DeploymentTarget`
carries all three variants, and the new `WritableDeploymentTarget` excludes
`model_menu` for create/update, because the generated
`@arkor/cloud-api-client` request types do not carry the variant yet.
Fields the server already supported but the SDK dropped: the ten sampling
parameters on `InferArgs` (`stop`, `presencePenalty`, `frequencyPenalty`,
`seed`, `logprobs`, `topLogprobs`, `logitBias`, `streamOptions`,
`enableThinking`, `reasoningEffort`), `gpuTypes` on `TrainerInput`, the
`training.completed` metrics and `training.failed` step now surfaced on
`onCompleted` / `onFailed`, and `expiresAt` on `DeploymentDto`.
Docs also claimed an omitted HuggingFace `split` falls back to the dataset's
default split; the backend substitutes the literal "train", which fails for a
dataset that publishes no such split.
`dryRun` is deliberately untouched: it is documented and typed but does not
exist anywhere on the server, which needs a separate call on whether to land
the backend implementation or drop the field.
Fixes ENG-984
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
WalkthroughThis PR updates trainer callback payloads, inference controls, deployment target contracts, Studio QuickStart behavior, generated trainer templates, and English/Japanese documentation. ChangesTrainer and inference contracts
Deployment target and expiry support
Template and forwarded-field guidance
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant TrainingSSE
participant Trainer
participant TrainerCallbacks
TrainingSSE->>Trainer: completed metrics or failed step
Trainer->>TrainerCallbacks: normalized terminal callback context
sequenceDiagram
participant DeploymentResponse
participant DeploymentSchema
participant StudioEndpoints
participant QuickStart
DeploymentResponse->>DeploymentSchema: decode target and expiresAt
DeploymentSchema->>StudioEndpoints: provide typed deployment
StudioEndpoints->>QuickStart: pass targetKind
QuickStart->>QuickStart: generate target-specific model samples
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify 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. Comment |
Code Review BotNo comment/code divergences or documentation drift detected. Reviewed 32 file(s); skipped 0. |
Greptile SummaryThis PR aligns the SDK, scaffolds, documentation, and Studio deployment UI with the cloud API schemas.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/arkor/src/core/trainer.ts | Forwards GPU and inference fields and exposes normalized completion metrics and failure-step data to callbacks. |
| packages/arkor/src/core/schemas.ts | Extends deployment decoding for model-menu targets and expiration while retaining a narrower write schema. |
| packages/arkor/src/core/deployments.ts | Expands deployment response types and separates writable targets from the complete read-side union. |
| packages/arkor/src/core/types.ts | Adds the cloud-supported trainer, inference, and callback data contracts. |
| packages/cli-internal/src/templates.ts | Corrects generated evaluation-step shapes and enables held-out dataset splits in all starter templates. |
| packages/studio-app/src/pages/Endpoints.tsx | Handles model-menu deployment targets explicitly in the Endpoints interface. |
| packages/studio-app/src/pages/QuickStart.tsx | Generates model-menu-aware QuickStart request examples. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Config[Trainer configuration] --> Builder[SDK job-config builder]
Builder --> Cloud[Cloud API schemas]
Cloud --> Events[Training SSE events]
Events --> Callbacks[SDK callbacks]
Cloud --> Decoder[Deployment response decoder]
Decoder --> Studio[Studio Endpoints UI]
Templates[Scaffold templates] --> Config
Reviews (8): Last reviewed commit: "Merge branch 'main' into eng-984" | Re-trigger Greptile
The `local/no-em-dash` ESLint rule only covers source files; the CI job runs `scripts/check-no-em-dash.mts` over the whole tracked tree, which caught these two in the mdx docs.
There was a problem hiding this comment.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/arkorThe overall coverage in commit c3c7c94 in the TypeScript / code-coverage/create-arkorThe overall coverage in commit c3c7c94 in the TypeScript / code-coverage/cli-internalThe overall coverage in commit c3c7c94 in the TypeScript / code-coverage/studio-appThe overall coverage in commit c3c7c94 in the Show a code coverage summary of the most impacted files.
Updated |
Address cubic's review on PR #210. The deployment target union was shared between the response decoder and `createDeploymentRequestSchema`, so widening it for `model_menu` also widened what Studio's create route accepts. That route casts the parsed body to `createDeployment`'s parameter type, which silently defeats the `WritableDeploymentTarget` restriction the same change introduced. The three variants are now separate consts composed into a read union (all three) and a write union (adapter / base_model), so the runtime check and the type contract agree. cubic framed this as an invalid create reaching the bootstrap path, which is not quite right: the cloud API does accept `model_menu`, so such a create would succeed rather than 400. The split is worth making for the type-contract reason instead. Also from the same review: `TrainerInput.gpuTypes` becomes a non-empty tuple, since an empty list names no primary dispatch candidate and the cloud API requires `.min(1)`; and the metrics test's name no longer claims to cover the failing step, which the onFailed test above it already does. cubic's remaining point (modelling `topLogprobs` / `logprobs` as a union so a positive value requires `logprobs: true`) is not taken: the coupling is documented on the field and in the reference, and a union there would complicate a widely-used public type for one parameter pair.
…ments Follow-up to the review on PR #210. Revert `gpuTypes` to `string[]`. The non-empty tuple added a commit ago rejects every array whose length TypeScript cannot see, not just the empty one it was meant to guard: slugs are environment-specific, so they usually arrive as a plain `string[]` from config or `process.env.X.split(",")`. The only escape is `as [string, ...string[]]`, which asserts away the very non-emptiness the tuple existed to prove, and `JobConfig.gpuTypes` erases the guarantee one hop later anyway. Both docs pages claimed an empty list was a compile error while the same section's intro said these fields have no compile-time check at all; the intro now describes what is actually checked, and cites `buildJobConfig` by name instead of a line range that this PR itself made stale. `describeTarget` returned a plain string containing Markdown backticks, so the menu deployment's label rendered them literally in the endpoint list and header. QuickStart.tsx hit this exact bug before and documents the fix it settled on; `describeTarget` now returns a `ReactNode` and renders a real `<code>`. QuickStart's samples hardcoded `"model":"ignored"` and said in prose that `model` is ignored "because the deployment pins the target". That is false for a menu deployment, where `model` is the per-request selector, and the card is rendered on the detail page of every deployment kind. It now takes the target kind, uses a `MODEL_NAME` placeholder for menu deployments, and branches the prose. `docs/concepts/lifecycle.mdx` and its JA mirror documented `onCompleted` / `onFailed` without the `metrics` and `step` fields this PR added; only `docs/sdk/callbacks.mdx` was updated. The introduction and overview both link the concepts page first, so a reader arriving that way never learned the new fields exist. Finally, `datasetSplit` had no documented shape even though this PR turns it on in every scaffolded project. The reference now gives the full shape and defaults, and the cookbook states the trade-off the change makes silently: `testSize: 0.1` means the scaffold trains on 90% of the dataset.
The reference and cookbook both documented the ratio form as `0 < n <= 1`. That matched the cloud API's `.max(1)` at the time, but the bound itself was a bug: `resolve_step` passes the value straight to `SFTConfig`, and transformers reads these fields as a fraction of the run only below 1, so `ratio: 1` means "every optimizer step" rather than "once at the end". arkorlab/orbit#357 tightens the schema to `< 1`; these pages follow, and now say why the bound is exclusive instead of leaving it as a bare range. Also folds in the `warmupSteps` carve-out the cookbook was missing. It said the same shape applies to `warmupSteps`, while the reference said `warmupSteps` additionally accepts `ratio: 0` — two statements of one backend rule that disagreed inside the same PR. Found by the Codex review on arkorlab/orbit#357.
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
docs/sdk/deployments.mdx (1)
108-111: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win"model field is ignored" is now only true for non-
model_menudeployments.Both language versions of this doc were just extended (a few lines above) to explain that
model_menudeployments do use themodelfield to pick which catalog model answers the request. The pre-existing blanket statement right after the curl example still says the field is always ignored "since the deployment already pins the target," which directly contradicts the model_menu section a reader just read moments earlier.
docs/sdk/deployments.mdx#L108-L111: qualify the statement, e.g. "…ignored for adapter/base_model deployments, since those pin the target; amodel_menudeployment uses it to select which model answers the request."docs/ja/sdk/deployments.mdx#L104-L110: apply the equivalent qualification in Japanese to keep the two docs paired, e.g. 「adapter/base_model デプロイでは無視されます…;model_menuデプロイでは応答するモデルを選ぶために使われます。」🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/sdk/deployments.mdx` around lines 108 - 111, The deployment documentation must qualify the model-field behavior by deployment type. In docs/sdk/deployments.mdx lines 108-111, state that adapter/base_model deployments ignore model while model_menu deployments use it to select the responding catalog model; make the equivalent clarification in Japanese in docs/ja/sdk/deployments.mdx lines 104-110, preserving the paired documentation.packages/arkor/src/core/trainer.ts (1)
292-318: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
infer()still copiesInferArgsfields one-by-one into the request body.Each new
InferArgssampling field (stop, penalties,seed,logprobs, etc.) requires a matching manual line here, in the type definition, and in the tests. Nothing enforces that these three stay in sync going forward; the accompanying test comment attrainer.test.tsLines 843-846 already flags this exact risk: "infer()copies fields one by one rather than spreadingargs, so a field added toInferArgswithout a matching line in the builder is silently dropped between the user's call and the request body."A full
...argsspread isn't safe here sincesignalmust stay out ofbody(it's forwarded separately as the top-levelsignaloption), so a straight spread would leak it into the wire payload. Consider a compile-time exhaustiveness guard instead, e.g. a helper type that fails to compile if a key is added toInferArgs(other thanmessages/signal) without being threaded through the body builder, so this class of bug surfaces at typecheck time rather than needing a human to remember the three-way sync.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/arkor/src/core/trainer.ts` around lines 292 - 318, Update the infer request-body construction in the function returning client.chat so InferArgs sampling fields cannot be silently omitted. Avoid spreading signal into body; introduce a compile-time exhaustiveness guard covering InferArgs keys while excluding messages and signal, and keep the existing top-level signal forwarding unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/ja/sdk/create-trainer.mdx`:
- Around line 92-96: Update the gpuTypes row in the Japanese create-trainer
documentation to describe the SDK type as string[], remove the claim that empty
arrays fail at compile time, and state that invalid or empty values are rejected
when submitting the job. Align the unknown-slug wording with the English
documentation while preserving the existing priority and fallback behavior
description.
In `@packages/arkor/src/core/schemas.ts`:
- Around line 121-145: Replace the sequential z.union definitions in
deploymentTargetSchema and writableDeploymentTargetSchema with
z.discriminatedUnion using the "kind" discriminator and their existing variant
schemas. Preserve the read union’s adapter, base_model, and model_menu variants
and the write union’s narrower adapter and base_model variants.
---
Outside diff comments:
In `@docs/sdk/deployments.mdx`:
- Around line 108-111: The deployment documentation must qualify the model-field
behavior by deployment type. In docs/sdk/deployments.mdx lines 108-111, state
that adapter/base_model deployments ignore model while model_menu deployments
use it to select the responding catalog model; make the equivalent clarification
in Japanese in docs/ja/sdk/deployments.mdx lines 104-110, preserving the paired
documentation.
In `@packages/arkor/src/core/trainer.ts`:
- Around line 292-318: Update the infer request-body construction in the
function returning client.chat so InferArgs sampling fields cannot be silently
omitted. Avoid spreading signal into body; introduce a compile-time
exhaustiveness guard covering InferArgs keys while excluding messages and
signal, and keep the existing top-level signal forwarding unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 598f2666-e544-4c70-a410-4f0c1523f413
📒 Files selected for processing (32)
docs/concepts/lifecycle.mdxdocs/cookbook/customizing-templates.mdxdocs/ja/concepts/lifecycle.mdxdocs/ja/cookbook/customizing-templates.mdxdocs/ja/sdk/callbacks.mdxdocs/ja/sdk/create-trainer.mdxdocs/ja/sdk/dataset.mdxdocs/ja/sdk/deployments.mdxdocs/ja/sdk/infer.mdxdocs/ja/sdk/overview.mdxdocs/sdk/callbacks.mdxdocs/sdk/create-trainer.mdxdocs/sdk/dataset.mdxdocs/sdk/deployments.mdxdocs/sdk/infer.mdxdocs/sdk/overview.mdxpackages/arkor/src/core/client.deployments.test.tspackages/arkor/src/core/client.tspackages/arkor/src/core/deployments.tspackages/arkor/src/core/schemas.test.tspackages/arkor/src/core/schemas.tspackages/arkor/src/core/trainer.test.tspackages/arkor/src/core/trainer.tspackages/arkor/src/core/types.tspackages/arkor/src/index.tspackages/cli-internal/src/templates.test.tspackages/cli-internal/src/templates.tspackages/studio-app/src/lib/api.tspackages/studio-app/src/pages/Endpoints.helpers.test.tspackages/studio-app/src/pages/Endpoints.tsxpackages/studio-app/src/pages/QuickStart.test.tspackages/studio-app/src/pages/QuickStart.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (205)
- GitHub Check: install · bun · macos-latest · node 24.12.0
- GitHub Check: install · pnpm-9 · macos-latest · node 24.12.0
- GitHub Check: install · npm · macos-latest · node 24.12.0
- GitHub Check: install · yarn · windows-latest · node >=26.0.0 <27
- GitHub Check: install · yarn-berry · windows-latest · node 26.0.0
- GitHub Check: install · pnpm-9 · windows-latest · node >=24.12.0 <25
- GitHub Check: install · pnpm-11 · windows-latest · node >=26.0.0 <27
- GitHub Check: install · pnpm-10 · windows-latest · node >=26.0.0 <27
- GitHub Check: install · pnpm-9 · windows-latest · node 26.0.0
- GitHub Check: install · bun · windows-latest · node >=26.0.0 <27
- GitHub Check: install · yarn · windows-latest · node 26.0.0
- GitHub Check: install · yarn-berry · windows-latest · node >=26.0.0 <27
- GitHub Check: install · pnpm-11 · windows-latest · node >=24.12.0 <25
- GitHub Check: install · npm · windows-latest · node 26.0.0
- GitHub Check: install · npm · windows-latest · node >=26.0.0 <27
- GitHub Check: install · pnpm-9 · windows-latest · node >=26.0.0 <27
- GitHub Check: install · pnpm-11 · windows-latest · node 26.0.0
- GitHub Check: install · npm · windows-latest · node 24.12.0
- GitHub Check: install · pnpm-11 · macos-latest · node 22.22.0
- GitHub Check: install · yarn · windows-latest · node 24.0.0
- GitHub Check: install · pnpm-11 · windows-latest · node 24.12.0
- GitHub Check: install · bun · windows-latest · node 26.0.0
- GitHub Check: install · bun · windows-latest · node 24.0.0
- GitHub Check: install · npm · windows-latest · node >=24.12.0 <25
- GitHub Check: install · pnpm-10 · windows-latest · node >=24.12.0 <25
- GitHub Check: install · pnpm-10 · windows-latest · node 26.0.0
- GitHub Check: install · yarn · windows-latest · node >=24.12.0 <25
- GitHub Check: install · bun · windows-latest · node >=24.12.0 <25
- GitHub Check: install · pnpm-10 · windows-latest · node 24.0.0
- GitHub Check: install · yarn-berry · windows-latest · node >=24.12.0 <25
- GitHub Check: install · bun · windows-latest · node 24.12.0
- GitHub Check: install · pnpm-10 · windows-latest · node 24.12.0
- GitHub Check: install · pnpm-9 · windows-latest · node 24.12.0
- GitHub Check: install · yarn-berry · windows-latest · node 24.0.0
- GitHub Check: install · yarn · windows-latest · node 24.12.0
- GitHub Check: install · npm · windows-latest · node 24.0.0
- GitHub Check: install · yarn-berry · windows-latest · node 24.12.0
- GitHub Check: install · pnpm-11 · windows-latest · node 24.0.0
- GitHub Check: install · pnpm-9 · windows-latest · node 24.0.0
- GitHub Check: install · bun · windows-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-11 · windows-latest · node >=22.22.0 <23
- GitHub Check: install · npm · windows-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-11 · windows-latest · node 22.22.0
- GitHub Check: install · bun · windows-latest · node 22.22.0
- GitHub Check: install · yarn-berry · windows-latest · node >=22.22.0 <23
- GitHub Check: install · yarn · windows-latest · node 22.22.0
- GitHub Check: install · yarn · ubuntu-latest · node >=26.0.0 <27
- GitHub Check: install · npm · windows-latest · node 22.22.0
- GitHub Check: install · pnpm-10 · windows-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-9 · windows-latest · node >=22.22.0 <23
- GitHub Check: install · yarn · windows-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-10 · windows-latest · node 22.22.0
- GitHub Check: install · pnpm-9 · windows-latest · node 22.22.0
- GitHub Check: install · yarn · ubuntu-latest · node 26.0.0
- GitHub Check: install · yarn-berry · windows-latest · node 22.22.0
- GitHub Check: install · npm · ubuntu-latest · node >=26.0.0 <27
- GitHub Check: install · yarn-berry · ubuntu-latest · node 22.22.0
- GitHub Check: install · bun · ubuntu-latest · node >=22.22.0 <23
- GitHub Check: install · yarn · ubuntu-latest · node 22.22.0
- GitHub Check: install · yarn · windows-latest · node >=26.0.0 <27
- GitHub Check: install · yarn · macos-latest · node 24.0.0
- GitHub Check: install · pnpm-10 · macos-latest · node 24.12.0
- GitHub Check: install · yarn-berry · windows-latest · node 24.0.0
- GitHub Check: install · pnpm-9 · macos-latest · node 24.0.0
- GitHub Check: install · npm · macos-latest · node 24.12.0
- GitHub Check: install · pnpm-9 · macos-latest · node >=24.12.0 <25
- GitHub Check: install · pnpm-10 · macos-latest · node >=24.12.0 <25
- GitHub Check: install · bun · windows-latest · node 26.0.0
- GitHub Check: install · pnpm-11 · windows-latest · node >=26.0.0 <27
- GitHub Check: install · yarn-berry · macos-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-9 · macos-latest · node 24.12.0
- GitHub Check: install · npm · macos-latest · node 24.0.0
- GitHub Check: install · yarn · macos-latest · node 24.12.0
- GitHub Check: install · yarn-berry · macos-latest · node 24.12.0
- GitHub Check: install · bun · macos-latest · node 24.12.0
- GitHub Check: install · pnpm-10 · windows-latest · node 26.0.0
- GitHub Check: install · bun · macos-latest · node 22.22.0
- GitHub Check: install · npm · macos-latest · node 22.22.0
- GitHub Check: install · yarn-berry · windows-latest · node >=26.0.0 <27
- GitHub Check: install · yarn-berry · windows-latest · node 26.0.0
- GitHub Check: install · yarn-berry · macos-latest · node 22.22.0
- GitHub Check: install · bun · macos-latest · node 24.0.0
- GitHub Check: install · pnpm-9 · macos-latest · node 22.22.0
- GitHub Check: install · pnpm-11 · macos-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-9 · windows-latest · node >=24.12.0 <25
- GitHub Check: install · npm · windows-latest · node >=24.12.0 <25
- GitHub Check: install · pnpm-11 · windows-latest · node 26.0.0
- GitHub Check: install · npm · windows-latest · node 24.12.0
- GitHub Check: install · pnpm-9 · windows-latest · node >=26.0.0 <27
- GitHub Check: install · pnpm-9 · windows-latest · node 26.0.0
- GitHub Check: install · yarn · windows-latest · node 24.12.0
- GitHub Check: install · npm · windows-latest · node >=26.0.0 <27
- GitHub Check: install · yarn · macos-latest · node >=22.22.0 <23
- GitHub Check: install · yarn · windows-latest · node 24.0.0
- GitHub Check: install · bun · windows-latest · node >=26.0.0 <27
- GitHub Check: install · pnpm-10 · windows-latest · node >=26.0.0 <27
- GitHub Check: install · pnpm-11 · macos-latest · node 22.22.0
- GitHub Check: install · pnpm-11 · windows-latest · node >=24.12.0 <25
- GitHub Check: install · yarn · windows-latest · node >=24.12.0 <25
- GitHub Check: install · pnpm-11 · windows-latest · node 24.12.0
- GitHub Check: install · npm · windows-latest · node 26.0.0
- GitHub Check: install · yarn · windows-latest · node 26.0.0
- GitHub Check: install · pnpm-10 · windows-latest · node >=24.12.0 <25
- GitHub Check: install · yarn-berry · windows-latest · node >=24.12.0 <25
- GitHub Check: install · bun · windows-latest · node 24.12.0
- GitHub Check: install · bun · windows-latest · node 24.0.0
- GitHub Check: install · yarn-berry · windows-latest · node 24.12.0
- GitHub Check: install · bun · windows-latest · node >=24.12.0 <25
- GitHub Check: install · pnpm-9 · windows-latest · node 24.12.0
- GitHub Check: install · pnpm-10 · windows-latest · node 24.12.0
- GitHub Check: install · npm · windows-latest · node 24.0.0
- GitHub Check: install · pnpm-10 · windows-latest · node 24.0.0
- GitHub Check: install · pnpm-11 · windows-latest · node 24.0.0
- GitHub Check: cubic · AI code reviewer
- GitHub Check: install · yarn-berry · windows-latest · node 22.22.0
- GitHub Check: install · pnpm-10 · windows-latest · node 22.22.0
- GitHub Check: install · pnpm-9 · windows-latest · node 24.0.0
- GitHub Check: install · yarn · windows-latest · node 22.22.0
- GitHub Check: install · npm · windows-latest · node 22.22.0
- GitHub Check: install · yarn-berry · windows-latest · node >=22.22.0 <23
- GitHub Check: install · bun · windows-latest · node >=22.22.0 <23
- GitHub Check: install · yarn · windows-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-10 · windows-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-11 · windows-latest · node 22.22.0
- GitHub Check: install · pnpm-9 · windows-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-11 · windows-latest · node >=22.22.0 <23
- GitHub Check: install · bun · windows-latest · node 22.22.0
- GitHub Check: install · npm · windows-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-9 · windows-latest · node 22.22.0
- GitHub Check: install · yarn · ubuntu-latest · node 24.0.0
- GitHub Check: Seer Code Review
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.12.0 <25
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=22.22.0 <23
- GitHub Check: typecheck · lint · test · build · macos-latest · node 24.12.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.8.0 <24.10.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=26.0.0 <27
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=26.0.0 <27
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.10.0 <24.12.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.0.0 <24.1.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.5.0 <24.8.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.1.0 <24.3.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node 24.12.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.1.0 <24.3.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node 22.22.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node 24.12.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.3.0 <24.5.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.8.0 <24.10.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node 26.0.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.1.0 <24.3.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.12.0 <25
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.5.0 <24.8.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.12.0 <25
- GitHub Check: typecheck · lint · test · build · windows-latest · node 26.0.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node 22.22.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.8.0 <24.10.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=22.22.0 <23
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.5.0 <24.8.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=26.0.0 <27
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.10.0 <24.12.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.3.0 <24.5.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.10.0 <24.12.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.0.0 <24.1.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node 26.0.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.3.0 <24.5.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=22.22.0 <23
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.0.0 <24.1.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node 22.22.0
- GitHub Check: coverage · upload to Codecov
- GitHub Check: typecheck · lint · test · build · macos-latest · node 26.0.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.5.0 <24.8.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.1.0 <24.3.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.3.0 <24.5.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.0.0 <24.1.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node 24.12.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=26.0.0 <27
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.10.0 <24.12.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.8.0 <24.10.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=22.22.0 <23
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=26.0.0 <27
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.10.0 <24.12.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.8.0 <24.10.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node 26.0.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.1.0 <24.3.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node 22.22.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.3.0 <24.5.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.3.0 <24.5.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.0.0 <24.1.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.12.0 <25
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=22.22.0 <23
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.8.0 <24.10.0
- GitHub Check: coverage · upload to Codecov
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.12.0 <25
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=22.22.0 <23
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.0.0 <24.1.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node 22.22.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.5.0 <24.8.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.12.0 <25
- GitHub Check: typecheck · lint · test · build · windows-latest · node 24.12.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node 24.12.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.10.0 <24.12.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=26.0.0 <27
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.5.0 <24.8.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node 22.22.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node 26.0.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.1.0 <24.3.0
⚠️ CI failures not shown inline (2)
GitHub Actions: Running Copilot Code Review / copilot-pull-request-reviewer: Running Copilot Code Review
Conclusion: failure
##[group]Run set -euo pipefail
�[36;1mset -euo pipefail�[0m
�[36;1mecho "RUNNER_TEMP=$RUNNER_TEMP"�[0m
�[36;1mfind "$RUNNER_TEMP" -maxdepth 1 -type f -name 'git-credentials-*.config' -print -delete�[0m
�[36;1m�[0m
�[36;1m# Generate a unique token and stop processing workflow commands to prevent the runtime from injecting commands�[0m
�[36;1mSTOP_***REDACTED*** /proc/sys/kernel/random/uuid)�[0m
�[36;1m�[0m
�[36;1m# Use a trap to ensure we always resume command processing and check for�[0m
�[36;1m# fallback error annotations, even if the runtime exits with a non-zero code�[0m
�[36;1m# (which would otherwise cause set -e to abort the shell before we get here).�[0m
�[36;1m# The trap preserves the original exit code.�[0m
�[36;1mcopilot_cleanup() {�[0m
�[36;1m echo "::$STOP_***REDACTED***
�[36;1m FALLBACK_FILE="${RUNNER_TEMP}/copilot-fallback-error.txt"�[0m
�[36;1m if [ -f "$FALLBACK_FILE" ]; then�[0m
�[36;1m FALLBACK_MSG=$(head -c 500 "$FALLBACK_FILE" | tr -d '\n\r')�[0m
�[36;1m echo "::error title=Copilot Error::${FALLBACK_MSG}"�[0m
GitHub Actions: Running Copilot Code Review / 0_copilot-pull-request-reviewer.txt: Running Copilot Code Review
Conclusion: failure
##[group]Run set -euo pipefail
�[36;1mset -euo pipefail�[0m
�[36;1mecho "RUNNER_TEMP=$RUNNER_TEMP"�[0m
�[36;1mfind "$RUNNER_TEMP" -maxdepth 1 -type f -name 'git-credentials-*.config' -print -delete�[0m
�[36;1m�[0m
�[36;1m# Generate a unique token and stop processing workflow commands to prevent the runtime from injecting commands�[0m
�[36;1mSTOP_***REDACTED*** /proc/sys/kernel/random/uuid)�[0m
�[36;1m�[0m
�[36;1m# Use a trap to ensure we always resume command processing and check for�[0m
�[36;1m# fallback error annotations, even if the runtime exits with a non-zero code�[0m
�[36;1m# (which would otherwise cause set -e to abort the shell before we get here).�[0m
�[36;1m# The trap preserves the original exit code.�[0m
�[36;1mcopilot_cleanup() {�[0m
�[36;1m echo "::$STOP_***REDACTED***
�[36;1m FALLBACK_FILE="${RUNNER_TEMP}/copilot-fallback-error.txt"�[0m
�[36;1m if [ -f "$FALLBACK_FILE" ]; then�[0m
�[36;1m FALLBACK_MSG=$(head -c 500 "$FALLBACK_FILE" | tr -d '\n\r')�[0m
�[36;1m echo "::error title=Copilot Error::${FALLBACK_MSG}"�[0m
🧰 Additional context used
📓 Path-based instructions (8)
docs/**/*.mdx
📄 CodeRabbit inference engine (AGENTS.md)
Keep English and Japanese documentation paired: changes under
docs/must also update the corresponding files underdocs/ja/. Verify Mintlify-generated anchors before adding cross-page links; preserve/,=, and full-width parentheses while accounting for stripped ASCII punctuation and backticks.
Files:
docs/ja/sdk/dataset.mdxdocs/sdk/dataset.mdxdocs/ja/sdk/create-trainer.mdxdocs/sdk/create-trainer.mdxdocs/sdk/overview.mdxdocs/sdk/deployments.mdxdocs/concepts/lifecycle.mdxdocs/ja/concepts/lifecycle.mdxdocs/sdk/infer.mdxdocs/cookbook/customizing-templates.mdxdocs/ja/sdk/callbacks.mdxdocs/ja/sdk/deployments.mdxdocs/ja/cookbook/customizing-templates.mdxdocs/ja/sdk/overview.mdxdocs/ja/sdk/infer.mdxdocs/sdk/callbacks.mdx
**/{*.md,*.mdx,*.yaml,*.yml}
📄 CodeRabbit inference engine (AGENTS.md)
Do not format Markdown, MDX, YAML, or YML files with oxfmt; these are excluded because documentation anchors and deliberate YAML layout must remain hand-managed.
Files:
docs/ja/sdk/dataset.mdxdocs/sdk/dataset.mdxdocs/ja/sdk/create-trainer.mdxdocs/sdk/create-trainer.mdxdocs/sdk/overview.mdxdocs/sdk/deployments.mdxdocs/concepts/lifecycle.mdxdocs/ja/concepts/lifecycle.mdxdocs/sdk/infer.mdxdocs/cookbook/customizing-templates.mdxdocs/ja/sdk/callbacks.mdxdocs/ja/sdk/deployments.mdxdocs/ja/cookbook/customizing-templates.mdxdocs/ja/sdk/overview.mdxdocs/ja/sdk/infer.mdxdocs/sdk/callbacks.mdx
packages/**/*.{js,jsx,ts,tsx,mjs,cjs}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Avoid using the em dash character (U+2014) in comments, string literals, and template literals in any package file; this includes CLI runtime messages, generated-file template bodies, and test names.
Files:
packages/studio-app/src/pages/Endpoints.helpers.test.tspackages/arkor/src/index.tspackages/arkor/src/core/client.deployments.test.tspackages/arkor/src/core/schemas.test.tspackages/cli-internal/src/templates.test.tspackages/studio-app/src/lib/api.tspackages/studio-app/src/pages/Endpoints.tsxpackages/cli-internal/src/templates.tspackages/arkor/src/core/client.tspackages/arkor/src/core/trainer.test.tspackages/arkor/src/core/schemas.tspackages/studio-app/src/pages/QuickStart.tsxpackages/arkor/src/core/types.tspackages/studio-app/src/pages/QuickStart.test.tspackages/arkor/src/core/deployments.tspackages/arkor/src/core/trainer.ts
**/*.{js,jsx,ts,tsx,mjs,cjs}
📄 CodeRabbit inference engine (CONTRIBUTING.ja.md)
Do not use em dashes (U+2014) in comments, string literals, or template literals anywhere in the codebase; use colons, periods, commas, parentheses, spaced hyphens (
" - "), or rephrasing instead.
Files:
packages/studio-app/src/pages/Endpoints.helpers.test.tspackages/arkor/src/index.tspackages/arkor/src/core/client.deployments.test.tspackages/arkor/src/core/schemas.test.tspackages/cli-internal/src/templates.test.tspackages/studio-app/src/lib/api.tspackages/studio-app/src/pages/Endpoints.tsxpackages/cli-internal/src/templates.tspackages/arkor/src/core/client.tspackages/arkor/src/core/trainer.test.tspackages/arkor/src/core/schemas.tspackages/studio-app/src/pages/QuickStart.tsxpackages/arkor/src/core/types.tspackages/studio-app/src/pages/QuickStart.test.tspackages/arkor/src/core/deployments.tspackages/arkor/src/core/trainer.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/cliscenario for CLI flow changes.
Files:
packages/studio-app/src/pages/Endpoints.helpers.test.tspackages/arkor/src/core/client.deployments.test.tspackages/arkor/src/core/schemas.test.tspackages/cli-internal/src/templates.test.tspackages/arkor/src/core/trainer.test.tspackages/studio-app/src/pages/QuickStart.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/studio-app/src/pages/Endpoints.helpers.test.tspackages/arkor/src/index.tspackages/arkor/src/core/client.deployments.test.tspackages/arkor/src/core/schemas.test.tspackages/cli-internal/src/templates.test.tspackages/studio-app/src/lib/api.tspackages/studio-app/src/pages/Endpoints.tsxpackages/cli-internal/src/templates.tspackages/arkor/src/core/client.tspackages/arkor/src/core/trainer.test.tspackages/arkor/src/core/schemas.tspackages/studio-app/src/pages/QuickStart.tsxpackages/arkor/src/core/types.tspackages/studio-app/src/pages/QuickStart.test.tspackages/arkor/src/core/deployments.tspackages/arkor/src/core/trainer.ts
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Run both linters through the root configurations:
oxlint --deny-warnings .followed byeslint .; add configuration overrides at the root rather than per-package configs.
Files:
packages/studio-app/src/pages/Endpoints.helpers.test.tspackages/arkor/src/index.tspackages/arkor/src/core/client.deployments.test.tspackages/arkor/src/core/schemas.test.tspackages/cli-internal/src/templates.test.tspackages/studio-app/src/lib/api.tspackages/studio-app/src/pages/Endpoints.tsxpackages/cli-internal/src/templates.tspackages/arkor/src/core/client.tspackages/arkor/src/core/trainer.test.tspackages/arkor/src/core/schemas.tspackages/studio-app/src/pages/QuickStart.tsxpackages/arkor/src/core/types.tspackages/studio-app/src/pages/QuickStart.test.tspackages/arkor/src/core/deployments.tspackages/arkor/src/core/trainer.ts
packages/arkor/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Preserve Studio CSRF protections: send the token in
X-Arkor-Studio-Tokenforfetch, usestudioTokenforEventSource, enforce the localhost host-header allow-list, do not configure CORS, and compare tokens withtimingSafeEqual.
Files:
packages/arkor/src/index.tspackages/arkor/src/core/client.deployments.test.tspackages/arkor/src/core/schemas.test.tspackages/arkor/src/core/client.tspackages/arkor/src/core/trainer.test.tspackages/arkor/src/core/schemas.tspackages/arkor/src/core/types.tspackages/arkor/src/core/deployments.tspackages/arkor/src/core/trainer.ts
🪛 LanguageTool
docs/sdk/create-trainer.mdx
[style] ~90-~90: The word ‘caveats’ is a legal term. To make your text as clear as possible to all readers, do not use this foreign term unless it is used with its legal meaning. Possible alternatives are “cautions” or “warnings”.
Context: ...hecked, not the slugs inside it, so the caveats below apply to it just the same. | Fie...
(CAVEAT)
[style] ~110-~110: This sentence is over 40 words long. Consider splitting it up, as shorter sentences make the text easier to read.
Context: ...sfully and then produces no eval loss. These fields are explicitly not stable: the backend contract for them can change between releases, and there is no compile-time check on the value you pass, so a wrong shape surfaces as a validation error from the cloud API when the job is submitted rather than as a type error. Prefer the typed fields above; reach fo...
(TOO_LONG_SENTENCE)
🔇 Additional comments (44)
packages/cli-internal/src/templates.ts (1)
27-39: LGTM!Also applies to: 89-90, 110-111, 149-150
packages/cli-internal/src/templates.test.ts (1)
31-38: LGTM!Also applies to: 40-47
docs/cookbook/customizing-templates.mdx (1)
22-23: LGTM!Also applies to: 41-46, 58-58, 107-107
docs/ja/cookbook/customizing-templates.mdx (1)
22-23: LGTM!Also applies to: 41-46, 58-58, 107-107
docs/sdk/create-trainer.mdx (1)
90-111: LGTM!docs/ja/sdk/create-trainer.mdx (1)
98-109: LGTM!docs/sdk/dataset.mdx (1)
35-35: LGTM!docs/ja/sdk/dataset.mdx (1)
35-35: LGTM!packages/arkor/src/core/deployments.ts (1)
14-17: LGTM!Also applies to: 26-48, 92-98, 141-147
packages/arkor/src/core/schemas.ts (2)
105-120: LGTM!Also applies to: 249-253
160-170: 🗄️ Data Integrity & IntegrationNo change needed.
updateDeploymentRequestSchemais not defined, andupdateDeployment()sends the caller-provided partial body via$patchwithout server-sideschema.safeParse()validation.packages/arkor/src/core/schemas.test.ts (1)
115-244: LGTM! Thorough coverage of the read/write target-kind split and theexpiresAtnormalization behavior. As per path instructions,packages/*/src/**/*.test.tsshould add Vitest tests alongside schema changes, which this satisfies.packages/studio-app/src/lib/api.ts (1)
343-347: LGTM!packages/studio-app/src/pages/Endpoints.tsx (1)
7-7: LGTM!Also applies to: 48-71, 1066-1070
packages/studio-app/src/pages/QuickStart.tsx (1)
14-14: LGTM!Also applies to: 34-75, 109-189, 196-215, 305-308
packages/studio-app/src/pages/QuickStart.test.ts (1)
24-268: LGTM!docs/ja/sdk/deployments.mdx (2)
72-82: LGTM!
193-195: LGTM!docs/sdk/deployments.mdx (2)
73-83: LGTM!
195-197: LGTM!packages/studio-app/src/pages/Endpoints.helpers.test.ts (1)
21-36: LGTM!packages/arkor/src/core/types.ts (4)
54-54: LGTM!
223-279: LGTM!
322-350: LGTM!
401-419: LGTM!packages/arkor/src/core/client.ts (2)
40-40: LGTM!
373-386: LGTM!packages/arkor/src/index.ts (3)
16-16: LGTM!
26-26: LGTM!
54-54: LGTM!packages/arkor/src/core/client.deployments.test.ts (1)
78-78: LGTM!docs/concepts/lifecycle.mdx (2)
95-110: LGTM!
111-117: LGTM!docs/ja/concepts/lifecycle.mdx (2)
95-109: LGTM!
111-117: LGTM!docs/sdk/callbacks.mdx (2)
17-24: LGTM!
91-110: LGTM!packages/arkor/src/core/trainer.ts (1)
79-89: LGTM!Also applies to: 144-144, 336-344, 354-358
packages/arkor/src/core/trainer.test.ts (1)
159-159: LGTM!Also applies to: 197-197, 469-478, 494-640, 798-807, 843-856
docs/ja/sdk/callbacks.mdx (1)
17-26: LGTM!Also applies to: 91-112
docs/sdk/infer.mdx (1)
37-51: LGTM!Also applies to: 67-80
docs/ja/sdk/infer.mdx (1)
37-51: LGTM!Also applies to: 67-80
docs/sdk/overview.mdx (1)
64-68: LGTM!docs/ja/sdk/overview.mdx (1)
64-68: LGTM!
… unions Address the CodeRabbit review on PR #210. The `gpuTypes` revert two commits ago only touched the English page, so the Japanese one kept advertising `[string, ...string[]]` and a compile error on an empty array: a type that no longer exists and a guarantee the SDK never makes. A reader of the JA page would work around a compiler error that cannot happen. Its section intro was stale for the same reason, still claiming every forwarded field is `unknown` and still citing the `trainer.ts:100-108` range this PR itself invalidated, both of which the English side already had fixed. The two deployment target unions now discriminate on `kind`, which is how the cloud API's own `deploymentTargetSchema` is built. The performance argument is immaterial at two or three branches; what matters is the rejection path. An unknown kind now fails on the discriminator with a path of `target.kind`, instead of an aggregate of every branch's mismatch, and that aggregate is what `studio/server.ts` stringifies into the 400 the user reads. `adapterRefSchema` is left as a plain union: it has the same shape, but it was not part of the review and widening the diff for it buys nothing here. Verified the rejection output rather than assuming it: both schemas now report `note: "No matching discriminator"` with `discriminator: "kind"`.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/ja/sdk/create-trainer.mdx (1)
98-105: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winKeep the forwarding example copy-paste valid.
Replacing the required
name,model, anddatasetfields with// ...makes thiscreateTrainercall fail TypeScript validation when copied. Retain the required fields from the earlier example.Proposed documentation correction
createTrainer({ - // ... + name: "support-bot-v1", + model: "unsloth/gemma-4-E4B-it", + dataset: { type: "huggingface", name: "arkorlab/triage-demo" }, evalSteps: { steps: 25 }, saveSteps: { ratio: 0.25 }, datasetSplit: { enabled: true, testSize: 0.1 }, });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/ja/sdk/create-trainer.mdx` around lines 98 - 105, Update the createTrainer example to retain the required name, model, and dataset fields from the earlier example alongside evalSteps, saveSteps, and datasetSplit, so the snippet remains valid when copied and compiled.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/ja/sdk/create-trainer.mdx`:
- Line 92: Update the step configuration example in the
warmupSteps/loggingSteps/saveSteps/evalSteps documentation to use an unambiguous
ratio placeholder, such as `{ ratio: number }`, and state the constraint `0 <
ratio < 1` separately in prose while preserving the existing warmupSteps
exception.
---
Outside diff comments:
In `@docs/ja/sdk/create-trainer.mdx`:
- Around line 98-105: Update the createTrainer example to retain the required
name, model, and dataset fields from the earlier example alongside evalSteps,
saveSteps, and datasetSplit, so the snippet remains valid when copied and
compiled.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 7488c43d-1114-4158-aed8-696f2d2de130
📒 Files selected for processing (2)
docs/ja/sdk/create-trainer.mdxpackages/arkor/src/core/schemas.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (205)
- GitHub Check: install · bun · macos-latest · node 24.12.0
- GitHub Check: install · bun · windows-latest · node 26.0.0
- GitHub Check: install · yarn-berry · macos-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-9 · macos-latest · node 24.12.0
- GitHub Check: install · yarn-berry · macos-latest · node 24.0.0
- GitHub Check: install · pnpm-11 · macos-latest · node 24.0.0
- GitHub Check: install · yarn · windows-latest · node 24.12.0
- GitHub Check: install · bun · windows-latest · node >=26.0.0 <27
- GitHub Check: install · pnpm-11 · windows-latest · node >=26.0.0 <27
- GitHub Check: install · npm · windows-latest · node >=26.0.0 <27
- GitHub Check: install · pnpm-11 · windows-latest · node 26.0.0
- GitHub Check: install · yarn-berry · windows-latest · node >=26.0.0 <27
- GitHub Check: install · npm · windows-latest · node 26.0.0
- GitHub Check: install · pnpm-10 · windows-latest · node >=26.0.0 <27
- GitHub Check: install · pnpm-11 · windows-latest · node 24.0.0
- GitHub Check: install · pnpm-11 · windows-latest · node >=24.12.0 <25
- GitHub Check: install · yarn · windows-latest · node >=26.0.0 <27
- GitHub Check: install · yarn-berry · windows-latest · node 26.0.0
- GitHub Check: install · pnpm-9 · windows-latest · node >=26.0.0 <27
- GitHub Check: install · yarn · windows-latest · node 26.0.0
- GitHub Check: install · npm · windows-latest · node >=24.12.0 <25
- GitHub Check: install · bun · windows-latest · node >=24.12.0 <25
- GitHub Check: install · pnpm-10 · windows-latest · node 26.0.0
- GitHub Check: install · pnpm-9 · windows-latest · node 26.0.0
- GitHub Check: install · bun · windows-latest · node 24.12.0
- GitHub Check: install · npm · windows-latest · node 24.12.0
- GitHub Check: install · yarn-berry · windows-latest · node 24.12.0
- GitHub Check: install · yarn-berry · windows-latest · node >=24.12.0 <25
- GitHub Check: install · pnpm-10 · windows-latest · node 24.12.0
- GitHub Check: install · yarn · windows-latest · node >=24.12.0 <25
- GitHub Check: install · npm · windows-latest · node 24.0.0
- GitHub Check: install · pnpm-10 · windows-latest · node >=24.12.0 <25
- GitHub Check: install · pnpm-11 · windows-latest · node 24.12.0
- GitHub Check: install · pnpm-9 · windows-latest · node >=24.12.0 <25
- GitHub Check: install · yarn-berry · windows-latest · node 24.0.0
- GitHub Check: install · bun · windows-latest · node 24.0.0
- GitHub Check: install · pnpm-10 · windows-latest · node 24.0.0
- GitHub Check: install · pnpm-9 · windows-latest · node 24.12.0
- GitHub Check: install · yarn · windows-latest · node 24.0.0
- GitHub Check: install · pnpm-9 · windows-latest · node 24.0.0
- GitHub Check: install · yarn-berry · windows-latest · node >=22.22.0 <23
- GitHub Check: install · yarn · windows-latest · node 22.22.0
- GitHub Check: install · bun · windows-latest · node 22.22.0
- GitHub Check: install · pnpm-11 · windows-latest · node >=22.22.0 <23
- GitHub Check: install · yarn · windows-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-9 · windows-latest · node >=22.22.0 <23
- GitHub Check: install · npm · windows-latest · node >=22.22.0 <23
- GitHub Check: install · yarn-berry · windows-latest · node 22.22.0
- GitHub Check: install · npm · windows-latest · node 22.22.0
- GitHub Check: install · bun · windows-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-10 · windows-latest · node >=22.22.0 <23
- GitHub Check: install · yarn · ubuntu-latest · node >=26.0.0 <27
- GitHub Check: install · pnpm-11 · windows-latest · node 22.22.0
- GitHub Check: install · pnpm-9 · windows-latest · node 22.22.0
- GitHub Check: install · pnpm-10 · windows-latest · node 22.22.0
- GitHub Check: install · yarn · ubuntu-latest · node 26.0.0
- GitHub Check: install · yarn · ubuntu-latest · node 22.22.0
- GitHub Check: install · yarn · ubuntu-latest · node 24.0.0
- GitHub Check: install · yarn · ubuntu-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-11 · ubuntu-latest · node 22.22.0
- GitHub Check: cubic · AI code reviewer
- GitHub Check: install · pnpm-10 · macos-latest · node 26.0.0
- GitHub Check: install · yarn-berry · macos-latest · node >=24.12.0 <25
- GitHub Check: install · yarn-berry · macos-latest · node 24.12.0
- GitHub Check: install · bun · macos-latest · node 24.12.0
- GitHub Check: install · bun · macos-latest · node 24.0.0
- GitHub Check: install · pnpm-10 · macos-latest · node 24.12.0
- GitHub Check: install · yarn · macos-latest · node 24.0.0
- GitHub Check: install · pnpm-9 · macos-latest · node 24.12.0
- GitHub Check: install · bun · macos-latest · node >=22.22.0 <23
- GitHub Check: install · yarn-berry · macos-latest · node >=22.22.0 <23
- GitHub Check: install · yarn · macos-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-10 · macos-latest · node 22.22.0
- GitHub Check: install · bun · macos-latest · node 22.22.0
- GitHub Check: install · pnpm-9 · macos-latest · node 22.22.0
- GitHub Check: install · bun · windows-latest · node >=26.0.0 <27
- GitHub Check: install · yarn · windows-latest · node >=26.0.0 <27
- GitHub Check: install · pnpm-9 · macos-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-11 · macos-latest · node 24.0.0
- GitHub Check: install · pnpm-11 · macos-latest · node >=22.22.0 <23
- GitHub Check: install · npm · macos-latest · node 24.0.0
- GitHub Check: install · pnpm-10 · windows-latest · node >=26.0.0 <27
- GitHub Check: install · yarn-berry · macos-latest · node 22.22.0
- GitHub Check: install · npm · macos-latest · node 22.22.0
- GitHub Check: install · pnpm-11 · windows-latest · node >=26.0.0 <27
- GitHub Check: install · yarn-berry · windows-latest · node >=26.0.0 <27
- GitHub Check: install · pnpm-9 · windows-latest · node >=26.0.0 <27
- GitHub Check: install · yarn-berry · windows-latest · node 26.0.0
- GitHub Check: install · npm · windows-latest · node >=26.0.0 <27
- GitHub Check: install · pnpm-11 · windows-latest · node 26.0.0
- GitHub Check: install · bun · windows-latest · node 24.12.0
- GitHub Check: install · yarn · windows-latest · node 26.0.0
- GitHub Check: install · bun · windows-latest · node 26.0.0
- GitHub Check: install · yarn-berry · windows-latest · node >=24.12.0 <25
- GitHub Check: install · pnpm-9 · windows-latest · node 26.0.0
- GitHub Check: install · pnpm-11 · windows-latest · node >=24.12.0 <25
- GitHub Check: install · pnpm-10 · windows-latest · node 26.0.0
- GitHub Check: install · bun · windows-latest · node >=24.12.0 <25
- GitHub Check: install · npm · windows-latest · node 26.0.0
- GitHub Check: install · pnpm-10 · windows-latest · node 24.12.0
- GitHub Check: install · npm · windows-latest · node >=24.12.0 <25
- GitHub Check: install · npm · windows-latest · node 24.0.0
- GitHub Check: install · yarn · windows-latest · node >=24.12.0 <25
- GitHub Check: install · pnpm-10 · windows-latest · node >=24.12.0 <25
- GitHub Check: install · yarn · windows-latest · node 24.12.0
- GitHub Check: install · yarn-berry · windows-latest · node 24.0.0
- GitHub Check: install · yarn-berry · windows-latest · node 24.12.0
- GitHub Check: install · pnpm-9 · windows-latest · node 24.12.0
- GitHub Check: install · pnpm-9 · windows-latest · node >=24.12.0 <25
- GitHub Check: install · bun · windows-latest · node 24.0.0
- GitHub Check: install · pnpm-11 · windows-latest · node 24.12.0
- GitHub Check: install · pnpm-10 · windows-latest · node 24.0.0
- GitHub Check: install · pnpm-11 · windows-latest · node 24.0.0
- GitHub Check: install · npm · windows-latest · node 24.12.0
- GitHub Check: install · yarn · windows-latest · node 24.0.0
- GitHub Check: install · yarn-berry · windows-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-9 · windows-latest · node >=22.22.0 <23
- GitHub Check: install · bun · windows-latest · node 22.22.0
- GitHub Check: install · yarn-berry · windows-latest · node 22.22.0
- GitHub Check: install · pnpm-11 · windows-latest · node >=22.22.0 <23
- GitHub Check: install · npm · windows-latest · node >=22.22.0 <23
- GitHub Check: install · yarn · windows-latest · node 22.22.0
- GitHub Check: install · pnpm-9 · windows-latest · node 22.22.0
- GitHub Check: install · pnpm-10 · windows-latest · node 22.22.0
- GitHub Check: install · pnpm-9 · windows-latest · node 24.0.0
- GitHub Check: install · bun · windows-latest · node >=22.22.0 <23
- GitHub Check: install · yarn · windows-latest · node >=22.22.0 <23
- GitHub Check: install · npm · windows-latest · node 22.22.0
- GitHub Check: install · pnpm-10 · windows-latest · node >=22.22.0 <23
- GitHub Check: install · pnpm-11 · windows-latest · node 22.22.0
- GitHub Check: Seer Code Review
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.10.0 <24.12.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.12.0 <25
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=26.0.0 <27
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.3.0 <24.5.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.12.0 <25
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.8.0 <24.10.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node 26.0.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node 24.12.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node 24.12.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node 22.22.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.5.0 <24.8.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.8.0 <24.10.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.3.0 <24.5.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=26.0.0 <27
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=22.22.0 <23
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.0.0 <24.1.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.1.0 <24.3.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node 26.0.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node 24.12.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.8.0 <24.10.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.10.0 <24.12.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node 26.0.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=22.22.0 <23
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.3.0 <24.5.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.5.0 <24.8.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node 22.22.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.5.0 <24.8.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node 22.22.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=22.22.0 <23
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.1.0 <24.3.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.0.0 <24.1.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.12.0 <25
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.1.0 <24.3.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.0.0 <24.1.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.10.0 <24.12.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=26.0.0 <27
- GitHub Check: coverage · upload to Codecov
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.12.0 <25
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.10.0 <24.12.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.1.0 <24.3.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node 26.0.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.3.0 <24.5.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.0.0 <24.1.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.8.0 <24.10.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=26.0.0 <27
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=22.22.0 <23
- GitHub Check: typecheck · lint · test · build · macos-latest · node 24.12.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.1.0 <24.3.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node 22.22.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=24.5.0 <24.8.0
- GitHub Check: typecheck · lint · test · build · macos-latest · node >=26.0.0 <27
- GitHub Check: typecheck · lint · test · build · windows-latest · node 26.0.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.12.0 <25
- GitHub Check: typecheck · lint · test · build · windows-latest · node 24.12.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.5.0 <24.8.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.8.0 <24.10.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.10.0 <24.12.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node 26.0.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.1.0 <24.3.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node 24.12.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.10.0 <24.12.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.0.0 <24.1.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node 22.22.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.3.0 <24.5.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=22.22.0 <23
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node 22.22.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.12.0 <25
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.8.0 <24.10.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=24.0.0 <24.1.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.3.0 <24.5.0
- GitHub Check: typecheck · lint · test · build · windows-latest · node >=24.5.0 <24.8.0
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=26.0.0 <27
- GitHub Check: typecheck · lint · test · build · ubuntu-latest · node >=22.22.0 <23
- GitHub Check: coverage · upload to Codecov
⚠️ CI failures not shown inline (2)
GitHub Actions: Running Copilot Code Review / copilot-pull-request-reviewer: Running Copilot Code Review
Conclusion: failure
##[group]Run set -euo pipefail
�[36;1mset -euo pipefail�[0m
�[36;1mecho "RUNNER_TEMP=$RUNNER_TEMP"�[0m
�[36;1mfind "$RUNNER_TEMP" -maxdepth 1 -type f -name 'git-credentials-*.config' -print -delete�[0m
�[36;1m�[0m
�[36;1m# Generate a unique token and stop processing workflow commands to prevent the runtime from injecting commands�[0m
�[36;1mSTOP_***REDACTED*** /proc/sys/kernel/random/uuid)�[0m
�[36;1m�[0m
�[36;1m# Use a trap to ensure we always resume command processing and check for�[0m
�[36;1m# fallback error annotations, even if the runtime exits with a non-zero code�[0m
�[36;1m# (which would otherwise cause set -e to abort the shell before we get here).�[0m
�[36;1m# The trap preserves the original exit code.�[0m
�[36;1mcopilot_cleanup() {�[0m
�[36;1m echo "::$STOP_***REDACTED***
�[36;1m FALLBACK_FILE="${RUNNER_TEMP}/copilot-fallback-error.txt"�[0m
�[36;1m if [ -f "$FALLBACK_FILE" ]; then�[0m
�[36;1m FALLBACK_MSG=$(head -c 500 "$FALLBACK_FILE" | tr -d '\n\r')�[0m
�[36;1m echo "::error title=Copilot Error::${FALLBACK_MSG}"�[0m
GitHub Actions: Running Copilot Code Review / 0_copilot-pull-request-reviewer.txt: Running Copilot Code Review
Conclusion: failure
##[group]Run set -euo pipefail
�[36;1mset -euo pipefail�[0m
�[36;1mecho "RUNNER_TEMP=$RUNNER_TEMP"�[0m
�[36;1mfind "$RUNNER_TEMP" -maxdepth 1 -type f -name 'git-credentials-*.config' -print -delete�[0m
�[36;1m�[0m
�[36;1m# Generate a unique token and stop processing workflow commands to prevent the runtime from injecting commands�[0m
�[36;1mSTOP_***REDACTED*** /proc/sys/kernel/random/uuid)�[0m
�[36;1m�[0m
�[36;1m# Use a trap to ensure we always resume command processing and check for�[0m
�[36;1m# fallback error annotations, even if the runtime exits with a non-zero code�[0m
�[36;1m# (which would otherwise cause set -e to abort the shell before we get here).�[0m
�[36;1m# The trap preserves the original exit code.�[0m
�[36;1mcopilot_cleanup() {�[0m
�[36;1m echo "::$STOP_***REDACTED***
�[36;1m FALLBACK_FILE="${RUNNER_TEMP}/copilot-fallback-error.txt"�[0m
�[36;1m if [ -f "$FALLBACK_FILE" ]; then�[0m
�[36;1m FALLBACK_MSG=$(head -c 500 "$FALLBACK_FILE" | tr -d '\n\r')�[0m
�[36;1m echo "::error title=Copilot Error::${FALLBACK_MSG}"�[0m
🧰 Additional context used
📓 Path-based instructions (7)
packages/**/*.{js,jsx,ts,tsx,mjs,cjs}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Avoid using the em dash character (U+2014) in comments, string literals, and template literals in any package file; this includes CLI runtime messages, generated-file template bodies, and test names.
Files:
packages/arkor/src/core/schemas.ts
**/*.{js,jsx,ts,tsx,mjs,cjs}
📄 CodeRabbit inference engine (CONTRIBUTING.ja.md)
Do not use em dashes (U+2014) in comments, string literals, or template literals anywhere in the codebase; use colons, periods, commas, parentheses, spaced hyphens (
" - "), or rephrasing instead.
Files:
packages/arkor/src/core/schemas.ts
packages/arkor/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Preserve Studio CSRF protections: send the token in
X-Arkor-Studio-Tokenforfetch, usestudioTokenforEventSource, enforce the localhost host-header allow-list, do not configure CORS, and compare tokens withtimingSafeEqual.
Files:
packages/arkor/src/core/schemas.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/schemas.ts
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Run both linters through the root configurations:
oxlint --deny-warnings .followed byeslint .; add configuration overrides at the root rather than per-package configs.
Files:
packages/arkor/src/core/schemas.ts
docs/**/*.mdx
📄 CodeRabbit inference engine (AGENTS.md)
Keep English and Japanese documentation paired: changes under
docs/must also update the corresponding files underdocs/ja/. Verify Mintlify-generated anchors before adding cross-page links; preserve/,=, and full-width parentheses while accounting for stripped ASCII punctuation and backticks.
Files:
docs/ja/sdk/create-trainer.mdx
**/{*.md,*.mdx,*.yaml,*.yml}
📄 CodeRabbit inference engine (AGENTS.md)
Do not format Markdown, MDX, YAML, or YML files with oxfmt; these are excluded because documentation anchors and deliberate YAML layout must remain hand-managed.
Files:
docs/ja/sdk/create-trainer.mdx
🔇 Additional comments (4)
packages/arkor/src/core/schemas.ts (3)
121-149: LGTM!
174-174: LGTM!
253-257: LGTM!docs/ja/sdk/create-trainer.mdx (1)
88-91: LGTM!Also applies to: 93-97, 107-109
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 782ccabcfb
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
`{ ratio: <0 < n < 1> }` nests two inequalities inside angle brackets, so
the reader cannot tell at a glance whether the inner text is a placeholder
or a type name. Name the fields and put the range in prose, with a concrete
value alongside it. The `{ steps: <integer >= 0> }` half used the same
notation and moves with it.
Applied to the reference and the cookbook in both languages: the notation
was shared across all four, and fixing only the page the review pointed at
would have split the EN/JA pair.
Found by the CodeRabbit review on PR #210.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c3c7c94d97
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| | Field | Status | | ||
| | --- | --- | | ||
| | `warmupSteps`, `loggingSteps`, `saveSteps`, `evalSteps` | Forwarded as-is. Use only if you already know the backend's expected shape. | | ||
| | `warmupSteps`, `loggingSteps`, `saveSteps`, `evalSteps` | Forwarded as-is. Each takes a **step config object**, not a bare number: exactly one of `{ steps }`, a non-negative integer, or `{ ratio }`, a number greater than 0 and less than 1 (e.g. `{ ratio: 0.25 }`). `warmupSteps` additionally accepts `ratio: 0`. The ratio's upper bound is exclusive because the trainer passes it straight through to a field the underlying library reads as a fraction *only* below 1; at exactly 1 it would flip to meaning "every single step", so the cloud API rejects it rather than silently checkpointing on every optimizer step. | |
There was a problem hiding this comment.
Document ratio 1 as an accepted step config
The cloud schema uses an inclusive maximum for ratio, so { ratio: 1 } is valid and means once at the end of the run; it is not rejected or interpreted as every optimizer step. This guidance incorrectly excludes a supported configuration and is repeated in the cookbook and Japanese mirror, so users may avoid or replace a valid end-of-run evaluation/checkpoint setting.
Useful? React with 👍 / 👎.
| * shows up in this project's list and must render rather than fall | ||
| * through to the `base_model` branch as `Base model: undefined`. | ||
| */ | ||
| | { kind: "model_menu" }; |
There was a problem hiding this comment.
Keep model-menu targets out of writable Studio bodies
Adding model_menu to this shared union also makes CreateDeploymentBody and UpdateDeploymentBody, which still use DeploymentTarget, accept { kind: "model_menu" }. In the Studio API inspected here, such a create passes TypeScript but is rejected by createDeploymentRequestSchema, while the installed cloud client cannot write this variant; similarly, forwarding a target from a fetched menu deployment into updateDeployment compiles and then fails remotely. Mirror the SDK's separate writable-target type in the SPA body types.
Useful? React with 👍 / 👎.
Summary
The docs and every scaffolded template wrote
evalSteps: 25, but the cloud API validates that field as a step config, so a freshcreate-arkorproject fails at job submission. Auditing the rest of the SDK against@orbit/shared's schemas turned up several more divergences; they are fixed together here.Fixes ENG-984.
What was wrong, and what changed
evalStepsshape (the reported bug).stepConfigSchemarequires exactly one of{ steps }or{ ratio }, so a bare number is rejected. All three templates (triage/translate/redaction) emitted the bad form, so this broke every scaffolded project, not just the doc example.Fixing the shape alone was not enough:
handler.pyonly setseval_stepswheneval_dataset is not None, which requiresdatasetSplit.enabled, and that defaults to{ enabled: false }server-side. A correctedevalStepson its own would submit cleanly and then produce no eval loss, leaving the "training and eval loss out of the box" promise in the template comment and the docs untrue. Templates now setdatasetSplit: { enabled: true, testSize: 0.1 }alongsideevalSteps: { steps: 25 }.model_menudeployments crashedlistDeployments(). The server'sdeploymentTargetSchemahas three variants; the SDK decoder had two.decode()calls.parse()with no fallback overz.array(deploymentSchema), so one menu deployment rejected the entire response:The resulting
ZodErroris not aCloudApiError, so Studio'sGET /api/deploymentsfell through to the generic catch and returned an opaque500 {"error": "Studio backend error"}. Menu deployments are created from the web dashboard and the one-click app flow, so a project can own one without ever touching Studio.Reads and writes are now separate types, because the installed
@arkor/cloud-api-client@0.0.1-alpha.2generated request types do not carry the variant yet (widening the write side would only produce a compile error at the call site):DeploymentTargetcarries all three variants and is whatDeploymentDto.targetuses.WritableDeploymentTarget = Exclude<DeploymentTarget, { kind: "model_menu" }>is whatCreateDeploymentInput/UpdateDeploymentInputuse.The SPA is fixed too:
describeTargetfell through to thebase_modelbranch and renderedBase model: undefined.Fields the server already supported but the SDK dropped. The ten sampling parameters on
InferArgs(stop,presencePenalty,frequencyPenalty,seed,logprobs,topLogprobs,logitBias,streamOptions,enableThinking,reasoningEffort);gpuTypesonTrainerInput/JobConfig; thetraining.completedmetrics (finalLoss/totalSteps/totalTime, newTrainingMetricstype) andtraining.failedstep, now on theonCompleted/onFailedcontexts; andexpiresAtonDeploymentDto. All additive.Doc fix. An omitted HuggingFace
splitwas documented as falling back to the dataset's default split. The backend substitutes the literal"train", which fails for a dataset that publishes no such split.Out of scope:
dryRundryRunis typed onTrainerInput/JobConfigand documented across six pages, but does not exist anywhere on the server.jobConfigSchemais a non-strict zod object, so the key is silently dropped with no error. The SDK half (927ab6a) landed on main on 2026-04-28; the server half is still unmerged onorigin/eng-450, which holds both the schema field and the trainer truncation logic (DRY_RUN_ROWS=50/DRY_RUN_MAX_STEPS=10) that the template comment's "50 rows, max_steps=10" refers to.The practical effect is that a user who sets
dryRun: trueexpecting a cheap smoke test is billed for a full run. Landing the backend implementation versus dropping the field is a product call, so it is tracked separately rather than decided here.Companion change
orbitcarries a one-line follow-up:stepConfigSchema's comment and error message sayratio < 1while the implementation is.max(1). The implementation is right (ratio 1 means "once, at the end of the run"), so the comment and message move to match it. The string is not embedded inopenapi.json, so no model regeneration is needed.Testing
pnpm typecheck(10 tasks),pnpm lint(7 packages), andoxfmt --checkall pass. Tests: arkor 442, studio-app 199, create-arkor 47, all passing.@arkor/cli-internalis 226/227 — the one failure isgit.test.ts's commit-signing fallback, which fails identically on a clean tree and is a local-environment issue unrelated to this change.New coverage:
expiresAtnormalises (absent /null/Date).evalStepsand assert the split is enabled, so a regression to a bare number fails the build rather than production.infer()copies fields one by one instead of spreading, so each new sampling parameter is asserted on the outgoing request body.onCompletedmetrics with values and with the block absent (all-null normalisation), plusonFailedstep.TypeScript enforces the SPA branch: deleting the
model_menucase fromdescribeTargetfails typecheck withProperty 'baseModel' does not exist on type '... | { kind: "model_menu"; }'.Summary by cubic
Aligns the SDK, docs, and Studio with the cloud API job/deployment schemas to stop scaffolded jobs from failing, add missing inference options, and fix Studio/QuickStart behavior for
model_menudeployments. Fixes ENG-984.Bug Fixes
evalSteps: { steps: 25 }and enabledatasetSplitso new projects submit and show eval loss; clarified step-config shape and bounds ({ steps }or{ ratio }with0 < ratio < 1,warmupStepsalso allowsratio: 0); documenteddatasetSplitshape/defaults and that HuggingFacedataset.splitdefaults to the literal"train".model_menutarget; writes useWritableDeploymentTarget(excludesmodel_menu). Decoders now discriminate onkind, andDeploymentDtoexposes and normalizesexpiresAt. Studio Endpoints renders the target label with a real code element and no longer 500s; QuickStart gets the target kind and uses aMODEL_NAMEplaceholder for menu deployments.onCompletedincludesmetrics(finalLoss,totalSteps,totalTime),onFailedincludesstep(ornull). English/JA docs updated across references and cookbooks.New Features
infer()forwards more sampling fields:stop,presencePenalty,frequencyPenalty,seed,logprobs,topLogprobs,logitBias,streamOptions,enableThinking,reasoningEffort.gpuTypes: string[]for managed GPU selection; values are validated at job submission. Exports now includeReasoningEffort,TrainingMetrics, andWritableDeploymentTarget.Written for commit c3c7c94. Summary will update on new commits.
Summary by CodeRabbit
expiresAtfield for one-click deploys.evalSteps/datasetSplitbehavior, datasetsplitdefaults, deployment target semantics, and inference parameters.