Skip to content

fix(scripts): relate the recorded @object-ui version to the objectui pin - #18814

Merged
os-bill merged 1 commit into
mainfrom
claude/issue-18611-sdui-manifest-version-pin-check
Sep 17, 2026
Merged

os-bill merged 1 commit into
mainfrom
claude/issue-18611-sdui-manifest-version-pin-check

Conversation

@os-bill

@os-bill os-bill commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Fixes #18611

Clause-②: no — one repo script, scripts/check-sdui-manifest.mjs. No published bytes move (measured below).

What changed

The gate gains check 4: the record's objectuiPackagesVersion must be the version packages/core/package.json declares at the pinned commit. Checks 1-3 already reached both fields and related neither — the version was a presence check only, so a record naming pin C and a version C never declared was green.

That is not hypothetical: gen-sdui-manifest-node.mjs defaults --objectui-version to the version already in the record, while re-recording objectuiSha from the live pin. A regeneration after a pin bump therefore writes the NEW pin under the OLD version string, and every check in this gate stayed green through it.

Question 1 — how "corresponds" is judged, and the channel readings behind the choice

The seat marked this unverified and asked for the channel to be measured first. Measured in this container, worktree at 034f5a3af:

channel reading
sibling checkout ../objectui present (/home/user/objectui). Shallow (--is-shallow-repository = true) and still carries the pin: git cat-file -e 53ded82b...^{commit} exit 0; git show 53ded82b:packages/core/package.json reads "version": "17.6.0"
in-tree witness of the version none. grep -c "@object-ui/" pnpm-lock.yaml = 0; no workspace package.json declares an @object-ui/* dependency; packages/sdui-parser/objectui-lockstep.json records objectui's rev but no version. There is no second in-repo fact to relate the version to
the required lint job oracle absent. .github/workflows/lint.yml has one actions/checkout@v7 (this repo) and no objectui clone; this gate's own header declines a network dependency inside a required lint job
ci.yml console-build job oracle present — it already shallow-clones objectui at the pin to build the Console SPA
depth-1 fetch of the pin works: git init + git fetch --depth=1 origin 53ded82bf7a494f54e344e19099dbf00854b8694 exit 0, commit resolves. The remedy line the gate prints is true, not a guess

So the predicate cannot be offline: nothing in this repo can relate the two fields. Check 4 reads the pinned commit's packages/core/package.json from an objectui checkout — OBJECTUI_ROOT, else the ../objectui sibling, the same two places bump-objectui.sh and objectui-range.mjs look (deliberately not a second env spelling for one checkout).

Because the oracle is external, absence is reported and never scored. Three outcomes are kept apart: resolved (compare), unreachable (no checkout, or one without the commit — NOT converted into a disagreement), unsupported (checkout in hand and still unable to answer — that is RED). On an unreachable oracle the success line says which leg did not run, and --require-objectui turns that gap into an exit 1 for callers that do hold a checkout.

Question 2 — the BEFORE reading: do they agree today?

They agree. Record objectuiPackagesVersion = 17.6.0; packages/core/package.json at pin 53ded82b declares 17.6.0. Tightening the gate does not red main, and no data was touched — sdui.manifest.json, scripts/sdui-manifest.record.json and .objectui-sha are read-only on this card and are unchanged in this diff (1 file, 259 insertions, 24 deletions).

⚠️ This agreement does not contradict the card's 12-day skew observation, and check 4 does not claim it does. The card's skew is that the published tarball at 17.6.0 was built from a commit earlier than the pin. Check 4 cannot see that and does not pretend to: it asserts only that the record's two fields describe one objectui commit. Which mechanism should produce the artefact — so that the published bytes and the pinned tree are the same thing — remains #17735's question and is not ruled here.

Acceptance controls

Both legs are the real CLI, on a tree assembled from the real sdui.manifest.json and the real .objectui-sha, with the gate copied in as scripts/check-sdui-manifest.mjs so DEFAULT_ROOT resolves to the fixture. Only the record's version field differs between LIT and DARK; the artefact bytes are untouched, so sha256 still matches and the hash leg stays green in every run. OBJECTUI_ROOT=/home/user/objectui. "before" is the gate taken from the merge base 034f5a3af by git show, not from memory — control: grep -c readPinnedDeclaredVersion on that copy is 0, with a non-zero control on the same file (grep -c checkTree = 8) proving the instrument reached it.

LIT — the red leg (record says 17.5.0, pin declares 17.6.0)

leg exit output
before 0 (GREEN) ✓ check-sdui-manifest: ... and fresh at objectui pin 53ded82bf7a4….
after 1 (RED) ✗ check-sdui-manifest: the record's two objectui fields describe different commits: objectuiPackagesVersion is "17.5.0", but objectui 53ded82bf7a4… — the pin the record itself names — declares "17.6.0" in packages/core/package.json … Regenerate against the pin: node scripts/gen-sdui-manifest-node.mjs --objectui-version 17.6.0

Same input, same command. The red leg is the evidence; "it is still green" is not.

DARK — the real, agreeing record

leg exit output
before 0 ✓ ... and fresh at objectui pin 53ded82bf7a4….
after 0 ✓ ... and recorded at the live objectui pin 53ded82bf7a4…. + @object-ui 17.6.0 is the version objectui 53ded82bf7a4… declares in packages/core/package.json (read from /home/user/objectui)

Plus, on this worktree at 3ba8c97dd4: node scripts/check-sdui-manifest.mjs exit 0, --self-test exit 0 (11 cases), --require-objectui exit 0 (the sibling is in hand here).

The no-oracle shape — what CI will see today

run exit reading
LIT input, no checkout reachable 0 NOT CHECKED — objectuiPackagesVersion "17.5.0" was not compared with what the pin declares: no objectui checkout at … — the disagreement is not scored as a match
same, --require-objectui 1 --require-objectui was passed and check 4 could not run: …

This is the honest cost of an external oracle, stated rather than hidden: in the required lint job check 4 will report NOT CHECKED, not green. Wiring --require-objectui where a checkout already exists (the ci.yml console-build job) is a workflow edit outside this card's declared file surface — named in the report for the seat, not smuggled in here.

Self-test

The red leg is pinned, not just demonstrated. Five rows added (roster and floor 6 → 11), each against a throwaway objectui git repository — a real one, because check 4 resolves the pin through git cat-file / git show and a stubbed resolver would leave exactly that resolution unexercised:

  • pin-declared version agreeing with the record passes
  • pin-declared version disagreeing with the record is RED
  • an unreachable objectui checkout is not a version verdict (same disagreeing tree, oracle removed → GREEN)
  • --require-objectui turns an unreachable checkout RED
  • a pinned commit with no packages/core/package.json is RED

Every row now passes its oracle explicitly, so OBJECTUI_ROOT in the ambient environment can neither green nor red this self-test. Each new row was probed for the reason it reds: the four RED rows carry four different problems, and the unreachable row carries none.

Gates

30 derived families, 30 run, all exit 0, reconciled with the deriver itself:

node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran ran.txt
✓ dispatch-gates --ran: 30 derived famil(ies) accounted for — 30 run, 0 NOT-MEASURED
  (a DERIVED zero — all 30 recorded an exit code and none of them is 3).

Re-derived after a fresh git fetch origin main: the family list is unchanged. pnpm check:nul-bytes exit 0 (8855 files), plus a direct control-byte scan of the changed file (no matches, with a non-zero control on the same predicate).

Lint, narrowed and the narrowing proven — measured at 3ba8c97dd4, clean tree:

  • population: 6837 files, read from eslint's own config (the extension set parsed from its files globs) filtered by eslint's own isPathIgnored, with both controls firing (the changed file reads in-population; a built artefact reads ignored);
  • this PR lints 1 of them: npx eslint --no-inline-config --format json scripts/check-sdui-manifest.mjs → 1 file, 0 errors, 0 warnings, exit 0 (file count read from the JSON output, not from prose);
  • invariance: type-aware linting is not enabled (eslint.config.mjs states no parserOptions.project and no typed rules; the only parserOptions are ecmaVersion / sourceType), so this diff cannot move the verdict on any file it does not touch.

The repo-wide pnpm lint run is CI's.

Changeset: none owed, measured

Not inferred from the path. The root package is private. All 70 publishable packages declare package-relative files[] (dist, README.md, CHANGELOG.md; packages/spec adds seven more, all inside itself), and npm packs only from the package directory, so a repo-root scripts/ file is outside every tarball. Measured on the package with the widest surface: npm pack --dry-run --json in packages/spec lists 275 entries — 0 matching check-sdui-manifest, 0 under scripts/, with the positive control firing (202 shipped src/**/*.zod.ts entries), so the zero is a reading and not a dead instrument. skip-changeset applied.

