Repository navigation
Commit 2695de7
docs(spec): import job
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6Jao7PCFNnUR8ZRYzq6dv7Zyh4)_
Fixes #27734
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:只改 spec 里导入任务状态的说明文字:`failed`
不再只写「致命错误中止」,也写明「至少有一行、但没有任何一行被创建、更新或跳过」的任务同样以 `failed` 结束;`error`
字段的说明同步补上这一情形,并重新生成参考文档。
- 为什么改:服务端按裁决 B(记录 6509036166)已在 #27795 合并,全部行失败的任务现在结束为 `failed`;spec
仍说 `failed` 只是致命中止,客户端和 AI 作者读到的含义比实际行为窄。
- 风险与回滚:零运行时风险,没有枚举值、键、类型或导出变化,线上形状不变;回滚即还原这三个文件。
- 先看:`packages/spec/src/api/export.zod.ts`(`ImportJobStatus`
文档块与两行注释、`error` 的
describe);`content/docs/references/api/export.mdx`(生成结果);`.changeset/27734-import-job-failed-wording.md`。
- 两分钟验证:`pnpm --filter @objectstack/spec build && pnpm --filter
@objectstack/spec check:generated`,预期 14 个产物全部最新。
- 需要你做的:无,席位落地。
## What changes
- **`ImportJobStatus`** (`packages/spec/src/api/export.zod.ts`). The
docblock now states the terminal rule the REST worker applies since
#27795: a job that had at least one row and created, updated or skipped
none of them ends `failed`, as does a job aborted on a fatal error; a
job with no rows, an all-skipped job and a partly-failed job end
`succeeded`; a dry run follows the same rule; a cancel wins over both.
The `succeeded` / `failed` value comments are reworded to match.
- **`ImportJobProgressSchema.error`**. The describe was "Fatal error
message (when status = failed)". It now says it carries either the fatal
error or, when every row failed, one sentence pointing at the job's
`results`.
- **`content/docs/references/api/export.mdx`**. Regenerated by
`gen:docs` (two table rows: progress and results both show the `error`
describe).
- **Changeset** `27734-import-job-failed-wording.md`,
`@objectstack/spec: patch` (describe text ships in the package).
No enum value, key, type or export changes; the wire is unchanged. The
sentence was written from PR #27795's diff
(`packages/rest/src/data-action-routes.ts`: `everyRowFailed =
finalStatus === 'succeeded' && total > 0 && created + updated + skipped
=== 0`, decided after every cancel re-check).
## Tests
No behaviour changed, so no test was added and no ablation applies
(prose only).
## Acceptance notes
- **Out of lane, routed to the seat:**
`packages/platform-objects/src/audit/sys-import-job.object.ts:70` still
labels the `error` column `Fatal Error`. After ruling B that column also
carries the "every row failed" sentence, so the label is stale the same
way (note 6512498465). It is `domain:server`, so this PR leaves it
alone.
- The `ImportJobStatus` enum-value comments are TS comments, not
`.describe()`, so they do not reach the generated reference; the
docblock and the `error` describe are what readers of the spec see.
## Verification
All readings on head `4765d36c` (worktree off `origin/main` `2e955dde`).
<details><summary>Spec build, generated artifacts, tests,
typecheck</summary>
- `pnpm --filter @objectstack/spec build` :: exit 0
- `pnpm --filter @objectstack/spec check:generated` :: exit 1 before
regeneration, naming exactly one stale artifact
(`content/docs/references/**`); `gen:docs` :: exit 0, then
`check:generated` is part of the sweep below :: exit 0
- `pnpm --filter @objectstack/spec typecheck` :: exit 0
- `pnpm --filter @objectstack/spec test` :: exit 0 — Test Files 756
passed (756), Tests 22510 passed, 1 todo
</details>
<details><summary>Derived gates (`dispatch-gates --commands`, 97
families)</summary>
- 97 derived, 94 run with exit 0, 3 NOT MEASURED (exit 3, prerequisite
not met), 0 unrun; `dispatch-gates --ran` :: exit 0.
- Four doc/skill gates first exited 3 for an unbuilt `@objectstack/lint`
/ `@objectstack/client-react`; after `turbo run build
--filter='@objectstack/lint...' --filter='@objectstack/client-react...'`
(38/38 tasks) they re-ran :: exit 0 (`check:doc-formula-expressions`,
`check:doc-security-posture`, `check:skill-examples`,
`check:docs-transcript-drift`).
- NOT MEASURED, left to CI: `check:dual-build-cjs-loads` and
`check:lean-entry-closure` (both need a whole-workspace `pnpm build`),
`check-plugin-teardown-shape.mjs --self-test` (needs an unshallow clone;
it grades the checker, not this diff).
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L9qibz3A9wkHngU9obhv1g)_
---------
Co-authored-by: Claude <noreply@anthropic.com>failed also covers a job whose every row failed (#28087)1 parent 062a232 commit 2695de7
3 files changed
Lines changed: 30 additions & 5 deletions
File tree
- .changeset
- content/docs/references/api
- packages/spec/src/api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
491 | 500 | | |
492 | 501 | | |
493 | 502 | | |
494 | 503 | | |
495 | | - | |
496 | | - | |
| 504 | + | |
| 505 | + | |
497 | 506 | | |
498 | 507 | | |
499 | 508 | | |
| |||
539 | 548 | | |
540 | 549 | | |
541 | 550 | | |
542 | | - | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
543 | 555 | | |
544 | 556 | | |
545 | 557 | | |
| |||
0 commit comments