You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(metadata)!: remove the artifact-api artifact source (#4246) (#4259)
MetadataPluginOptions.artifactSource loses its artifact-api union member;
{ mode: 'local-file', path } is the single artifact source (path may be an
http(s) URL — the control plane's /pub/v1/environments/:id/artifact route
serves it verbatim). Removed on the owner's call after a cross-repo consumer
audit found zero call sites: the cloud runtime pulls artifacts through its
own ArtifactApiClient, and package distribution into a running OSS instance
goes through @objectstack/cloud-connection. A still-configured artifact-api
source fails loudly at start() with a migration pointer instead of silently
falling back to the filesystem scan. Breaking: @objectstack/metadata major.
Copy file name to clipboardExpand all lines: content/docs/protocol/kernel/metadata-service.mdx
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -187,7 +187,7 @@ Four orthogonal levers shape how `MetadataManager` and `MetadataPlugin` behave a
187
187
| :--- | :--- | :--- |
188
188
|`eager` (default) | Local dev, traditional servers | Scans filesystem (or hydrates from `artifactSource`) at boot. |
189
189
|`lazy`| Cold-start sensitive runtimes, on-demand workloads | Skips the FS prime; reads flow through registered loaders (incl. DatabaseLoader cache). Honors `artifactSource` when set. |
190
-
|`artifact-only`| Edge / serverless / read-only production | Refuses to touch the filesystem. Requires `artifactSource` (`mode: 'local-file'` or `'artifact-api'`). |
190
+
|`artifact-only`| Edge / serverless / read-only production | Refuses to touch the filesystem. Requires `artifactSource` (`mode: 'local-file'`; `path` may be an `http(s)` URL). |
191
191
192
192
```typescript
193
193
newMetadataPlugin({
@@ -196,6 +196,37 @@ new MetadataPlugin({
196
196
});
197
197
```
198
198
199
+
#### Artifact source
200
+
201
+
`artifactSource: { mode: 'local-file', path, fetchTimeoutMs? }` is the single
202
+
artifact source, honored by every bootstrap mode above. `path` is a filesystem
203
+
path or an `http(s)` URL fetched verbatim — the control plane's public
Copy file name to clipboardExpand all lines: content/docs/releases/implementation-status.mdx
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,8 @@ This matrix is generated from actual codebase analysis and represents the curren
72
72
- Metadata is loaded from config files or `dist/objectstack.json` at startup and held in memory
73
73
-`MetadataPlugin` auto-provisions the `sys_metadata` / `sys_metadata_history` storage objects (plus the ADR-0067 commit log and the metadata audit trail) by default, so `PUT /api/v1/meta/{type}/{name}` always has somewhere to write. Per-project (cloud) kernels opt out with `registerSystemObjects: false`, because there the control plane owns those tables
74
74
-`MetadataPlugin` does **not** auto-bridge ObjectQL to a `DatabaseLoader` — there is no automatic runtime project-DB bridge, and nothing in the packages calls the bridge during boot. Database-backed metadata is an explicit `MetadataManager` opt-in (`setDataEngine()` / `setDatabaseDriver()`, or a `datasource` + `driver` pair on the manager config), and even then it is control-plane only: both methods return early whenever an `environmentId` is supplied, so a per-project kernel never gets a database-backed metadata loader
75
-
- Future: production Artifact API loader (`artifactSource: { mode: 'artifact-api' }` is reserved) and durable local artifact cache
75
+
- The artifact source is `artifactSource: { mode: 'local-file', path }` — a compiled artifact read from a filesystem path or fetched from an `http(s)` URL (the control plane's public `/pub/v1/environments/:id/artifact[?commit=…]` route serves exactly such URLs), honored by all three bootstrap modes (`eager` / `lazy` / `artifact-only`). A second `artifact-api` mode (a Bearer-authenticated control-plane pull) this page once called "Future / reserved" was **removed** while resolving #4246: it had zero consumers in any repo — the cloud runtime uses its own `ArtifactApiClient`, and package installs into a running OSS instance go through `@objectstack/cloud-connection` — and a still-configured `artifact-api` source now fails loudly at `start()` instead of lingering half-declared
76
+
- Future: durable local artifact cache — remote artifact URLs re-fetch on every boot
|**Single-source schema discipline**| Canonical `MetadataManagerConfigSchema` / `MetadataFallbackStrategySchema` live in `kernel/metadata-loader.zod.ts` and are re-exported from `system/metadata-persistence.zod.ts`. |
34
-
|**`artifact-api` runtime source**|`MetadataPlugin`can boot from a remote control-plane artifact (`artifactSource: { mode: 'artifact-api', url, projectId, commitId? }`). Wired across `eager` / `lazy` / `artifact-only` bootstrap modes. Configurable timeout via `fetchTimeoutMs` or `OS_ARTIFACT_FETCH_TIMEOUT_MS` (default 60 s). |
34
+
|**Remote artifact boot**|`MetadataPlugin`boots from a compiled artifact via `artifactSource: { mode: 'local-file', path }`, where `path` may be an `http(s)` URL — e.g. the control plane's public `/pub/v1/environments/:id/artifact[?commit=…]` route. Wired across `eager` / `lazy` / `artifact-only` bootstrap modes. Configurable timeout via `fetchTimeoutMs` or `OS_ARTIFACT_FETCH_TIMEOUT_MS` (default 60 s). A dedicated `artifact-api` mode (Bearer-authenticated control-plane pull) was removed in #4246 — zero consumers in any repo; the cloud runtime uses its own `ArtifactApiClient`. |
0 commit comments