Skip to content

Commit c09850b

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-38415-seat-by-account-rule
2 parents 03afc9d + 1a9d149 commit c09850b

34 files changed

Lines changed: 3436 additions & 161 deletions
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/knowledge-turso': patch
3+
'@objectstack/knowledge-pgvector': patch
4+
---
5+
6+
fix(knowledge): the keyword leg keeps the letters and numbers of the CJK symbols block inside a term
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
`keywordTerms` in `@objectstack/knowledge-turso` and `@objectstack/knowledge-pgvector` split a query at every character of the CJK symbols block (U+3000–303F) except 々, 〆 and 〇. The block also holds other letters and numbers: the vertical iteration mark 〻 (U+303B), the kana repeat marks 〱–〵 (U+3031–3035), the mark 〼 (U+303C) and the Hangzhou numerals 〡–〩 and 〸–〺 (U+3021–3029, U+3038–303A). Each of them cut the term it sat in, and a run of one character is dropped, so 「人〻」 gave no keyword term. Now only the members of the block that are neither a letter nor a number split terms: 「人〻」 is one piece, and 「第〢〣号」 gives 「第〢〣」, 「〢〣号」 and the pieces of two. 「、」, 「。」 and the brackets still split terms. The two stores keep one identical split class. Matching is unchanged. No index or fingerprint change, no reindex.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/service-knowledge': patch
3+
---
4+
5+
fix(service-knowledge): a bulk import or bulk update reaches search in batches, and a large backlog is reconciled instead of chased
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: none
9+
10+
Record sync used to read, embed and write one record per queue message, and the database queue handed those messages over ten a second, one at a time, so search trailed a bulk import of tens of thousands of records by hours. Where the composed queue has `IQueueService.subscribeBatch` (the platform's database queue does), the record-sync worker now takes up to 100 messages per call: the messages of one source are synced with one re-read of their rows under the source's `where`, one split, one store `upsert` (the embedder splits it into its provider's requests) and one `delete` for the records no row matches, under one index fingerprint. Several messages for one record sync it once. If a batch's write fails, its records are synced again one by one, so a record that cannot be synced is retried and dead-lettered alone while its neighbours are indexed. A queue without `subscribeBatch` keeps per-message delivery, unchanged. Messages stay identifiers only.
11+
12+
When a source's estimated backlog reaches 5,000 waiting record syncs and 5 % of the source's rows (the estimate is the queue's waiting count times the source's share of the batch in hand), the worker schedules one reconcile of that source (the complete build with skip and purge) and keeps syncing while it walks; it never waits for it. Once a complete build of the source (that reconcile or any other) ends `done` with its purge run, a waiting message published more than 5 seconds before it began completes without a read, as `covered`. A build that ended `done` without purging (a store that does not list its documents, or a listing that failed) covers no message, so a waiting delete is still synced. After a backlog reconcile ends `done`, the next one for that source waits at least 10 minutes; after one that does not, the next waits 5 minutes, doubling to an hour. A source whose store does not list its documents is never reconciled for a backlog. `KnowledgeRecordSyncOutcome` gains `covered`, also answered by the per-message path. `KnowledgeService` gains `processRecordSyncBatch` (the worker's batch body), and `processRecordSync` takes the message's publish time as an optional second argument. The batch item and result types, `KnowledgeRecordSyncBatchItem` and `KnowledgeRecordSyncBatchResult`, are exported.
13+
14+
The waiting count the `index_status` action and `os knowledge status` show is now exact above 10,000 messages (the database queue's `getQueueSize`).
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/service-queue': patch
4+
---
5+
6+
feat(queue): an optional batch-consume member on `IQueueService`, implemented by the database queue
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
`IQueueService` gains an optional `subscribeBatch(queue, handler, { maxBatch })`, with the new exported types `QueueBatchHandler`, `QueueBatchOutcome` and `QueueBatchSubscribeOptions`. The handler receives up to `maxBatch` messages of one queue in one call and answers one outcome per message (`{ ok: true }`, or `{ ok: false, error }`), so a message that fails takes the retry and dead-letter path alone while its neighbours complete. A queue takes either per-message handlers or one batch handler. The member is optional: a consumer that finds it absent subscribes per message with `subscribe`, which stays correct, only slower. No existing member changes, and an `IQueueService` implementation that does not add the member keeps compiling and working.
12+
13+
`DbQueueAdapter` implements it. A batch-consumed queue is drained by a loop of its own: each tick claims up to `maxBatch` due rows, renews every claimed row's lease in one write while the handler runs, settles each row by its own outcome (a settling write that fails does not stop the others), and ticks again at once while a claim comes back full. A row the lease reclaim returns to a batch-consumed queue wakes that queue's loop. Every per-message queue keeps the main loop exactly as before: one message per handler call, at most `batchSize` per `pollIntervalMs`. A publish wakes only the loop of its own queue. `DbQueueAdapter.pollBatchOnce(queue)` is the test-friendly poll of one batch queue, like `pollOnce`.
14+
15+
`DbQueueAdapter.getQueueSize` now counts pending rows through the engine's `count` when the engine has one (the ObjectQL engine does), so a backlog larger than 10,000 messages is answered exactly instead of stopping at 10,000. An engine without `count` is read as before.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/plugin-kanban': patch
3+
---
4+
5+
fix(kanban): a list view board laned by a text field draws a lane for a value whose records all sit past the first page
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A list view hands its kanban one page of the view's query. On a board laned by a text field, the grouped lane read already counted every value, but a value whose records all sat past the page got no lane: its records were counted and could not be found on the board. The board now draws that lane after the page's lanes, as it does for a lookup field, titled by the stored value itself, with its whole count, the "Cards not loaded" line and "Load more". A source with no grouped door, or a read that is refused or cut, draws the page's lanes only, as before. Boards laned by a number, boolean or date field still draw the page's lanes only. Nothing to migrate.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/plugin-form': patch
3+
---
4+
5+
fix(plugin-form): a parent's whole-record hand lock locks the record page's line panels too
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The record page has two hand surfaces over a document's lines besides the edit form: the `record:line_items` panel, and the body-table editor its edit state draws. Both now read the parent object's `uiReadonlyWhen` (the whole-record hand lock), as the edit form already does. While it holds over the parent record, a person adds, duplicates, removes or reorders no line there, and every line cell is locked unless its child field declares a hand lock of its own (`uiReadonly: true` or a `uiReadonlyWhen`), which then judges that cell instead. So a child field whose own `uiReadonlyWhen` is the constant `false` keeps that one cell editable on a confirmed order; `uiReadonly: false` is not such a declaration. The panel judges the lock when the record page it sits on is its parent; until that record's row has loaded, its lines stay locked. The edit state judges the record as the user has it in the open edit. REST, import, action and flow writes are unchanged: nothing on the server reads either key.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/plugin-approvals': patch
3+
---
4+
5+
fix(plugin-approvals): a locked record's refusal names it only by a field the writer may read
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The `RECORD_LOCKED` refusal raised while an approval holds a record names that record by its display field only when the field is one a caller can be served: a display field declared `internal: true`, or of a credential type (`secret`, `password`), never titles it. When the field-visibility source cannot answer, the refusal names no title. In both cases the refusal keeps its code (`RECORD_LOCKED`), its status (409) and its sentence, naming the object's label: "This Opportunity is locked while an approval is in progress, …". An ordinary display field still names the record as before.

0 commit comments

Comments
 (0)