Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Commit c6a42be

Browse files
objectstack-fleet[bot]claudeos-zhuang
authored
ci: delete the spec-main-shape-gate copy, the spec shape gate runs in objectstack (objectui#12352) (#12596)
Fixes #12352 Clause-②: no Executes ruling B on objectstack-ai/objectstack#23238 (comment 6145029395, batch 336 item 3, maintainer 「其他同意」 2026-10-13), the objectui half: "the spec shape gate moves to objectstack … objectui drops its copy" once the objectstack side agrees for two consecutive hourly runs. The objectstack half landed as objectstack-ai/objectstack#23283 (`18cd410dc4`); the card shows four agreeing pairs. ## The successor - **The gate:** objectstack's `.github/workflows/spec-shape-gate.yml` (`Spec Shape Gate`), hourly on objectstack `main` at `:52`. It clones objectui `main`, injects the spec built from the objectstack commit with objectstack's own `scripts/ci/spec-shape-gate.mjs inject`, and runs this repository's `TURBO_FORCE=true pnpm type-check --continue`. It is registered in objectstack's `RELEASE_GATE_WORKFLOWS` (`scripts/ci/scheduled-full-run.mjs`), so its scheduled run is read by the release gate, and a red is attributed to the objectstack lane that moved the shape. - **Intentional retirements** are registered from now on in objectstack's `scripts/ci/spec-shape-retirements.json`, one entry per retirement naming the objectui card that removes the downstream use; the gate reads a matching diagnostic as known, not new. - The successor calls none of the files deleted here: its `inject` and `report` are objectstack's own port (read on objectstack `origin/main` at `6362c66ca`). ## What changed | Path | Change | Why | |:--|:--|:--| | `.github/workflows/spec-main-shape-gate.yml` | deleted | the copy the ruling drops | | `scripts/spec-main-shape-gate.mjs` | deleted | its script; no other file imports it | | `scripts/__tests__/spec-main-shape-gate.test.ts` | deleted | its pin test | | `scripts/dependabot-merge-gate.mjs` | `NOT_A_GATE` entry and the `REQUIRED_CONTEXTS` note removed | no workflow produces the context any more; the partition test (`the gate names checks that no pull-request workflow produces`) refuses a classified name nothing produces, and the note said "the reason is written there" about the entry being removed | | `scripts/__tests__/dependabot-merge-gate.test.ts` | the objectui#12240 describe block removed | it pinned the `NOT_A_GATE` entry above; the general partition test now holds the absence | | `scripts/check-required-check-set.mjs` | `WATCHED_CONTEXTS` tombstone rewritten | it pointed at the deleted workflow's header and described re-enrolment; it now says the workflow is gone and the name must not come back to the ruleset (a required context nothing reports stalls the queue at the ruleset timeout, objectui#3523) | | `.github/workflows/repo-gates.yml` | header comment only | it said the gate "keeps its own workflow for its hourly run on `main`" | | `content/docs/guide/ci-cd-pipeline.md` | inventory row removed; Repo Gates paragraph updated; the `Spec Main Shape Gate` section replaced by a short `Spec Shape Gate — moved to objectstack` section | the page's pins require every bare workflow filename it names to exist; the new section names the successor, the registry, and why `turbo.json` keeps the marker | | `scripts/__tests__/ci-cd-pipeline-doc.test.ts` | the two `SWEEP_DECLARED_NON_RUN_COMMANDS` entries keyed on the deleted workflow removed | the map is asserted as an exact set; with no section, both entries would read as stale | ## Kept on purpose - **`turbo.json` `globalDependencies` keeps `node_modules/@objectstack/spec/.spec-main-shape-gate.json`.** Who writes the marker: before this change, objectui's `inject` and objectstack's `inject`; after it, objectstack's `inject` still writes the same-named marker into every spec copy it replaces in an objectui install (`MARKER_FILE` in objectstack's `scripts/ci/spec-shape-gate.mjs`, whose header says the spelling "stays objectui's … for as long as objectui's turbo config names it"). Who reads it: turbo, through this entry, and nothing else in this tree (`git grep` for the marker name outside the deleted files hits only `turbo.json`; `scripts/select-type-check-scope.mjs` reads `globalDependencies` generically as root-change globs). The function still holds: a local reproduction of the successor gate in a linked worktree shares `.turbo/cache` with its siblings, and the marker keeps a forced injected run from leaving a verdict an installed tree replays (objectui#12114). Removing it would leave objectstack's header describing a coupling that no longer exists. Its in-tree pin lived in the deleted test, so the entry is now unpinned here; the new docs section carries the reason. - **`scripts/__tests__/select-type-check-scope.test.ts`** still feeds the two deleted paths as input strings to the selector: that case reproduces PR #12262's diff, turbo's answer is stubbed to an empty list, and nothing reads those paths from disk. The case stays true. - **`scripts/__tests__/check-required-check-set.test.ts` and `fixtures/required-check-set/live-2026-10-12.json`** are a dated reading of the objectui#12240 window and a pin that the name is neither pinned nor watched; both stay true. The seven ruled names are unchanged. - **The objectui#12240 window paragraph in the `check-required-check-set.mjs` header** is history and stays true. - **`packages/**`, `CHANGELOG.md` and landed `.changeset/*` mentions** are other lanes' history and are not touched (listed in the report). ## Safety readings (2026-10-16, before the first push) - **Live ruleset:** `GET /repos/objectstack-ai/objectui/rules/branches/main`, evaluated by `node scripts/check-required-check-set.mjs --fixture` on the saved answer: `INTACT`, seven required contexts, `Spec Main Shape Gate` not among them. So deleting the workflow cannot leave a required context unreported. (The script's own live read answered 401 in this container for want of a token, exit 2, a reading not taken; the same endpoint read through `gh api` answered.) - **Agreement, re-read at start:** the last four `schedule` runs on `main` of both gates all concluded `success` (objectui `38833480846`, `38826070331`, `38819949451`, `38813070302`; objectstack `38833492264`, `38826210209`, `38820098793`, `38813219037`). objectui#12325 is closed. ## Changeset None. `node scripts/check-changeset-presence.mjs` on this diff: "No source or published contract of a released package changed in this range, so no changeset is owed" (exit 0). The diff touches workflows, scripts and docs only. ## Governed surface `node scripts/check-governed-queue-guard.mjs --test` on all nine changed paths: `GOVERNED`, 2 of 9 paths on `.github/workflows/**` (exit 3). This PR stays a draft; it is a dispatched PR, so the claiming seat requests the review and lands it after an authorised approval. ## Verification at `3e9675e20` `node ../objectstack/scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectui` refuses by design (the script derives only objectstack's families), so the local set was hand-derived from this repository's own workflows and tests: - `pnpm exec vitest run --maxWorkers=2` over 89 test files: every test under `scripts/__tests__/` that names `repo-gates.yml`, the deleted workflow, `dependabot-merge-gate`, `check-required-check-set`, `ci-cd-pipeline.md` or `workflow-checks`, plus every test that reads `.github/workflows/`: `Test Files 89 passed (89)`, `Tests 3340 passed (3340)`, lock verdict `command-exit 0`. - `pnpm type-check:scripts` (tsc over `scripts/`, the pin tests included): exit 0. - `pnpm exec eslint` on the four changed script and test files: exit 0. - The install-free Repo Gates steps, each exit 0: `check-control-bytes`, `check-action-ref-convention`, `check-pre-install-import-graph` (self-test and run), `check-shell-escape-residue`, `check-doc-links`, `check-doc-fence-languages` (self-test and run), `check-doc-example-ids`, `check-doc-component-types`; plus `check-new-cross-file-line-citations` (0 new), `check-required-check-set --self-test`, `check-changeset-presence`. - NOT MEASURED locally, CI's: the full `pnpm test`, `pnpm lint`, the turbo type-check, `Build Docs`, `Build & E2E`, and the Repo Gates steps that need a build (doc snippet and skill example compiles). The new docs section adds no fenced block. ## Acceptance notes - objectstack's `scripts/ci/spec-shape-retirements.json` still carries the entry registered to objectui#12325, although that card closed on 2026-10-14 and the file's `$comment` says an entry is "deleted when that card closes". The objectui runs have been green since, so the entry matches nothing today; a later break of the same pattern would read as known. An observation about the objectstack side, not acted on here. - The `turbo.json` marker entry has no in-tree pin after this change (see "Kept on purpose"). - Several `packages/**` comments describe the gate in the present tense ("compiled … by the Spec Main Shape Gate against `main`"). The compile they describe still happens, now as objectstack's `Spec Shape Gate`; only the name is stale. Other lanes' files, left alone. ## 维护者速读(草稿) - **改了什么:** 删掉 objectui 自己那份 spec 形状门(workflow、脚本、它的 pin 测试),并把五处提到它的说明改成「门已搬到 objectstack」。 - **为什么改:** 维护者已裁(objectstack-ai/objectstack#23238 裁决 B):形状门搬到上游 objectstack,objectui 的副本在两边连续一致后删除;卡上记了四对一致的小时运行。两份同时在跑只会让人读错哪份是权威。 - **风险与代价(含回滚):** 线上必需检查名单里已没有这个检查名(本 PR 开出前实读),删掉不会卡住合并队列;后继门在 objectstack 每小时跑、发版前必过,红灯归改动 spec 的那条 lane。回滚 = revert 本 PR,门恢复原样。 - **席位意见:** - **你要做的:** 看一眼删除范围与保留的 `turbo.json` 标记理由,批准后由认领席落地。 --- _Generated by [Claude Code](https://claude.ai/code/session_016PVjjuVPte5XEJvaQx1E4t)_ Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: os-zhuang <jack@objectstack.ai>
1 parent 7d0c174 commit c6a42be

9 files changed

Lines changed: 50 additions & 2807 deletions

‎.github/workflows/repo-gates.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ name: Repo Gates
2121
# reads the live set; when this fold landed the ruleset named
2222
# `Governed Surface Queue Guard`, `Changeset Declaration` and
2323
# `Spec Main Shape Gate`, which is why those three workflows were NOT folded --
24-
# the last has since left the set by objectui#12240's ruling and keeps its own
25-
# workflow for its hourly run on `main`), so the queue is unchanged. The one in-tree reader
24+
# the last has since left the set by objectui#12240's ruling, and objectui#12352
25+
# deleted its workflow when the spec shape gate moved to objectstack), so the
26+
# queue is unchanged. The one in-tree reader
2627
# of the old names, `scripts/dependabot-merge-gate.mjs`, now waits for the one
2728
# context this job produces, `Repo Gates`.
2829
#

‎.github/workflows/spec-main-shape-gate.yml‎

Lines changed: 0 additions & 425 deletions
This file was deleted.

‎content/docs/guide/ci-cd-pipeline.md‎

Lines changed: 40 additions & 120 deletions
Large diffs are not rendered by default.

‎scripts/__tests__/ci-cd-pipeline-doc.test.ts‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3565,20 +3565,6 @@ function inheritedDeclarations(): Map<string, string> {
35653565
* STALE rather than quietly widening the hole.
35663566
*/
35673567
const SWEEP_DECLARED_NON_RUN_COMMANDS = new Map<string, string>([
3568-
[
3569-
'spec-main-shape-gate.yml: scripts/dependabot-merge-gate.mjs',
3570-
'Named as the registry that classifies this context: `REQUIRED_CONTEXTS` from ' +
3571-
'objectui#9969 (the in-tree half of the enrolment), `NOT_A_GATE` since objectui#12240 ' +
3572-
'(the in-tree half of its removal from the required set). A declaration this section ' +
3573-
'points at, not a step this workflow runs (objectui#9860, objectui#9969, objectui#12240).',
3574-
],
3575-
[
3576-
'spec-main-shape-gate.yml: scripts/check-required-check-set.mjs',
3577-
'Named as the one thing in this tree that can READ the ruleset where requiredness actually ' +
3578-
'lives — the instrument that says whether this context is still enrolled, which the ' +
3579-
"section deliberately does not answer. A different workflow's instrument, cited to keep " +
3580-
'the claim falsifiable (objectui#9860, objectui#9969, objectui#12240).',
3581-
],
35823568
[
35833569
'changeset-guard.yml: scripts/check-changeset-presence.mjs',
35843570
'Introduced by the words "Deliberately not listed": the overwrite gate imports that ' +

‎scripts/__tests__/dependabot-merge-gate.test.ts‎

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -392,53 +392,6 @@ describe('the path-filtered blocking checks (optional bucket)', () => {
392392
});
393393
});
394394

395-
/**
396-
* objectui#12240 — the maintainer's ruling B on objectui#12214's open question
397-
* 1 (ACCEPT 6123370050). `Spec Main Shape Gate` leaves the required set and is
398-
* advisory on a pull request, so it moved back from `REQUIRED_CONTEXTS` (where
399-
* objectui#9969's ruling A had put it) to `NOT_A_GATE`. This block pins the
400-
* MOVE by name, in both directions: an edit that parks the name back in
401-
* `REQUIRED_CONTEXTS` without a ruling fails here, and so does one that drops
402-
* it from every bucket. The control comes first: the same red on a context
403-
* that IS required still refuses the head, so each green below is about this
404-
* one name and not about a snapshot that stopped being read.
405-
*/
406-
describe('Spec Main Shape Gate is advisory, not waited for (objectui#12240)', () => {
407-
const NAME = 'Spec Main Shape Gate';
408-
const withSpecGate = (conclusion: string | null, status = 'completed') => [
409-
...allGreenSnapshot(),
410-
{ id: 95_325_290_000, name: NAME, status, conclusion },
411-
];
412-
413-
it('is declared NOT_A_GATE, with a reason, and in neither other bucket', () => {
414-
expect(Object.keys(NOT_A_GATE)).toContain(NAME);
415-
expect(NOT_A_GATE[NAME as keyof typeof NOT_A_GATE]).toMatch(/objectui#12240/);
416-
expect(REQUIRED_CONTEXTS).not.toContain(NAME);
417-
expect(Object.keys(OPTIONAL_CONTEXTS)).not.toContain(NAME);
418-
});
419-
420-
it('CONTROL: the same red on a REQUIRED context still refuses the head', () => {
421-
const runs = withSpecGate('success').map((run) =>
422-
run.name === 'Type Check' ? { ...run, conclusion: 'failure' } : run,
423-
);
424-
expect(evaluateGate({ checkRuns: runs }).verdict).toBe('red');
425-
});
426-
427-
it('does not refuse a head on which it reported failure', () => {
428-
const result = evaluateGate({ checkRuns: withSpecGate('failure') });
429-
430-
expect(result.verdict).toBe('green');
431-
expect(result.failing).toEqual([]);
432-
});
433-
434-
it('does not hold a head on which it is still running, or has not reported', () => {
435-
expect(evaluateGate({ checkRuns: withSpecGate(null, 'in_progress') }).verdict).toBe('green');
436-
const absent = evaluateGate({ checkRuns: allGreenSnapshot().filter((run) => run.name !== NAME) });
437-
expect(absent.verdict).toBe('green');
438-
expect(absent.missing).toEqual([]);
439-
});
440-
});
441-
442395
describe('waitForGate: the deadline fails closed', () => {
443396
const fakeClock = () => {
444397
let nowMs = 0;

0 commit comments

Comments
 (0)