Skip to content

Commit 0c3a0ff

Browse files
objectstack-fleet[bot]zhuangjianguoclaude
authored
chore(upstream): the cloud pin moves by hand; the bump workflow moves only objectstack (#433) (#434)
* docs(i18n): translate the entry path into ja (index, why, start, editions, use) Phase 1 of the other-locale plan. Adds ja translations of the 19 entry-path pages (index, why, start/*, editions/*, use/*) and the ja sidebar labels for start/ and editions/. Every heading keeps its English id, fences match the English byte for byte, terms follow the glossary's ja column, and each page carries a --stamp. check-translations: ja 0 stale, 79 missing (was 98). Fixes #386 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate build/ and build/data/ into ja (#388, PR 1 of 7) Phase 2 of the other-locale plan, first batch: ja for the build/ top level (index, agents, ai-builder, ai-skills, extend-existing-systems, marketplace, packages, reports, templates) and build/data/ (index, relationships, formulas, validation-rules). Same rules as #386: English heading ids, fences byte for byte, glossary ja column, UI labels in English, one line per paragraph, each page stamped. check-translations: ja 0 stale, 66 missing (was 79). Refs #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate build/automation/ and build/interface/ into ja (#388, PR 2 of 7) Adds ja translations for the 11 automation and interface pages: build/automation/{index,flows,workflows,approvals} and build/interface/{index,apps,views,forms,dashboards,pages,actions}. Both sections' meta.ja.json already match the English pages list. Refs #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * fix(search): keep one locale index and read search text from build output (#393) /api/search kept every locale's Orama index (30-40 MB each) and every page module page.data.load() imported, so one Worker isolate grew from 58 MB after its first locale to 283 MB after all eight, and #390's ja pages tipped it past 128 MB into 503s. - scripts/gen-search-data.mjs computes each page's structuredData before next build with fumadocs-mdx's own remark chain and writes one gzipped module per locale to apps/docs/.search/; the route reads that instead of importing page modules. - The route keeps the most recently used locale's index only. - check-search-heap.mjs asks the built route in every locale twice and fails above 100 MB or when the second pass keeps growing; it runs in ci.yml after check-search-locales and its --self-test is in SELF_TESTED. Measured on the built route: levels at 50-54 MB across both passes. Fixes #393 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): re-land build/automation/ and build/interface/ ja pages (#388, PR 2 of 7) Reverts #392, which reverted #390 because /api/search ran out of Worker memory. #394 (#393) fixed that, so the same 11 ja pages come back unchanged. Refs #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * fix(worker): stop bundling every docs page twice (#395) Six route handlers (search, og, sitemap, llms.txt, llms-full.txt, llms.mdx) import lib/source.ts, whose fumadocs-mdx collection holds a lazy import() of every compiled page. Turbopack compiles route handlers as their own module graph, so the Worker carried a second copy of every page module: ~20 MB of upload, and each translated page cost ~170-235 KiB instead of ~86. #388's PR 3 would have gone over the 61,440 KiB budget. - scripts/gen-route-data.mjs (was gen-search-data.mjs) also writes .route-data/collection.ts: .source/server.ts with each page's body import replaced by a read of generated data, and markdown.ts, the English pages' processed Markdown the llms routes serve. With --dev it re-exports the full collection so next dev sees new pages. - lib/source.ts builds its loader on that collection; the page route loads bodies through lib/page-body.ts, the only module that imports the full collection. - lib/packed.ts unpacks the generated gzip+base64 strings. - The Worker budget step prints a per-page projection from the bundle's metafile (check-worker-page-cost.mjs, in SELF_TESTED). Measured, same machine: main f7e4a57 59,173 KiB, this change 38,909 KiB; with every ja page filled in, 43,700 KiB. Fixes #395 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate configure/ into ja (#388, PR 3 of 7) Adds ja translations for the 14 configure/ pages: index, ai, api-access, authentication, data-sources, email, localization, mcp, notifications, runtime, storage, system-settings, users and webhooks. configure/ meta.ja.json already matches the English pages list. Same rules as the earlier batches: English heading ids, fences byte for byte, glossary ja column, UI labels in English, one line per paragraph, each page stamped. check-translations: ja 0 stale, 41 missing (was 55). Refs #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate configure/permissions/ and cloud/ into ja (#388, PR 4 of 7) Adds ja translations for the 7 configure/permissions/ pages (index, managing-access, permission-sets, positions, record-access, field-level-security, hierarchy-visibility) and the 8 cloud/ pages (organization, environments, plans-and-seats, ai-credits-and-limits, storage-and-limits, domains, apps, cloud-connection), plus a new cloud/meta.ja.json whose pages match the English. configure/permissions/ meta.ja.json already matched. Same rules as the earlier batches. check-translations: ja 0 stale, 26 missing (was 41). Refs #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate deploy/ and operate/ into ja (#388, PR 5 of 7) Adds ja translations for the 4 deploy/ pages (index, docker, kubernetes, air-gapped) and the 7 operate/ pages. Both sections' meta.ja.json already match the English pages list. Same rules as the earlier batches. check-translations: ja 0 stale, 15 missing (was 26). Refs #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate reference/, architecture and ontology into ja (#388, PR 6 of 7) Adds ja translations for the 9 reference/ pages and the two root pages, architecture and ontology. reference/meta.ja.json already matches the English pages list; the root sidebar has only meta.json. Same rules as the earlier batches. check-translations: ja 0 stale, 4 missing (was 15). Refs #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate resources/ into ja, completing ja coverage (#388, PR 7 of 7) Adds ja translations for the 4 resources/ pages: changelog, faq, glossary and support. resources/meta.ja.json already matches the English pages list. Same rules as the earlier batches. With this batch every English page has a ja translation. check-translations: ja 0 stale, 0 missing (was 4). Fixes #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): re-sync start/cloud step 1 in zh-Hans, zh-Hant and ja (#404) #403 changed step 1 of "Start on ObjectOS Cloud" to link the console's register and sign-in pages instead of www.objectos.ai. This carries the same change into zh-Hans and ja, restamps both, and regenerates zh-Hant with gen:zh-hant. check-translations: zh-Hans and ja 0 stale, 0 missing. Fixes #404 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): re-sync six pages changed by #410 and #413 in zh-Hans, zh-Hant and ja (#414) #410 added subscription management, AI seat changes and Paddle as the seller to cloud/plans-and-seats and cloud/ai-credits-and-limits. #413 moved the sales contact to sales@objectos.ai on editions/license, resources/support, resources/faq and start/enterprise. This carries only the changed parts into zh-Hans and ja, restamps all twelve pages, and regenerates zh-Hant with gen:zh-hant. Paddle, emails and URLs are copied byte for byte. check-translations: zh-Hans and ja 0 stale, 0 missing. Fixes #414 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(positioning): quote the README's three-edition sentence (#341) objectstack#26148 replaced the README sentence OBJECTOS_DEFINITION quoted ("...the commercial runtime environment built on this stack") with one naming three editions: ObjectOS Community, shipped by the repository, free and self-hosted; ObjectOS Cloud, hosted; ObjectOS Enterprise, self-managed and licensed. - OBJECTOS_DEFINITION quotes README lines 27-31 from "To run it", with three declared changes: "this repository" spelled out as "the ObjectStack repository", the Markdown dropped, and the in-README "(Ship it)" link left out. - OBJECTOS_EDITIONS keeps only the #171 Q2 export clause, naming Cloud and Enterprise instead of "either edition". - POSITIONING_SHORT (152 characters) names the three editions in the README's words. - The index.mdx opening paragraph and description follow, and the zh-Hans and ja siblings are re-translated and restamped; zh-Hant is regenerated. check-positioning passes after a build. Fixes #341 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): re-sync editions/compare and editions/license after #407 (#418) #407 added Team's annual price ($20 / AI seat / month billed annually) to the Price row of editions/compare and editions/license. This adds the same to the zh-Hans and ja Price cells, in the annual-price wording each locale uses on cloud/plans-and-seats, restamps the four pages and regenerates zh-Hant. check-translations: zh-Hans and ja 0 stale, 0 missing. Fixes #418 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(architecture): ObjectOS layer row in three-edition terms (#417) The layer table on architecture still called ObjectOS "the commercial runtime environment built on the framework" with two editions, the definition objectstack#26148 retired and #416 removed from the positioning constants. The row now uses only positioning.ts's terms: ObjectOS Community free and self-hosted, ObjectOS Cloud the hosted edition, ObjectOS Enterprise the self-managed, licensed one. zh-Hans and ja use the wording their index.mdx carries since #416; both are restamped and zh-Hant is regenerated. check-positioning rule (c) now lists "commercial runtime environment" as a stale sentence, with a fixture, so the phrase cannot come back to an English source. Fixes #417 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(templates): remove the five retired templates from the catalog and entry pages (#421) On ObjectStack 17.7 the scaffolder refuses todo, compliance, content, contracts and procurement as retired, yet the docs listed them as templates and catalog apps. Per the ruling on #334 Q5 they are removed, and build/templates' "--template todo is refused as retired" stays as the one mention. - build/templates: seoTitle and description name helpdesk, hr and project; the five catalog rows and the three pick-table rows that pointed at them are gone. - index: the marketplace example names Helpdesk only. - start/community and build/marketplace: the same five rows leave their app tables, and the template clone example uses helpdesk. - build/index names none of the five and is untouched. zh-Hans and ja get the same removals and are restamped; zh-Hant is regenerated. Fixes #421 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(upgrade): JWT key rotation follows the deployment's own procedure (#423) Per the ruling on #334 Q4, the upgrade page's "Rotate the JWT signing keys" step gains one sentence: how the keys are rotated depends on how the deployment supplies them, so follow the deployment's own procedure. It names no mechanism, variable or command. zh-Hans and ja carry the same sentence and are restamped; zh-Hant is regenerated. Q2 and Q3 of the same ruling need no change; the seat measured both pages against it. Fixes #423 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(positioning): exporting a Cloud or Enterprise ontology to the open runtime is planned (#334 Q1) No mechanism exports a Cloud or Enterprise tenant's ontology to run on the open-source ObjectStack runtime yet. OBJECTOS_EDITIONS, the index opening paragraph, /llms.txt and 13 sentences across index, security, glossary, why, architecture and ontology now say the export is planned, and keep what is true today: the ontology is ordinary ObjectStack metadata, ObjectStack is Apache-2.0, and ObjectOS Community runs on your own machine. zh-Hans and ja follow, restamped; zh-Hant regenerated. Ruling-ref: #334 comment 6568804196 Fixes #425 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate six cloud and editions pages after one environment per organization, re-sync cloud/organization (zh-Hans, zh-Hant, ja) #428 deleted the zh-Hans, zh-Hant and ja siblings of cloud/apps, domains, environments, plans-and-seats, storage-and-limits and editions/compare. They are translated from the current English: every sentence #428 changed is new, and wording is reused only where the English sentence is unchanged. cloud/organization is re-synced in both locales. zh-Hant regenerated. Part of #429 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): follow #431 plan B in zh-Hans, zh-Hant and ja; translate editions/license fresh Re-sync cloud/plans-and-seats and editions/compare to #431's English, and translate editions/license, whose siblings #431 deleted, from the current English, reusing wording only where the English sentence is unchanged. Re-sync configure/mcp, deploy/index, index and start/enterprise. zh-Hant regenerated. Fixes #429 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * chore(upstream): the cloud pin moves by hand; the bump workflow moves only objectstack Maintainer ruling on #433: .cloud-sha is updated by hand when the docs are aligned with production, with no repository_dispatch from cloud and no UPSTREAM_BUMP_TOKEN for cloud. AGENTS.md 'Upstream pins' now gives the steps: the full SHA from cloud's v* tag or its deploy-cloud-prod run (the health header has only 8 characters), and the git log of CHANGELOG.md and .changeset/ pasted into the PR body. bump-upstream-pin.mjs refuses --upstream cloud with those steps, and its self-test proves the refusal; --check still validates both pins by format alone. The workflow offers only objectstack, and its token message no longer asks for cloud read access. objectstack's bump and its token requirement are unchanged. Fixes #433 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Steedos <zhuangjianguo@steedos.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 32ee782 commit 0c3a0ff

3 files changed

Lines changed: 87 additions & 48 deletions

File tree

‎.github/scripts/bump-upstream-pin.mjs‎

Lines changed: 51 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/usr/bin/env node
22
/**
3-
* Upstream pins — move one of `.objectstack-sha` / `.cloud-sha` and write the
4-
* pull-request body that lists what changed upstream since the previous pin.
3+
* Upstream pins — check both `.objectstack-sha` and `.cloud-sha`, and move the
4+
* objectstack pin, writing the pull-request body that lists what changed
5+
* upstream since the previous pin. The cloud pin is moved by hand (below).
56
*
67
* ## Why this exists
78
*
@@ -12,27 +13,38 @@
1213
* pass misses. A pin turns it into a bounded one: each file at the repository
1314
* root holds the one upstream commit the site was last aligned to, and every
1415
* alignment is a review of the upstream commits and changed paths since that
15-
* commit. This script computes that range; `bump-upstream-docs.yml` runs it
16-
* and opens the pull request whose body it writes.
16+
* commit. For objectstack this script computes that range;
17+
* `bump-upstream-docs.yml` runs it and opens the pull request whose body it
18+
* writes.
1719
*
1820
* ## When a pin moves
1921
*
2022
* objectstack on a published `@objectstack/cli` release — the commit its
2123
* release tag `@objectstack/cli@VERSION` names. With no `--sha`,
22-
* the release is npm's `latest` dist-tag.
23-
* cloud after a successful cloud production deploy — the commit that
24-
* deploy serves, never a merge to cloud's `main`. There is no
25-
* default: the deploy supplies `--sha`, and the run refuses
26-
* without one.
24+
* the release is npm's `latest` dist-tag. This script moves it.
25+
* cloud BY HAND, when someone refreshes the docs to match production —
26+
* not on every cloud release (maintainer ruling,
27+
* docs.objectos.ai#433). The person writes the full SHA of the
28+
* commit production serves (cloud's `v*` tag, or its
29+
* deploy-cloud-prod run; the health header's 8-character
30+
* `x-objectstack-build-sha` only identifies it) and pastes
31+
* `git log OLD..NEW -- CHANGELOG.md .changeset/` from a local
32+
* cloud checkout into the pull-request body. No workflow, dispatch
33+
* or token moves it, and this script refuses `--upstream cloud`:
34+
* cloud is private and this repository holds no token to read it.
35+
* AGENTS.md "Upstream pins" has the steps.
36+
*
37+
* `--check` validates both pin files the same way, by format alone; it reads
38+
* neither upstream, so a hand-edited `.cloud-sha` passes it like any other.
2739
*
2840
* ## The pin file
2941
*
3042
* Exactly one line: a full, lowercase, 40-character commit SHA. The one other
3143
* accepted value is the placeholder `unpinned`, for an upstream that has never
3244
* been pinned (`.cloud-sha` ships with it, because cloud is a private
3345
* repository this site's maintainers could not read when the pins were added).
34-
* A range cannot start at the placeholder, so the first bump of an unpinned
35-
* upstream only records the commit and says so; the next bump is the first
46+
* A range cannot start at the placeholder, so the first move of an unpinned
47+
* pin only records the commit and lists nothing; the next one is the first
3648
* bounded diff. A missing file, an empty one, an abbreviated SHA or a branch
3749
* name is refused — a pin that cannot be resolved to one commit bounds nothing.
3850
*
@@ -41,8 +53,8 @@
4153
* - the new commit is not a descendant of the current pin — the range
4254
* `OLD..NEW` would silently drop whatever `OLD` has that `NEW` lacks, and
4355
* the review would read a diff that is not the change;
44-
* - the upstream cannot be read — cloud is private and needs `UPSTREAM_TOKEN`;
45-
* - a cloud bump with no `--sha`.
56+
* - the upstream cannot be read;
57+
* - a bump of an upstream whose pin is moved by hand (cloud).
4658
*
4759
* A bump to the commit already pinned is not an error: it writes nothing,
4860
* reports `changed=false`, and the workflow opens no pull request.
@@ -62,7 +74,7 @@
6274
*
6375
* node .github/scripts/bump-upstream-pin.mjs --check
6476
* Validate both pin files. Exit 1 naming each bad one.
65-
* node .github/scripts/bump-upstream-pin.mjs --upstream objectstack|cloud \
77+
* node .github/scripts/bump-upstream-pin.mjs --upstream objectstack \
6678
* [--sha SHA] --body FILE [--git-dir DIR]
6779
* Resolve, fetch (blobless) into DIR, write the new pin and the body.
6880
* Writes `changed`, `old`, `new`, `short`, `label` and `title` to $GITHUB_OUTPUT
@@ -79,19 +91,25 @@ import { spawnSync } from 'node:child_process';
7991

8092
const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '../..');
8193

82-
/** The two upstreams. `paths` is what the alignment review reads. */
94+
/**
95+
* The two upstreams. `paths` is what the alignment review reads. `byHand` marks
96+
* a pin this script checks but never moves (docs.objectos.ai#433): its paths are
97+
* the ones the person moving it lists with `git log` in the pull-request body.
98+
*/
8399
const UPSTREAMS = {
84100
objectstack: {
85101
repo: 'objectstack-ai/objectstack',
86102
pinFile: '.objectstack-sha',
87103
paths: ['content/docs', 'docs/releases', 'CHANGELOG.md'],
88104
release: '@objectstack/cli',
105+
byHand: false,
89106
},
90107
cloud: {
91108
repo: 'objectstack-ai/cloud',
92109
pinFile: '.cloud-sha',
93110
paths: ['CHANGELOG.md', '.changeset'],
94111
release: null,
112+
byHand: true,
95113
},
96114
};
97115

@@ -124,6 +142,17 @@ function parseUpstream(name) {
124142
return UPSTREAMS[name];
125143
}
126144

145+
/** An upstream this script may move: declared, and not moved by hand. */
146+
function bumpable(name) {
147+
const up = parseUpstream(name);
148+
if (up.byHand) {
149+
throw new Refusal(
150+
`${up.pinFile} is moved by hand, not by this script (docs.objectos.ai#433): write the full SHA production serves and paste \`git log OLD..NEW -- ${up.paths.join(' ')}\` from a local checkout into the pull-request body — see AGENTS.md "Upstream pins"`,
151+
);
152+
}
153+
return up;
154+
}
155+
127156
/** A `--sha` / dispatch-payload value: absent, or a full SHA. Never a ref name. */
128157
function parseShaInput(value) {
129158
const v = (value ?? '').trim();
@@ -265,7 +294,7 @@ function readPinFile(root, up) {
265294

266295
async function bump(opts) {
267296
const name = opts.upstream;
268-
const up = parseUpstream(name);
297+
const up = bumpable(name);
269298
const oldPin = readPinFile(opts.root, up);
270299
const url = `https://github.com/${up.repo}.git`;
271300
const env = gitEnv(process.env.UPSTREAM_TOKEN);
@@ -274,9 +303,6 @@ async function bump(opts) {
274303
let source = 'supplied by the run that requested this bump';
275304
let target = null;
276305
if (!newSha) {
277-
if (!up.release) {
278-
throw new Refusal(`a ${name} bump needs --sha: the commit its production deploy serves (there is no default)`);
279-
}
280306
const version = await latestRelease(up.release);
281307
const tag = `${up.release}@${version}`;
282308
const ls = git(['ls-remote', url, `refs/tags/${tag}`, `refs/tags/${tag}^{}`], { env });
@@ -294,8 +320,7 @@ async function bump(opts) {
294320
const wants = kind === 'range' ? [newSha, oldPin.sha] : [newSha];
295321
const fetched = git(['fetch', '--quiet', '--filter=blob:none', url, ...wants], { gitDir, env, allowFail: true });
296322
if (fetched.status !== 0) {
297-
const hint = name === 'cloud' && !process.env.UPSTREAM_TOKEN ? ' — cloud is private: set UPSTREAM_TOKEN' : '';
298-
throw new Refusal(`could not fetch ${up.repo} at ${wants.join(', ')}${hint}: ${(fetched.stderr || '').trim().split('\n').pop()}`);
323+
throw new Refusal(`could not fetch ${up.repo} at ${wants.join(', ')}: ${(fetched.stderr || '').trim().split('\n').pop()}`);
299324
}
300325
git(['cat-file', '-e', `${newSha}^{commit}`], { gitDir });
301326

@@ -433,6 +458,10 @@ function selfTest() {
433458
for (const bad of ['', 'objectui', 'toString', '__proto__', undefined]) {
434459
expectRefusal(`upstream: ${JSON.stringify(bad)}`, () => parseUpstream(bad), 'unknown upstream');
435460
}
461+
// Only objectstack is bumped here; the cloud pin is moved by hand (#433), and the refusal says how.
462+
if (bumpable('objectstack') !== UPSTREAMS.objectstack) fail('bump: objectstack is not bumpable');
463+
expectRefusal('bump: cloud', () => bumpable('cloud'), 'moved by hand');
464+
expectRefusal('bump: cloud names the git log to paste', () => bumpable('cloud'), 'git log OLD..NEW -- CHANGELOG.md .changeset');
436465

437466
// The pin a missing file refuses is the real reader, against a real (temporary) tree.
438467
const empty = mkdtempSync(join(tmpdir(), 'pin-selftest-'));
@@ -489,7 +518,7 @@ function selfTest() {
489518
process.exitCode = 1;
490519
return;
491520
}
492-
console.log(`✓ self-test: ${total} pin/input case(s), upstream names, tag resolution, plan, body bounds and token carriage`);
521+
console.log(`✓ self-test: ${total} pin/input case(s), upstream names, the hand-moved cloud pin, tag resolution, plan, body bounds and token carriage`);
493522
}
494523

495524
/* ------------------------------------------------------------------ main -- */

‎.github/workflows/bump-upstream-docs.yml‎

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
name: Bump upstream docs pin
22

3-
# Moves ONE upstream pin — `.objectstack-sha` or `.cloud-sha` — and opens a
4-
# pull request whose body lists the upstream commits and changed paths since
5-
# the previous pin. That body is the alignment review's input: the site is
6-
# checked against a bounded diff instead of a periodic re-read of both corpora.
7-
# The rules for when each pin moves, and what the body lists, are in the header
8-
# of `.github/scripts/bump-upstream-pin.mjs`; AGENTS.md has the short form.
3+
# Moves the objectstack pin, `.objectstack-sha`, and opens a pull request whose
4+
# body lists the upstream commits and changed paths since the previous pin.
5+
# That body is the alignment review's input: the site is checked against a
6+
# bounded diff instead of a periodic re-read of the corpus. The rules are in the
7+
# header of `.github/scripts/bump-upstream-pin.mjs`; AGENTS.md has the short form.
98
#
109
# objectstack on a published `@objectstack/cli` release. With no `sha`, the
1110
# run pins the commit tagged with npm's `latest` release.
12-
# cloud after a successful cloud production deploy, to the commit that
13-
# deploy serves. `sha` is required; the run refuses without it.
11+
#
12+
# The cloud pin, `.cloud-sha`, is NOT moved here: it is moved by hand when the
13+
# docs are refreshed to match production (maintainer ruling,
14+
# docs.objectos.ai#433), and the helper refuses `upstream: cloud`. AGENTS.md
15+
# "Upstream pins" has the steps. This workflow still checks its format.
1416
#
1517
# Triggers: `workflow_dispatch` by hand, or `repository_dispatch` of type
16-
# `bump-upstream-docs` with `client_payload: { upstream, sha }` — the shape a
17-
# deploy or release workflow elsewhere sends. On a pull request that touches the
18-
# pins, the helper or this file, the `pins` job runs the helper's self-test and
19-
# checks both pin files.
18+
# `bump-upstream-docs` with `client_payload: { upstream: objectstack, sha }` —
19+
# the shape a release workflow elsewhere sends. On a pull request that touches
20+
# the pins, the helper or this file, the `pins` job runs the helper's self-test
21+
# and checks both pin files by format alone; it reads neither upstream.
2022
#
2123
# ⛔ One secret, `UPSTREAM_BUMP_TOKEN`, and the bump refuses to start without
22-
# it. It is used for two things `GITHUB_TOKEN` cannot do here:
23-
# - read `objectstack-ai/cloud`, a private repository (contents: read there);
24-
# - push the bump branch and open the pull request (contents: write and
25-
# pull-requests: write here). A pull request opened with `GITHUB_TOKEN`
26-
# starts no `pull_request` workflows — GitHub suppresses them to prevent
27-
# recursive runs — so CI would never run on the bump, and whether this
28-
# repository lets Actions open pull requests at all is a repository setting.
24+
# it. It pushes the bump branch and opens the pull request (contents: write and
25+
# pull-requests: write here), which `GITHUB_TOKEN` cannot do usefully: a pull
26+
# request it opens starts no `pull_request` workflows — GitHub suppresses them
27+
# to prevent recursive runs — so CI would never run on the bump, and whether
28+
# this repository lets Actions open pull requests at all is a repository
29+
# setting.
2930

3031
on:
3132
workflow_dispatch:
3233
inputs:
3334
upstream:
34-
description: Which pin to move
35+
description: Which pin to move (the cloud pin is moved by hand, see AGENTS.md)
3536
type: choice
36-
options: [objectstack, cloud]
37+
options: [objectstack]
3738
required: true
3839
sha:
3940
description: >-
40-
Full 40-character commit SHA to pin. Required for cloud (the commit its
41-
production deploy serves). Leave empty for objectstack to pin npm's
42-
latest @objectstack/cli release.
41+
Full 40-character commit SHA to pin. Leave empty to pin npm's latest
42+
@objectstack/cli release.
4343
type: string
4444
required: false
4545
repository_dispatch:
@@ -96,7 +96,7 @@ jobs:
9696
UPSTREAM_BUMP_TOKEN: ${{ secrets.UPSTREAM_BUMP_TOKEN }}
9797
run: |
9898
if [ -z "$UPSTREAM_BUMP_TOKEN" ]; then
99-
echo "::error title=NOT CONFIGURED::The repository secret UPSTREAM_BUMP_TOKEN is not set. It needs contents: read on objectstack-ai/cloud and contents: write + pull-requests: write on this repository. GITHUB_TOKEN is not a substitute: it cannot read cloud, and a pull request it opens runs no CI."
99+
echo "::error title=NOT CONFIGURED::The repository secret UPSTREAM_BUMP_TOKEN is not set. It needs contents: write + pull-requests: write on this repository. GITHUB_TOKEN is not a substitute: a pull request it opens runs no CI. (The cloud pin needs no token: it is moved by hand, see AGENTS.md.)"
100100
exit 1
101101
fi
102102

‎AGENTS.md‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,17 @@ node .github/scripts/check-translations.mjs --worklist # what the next pass wil
103103

104104
## Upstream pins
105105

106-
`.objectstack-sha` and `.cloud-sha` at the repository root each hold one full commit SHA: the commit of `objectstack-ai/objectstack` and of `objectstack-ai/cloud` this site was last aligned to. The objectstack pin moves when an `@objectstack/cli` release is published, to the commit its release tag names; the cloud pin moves after a successful cloud production deploy, to the commit that deploy serves — never on a merge to cloud's `main`. ⛔ Don't edit a pin by hand: `.github/workflows/bump-upstream-docs.yml` (run by hand, or a `repository_dispatch` of type `bump-upstream-docs` with `{ upstream, sha }`) moves one pin and opens a PR whose body lists the upstream commits and changed paths since the previous pin — objectstack: `content/docs`, `docs/releases`, `CHANGELOG.md`; cloud: `CHANGELOG.md`, `.changeset/`. That list is the alignment review's input: update the English pages it affects before the pin lands. `.cloud-sha` holds the placeholder `unpinned` until its first bump, which records a commit and lists nothing. The rules live in the header of `.github/scripts/bump-upstream-pin.mjs`.
106+
`.objectstack-sha` and `.cloud-sha` at the repository root each hold one full commit SHA: the commit of `objectstack-ai/objectstack` and of `objectstack-ai/cloud` this site was last aligned to. What changed upstream between the old pin and the new one is the alignment review's input: update the English pages it affects before the pin lands.
107+
108+
**The objectstack pin** moves when an `@objectstack/cli` release is published, to the commit its release tag names. ⛔ Don't edit it by hand: `.github/workflows/bump-upstream-docs.yml` (run by hand, or a `repository_dispatch` of type `bump-upstream-docs` with `{ upstream: "objectstack", sha }`) moves it and opens a PR whose body lists the upstream commits and changed paths since the previous pin in `content/docs`, `docs/releases` and `CHANGELOG.md`. Opening that PR needs the repository secret `UPSTREAM_BUMP_TOKEN`.
109+
110+
**The cloud pin moves by hand** (maintainer ruling, #433): when someone refreshes the docs to match production, not on every cloud release. No workflow, dispatch or token moves it. To move it:
111+
112+
1. Take the full 40-character SHA of the commit production serves: `git rev-parse vX.Y.Z^{commit}` on cloud's `v*` release tag, or the commit of cloud's `deploy-cloud-prod` run. The `x-objectstack-build-sha` header of `https://cloud.objectos.ai/api/v1/health` has only the first 8 characters: it tells you which commit, but it is not a pin.
113+
2. Write that SHA to `.cloud-sha` as the file's only line.
114+
3. In the PR body, paste the output of `git log <old>..<new> -- CHANGELOG.md .changeset/`, run in a local cloud checkout. That list is the alignment review's input. The first hand update, from the placeholder `unpinned`, has no previous commit, so it lists nothing.
115+
116+
On a PR that touches a pin, the `pins` job checks the format only (a full lowercase SHA, or `unpinned`) and reads neither upstream. The rules live in the header of `.github/scripts/bump-upstream-pin.mjs`.
107117

108118
## Commands
109119

0 commit comments

Comments
 (0)