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

ci(dependabot-gate): wait for Spec Main Shape Gate now that it is enrolled (objectui#9969) - #10796

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-9969-spec-main-shape-gate-required
Sep 27, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-9969-spec-main-shape-gate-required

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #9969
Clause-②: no

The domain:ui seat's half of objectui#9969's ruling A (director seat, comment 5749111530; maintainer 「objectui#9584 + #9969 A」, comment 5750520799). The maintainer's half was taken first: Spec Main Shape Gate was enrolled in ruleset 11776024 and read back on 2026-09-27 (comment 5852129691, 「Spec Main Shape Gate 已处理,其他同意」). This PR is the second, in-tree step.

What changes

  • scripts/dependabot-merge-gate.mjs: 'Spec Main Shape Gate' moves from NOT_A_GATE to REQUIRED_CONTEXTS. The entry's prose is rewritten: both of its conditions were met before the move (the enrolment, as a dated reading that scripts/check-required-check-set.mjs re-takes; and the cleared day-one break), and the order of the two steps is recorded, with why neither order lets a red through. The docblock's workflow-to-check inventory gains the spec-main-shape-gate.yml row.
  • scripts/check-required-check-set.mjs: the context joins WATCHED_CONTEXTS, not PINNED_CONTEXTS (reasons under Measurement 2).
  • Tests: dependabot-merge-gate.test.ts gains a named block that pins the move, with a control. check-required-check-set.test.ts gets a new control fixture ruling-9969.json (objectui#9499's set plus this one context), an updated type-check-removed.json (the control minus Type Check, as before), and a case that reads the declared set with this context lost. The existing ruling-9499.json is kept, because it is now exactly that case.
  • content/docs/guide/ci-cd-pipeline.md: the inventory row said "No, not yet ... classifies it NOT_A_GATE", and the section was headed "Why it is not a required check yet". This change makes both false, so they are updated, and the doc test's declared-reason prose for that section follows. ⚠️ This is outside the claim's file surface (scripts/dependabot-merge-gate.mjs and scripts/check-required-check-set.mjs plus their tests). It is here because this change is what makes those sentences false. No published package, no .github/workflows/** edit.

Measurement 1: the ruling's unmeasured point, "what the script does when the name is in REQUIRED_CONTEXTS and the ruleset does not list it"

Measured with the committed module (5d96da240) against the pre-change module from bff63cc12, using a harness in the dev's scratchpad (not committed):

  • The ruleset is not one of the gate's inputs. main() was run through createChecksApi with a fetch stub that records every URL. It requested exactly one route shape, /repos/objectstack-ai/objectui/commits/SHA/check-runs?filter=latest&per_page=100&page=1, and nothing under /rules or /branches/.../protection. So once the name is in REQUIRED_CONTEXTS, the gate behaves the same whether or not the ruleset lists the context.
  • Real snapshots, old module vs new. 12 real PR heads from the last 100 Spec Main Shape Gate runs, all with the check at completed/success: OLD green, NEW green on 12/12. This check was the last required context to report on 2 of the 12, which moved the gate's green instant by +5 s and +77 s. On the other 10 it moved nothing. For scale, the workflow's own runs over that window took a median of 12.0 min on pull_request (max 13.3 min, 61 runs), against the gate's 40-minute deadline (GATE_TIMEOUT_SECONDS: '2400').
  • The same real snapshot with only this check varied: failure gives OLD green and NEW red, failing Spec Main Shape Gate (failure). absent gives OLD green and NEW pending, missing it; through waitForGate with a fake clock and the 40-minute deadline, that becomes red, timedOut: true after 121 polls. in_progress gives OLD green and NEW pending.
  • ⇒ The two half-states. Name in the list with the ruleset silent: the Dependabot lane would be stricter than the queue, never looser. It waits for the check and refuses it when it is red or never reports. Ruleset listing it with the name absent (the state since the 2026-09-27 enrolment, until this merges): the Dependabot gate could enable auto-merge without waiting, and the queue build (where the ruleset requires the context, and the workflow subscribes merge_group) would still refuse a red. Exposure in that window: 0 open Dependabot PRs. Checked with GET /issues?state=open&creator=dependabot[bot], which returned 0; the control query state=all with the same filter returned chore(deps): Bump maplibre-gl from 6.4.1 to 6.9.0 #8940, chore(deps): Bump next from 16.3.3 to 16.3.4 #8939 and chore(deps): Bump next from 16.3.1 to 16.3.3 #8683 (all closed), so the filter works. The order ruling A asked for, ruleset first and this line second, is the order that happened.
  • NOT MEASURED: a Spec Main Shape Gate run on a Dependabot head. No Dependabot PR has produced one yet. The workflow's run list filtered to actor=dependabot[bot] has total_count: 0. The newest Dependabot-actor run of dependabot-auto-merge.yml is from 2026-09-12, and this workflow first ran on 2026-09-18. Why it should run there: the pull_request trigger has no path filter, the job has no actor if:, and the only secret it uses is secrets.GITHUB_TOKEN under contents: read. If it does not run, the failure is closed: the gate times out red, nothing merges, and the PR carries a red check naming Spec Main Shape Gate (never reported).

Measurement 2: should scripts/check-required-check-set.mjs pin the new context?

  • Before this change the patrol pinned Type Check and watched 5 contexts. The live run on 2026-09-27 (NODE_USE_ENV_PROXY=1 node scripts/check-required-check-set.mjs, exit 0) read DRIFTED, listing Spec Main Shape Gate and Governed Surface Queue Guard as "required but not declared".
  • I took that live answer and removed Spec Main Shape Gate. The old patrol only drops the name from its "not declared" list: exit 0, and nothing names the loss. The new patrol prints No longer required: `Spec Main Shape Gate`., also exit 0. So watching it is what makes losing it from the ruleset visible, which is what the triage note asked for.
  • Watched, not pinned. Pinning would add a new red leg, and the patrol's own header makes promotion to PINNED_CONTEXTS "a maintainer's call, not a tidy-up". New gates default to no, so it is watched only: a loss is reported and exits 0. No new red is introduced.
  • After the change, the live read is still DRIFTED, with 1 undeclared context (Governed Surface Queue Guard). That context is outside this card; see the acceptance notes.

Readings taken before any edit

  • GET /repos/objectstack-ai/objectui/rules/branches/main at 2026-09-27T15:10Z: the required_status_checks rule of ruleset 11776024 lists 8 contexts, including Spec Main Shape Gate.
  • Latest Spec Main Shape Gate check run on the main head dac022c4e: completed/success (merge-queue build). The last 100 workflow runs had 0 failures (61 pull_request success, 34 merge_group success, 3 cancelled, 2 in progress).

Tests and gates (all at head 5d96da240)

  • pnpm exec vitest run on the five core files (dependabot-merge-gate, check-required-check-set, merge-queue-reporting, ci-cd-pipeline-doc, spec-main-shape-gate), under the verify lock: Test Files 5 passed (5), Tests 200 passed (200), VERDICT command-exit 0.
  • Every scripts/__tests__/*.test.ts that names either script or the CI/CD guide (26 files, from git grep -l), plus spec-main-shape-gate.test.ts and scripts-type-check.test.ts: Test Files 28 passed (28), Tests 1182 passed (1182), VERDICT command-exit 0.
  • pnpm type-check:scripts (tsc -p tsconfig.scripts.json): exit 0. --listFilesOnly confirms both scripts and all three edited test files are in the program.
  • node scripts/check-required-check-set.mjs --self-test: 32 cases pass, exit 0.
  • node scripts/check-changeset-presence.mjs: "No source or published contract of a released package changed in this range, so no changeset is owed.", exit 0.
  • node scripts/check-new-cross-file-line-citations.mjs: VERDICT new-cross-file-line-citations: 0 new citation(s), exit 0.
  • check-control-bytes, check-doc-links, check-shell-escape-residue, check-doc-fence-languages and check-doc-example-ids: all exit 0.
  • ESLint on the 5 touched .mjs and .ts files with --no-inline-config --format json: 5 files linted, 0 errors, 0 warnings, none ignored. eslint.config.js does not enable type-aware linting (no parserOptions.project or projectService), so this diff cannot change the verdict on any untouched file. The repo-wide lint belongs to CI.
  • node scripts/check-governed-queue-guard.mjs --test over the 8 changed paths: NOT GOVERNED.

Ablations (one-off, both through objectstack's scripts/ablation-replace.mjs, run on the committed head)

  • A: delete the 'Spec Main Shape Gate', line from REQUIRED_CONTEXTS (anchor 1 → 0, blob e10ecb0 → 5e53694, on-disk count 0). 6 failed: the 4 cases of the new block, the partition case classifies every produced check exactly once, and the patrol's every pinned and watched name is declared blocking in REQUIRED_CONTEXTS. The restore was proven: blob == HEAD, git diff HEAD empty. ⚠️ My first attempt used an anchor whose replacement text already existed in the file, so the tool refused it (count rose by 0) and restored. That attempt ran nothing and is not counted.
  • B: delete the name from WATCHED_CONTEXTS (anchor 1 → 0, blob c809136 → 1c38467). 4 failed: the CLI control on ruling-9969.json, declares exactly the contexts the patrol pins and watches, the dated drift case, and the new "lost ... naming it" case. Restore proven the same way.

Acceptance notes (observed, out of scope, not fixed here)

  • .github/workflows/spec-main-shape-gate.yml: its header still says "This context is REQUIRABLE, and it is not REQUIRED" and "classifies it ... in NOT_A_GATE until a maintainer enrols it there", and it has a section headed "Why merge_group is subscribed although this context is NOT required yet". The enrolment made the first claim false, and this PR completes the second. The dispatch forbade edits under .github/workflows/**, so the text is left as it is. Carrier: none.
  • Governed Surface Queue Guard is listed by the ruleset (read above) but is not in the patrol's WATCHED_CONTEXTS, so the patrol keeps reading DRIFTED. objectui#6596 is closed. The objectui AGENTS.md sentence saying that context is not yet a required context is governed surface. Carrier: none.
  • In scripts/dependabot-merge-gate.mjs, the REQUIRED_CONTEXTS docblock still says "The four shards are spelled out individually on purpose", which the inline comment at 'Test' has contradicted since objectui#9499. In the CI/CD guide, the patrol section says WATCHED_CONTEXTS "is the other eight". Both were stale before this change and are not touched here. Carrier: none.

Session: https://claude.ai/code/session_01DuWo5bdP9SdVebamn99GGk (dispatched os-dev, domain:ui seat #1).


Generated by Claude Code

…olled

Executes the domain:ui seat's half of objectui#9969's ruling A: the
maintainer enrolled `Spec Main Shape Gate` in ruleset 11776024 first
(read back 2026-09-27), and this moves the name from `NOT_A_GATE` to
`REQUIRED_CONTEXTS` in scripts/dependabot-merge-gate.mjs second, with
the entry's prose rewritten to record that both of its conditions were
met and why the order cannot let a red through.

scripts/check-required-check-set.mjs now WATCHES the context (not pins
it): before this change the patrol listed it as "required but not
declared", and losing it from the ruleset would have named nothing.
Watched is exit 0 on loss, so no new red leg is added.

The CI/CD guide's inventory row and section are updated to match, and
the doc test's declared-reason prose for that section follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DuWo5bdP9SdVebamn99GGk
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 5d96da2409462627c4799b9a9deab4ff251ff6fb

① Derived judgments

(a) Ordering condition — HOLDS. GET /repos/objectstack-ai/objectui/rules/branches/main, read in this act at 2026-09-27T15:49Z: ruleset 11776024, one required_status_checks rule (strict_required_status_checks_policy: true) carrying 8 contexts — Lint, Type Check, Build & E2E, Build Docs, Changeset Declaration, Test, Spec Main Shape Gate, Governed Surface Queue Guard. Spec Main Shape Gate is in the required set. The triage note 5852129691 read 7 at its time; the eighth, Governed Surface Queue Guard, is outside this card. The enrolment preceded the PR (read back and recorded at 2026-09-27T02:58Z; the PR was opened later that day), which is the order the seat ruling 5750525995 prescribed: the source file never claims the gate is required before the setting is read back, and the maintainer's word 「Spec Main Shape Gate 已处理,其他同意」 is the provenance.

(b) Latest check-run on the current main head — SUCCESS. main is 6cf599985db2f021d53edcb2b1fa6837f1937461; GET /commits/6cf5999…/check-runs?filter=latest lists Spec Main Shape Gate completed / success (run 36329428115, a merge_group build). The PR body's dac022c4e reading is older: main has moved 3 commits since the PR's base bff63cc12, none touching a file this PR changes (mergeable_state: clean).

(c) Gate semantics — YES: it waits, and it refuses on red or absent; it cannot let a red or missing SMSG through, and there is no legitimate never-reports case to stall on. Read from the code at head, not its comments. evaluateGate (scripts/dependabot-merge-gate.mjs:374-412) iterates REQUIRED_CONTEXTS; classify() (:358-362) returns missing for no run, pending for status !== 'completed', and not-green for any conclusion !== 'success' (so failure, cancelled and skipped are all not green); the verdict is red if anything is failing, else pending if anything is pending or missing, else green. waitForGate (:470-508) returns only on a non-pending verdict and turns a still-pending gate at the deadline into red with timedOut: true; dependabot-auto-merge.yml runs approve and enqueue only under if: steps.gate.outputs.gate == 'green'. createChecksApi (:419-457) issues only /repos/{repo}/commits/{sha}/check-runs; nothing reads the ruleset, so ruleset membership never changes the gate's answer. The name is at :242. Reporting surface: .github/workflows/spec-main-shape-gate.yml triggers pull_request: branches: [main, develop] with no paths, plus merge_group and workflow_dispatch, with no continue-on-error; dependabot-auto-merge.yml triggers on the identical pull_request: branches: [main, develop], and .github/dependabot.yml sets no target-branch, so every pull request the gate judges also produces this check — it is neither path-filtered nor merge_group-only. Timing: the last 100 SMSG runs show pull_request median 12.1 min, max 13.3 min (58 successes, 34 merge_group successes, 3 cancelled superseded PR runs, 0 failures) against the gate's 2400-second deadline; a run slower than the deadline fails closed (timeout red), never open. Not measured by anyone, and I confirm it cannot be yet: SMSG has never run on a Dependabot-actor head (runs?actor=dependabot[bot] answers 0; no Dependabot PR has existed since the workflow was born on 2026-09-18). The workflow needs only secrets.GITHUB_TOKEN under contents: read, and if it did not run, the gate would time out red and merge nothing. Open Dependabot PRs at this reading: 0.

(d) WATCHED_CONTEXTS is a report-only parameter of the existing patrol — YES, no new failing limb. The header of scripts/check-required-check-set.mjs (:13-15) reserves exit 3 for a pinned context or a rule type gone; :84-87 says WATCHED_CONTEXTS "is the rest of the live set, reported and never red"; :110-114 names the accepted failure mode (a silent removal of a watched context is reported and does not fail anything) and makes promotion "a maintainer's call, not a tidy-up". The code agrees: evaluate() (:251-288) computes missingWatched and yields drifted, exitCodeFor('drifted') is EXIT_OK (:209-213), and renderReading prints "No longer required: …" for it (:361). PINNED_CONTEXTS is untouched (['Type Check']). Declaring the name also removes it from unexpected: before this PR the live read listed it under "Required but not declared here" (:364), a list that a loss from the ruleset would have shortened without naming anything — which is the gain the triage note asked the seat to measure.

(e) Every factual sentence the diff adds — TRUE against the tree, the ruleset and the rulings.

  • Doc inventory row (content/docs/guide/ci-cd-pipeline.md:46): "Yes" in the "Blocks a PR?" column — the ruleset requires it; "the maintainer enrolled the context under [decision] When does Spec Main Shape Gate become REQUIRED, and who enrols it? (residual of objectui#9860, ruling C) #9969's ruling A" — 5852129691 and the live read; "scripts/dependabot-merge-gate.mjs declares it in REQUIRED_CONTEXTS, so a Dependabot bump waits for it too" — :242 and (c).
  • Doc section (:2064-2076): readable by check-required-check-set.mjs and writable by nothing in the tree — fetchRules is one GET and the script never writes; "unfiltered on pull_request, subscribed to merge_group, no continue-on-error" — yml :72-77, and no such key exists; "its first run was red on one objectui file over an objectstack commit" — the workflow's only run of 2026-09-18 (35346702279) concluded failure, and its annotations name exactly one objectui source path, src/utils/normalize-list-view.ts:205 (TS2353 on page, "compiled against @objectstack/spec …"); "the in-tree half of that action came second" — true by the dates in (a); "reads check runs and never the ruleset" — createChecksApi; "the order could not let a red through either way" — name-first, the gate refuses (c); ruleset-first, strict required checks block GitHub's own mergeability and the queue build, and 0 Dependabot PRs were open in the window; "watches it, and reports its loss in the patrol's run summary without failing" — (d), and required-check-set-patrol.yml:164 appends the reading to GITHUB_STEP_SUMMARY.
  • Gate script prose (scripts/dependabot-merge-gate.mjs:159, :221-241): the inventory row belongs under "no trigger-level path filter" — true; (1) enrolment in ruleset 11776024 read back 2026-09-27 and recorded on [decision] When does Spec Main Shape Gate become REQUIRED, and who enrols it? (residual of objectui#9860, ruling C) #9969 — true, and "no decision in this file turns on what the ruleset says" — true; (2) success on main on 2026-09-27, re-derived on every queue build — true, (b) and the merge_group subscription; the 2026-09-18 first run red on one objectui file for a spec change made in objectstack — true, annotations above; "stricter than the queue, never looser" — true per (c).
  • Patrol prose (scripts/check-required-check-set.mjs:182-188): a ruling not an endpoint reading; moved into REQUIRED_CONTEXTS in the same change; printed "required but not declared" before; a loss would have named nothing; watched not pinned — all true, renderReading:364 prints exactly that category.

② Semver level

None owed, and the PR complies. scripts/check-changeset-presence.mjs (header, "What is guarded") guards the published, executable source of the packages in the fixed group of .changeset/config.json — each package's src/ tree, its index.html, and the roots its files list publishes — and nothing else. This PR touches scripts/**, scripts/__tests__/** and content/docs/guide/** only: no package source, no published contract, so no .changeset/*.md is due and none was added. The head's Changeset Declaration check-run is success.

③ Boundary flags

  • .github/workflows/spec-main-shape-gate.yml:36 (section heading "…although this context is NOT required yet"), :44 ("This context is REQUIRABLE, and it is not REQUIRED"), :46-48 ("classifies it, with the reason, in NOT_A_GATE until a maintainer enrols it there; moving the name to REQUIRED_CONTEXTS in that file is the in-tree half of the same action"), :49 ("Nothing here claims the check is required"). Lines 36 and 44 were falsified by the enrolment and are already false at origin/main; lines 46-47 are falsified by this PR. Named in the PR's Acceptance notes; .github/workflows/** was outside the dispatch's file surface, and spec-main-shape-gate.test.ts pins only requirability, not this prose. Flagged for the seat; carrier: none.
  • AGENTS.md: carries no statement about Spec Main Shape Gate; :347 says the ruleset's required-checks list is not written in-repo — unaffected. :545 (Governed Surface Queue Guard 「只报告、不拦截」) is stale against the ruleset, but by the maintainer's enrolment of that other context, not by this PR; governed surface, out of scope.
  • Other docs pages: Spec Main Shape Gate appears in no content/docs file other than ci-cd-pipeline.md, and no other page lists the required checks. Nothing newly false.
  • Pre-existing stale counts this PR leaves as they were (already false at origin/main, still false; observations, not defects of this change): content/docs/guide/ci-cd-pipeline.md:2850,2853,2855 ("WATCHED_CONTEXTS is the other eight", "the nine to pin", "any of the eight" — it is 1 pinned + 6 watched now); :2965-2968 enumerates the declared set as Test, Type Check, Lint, Build & E2E, Build Docs "and the five one-node-call gates" (the list holds 23 names); scripts/check-required-check-set.mjs:19-20,70,111-112,154 ("nine contexts", "eight watched", "one name and not nine"); scripts/dependabot-merge-gate.mjs:173-175 ("The four shards are spelled out individually on purpose").
  • Closing keyword: the body's only closing reference is Fixes #9969. Correct.
  • Check results at head: 40 check-runs, 37 success, 3 skipped (Test (coverage), Test (coverage shard …), dependabot — non-gates by design), 0 failed; each of the 8 ruleset contexts is success. The PR is a draft with assignee os-steve; its single commit carries a model-named Co-Authored-By trailer, which the seat's report already flags for the squash message.

Implemented-by: claude/issue-9969-spec-main-shape-gate-required
Reviewed-by: session_01DuWo5bdP9SdVebamn99GGk

VERDICT: PASS


Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review September 27, 2026 16:11
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Sep 27, 2026
Merged via the queue into main with commit 4785523 Sep 27, 2026
42 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-9969-spec-main-shape-gate-required branch September 27, 2026 16:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[decision] When does Spec Main Shape Gate become REQUIRED, and who enrols it? (residual of objectui#9860, ruling C)

2 participants