Acceptance notes (out of scope, noted and not folded in)


Generated by Claude Code

check-sdui-manifest read `objectuiPackagesVersion` as a presence check only:
the record could name a pin and a version with nothing asking whether that
version is the one the pinned commit declares. The generator's default makes
that the live shape — with `--objectui-version` unset it reuses the version
already in the record, so a regeneration after a pin bump re-records the NEW
pin under the OLD version while every check here stayed green.

The new check reads `packages/core/package.json` at the pinned commit from an
objectui checkout (OBJECTUI_ROOT, else the ../objectui sibling) and fails when
it disagrees with the record. That checkout is an oracle a required lint job
does not have, so an absent one is REPORTED, never scored: the success line
names the leg that did not run, and --require-objectui turns that gap into an
exit 1 for callers that hold a checkout. An oracle present and unable to answer
is a failure, not a skip.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JbZnqu8bt6YqfJsr9vaFb3
@os-bill os-bill added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 17, 2026 — with Claude
@os-bill
os-bill marked this pull request as ready for review September 17, 2026 23:06
@os-bill
os-bill added this pull request to the merge queue Sep 17, 2026
Merged via the queue into main with commit c993b7c Sep 17, 2026
37 checks passed
@os-bill
os-bill deleted the claude/issue-18611-sdui-manifest-version-pin-check branch September 17, 2026 23:32
akarma-synetal pushed a commit to akarma-synetal/framework that referenced this pull request Sep 28, 2026
…from the PIN, not the record (objectstack-ai#18875)

Fixes objectstack-ai#18819

Clause-②: no

## The defect, re-measured on this branch's base

`origin/main` `36583e989b`. The generator read its two provenance fields
at two different
moments:

```
:129   const version = arg('--objectui-version') ?? record.objectuiPackagesVersion;
:199   objectuiSha: pin,
:200   objectuiPackagesVersion: version,
```

`objectuiSha` is re-read from the LIVE `.objectui-sha`;
`objectuiPackagesVersion` fell back to
the value already sitting in `scripts/sdui-manifest.record.json`. A
regeneration after a pin bump
therefore wrote the NEW pin under the OLD version string — a record
whose two objectui fields
describe two different commits, which is exactly the record
`scripts/check-sdui-manifest.mjs`
check 4 rejects. The person that reds is the one who followed the
documented bump procedure, so
the producer is where it gets fixed.

## Step one, before writing any fix: is that path reachable today?

The counterfactual on `:129` is that the defect is unreachable if
`arg('--objectui-version')` is
never empty. It is reachable. **Paths, not counts.**

**No automated caller exists at all.** No `package.json` script, no
workflow step and no shell
line executes this generator. `scripts/bump-objectui.sh` and
`scripts/build-console.sh` only
`echo` the command. Every invocation is therefore a person or an agent
typing one of the
spellings the tree documents.

Of those spellings, six omit `--objectui-version`:

| path | spelling |
|:---|:---|
| `scripts/check-sdui-manifest.mjs:228` | `Regenerate: node
scripts/gen-sdui-manifest-node.mjs` — printed when the artefact is
missing |
| `scripts/check-sdui-manifest.mjs:275` | `Regenerate: node
scripts/gen-sdui-manifest-node.mjs` — printed on a sha256 mismatch |
| `scripts/sdui-manifest.record.json:10` | `Regenerate + re-record: node
scripts/gen-sdui-manifest-node.mjs` |
| `packages/spec/scripts/manifest-prescription.ts:81` | ``regenerate it
and its record with `node scripts/gen-sdui-manifest-node.mjs` `` |
| `scripts/gen-sdui-manifest-node.mjs:8` | the bare usage line |
| `scripts/gen-sdui-manifest-node.mjs:9` | the `--modules-root DIR`
offline usage line |

Two of those six are printed **by the gate itself**. The remaining
spellings do carry the flag:
`AGENTS.md:156`, `docs/releases-maintenance.md:116` and `:279`,
`scripts/bump-objectui.sh:11` and
`:739`, `scripts/build-console.sh:297`,
`scripts/check-sdui-manifest.mjs:301` `:303` `:320`.

The other paths that name the generator carry no command at all and are
listed here for
completeness: `.github/workflows/lint.yml:799` (a comment),
`packages/spec/scripts/check-generated.ts:391`,
`packages/spec/scripts/check-react-blocks-declaration-parity.ts:85`, and

`packages/spec/scripts/check-react-blocks-declaration-parity.test.ts:565`
`:569` (a pin test on
the prescription text).

## A or B — decided by that reading, not by preference

Zero automated call sites means option B's stated cost ("every call site
has to change") is
nearly zero *in code*. But B is not free: it would turn all six
documented no-flag spellings into
refusals, including the `--modules-root` offline mode, and it would
refuse even when the answer is
sitting in the objectui checkout the bump already required.

So: **A for the default, B for the residue.**

- `--objectui-version` still wins when passed.
- Otherwise the version is what `packages/core/package.json` DECLARES at
the pinned commit, read
through `check-sdui-manifest.mjs`'s exported `readPinnedDeclaredVersion`
— the same function
check 4 judges the written record with, imported rather than re-typed.
Producer and gate now
read one oracle; two readers of two oracles is where this drift came
from.
- When that oracle cannot answer (no objectui checkout, or one that does
not carry the pin) the
generator REFUSES and names both remedies. An unread version is never
converted into a version
string — Route and surface ownership §3, prefer failing to falling back,
and Prime Directive
  objectstack-ai#12's ban on a lenient `??` fallback in place of fixing the producer.

Importing the gate's exported oracle changes no gate:
`scripts/check-sdui-manifest.mjs` is
untouched in this diff, and its CLI body is behind
`isEntrypoint(import.meta.url)`, so importing
it runs nothing.

## Verification

Every leg below ran against a fixture tree in a scratchpad, or against
the real repo with a trap
and a proved restore. `.objectui-sha` and
`scripts/sdui-manifest.record.json` are read-only this
round; neither is in this diff.

### LIT — pin bumped, `--objectui-version` not passed. Both legs read.

A synthetic objectui checkout with two commits (`a183cfbf…` declaring
`17.6.0`, `51ecffcc…`
declaring `18.0.0-fixture`), a stub `@object-ui` install behind
`--modules-root`, and a fixture
record naming the OLD sha at `17.6.0`. The fixture pin is the NEW sha.

| leg | generator | record written | `check-sdui-manifest.mjs` |
|:---|:---|:---|:---|
| before | `36583e989b` | `51ecffccfb32 / 17.6.0` — new pin, **old
version** | **exit 1**, check 4 red |
| after | this branch | `51ecffccfb32 / 18.0.0-fixture` | **exit 0**,
green |

The before leg's gate output is check 4 naming the defect verbatim:

```
the record's two objectui fields describe different commits: objectuiPackagesVersion is "17.6.0",
  but objectui 51ecffccfb32… — the pin the record itself names — declares "18.0.0-fixture" in packages/core/package.json
```

### DARK — pin not bumped. Reads zero, on the REAL artefact.

Not a fixture: the real `scripts/gen-sdui-manifest-node.mjs`, the real
pin
`53ded82bf7a494f54e344e19099dbf00854b8694`, and the real published
`@object-ui/*` 17.6.0 set
installed once and reused by both legs so the install cannot be the
variable. The base generator
was swapped in on disk, its arrival proved by anchor counts before the
leg ran
(`?? record.objectuiPackagesVersion` = 1, `readPinnedDeclaredVersion` =
0, and a `git hash-object`
differing from the HEAD blob), then restored.

```
leg after  (fixed) : 57 components, 66910 bytes, sha256 49211fee7792cf51174930dc2c1be2169d5175f77a83491f68f90b3f0c19e69d
leg before (base)  : 57 components, 66910 bytes, sha256 49211fee7792cf51174930dc2c1be2169d5175f77a83491f68f90b3f0c19e69d
cmp: BYTE-IDENTICAL
```

That sha256 is also the one the tracked record already carries, and the
tracked
`sdui.manifest.json` HEAD blob is still `78f870e42fe9` — unmoved.
Restore proved by state, not by
an exit code: `git diff HEAD` empty and `git status --porcelain` empty
afterwards.

### Two further legs

- **Refusal residue.** Pin bumped, no flag, oracle unreachable
(`OBJECTUI_ROOT` at a directory
with no `.git`): base generator exits 0 and silently writes the drifted
record; this branch
  exits 1, writes no manifest, and leaves the record untouched.
- **Explicit precedence.** `--objectui-version 99.1.2-explicit` is
honoured unchanged on both
  legs; the success line now also names where the version came from.

### Gates

- `node scripts/check-sdui-manifest.mjs` — **exit 0** on the clean tree,
and its check 4 leg
resolved for real: "@object-ui 17.6.0 is the version objectui
53ded82… declares in
  packages/core/package.json (read from /home/user/objectui)".
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 26
commands; all 26 run, **all exit 0**, and `--ran` with exit codes
recorded reconciles:
"26 derived famil(ies) accounted for — 26 run, 0 NOT-MEASURED (a DERIVED
zero)".
- The seven roster families the tool flags as "roster under scripts,
which one of your paths is
in — silence is not evidence in EITHER direction" were run too. Six exit
0.
`pnpm check:published-readme-exports` exits **3 — PREREQUISITE NOT MET**
(46 packages unbuilt);
that is NOT MEASURED, not a finding, and this diff moves no package
source and no README.
- `pnpm lint` (`eslint . --no-inline-config`), the whole repo, **exit
0** at `1c3a721ac1`.
- `pnpm check:nul-bytes` exit 0; an independent control-byte scan of the
changed file is clean.

