Skip to content

Commit 10bdff1

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-5240-empty-field-spec-reject
2 parents 261f893 + 04fab5e commit 10bdff1

7 files changed

Lines changed: 8687 additions & 44 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
"@objectstack/spec": patch
3+
---
4+
5+
fix(spec): the authorable-surface deletion gate no longer needs network to build (#5235)
6+
7+
`gen:schema` anchors the #4650 deletion check on `authorable-surface.json` at the merge
8+
base with `origin/main` — the one version of that file the commit under test cannot
9+
rewrite. When `origin/main` could not be resolved (and the self-heal `git fetch` could not
10+
make it resolvable), the build failed:
11+
12+
```
13+
❌ Cannot resolve origin/main to anchor the authorable-surface deletion check (#4650).
14+
```
15+
16+
That is correct for a developer who forgot to fetch, and wrong for an entire class of
17+
build environments that have no route to GitHub at all: image-build stages that copy a
18+
SHA-pinned framework tree into a container and build it there, air-gapped builds, forks,
19+
and historical-tag reproductions. Those trees are immutable and already merged — there is
20+
no "what did this PR delete relative to main" question to ask — yet the gate failed them
21+
anyway. It blocked every downstream consumer that builds `@objectstack/spec` from a pinned
22+
checkout without network.
23+
24+
The baseline is now also committed to the tree as `packages/spec/authorable-surface.base.json`:
25+
the keys of `authorable-surface.json` as of `baseRev`, a commit on `origin/main`.
26+
27+
- Where `origin/main` is reachable (every dev checkout, every CI run) nothing changes: the
28+
gate still anchors on the merge base, and it additionally verifies the committed anchor
29+
against it — `baseRev` must be an ancestor of `origin/main` and the recorded keys must
30+
be that commit's baseline. So a commit cannot edit the anchor to hide a deletion; the
31+
environments that can check, do.
32+
- Where `origin/main` is not resolvable, the gate anchors on the committed file and the
33+
build proceeds. It still runs: a key the anchor records that the build no longer emits
34+
is as fatal as before. Only an authoritative anchor may write the file, so an offline
35+
build can never advance it to its own state.
36+
37+
There is deliberately no environment-variable skip — a deletion check that can be switched
38+
off is the bypass #4650 exists to close. With neither anchor available the build still
39+
fails.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
packages/spec/spec-changes.json merge=os-regen
3939
packages/spec/authorable-surface.json merge=os-regen
40+
packages/spec/authorable-surface.base.json merge=os-regen
4041
packages/spec/json-schema.manifest.json merge=os-regen
4142
packages/spec/api-surface.json merge=os-regen
4243
packages/spec/api-surface-signatures.json merge=os-regen

0 commit comments

Comments
 (0)