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
{{ message }}
Repository navigation
Commit 882d4e4
Browse filesBrowse the repository at this point in the historyBrowse files
fix(cli): os package publish sends the manifest's listing tags, and uses a top-level tagline only as a missing description (#27573)
domain:server#1 · os-sales · session_01L6bhgXcN9HaZYSEUdJWEjw
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuVpEmthvkRbuHGjC6oSQZvd)_Fixes#27364
Clause-②: no
Metadata-protocol: none
Skills-docs: updated here —
content/docs/deployment/marketplace-handbook.mdx,
content/docs/deployment/cli.mdx (commit 94a3512, claim amendment
6498466275)
## 维护者速读
- **改了什么**:`os package publish` 现在把清单里的 `tags`
原样发给云端;警告改口:`publisher`、`isStarter` 由平台决定、作者写了不生效(不再说「暂未携带」);顶层
`tagline` 只在没有 description 时充当 description,否则不发并提示。
- **为什么改**:云端发布接口已能校验并保存 `tags`(cloud#3361),CLI 还在丢弃它,警告也说错了原因;`tagline`
云端没有这一列,一直白发。
- **风险与回滚**:只动 CLI 一个命令的请求体与警告文案;超长或过多的标签由云端 400 拒收并原样打印,CLI 不自设上限。回滚即
revert 本 PR。
- **先看**:`packages/cli/src/commands/package/publish.ts`(`pkgBody.tags` 与
tagline/description
那一段、`uncarriedManifestWarnings`);`packages/cli/test/package-publish-uncarried-manifest-keys.test.ts`。
- **两分钟验证**:`pnpm --filter @objectstack/cli exec vitest run --project
unit test/package-publish-uncarried-manifest-keys.test.ts`,预期 14 个用例全绿。
- **需要你做的**:无,席位落地。
## What changes
`packages/cli/src/commands/package/publish.ts`, one command:
- **`tags` is sent.** When `objectstack.manifest.json` declares `tags`,
the package POST carries `tags` as written. The hosted route owns the
shape and the bounds; the CLI keeps no copy of them and pre-checks
nothing, so a refused list comes back as the server's 400 and is printed
as the server wrote it (the existing failure path). An absent key leaves
the stored tags alone; `[]` clears them. `tags` leaves
`UNCARRIED_MANIFEST_KEYS`.
- **Warning wording.** `publisher` and `isStarter` get their own
warning: decided by the platform, an author's value has no effect, so
publish does not send them. ⛔ Neither is ever sent. `preview` keeps the
"hosted catalog does not carry yet" warning with the tracking link;
`visibility` keeps its flag warning.
- **Top-level `tagline`.** With no `--description` flag and no manifest
`description`, the trimmed tagline is sent as `description`. Otherwise
the tagline is not sent, and a warning names it (dropping an authored
key silently is the defect this module's warnings exist for). The
per-locale `translations.LOCALE.tagline` path is unchanged.
Importers of the two exported constants: `UNCARRIED_MANIFEST_KEYS` and
`CATALOG_SEND_ISSUE` are imported only by
`packages/cli/test/package-publish-uncarried-manifest-keys.test.ts`
(repo-wide grep at the branch head).
One changeset, `@objectstack/cli` patch.
## Tests
`packages/cli/test/package-publish-uncarried-manifest-keys.test.ts`
drives the real command (`PackagePublish.run`) against a stubbed `fetch`
and reads the request body it sends:
- tags: sent as written; `[]` sent; no key when undeclared; 21 over-long
tags reach the wire unchanged, and the server's 400 message reaches the
output, exit 1, no version POST.
- tagline: becomes `description` when none is given; not sent and named
in a warning when the manifest or the flag gives one; per-locale tagline
untouched.
- warnings: `publisher`/`isStarter` platform-decided and never sent;
`preview` still not carried, with the link; `visibility` separate; quiet
when only sent keys are declared.
- the schema-key partition moves `tags` to SENT.
## Acceptance notes
- **Docs updated here (commit `94a3512f`, file surface extended by claim
amendment 6498466275).**
`content/docs/deployment/marketplace-handbook.mdx`: the warn callout no
longer says `tags` is not sent (`publisher` / `isStarter` are
platform-decided, never sent, warned), and the key table gains a `tags`
row. `content/docs/deployment/cli.mdx`: the keys-read list names `tags`
(sent as written) in place of `tagline`, and says a top-level `tagline`
is used only as a missing description.
- The hosted bounds (20 tags, 64 characters each) are cloud's numbers
and are not exported in this repository, so per the triage ruling the
CLI does not pre-check them.
## Verification
All readings below are at head `083edf170d` (fix `fadb51292f` plus one
merge of `origin/main`), except the red leg and the ablation, which name
their commit.
<details><summary>Red first (test commit f2c48fc, source
unchanged)</summary>
```
Test Files 1 failed (1)
Tests 9 failed | 5 passed (14)
```
Failing: the three tags-sent cases, the three tagline cases, the
platform-decided wording, the quiet case, and the partition.
</details>
<details><summary>Green</summary>
```
publish suites (5 files): Test Files 5 passed (5) · Tests 59 passed (59)
pnpm --filter @objectstack/cli exec vitest run --project unit: Test Files 349 passed (349) · Tests 5063 passed (5063) · VERDICT command-exit 0
pnpm --filter @objectstack/cli typecheck: VERDICT command-exit 0 (test layer: 28 errors / 6 signatures held in test-typecheck-debt.json, unchanged)
eslint --no-inline-config packages/cli: exit 0
```
The `integration` layer is declared to CI (the diff touches no spawn
entry).
</details>
<details><summary>Ablation (scripts/ablation-replace.mjs, at
fadb512)</summary>
```
anchor "if (m.tags !== undefined) pkgBody.tags = m.tags;" x1 -> x0, replacement x0 -> x1
blob 4bc0cb2 -> d0cced9bda65
Tests 3 failed | 11 passed (14): the three tags-sent cases
restored: blob == HEAD (4bc0cb2) and git diff HEAD is empty
```
The test imports the command from `src/`, so no build sits between the
mutation and the run. The tagline and wording changes are evidenced by
the red leg against the unchanged source.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgXcN9HaZYSEUdJWEjw)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L6bhgXcN9HaZYSEUdJWEjw
---------
Co-authored-by: Claude <noreply@anthropic.com>
fix(cli): `os package publish` sends the manifest's listing `tags`, says `publisher` and `isStarter` are decided by the platform, and uses a top-level `tagline` only as a missing description
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
The hosted publish route validates and stores a package's listing tags, so `os package publish` now carries them:
11
+
12
+
-**`tags`.** When `objectstack.manifest.json` declares `tags`, publish sends them as written. The hosted route owns the shape and the bounds and refuses a bad list with a 400, which publish prints as the server wrote it; the CLI applies no limit of its own. A file with no `tags` leaves the stored tags alone, and `"tags": []` clears them. The warning no longer names `tags`.
13
+
-**`publisher` and `isStarter`.** The warning now says the platform decides them and an author's value has no effect. Publish still never sends either.
14
+
-**Top-level `tagline`.** The hosted catalog has no tagline column; `description` is the short listing text. When neither `--description` nor the manifest's `description` is given, publish sends the tagline as the description. Otherwise it no longer sends the tagline, and a warning says so. A per-locale `translations.<locale>.tagline` is sent as before.
15
+
-**`preview` and `visibility`.** Unchanged: `preview` is still named as not carried by the hosted catalog yet, and `visibility` is still set only by `--visibility`.
Copy file name to clipboardExpand all lines: content/docs/deployment/marketplace-handbook.mdx
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,7 @@ the declared keys below are the ones publish actually sends.
35
35
|`displayName`| The name on the card |`--display-name`|
36
36
|`description`| The short description |`--description`|
37
37
|`category`| The catalog category slug (`crm`, `hr`, `finance`, …) |`--category`|
38
+
|`tags`| The listing tags, sent as written. The catalog validates and stores them and refuses a bad list with a 400, which publish prints as it is; `[]` clears the stored tags, and leaving the key out keeps them | — |
38
39
|`iconUrl`| A public http(s) icon URL |`--icon-url`, or `--icon-file` to upload one |
39
40
|`homepageUrl`| Your project or docs URL |`--homepage-url`|
40
41
|`license`| An SPDX identifier |`--license`|
@@ -83,10 +84,12 @@ columns for a missing key. The per-locale shape is the
83
84
**Two things the file can say that never reach the listing.** Publish uploads no
84
85
screenshot images, and the Console's marketplace pages render none: a
85
86
`preview.screenshots` list stays on your disk, and `screenshotCaptions` travels
86
-
with no image to caption. The schema also accepts `tags`, `publisher` and
87
-
`isStarter`, but `os package publish` does not send them. Put the icon, the
88
-
description, the tagline and the README where the table above says, and nothing
89
-
else.
87
+
with no image to caption. The schema also accepts `publisher` and `isStarter`,
88
+
but the platform decides both: an author's value has no effect, so
89
+
`os package publish` never sends them and prints a warning naming each one the
90
+
file declares. `tags` is different: it is sent as written (see the table above).
91
+
Put the icon, the description, the tags, the tagline and the README where the
0 commit comments