Skip to content

Commit 39475b9

Browse files
committed
test(objectql): bind ten overlay-door fixtures to an object their harness registers
Claude-Session: https://claude.ai/code/session_019oFY6Hi35J7atvgVFnmoaK Co-authored-by: Claude <noreply@anthropic.com>
1 parent a43b54e commit 39475b9

10 files changed

Lines changed: 33 additions & 9 deletions

‎packages/objectql/src/delete-meta-response-conformance.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ async function makeProtocol() {
164164
}
165165

166166
// [#7741] the inline arm requires the object binding pair
167+
// [#24668] Bound to `sys_metadata`, an object this harness registers: the overlay save door refuses a list view bound to an object that exists nowhere (it read `case`).
167168
const viewBody = (label: string) => ({
168-
name: 'cases', type: 'grid', label, columns: ['id'], object: 'case', viewKind: 'list',
169+
name: 'cases', type: 'grid', label, columns: ['id'], object: 'sys_metadata', viewKind: 'list',
169170
});
170171

171172
/** Keys the producer emitted that the schema refused to carry through. */

‎packages/objectql/src/environment-overlay-five-types.test.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,18 @@ function overlayCatalogManifest(): Record<string, unknown> {
135135
return {
136136
id: PKG,
137137
name: 'overlay_catalog',
138+
// [#24668] The object the view and the dataset bind to, shipped by the
139+
// package: the overlay save door refuses a list view bound to an object
140+
// that exists nowhere, and `probe_obj` was declared by nothing.
141+
objects: [{
142+
name: 'probe_obj',
143+
label: 'Probe Object',
144+
sharingModel: 'private',
145+
fields: {
146+
name: { name: 'name', label: 'Name', type: 'text' },
147+
amount: { name: 'amount', label: 'Amount', type: 'number' },
148+
},
149+
}],
138150
views: [{
139151
object: 'probe_obj',
140152
listViews: {

‎packages/objectql/src/protocol-commit-history.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,8 +912,12 @@ describe('#6620 — revertCommit soft-removes a runtime-CREATED `object`', () =>
912912
],
913913
})]);
914914
await seedCreatedObject(protocol, 'myapp_invoice', APP_PKG);
915+
// [#24668] Bound to the object this same build creates: once an object
916+
// exists the save door judges the binding against the whole collection,
917+
// and refuses one that exists nowhere (`gridBody` reads `case`).
915918
await protocol.saveMetaItem({
916-
type: 'view', name: 'myapp_case_grid', packageId: APP_PKG, item: gridBody('Cases'),
919+
type: 'view', name: 'myapp_case_grid', packageId: APP_PKG,
920+
item: { ...gridBody('Cases'), object: 'myapp_invoice', columns: ['id', 'name'] },
917921
});
918922

919923
const res = await protocol.revertCommit({ commitId: 'cmt_new_build' });

‎packages/objectql/src/protocol-metadata-row-actor.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ const BOB = 'usr_bob';
126126
const NAME = 'case_grid';
127127

128128
// [#21470] `name` is the row's: a body `name` that is not its row's is refused by the write doors.
129-
const viewBody = (label: string) => ({ name: NAME, type: 'grid', label, columns: ['id'], object: 'case', viewKind: 'list' });
129+
// [#24668] Bound to `sys_metadata`, an object this harness registers: the overlay save door refuses a list view bound to an object that exists nowhere (it read `case`).
130+
const viewBody = (label: string) => ({ name: NAME, type: 'grid', label, columns: ['id'], object: 'sys_metadata', viewKind: 'list' });
130131

131132
describe('#23033 — the sys_metadata row records who created it and who last changed it', () => {
132133
let kernel: ObjectKernel;

‎packages/objectql/src/protocol-publish-canonical-fold.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,9 @@ async function refusalOf(fn: () => Promise<unknown>): Promise<{ code?: string; s
271271
const translationBody = (label: string) => ({ locale: 'zh-CN', name: 'zh_cn', label });
272272

273273
/** [#7741] the inline arm requires the object binding pair. */
274+
// [#24668] Bound to `sys_metadata`, an object this harness registers: the overlay save door refuses a list view bound to an object that exists nowhere (it read `case`).
274275
const viewBody = (label: string) => ({
275-
name: 'case_grid', type: 'grid', label, columns: ['id'], object: 'case', viewKind: 'list',
276+
name: 'case_grid', type: 'grid', label, columns: ['id'], object: 'sys_metadata', viewKind: 'list',
276277
});
277278

278279
// ═══════════════════════════════════════════════════════════════════════════

‎packages/objectql/src/protocol-recorded-by-null.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ function makeStubDriver() {
187187
}
188188

189189
// [#21470] `name` is the row's: a body `name` that is not its row's is refused by the write doors.
190-
const viewBody = (label: string, name = 'cases') => ({ name, type: 'grid', label, columns: ['id'], object: 'case', viewKind: 'list' }); // [#7741] the inline arm requires the object binding pair
190+
// [#24668] Bound to `sys_metadata`, an object this harness registers: the overlay save door refuses a list view bound to an object that exists nowhere (it read `case`).
191+
const viewBody = (label: string, name = 'cases') => ({ name, type: 'grid', label, columns: ['id'], object: 'sys_metadata', viewKind: 'list' }); // [#7741] the inline arm requires the object binding pair
191192

192193
describe('#4556 — protocol write paths store NULL, not the sentinel string', () => {
193194
let engine: ObjectQL;

‎packages/objectql/src/protocol-revert-org-scope.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ function makeStubDriver() {
192192
}
193193

194194
const PKG = 'app.revertscope';
195-
const viewBody = (label: string) => ({ name: 'cases', type: 'grid', label, columns: ['id'], object: 'case', viewKind: 'list' }); // [#7741] the inline arm requires the object binding pair
195+
// [#24668] Bound to `sys_metadata`, an object this harness registers: the overlay save door refuses a list view bound to an object that exists nowhere (it read `case`).
196+
const viewBody = (label: string) => ({ name: 'cases', type: 'grid', label, columns: ['id'], object: 'sys_metadata', viewKind: 'list' }); // [#7741] the inline arm requires the object binding pair
196197

197198
describe('#7559 — the revert reads the history row under the key the writer stored it with', () => {
198199
let engine: ObjectQL;

‎packages/objectql/src/protocol-save-meta-repo-path-real-engine.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ function makeStubDriver() {
138138
}
139139

140140
function viewBody(label: string) {
141-
return { name: 'cases', type: 'grid', label, columns: ['id'], object: 'case', viewKind: 'list' }; // [#7741] the inline arm requires the object binding pair
141+
// [#24668] Bound to `sys_metadata`, an object this harness registers: the overlay save door refuses a list view bound to an object that exists nowhere (it read `case`).
142+
return { name: 'cases', type: 'grid', label, columns: ['id'], object: 'sys_metadata', viewKind: 'list' }; // [#7741] the inline arm requires the object binding pair
142143
}
143144

144145
describe('saveMetaItem — repository write path against real ObjectQL (PR-10d.4)', () => {

‎packages/objectql/src/publish-meta-response-conformance.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ async function makeProtocol() {
163163
return new ObjectStackProtocolImplementation(engine);
164164
}
165165

166-
const viewBody = (label: string) => ({ name: 'cases', type: 'grid', label, columns: ['id'], object: 'case', viewKind: 'list' }); // [#7741] the inline arm requires the object binding pair
166+
// [#24668] Bound to `sys_metadata`, an object this harness registers: the overlay save door refuses a list view bound to an object that exists nowhere (it read `case`).
167+
const viewBody = (label: string) => ({ name: 'cases', type: 'grid', label, columns: ['id'], object: 'sys_metadata', viewKind: 'list' }); // [#7741] the inline arm requires the object binding pair
167168

168169
/**
169170
* A `seed` body, which is what makes `seedApplied` appear on the response. It

‎packages/objectql/src/save-meta-response-conformance.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ async function makeProtocol() {
168168
return new ObjectStackProtocolImplementation(engine);
169169
}
170170

171-
const viewBody = (label: string) => ({ name: 'cases', type: 'grid', label, columns: ['id'], object: 'case', viewKind: 'list' }); // [#7741] the inline arm requires the object binding pair
171+
// [#24668] Bound to `sys_metadata`, an object this harness registers: the overlay save door refuses a list view bound to an object that exists nowhere (it read `case`).
172+
const viewBody = (label: string) => ({ name: 'cases', type: 'grid', label, columns: ['id'], object: 'sys_metadata', viewKind: 'list' }); // [#7741] the inline arm requires the object binding pair
172173

173174
/** Keys the producer emitted that the schema refused to carry through. */
174175
function strippedKeys(raw: Record<string, unknown>): string[] {

0 commit comments

Comments
 (0)