Skip to content

Commit f549a0d

Browse files
qq9340100claude
andauthored
refactor(spec)!: ADR-0049 退役 sweep —— server 运行期词表 / ViewProtocol / L2 ETL(#5295 #6239 #6414) (#6526)
* refactor(spec)!: ADR-0049 retirement sweep — server runtime vocabulary, ViewProtocol, L2 ETL (#5295 #6239 #6414) 三个成员共用 route 3(整 def 删除):都不是 authorable 键、全仓零 parse, 因此无 retiredKey() 墓碑、无 D2 conversion —— `RETIRED_DEFS_BY_MAJOR[17]` (23 defs) 加三条 D3 `SemanticMigration` 即声明本身。 - #5295 `system/http-server.zod.ts` 的运行期词表(ServerEvent* / ServerCapabilities / ServerStatus)。前置测量:plugin-hono-server 既不实现 也不报告三者;对照组 MiddlewareConfig 在同一轮扫描中命中 runtime 消费者。 - #6239 `ViewProtocol` 五方法与十套 Request/Response schema。零实现、零路由、 零调用方;#5948 曾把 GetViewResponseSchema 误当 /ui/view 的契约。 - #6414 整个 L2 ETL 层。零执行侧消费者、无 liveness 台账;同 PR 重写 `packages/spec/docs/SYNC_ARCHITECTURE.md`(它此前把 ETLPipeline 当作 L1 退役后的推荐去处),并吸收 #4962 的 etl-retry 语义迁移条目。 生成基线整体重生成;ADR-0122 pin 751 → 744(收据写在计数断言处)。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011M7UwH25Unfi73UHim7ajY * chore(spec): 在合并树上整体重生成生成物(os-regen 第四步) manifest 相对 origin/main 的删除恰为本 sweep 的 23 个 def,零新增; #6474 的 ValidateData 等同期条目在重生成后完整存活。 * fix(ci): 补 ADR-0087 disposition 标记,并把两处指向已退役 ETL 页的死链修在源头 - 三份 changeset 各补 `adr-0087: registered <id>`(#6148 门禁要求书面处置) - `integration/connector.zod.ts` 的三处 TSDoc 指向 automation/etl.zod.ts: L2 已退役,指针改指真正执行的面(data/mapping.zod.ts 的 transform), 而不是转到另一个不执行的层——这正是该文件 header 自己写的"signpost 必须 落在被执行的地方" - quick-reference.mdx 删掉 ETL 行并把 Automation 计数 5 → 4 * docs(spec): 重生成 connector 参考页,并更新一处指向已删文件的注释 - content/docs/references/integration/connector.mdx 随 connector.zod.ts 的 TSDoc 修正重生成(三条死链消失) - alias-integrity.test.ts 的十点测量里 etl.zod.ts 已不在:保留原计数并注明 退役,论点是 AST 盲区,不因少一个文件而变弱 * chore(spec): 在第二次合并树上整体重生成(os-regen 第四步) manifest 相对 origin/main 的删除仍恰为本 sweep 的 23 个 def、零新增; #5933 的 SpecifierValueDomain 与 #6527 的 array_agg/string_agg 退役均完整存活。 ADR-0122 pin:755 → 748。 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6f657f4 commit f549a0d

47 files changed

Lines changed: 1037 additions & 3238 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
"@objectstack/spec": major
3+
---
4+
5+
refactor(spec)!: retire the L2 ETL layer — `automation/etl.zod.ts` had no executor, and the sync architecture doc was recommending it (#6414)
6+
7+
`ETLPipeline`, `ETLPipelineRun`, `ETLSource`, `ETLDestination`, `ETLTransformation`,
8+
the `ETLEndpointType` / `ETLTransformationType` / `ETLSyncMode` / `ETLRunStatus`
9+
enums and the `ETL` factory are REMOVED under ADR-0049 enforce-or-remove. The whole
10+
file goes, on the same reading #4738 used to retire L1 `DataSyncConfig` one layer up:
11+
**narrative-only**. No engine ever parsed, scheduled or executed an `ETLPipeline`.
12+
13+
Measured on `origin/main` immediately before the removal: the only non-spec
14+
references in this repo are two fumadocs-generated documentation sources
15+
(`apps/docs/.source/*.ts`), not executors; objectui has no reference at all; and
16+
there is no `packages/spec/liveness/etl.json`, so no ADR-0049 gate ever had a reading
17+
on the surface — while the same file family's EXECUTED half does have one
18+
(`liveness/mapping.json`), which is what makes that absence meaningful rather than an
19+
oversight.
20+
21+
FROM → TO, layer by layer — with one gap stated plainly instead of redirected:
22+
23+
| removed | use instead |
24+
|---|---|
25+
| `ETLPipeline.source` + `syncMode` + `schedule` (scheduled extraction from an external system) | `ConnectorSchema.syncConfig` (`integration/connector.zod.ts`) — the live, parsed sync surface: strategy, direction, cron schedule, `conflictResolution`, batching, delete mode |
26+
| `ETLTransformation` of type `map` / `cast`-like per-field work | `mapping.fieldMapping[].transform` (`data/mapping.zod.ts`) — `none`/`constant`/`map`/`split`/`join`/`lookup`, applied row by row by the REST import path |
27+
| `ETLPipeline.schedule` alone | `system/job.zod.ts` |
28+
| `ETLTransformation` of type `join` / `aggregate` / `script` / `merge` / `deduplicate` / … | **nothing.** There is no replacement because there was never an implementation — those ten transformation types named capabilities no runtime had. Do the work where it runs (the destination warehouse's ELT, a `flow`, a scheduled job), and let multi-stage movement return through ADR-0049's ENFORCE route: the engine first, the vocabulary second |
29+
30+
**The fix:** delete the import. Nothing was ever deployed under an `ETLPipeline`
31+
that is the finding, not a consolation — so there is no data migration; `tsc` reports
32+
TS2724/TS2305 at every import of a retired name.
33+
34+
**`packages/spec/docs/SYNC_ARCHITECTURE.md` is rewritten in the same change**, and
35+
that is not incidental. It named `ETLPipeline` as the recommended destination for
36+
authors displaced by the L1 retirement and tabulated ten transformation types with
37+
copyable examples down to `script | Custom JavaScript/Python`. Retiring the schema
38+
while the doc still recommended it would have been self-contradictory, and
39+
forwarding L1's authors to a second layer with no executor was the defect compounding
40+
rather than closing.
41+
42+
**Absorbed:** the #4962 `etl-retry-converged-onto-retry-policy` entry (`retry.maxAttempts`
43+
`maxRetries`, default 3 → 0) — both land in the unreleased protocol 17, so composed,
44+
a rename on a shape that does not survive the major has no observable effect, and its
45+
`retiredKey()` tombstone goes with the shape that carried it.
46+
47+
The retirement kit — route 3: no tombstone, no D2 conversion.
48+
`RETIRED_DEFS_BY_MAJOR[17]` (9 defs) plus the D3 `SemanticMigration`
49+
`etl-pipeline-layer-retired` are the declaration.
50+
51+
<!-- adr-0087: registered etl-pipeline-layer-retired -->
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
"@objectstack/spec": major
3+
---
4+
5+
refactor(spec)!: retire `system/http-server.zod.ts`'s runtime vocabulary — the event, capability and status shapes nothing ever emitted (#5295)
6+
7+
`ServerEventType`, `ServerEventSchema` / `ServerEvent`, `ServerCapabilitiesSchema` /
8+
`ServerCapabilities` / `ServerCapabilitiesParsed` and `ServerStatusSchema` /
9+
`ServerStatus` are REMOVED under ADR-0049 enforce-or-remove. This is the second and
10+
final pass over the file: #4938 removed its CONFIG half (`HttpServerConfigSchema`,
11+
nine keys, zero readers, zero authoring entry), and this removes the RUNTIME half —
12+
a 7-member lifecycle event union, an eight-boolean capability report and a
13+
five-state status record with connection and request counters. Nothing ever emitted,
14+
consumed or parsed any of them.
15+
16+
FROM → TO:
17+
18+
| removed | what actually decides it |
19+
|---|---|
20+
| `ServerEventType` / `ServerEvent(Schema)` | nothing emits a server event feed. Lifecycle is the transport plugin's own start/stop seam; observability is `system/metrics.zod.ts` + `system/logging.zod.ts`, and `OS_SERVER_TIMING` for timings |
21+
| `ServerCapabilities(Schema/Parsed)` | a transport plugin declares what it provides by implementing the kernel plugin contract — the seams it registers ARE the capability statement |
22+
| `ServerStatus(Schema)` | `/health` for liveness, the metrics surface for counters |
23+
24+
**The fix:** delete the import. There is no replacement key, because there was
25+
never a key — none of the four was authorable on any shape. Server-level
26+
configuration that IS authorable is untouched: `defineStack({ server: { trustProxy,
27+
security } })` / `StackServerConfigSchema` (#5006) parses exactly as it did in 16.x,
28+
as does the route-registration half of the same module (`RouteHandlerMetadata`,
29+
`MiddlewareType`, `MiddlewareConfig`).
30+
31+
**Why now, and what unblocked it.** The card was held rather than queued on a real
32+
doubt: a response/capability vocabulary can legitimately be a REFERENCE surface for
33+
host implementers, so "zero consumers in this repo" is weaker evidence for one of
34+
those than for an authorable key. It was lifted by measuring the reference reader
35+
itself — `plugin-hono-server`, the one in-tree host implementation, neither
36+
implements nor reports any of the three: it names no capability record, no status
37+
shape and no event union, and what it registers is routes and middleware. The
38+
control passed in the same sweep (`MiddlewareConfig`, twelve lines away, resolves to
39+
`packages/runtime/src/middleware.ts`).
40+
41+
The retirement kit — route 3 of the retirement playbook, as #4938 was in this same
42+
file: **no `retiredKey()` tombstone and no D2 conversion**, because a prescription
43+
nobody can receive is noise and there is no authored document to rewrite.
44+
`RETIRED_DEFS_BY_MAJOR[17]` (4 defs) plus the D3 `SemanticMigration`
45+
`http-server-runtime-vocabulary-retired` are the declaration; the generated
46+
baselines (`json-schema.manifest/system.json`, `authorable-surface/system.json`,
47+
`api-surface/system.json`) lose their entries in the same change, deliberately.
48+
49+
If host-implementer conformance becomes a real requirement it returns through the
50+
ENFORCE route: an adapter contract with a checker behind it, vocabulary second.
51+
52+
<!-- adr-0087: registered http-server-runtime-vocabulary-retired -->
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
"@objectstack/spec": major
3+
"@objectstack/client": major
4+
---
5+
6+
refactor(spec,client)!: retire `ViewProtocol`'s five viewId-addressed methods and their ten schemas (#6239)
7+
8+
`listViews`, `getView`, `createView`, `updateView` and `deleteView` — the
9+
`ViewProtocol` interface and `ListViews`/`GetView`/`CreateView`/`UpdateView`/`DeleteView`
10+
Request+Response schemas in `api/protocol.zod.ts` — are REMOVED under ADR-0049
11+
enforce-or-remove (maintainer ruling 2026-08-07). `@objectstack/client` drops the
12+
five response types it re-exported.
13+
14+
Measured on `origin/main` immediately before the removal, the surface had none of
15+
the three things a protocol method needs:
16+
17+
- **no implementation**`packages/metadata-protocol/src/protocol.ts` declares no
18+
`listViews`/`getView`/`createView`/`updateView`/`deleteView`; its only view
19+
resolver is `getUiView`;
20+
- **no route**`packages/rest/src/rest-server.ts` never mentions `viewId`, so
21+
nothing viewId-addressed was reachable over HTTP at all;
22+
- **no caller** — the only `ViewProtocol` mention outside its own file was
23+
`content/docs/kernel/services-checklist.mdx`, which already recorded the five as
24+
declared-and-unrouted.
25+
26+
FROM → TO — both replacements are surfaces that were always the live ones:
27+
28+
| removed | use instead |
29+
|---|---|
30+
| `listViews` / `getView` / `createView` / `updateView` / `deleteView` (+ their 10 schemas) | the generic metadata methods with `type: 'view'``getMetaItem` / `getMetaItems` / `saveMetaItem` / `deleteMetaItem`, served at `/api/v1/meta/view/:name` |
31+
| `GetViewResponse` as "the shape of the resolved view" | `GetUiViewResponse``getUiView`, served at `GET /api/v1/ui/view/:object/:type` |
32+
33+
**The fix:** delete the import and address views by NAME through the metadata API
34+
(`view` is a metadata type), or by object+type through `getUiView`. Nothing
35+
addressed a view by `viewId` before this change either; that is the finding.
36+
37+
**Why a removal rather than a note.** The declared surface is name-identical and
38+
semantics-adjacent to a real one, which makes it an attractive nuisance in every
39+
grep — and it has already mis-directed a decision: **#5948's issue body AND its
40+
2026-08-07 maintainer ruling both read `GetViewResponseSchema` (zero
41+
implementations) as the contract of `GET /ui/view/:object/:type`**, whose declared
42+
response is `GetUiViewResponseSchema`, 250 lines up and one word different. That
43+
ruling's reasoning happened to survive the mix-up; this removal stops relying on
44+
that luck.
45+
46+
The retirement kit — route 3: **no tombstone and no D2 conversion** (none of the ten
47+
was a key on an authorable shape, and nothing parsed them, so there is no source or
48+
`sys_metadata` row to rewrite). `RETIRED_DEFS_BY_MAJOR[17]` (10 defs) plus the D3
49+
`SemanticMigration` `view-management-protocol-retired` are the declaration; the
50+
generated baselines and reference docs lose their entries in the same change.
51+
52+
If "read and write ONE view by id" becomes a real requirement, it returns
53+
implementation-first.
54+
55+
<!-- adr-0087: registered view-management-protocol-retired -->

content/docs/getting-started/quick-reference.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ REST/GraphQL endpoints, real-time subscriptions, and discovery.
145145
| **[Metadata](/docs/references/api/metadata)** | `metadata.zod.ts` | Metadata | API metadata endpoints |
146146
| **[Storage](/docs/references/api/storage)** | `storage.zod.ts` | Storage | API storage operations |
147147

148-
## Automation Protocol (5 schemas)
148+
## Automation Protocol (4 schemas)
149149

150150
Flows, state machines, approvals, and integrations.
151151

@@ -155,7 +155,6 @@ Flows, state machines, approvals, and integrations.
155155
| **[Approval](/docs/references/automation/approval)** | `approval.zod.ts` | ApprovalNodeConfig | Flow approval-node config |
156156
| **[State Machine](/docs/references/automation/state-machine)** | `state-machine.zod.ts` | StateMachine | State machine definitions |
157157
| **[Webhook](/docs/references/automation/webhook)** | `webhook.zod.ts` | Webhook | Outbound webhooks |
158-
| **[ETL](/docs/references/automation/etl)** | `etl.zod.ts` | ETLPipeline | Data transformation pipelines |
159158

160159
## Security Protocol (3 schemas)
161160

content/docs/kernel/services-checklist.mdx

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -320,22 +320,34 @@ registered under their own names (`security.permissions`, `security.rls`,
320320

321321
## 5–6. Business Services
322322

323-
### 5. ui Service — 5 declared methods, none routed
324-
`listViews`, `getView`, `createView`, `updateView`, `deleteView`
323+
### 5. ui Service — 1 routed method ✅ (was 5 declared, none routed)
324+
`getUiView`
325325

326326
<Callout type="warn">
327-
These five are **optional members of `ViewProtocol` that nothing implements and no
328-
route reaches**`view` is a metadata type, so view CRUD goes through the metadata
329-
API (`/api/v1/meta`), not through them. Nothing anywhere registers the `ui` slot
330-
either (#4093 / #4146), so `CORE_SERVICE_PROVIDER.ui` names
331-
`@objectstack/metadata-protocol` rather than a `ui` plugin: the one route the `/ui`
332-
domain serves is `GET /api/v1/ui/view/:object[/:type]`, which calls `getUiView` on
333-
the **`protocol`** service that `assembleMetadataProtocol()` registers (invoked by
327+
Nothing anywhere registers the `ui` slot (#4093 / #4146), so `CORE_SERVICE_PROVIDER.ui`
328+
names `@objectstack/metadata-protocol` rather than a `ui` plugin: the one route the
329+
`/ui` domain serves is `GET /api/v1/ui/view/:object[/:type]`, which calls `getUiView`
330+
on the **`protocol`** service that `assembleMetadataProtocol()` registers (invoked by
334331
`ObjectQLPlugin`, or by the standalone `createMetadataProtocolPlugin()`). Without it
335332
the domain answers **501** with that remedy spelled out, not a generic "install a ui
336333
plugin".
337334
</Callout>
338335

336+
#### Retired in v17: `ViewProtocol`'s five methods
337+
`listViews`, `getView`, `createView`, `updateView`, `deleteView` — and their ten
338+
Request/Response schemas — were removed in
339+
[#6239](https://github.com/objectstack-ai/objectstack/issues/6239) under ADR-0049
340+
enforce-or-remove. This checklist had recorded them as declared-and-unrouted since it
341+
was written; the removal makes that reading permanent instead of re-derivable. Views
342+
are read and written through the surfaces that always served them: the metadata API
343+
(`/api/v1/meta/view/:name`, `view` being a metadata type) for the stored definition,
344+
and `getUiView` above for the resolved render-time view.
345+
346+
The concrete cost of leaving it declared is on the record: **#5948's issue body and its
347+
2026-08-07 maintainer ruling both read `GetViewResponseSchema` — this retired block,
348+
zero implementations — as the contract of `GET /ui/view/:object/:type`**, whose declared
349+
response is `GetUiViewResponseSchema`. One word apart, and identical to a grep.
350+
339351
### Retired in v17: the `workflow` slot
340352
The slot, its `IWorkflowService` contract and the three `WorkflowProtocol`
341353
methods (`getWorkflowConfig`, `getWorkflowState`, `workflowTransition`) were
@@ -509,7 +521,7 @@ a package that cannot be installed is a dead end, which is why
509521

510522
| Slot | State |
511523
|:-------|:------------|
512-
| **ui** | Nothing registers the slot. `ViewProtocol`'s five methods are declared and unrouted; view CRUD runs through `/api/v1/meta`, and `/api/v1/ui/view/:object` is served by the `protocol` service. |
524+
| **ui** | Nothing registers the slot. `ViewProtocol`'s five declared-and-unrouted methods were **retired in v17** (#6239); view CRUD runs through `/api/v1/meta`, and `/api/v1/ui/view/:object` is served by the `protocol` service. |
513525
| **search** | Nothing ships. Contract and engine enum exist in `@objectstack/spec` only. |
514526
| **ai** | Nothing in this repo — `service-ai` (chat, completion, models, conversations) is Cloud/EE. |
515527
| **realtime transport** | The service exists but no WebSocket/SSE route is mounted, so `routes.realtime` is deliberately never advertised. |

0 commit comments

Comments
 (0)