You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ff557c4
Browse filesBrowse the repository at this point in the historyBrowse files
fix(service-knowledge): a backlog reconcile asked for during a bulk import waits until the import's record syncs have drained
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
When the record-sync backlog of a source is no larger than the source's rows (a bulk import or bulk update: about one message per record), the reconcile the batch worker schedules for it now starts only once that backlog has drained, and then writes only the rows no record sync reached. Before, it walked beside the drain, and since a message is covered only when it was published 30 s before the walk began, every imported record was embedded and written twice: about twice the embedding requests and twice the vector writes of a rebuild. A backlog that outnumbers the source's rows (repeated saves, rows deleted or moved out of `where`) is still walked beside the drain, as before. A queue that does not drain within an hour starts the walk anyway. No option, setting or error code changes.
fix(metadata-protocol): a duplicated or namespace-imported package copies its `object_extension` rows without a `name` key, and each copy extends the copied object
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
The namespace rename that `duplicatePackage` and `importUnmanagedPackage` (with `targetNamespace`) run on every copied item set `name` on each rewritten body. An `object_extension` body is keyed by `extend`, and the strict extension schema refuses `name`, so every copied extension landed in `failed[]` with "Unrecognized key(s) on this object extension: `name`", a key the author never wrote. The rewrite now leaves `name` off an `object_extension` body.
11
+
12
+
A copied extension now follows the copied object: when its `extend` names an object the copy renames, the copy extends the copy's object and its row is named by it, for a bare object name too (`ticket` copied as `acme_ticket`), so it never extends the source package's object. An `extend` naming an object the copy does not hold (a platform object, another package's object) keeps its name. Every other type still takes its copy name.
it('a package duplicate refuses the copied arrangement in a plain target and in another App\'s pair, per row; CONTROL: the copy of a row without the keys lands',async()=>{
346
+
it('a package duplicate refuses the copied arrangement in a plain target and in another App\'s pair, per row; CONTROL: the copy of a row without the keys lands in `copied[]` and is stored',async()=>{
347
347
const{ protocol, stores }=awaitboot();
348
348
// No `__c` field in the row: the copy into a plain package is refused for the arrangement alone.
expect(copied.map((c: any)=>c.name),'the row is copied').toEqual([OBJ]);
382
+
conststored=rowsIn(stores,`${SVC}.custom`);
383
+
expect(stored.map((r)=>r.name),'the copy is stored under its target').toEqual([OBJ]);
384
+
expect(JSON.parse(String(stored[0]!.metadata)),'the stored body is keyed by `extend`, with no `name`').toEqual({extend: OBJ});
385
+
});
386
+
});
387
+
388
+
/**
389
+
* objectstack#38709 — a duplicate's copied `object_extension` follows the
390
+
* copied object. The source package holds a bare-named object (`ticket`, a row
391
+
* stored before the namespace-prefix rule) and an extension of it; the copy
392
+
* into `acme` renames the object to `acme_ticket`, and the copied extension
393
+
* must extend that copy, never the source's object.
394
+
*/
395
+
describe('objectstack#38709 — a duplicated extension of the package\'s own bare object extends the copy',()=>{
396
+
it('the copy lands in `copied[]` under the copy\'s object name, its stored `extend` is the copy\'s object, and the source\'s extension is untouched',async()=>{
expect((res.copied??[]).filter((c: any)=>c.type==='object_extension').map((c: any)=>c.name),'the extension is copied, under the copy\'s object name').toEqual(['acme_ticket']);
0 commit comments