No changeset: nothing published moves. `scripts/**` appears in no
package's `files[]` and the
root package is `private`, so no released package's contents change.

## Acceptance notes

Noted, not filed — none is a reproducible defect, a declared-contract
violation, or a
metadata-authoring trap, so none earns a card under Prime Directive objectstack-ai#10:

- `scripts/check-sdui-manifest.mjs` check 4's header paragraph, and its
check-4 failure text at
`:318-319`, both explain the producer default this PR removes ("The
generator REUSES the version
already recorded when `--objectui-version` is not passed"). After this
lands those sentences
describe history rather than current behaviour. The gate is fenced
read-only for this card, so
they are left exactly as they are. The check itself stays load-bearing —
it still catches a
hand-edited record, an explicitly-wrong `--objectui-version`, and any
other producer.
- `packages/spec/scripts/check-react-blocks-declaration-parity.ts:88-89`
says the node producer
"enumerates the PUBLISHED `@object-ui/*` packages at the version named
in
`scripts/sdui-manifest.record.json`". That sentence is wrong-by-default
after this change. Not
fixed in place: editing it pulls `packages/spec` into the diff and with
it a whole gate family
this card does not otherwise owe, against the bounded-in-place-fix
condition of adding no new
  verification surface.
- The residual hole this PR deliberately does not close: an operator who
passes
`--objectui-version` **explicitly and wrongly** still writes a drifted
record. The generator
could warn when an explicit value disagrees with the resolvable pin
oracle. Check 4 already reds
the resulting record, so this is a loudness improvement, not a
correctness gap.
- objectstack-ai#17735 is not addressed here — whether the published tarballs at a
version were built from the
pinned commit is that card's producer question, and it carries
`needs-user-decision`. This
change moves the version's SOURCE and nothing about that relation.
objectstack-ai#18814's check 4 is not
  modified here either.

Fenced files honoured: `scripts/sdui-manifest.record.json` and
`.objectui-sha` are held by open PR
objectstack-ai#18723 and are read-only in this round. The real DARK leg did rewrite
the record as a side effect
of running the generator, exactly as warned; both were restored from
HEAD and the restore is
proved by an empty `git diff HEAD`, never by an exit code.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01JbZnqu8bt6YqfJsr9vaFb3)_

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants