Skip to content

Commit 9353883

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-xniw22
2 parents c1d3b9d + f125ce4 commit 9353883

128 files changed

Lines changed: 6133 additions & 459 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
docs(spec): `ConnectorConnectionState.status` no longer says a connection with no refresh token is marked because its access token expired
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Comment only. The `reconnect_required` JSDoc said such a connection "keeps nothing to renew an expired access token with". A refresh also runs on a cache miss (a fresh replica, or a `revision` another replica moved) and on a dispatch's 401, so a connection with no refresh token, or no client to refresh with, is marked even while its access token is still valid. The JSDoc now reads "keeps nothing to renew an access token it has to renew with", the wording the runtime's own `markReconnectRequired` doc and the `sys_connector_connection.status` description use, and the sense of the `status_reason` the runtime stores ("an access token the connection has to renew cannot be renewed").
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/metadata-protocol': minor
3+
---
4+
5+
fix(metadata-protocol)!: a runtime permission-set save refuses a grant on an object that does not exist
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: narrowed
9+
10+
**BREAKING** for one shape only: a `permission` set whose `objects` map grants on an object this runtime does not know. It was stored and published (200), and the grant applied to nothing, because the permission evaluator keys a grant by the object's name: a short `lead` where the object is `crm_lead` silently granted nothing. `defineStack` already refuses the same grant at build; the metadata save doors now refuse it too.
11+
12+
- **Where.** `PUT /api/v1/meta/permission/NAME`, live and `?mode=draft`; the publish of a draft (`POST /meta/permission/NAME/publish`, `POST /packages/ID/publish-drafts`); and the restore doors (`POST /meta/permission/NAME/rollback`, a commit revert).
13+
- **The refusal.** `422 INVALID_METADATA`, the save door's existing envelope, with one finding per unknown object at `objects.NAME`: "Permission 'SET' grants on object 'NAME' which is not defined in objects: …". Nothing is stored; a package publish aborts the batch.
14+
- **What counts as known.** The `'*'` wildcard; an object the runtime registers, from any package, platform objects (`sys_*`, the RBAC link tables) included; an object stored in this environment or defined in code; on a draft save, any object draft; on a package publish, an object drafted in the same batch.
15+
- **What is not judged.** A grant the set already holds: a re-save, `os migrate meta --stored` or a restore that keeps it is not refused, even if the object has gone since. Editing a shipped set is therefore never refused for a grant it ships with.
16+
- **What to do.** Correct the object name to the object's full name, create the object first (or draft it in the same package), or remove the grant.
17+
18+
<!-- adr-0087: not-required (no-migration-prescription) the diff registers no retirement and prescribes no rewrite: the refused value granted nothing, so there is no stored shape to convert; a set that already holds such a grant is not refused on re-save -->
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
---
4+
5+
fix(plugin-auth): a rate limit admits no more than its limit inside one process, and the auth counters count in a registered `cache` service
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **A limit holds under concurrency inside one process.** Updates of one counter key are now serialised in the process: a fixed-window limit of `max` admits at most `max` requests per window for one key however many arrive at once, and every request is counted. This holds in the per-process store and in the kernel `cache` alike. It covers better-auth's sign-in and sign-up rate limits (`rateLimit.customStorage`), the counters of the exported `cacheSecondaryStorage()` adapter, the signed-out invitation preview, and every other caller of `incrementFixedWindow` (`@objectstack/plugin-auth/rate-limit-storage`). The per-number OTP send budget follows the same rule: one number is granted no more sends than its cooldown and hourly cap allow. Other keys keep counting concurrently.
11+
- **The counters count in the registered `cache`.** When a `cache` service is registered, as a value or as a factory, the rate limits, the OTP send budget and the invitation preview count in it. They fall back to a per-process store only when none is registered, and say so once. The service is resolved through the kernel the plugin context hands out (`getKernel().getServiceAsync`), or through `getService` on a host without service factories (`LiteKernel`).
12+
- **Across nodes, unchanged.** `ICacheService` has no atomic increment, so two nodes that share one cache can still over-admit slightly between them (ADR-0069 D2), as documented. That is still strictly better than counting per node.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
fix(cli): the os validate / os build flow-region check never passes a flow it could not judge, and the boot banner counts flows refused at registration
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **No silent pass.** The flow-region check `os validate` and `os build` run (the automation engine's registration verdict, ADR-0031) parses each flow with `FlowSchema` before it judges the regions. When that parse failed it used to skip the flow with no row, so the flow passed unjudged. It now refuses it with a `VALIDATION_ERROR` row at the flow's `path`, naming the flow and the schema's issues. No authored stack reaches this branch today: the stack schema has already parsed every flow the check reads, and `FlowSchema` accepts its own output. Nothing refused or accepted today changes.
11+
- **Refused flows in the boot banner.** When the automation engine refuses a declared flow at registration, boot still continues and the per-flow reason is still under Boot diagnostics. The `os serve` / `os dev` banner now also prints one line beside the declared count, for example `⚠ Flows: 2 flow(s) declared, 1 refused at registration`, read from the engine's own record (`getFlowRegistration`). It prints even when every declared flow was refused and nothing registered. A boot with nothing refused prints no such line.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
'@object-ui/app-shell': patch
4+
'@object-ui/components': patch
5+
---
6+
7+
fix(plugin-detail, app-shell, components): the record page's controls are 44 px touch targets at phone width, the inline-edit pencil shows on a touch screen, and the phone's back link leaves no copy of the record behind it
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
The mobile app hosts the Console in a WebView, so a phone user gets the record page at 375 or 390 px wide. Driven there on the CRM and showcase examples, the page did not scroll sideways, its dialogs and menus fit the screen and the keyboard left the focused field in view, but most of its own controls were smaller than a finger: the record tabs and their `+N` menu (36 px), the related card's header controls (24 px) and rows (32 px), the related list's toolbar, filter and paging, the timeline's chips and "Write a note…" box, the comment toolbar (28 px), "Show N empty fields", the inline save bar (36 px), the bottom action bar (40 px), the phone's back link (28 px) and the top bar's next and previous buttons (28 px), the copy-record-ID button (20 px), the attachments Upload button, the declared action buttons and their parameter dialog's Cancel and Confirm. The inline-edit pencil, in the details body and in the header strip, was drawn at opacity 0 until hover, and a touch screen has no hover, so a phone showed no way into inline edit. The back link 「‹」 pushed the list as a new history entry, so the browser's Back after it opened the record again.
13+
14+
Below `sm` each of them is now at least 44 px, through the spellings the code already uses for its phone faces (`h-11 sm:h-N`, `min-h-[44px] sm:min-h-0`), and the pencil is always drawn on a coarse pointer. The back link replaces the record's history entry instead of pushing a new one, so Back after it leaves the record; a page pushed from a parent record still goes back in the history as before. From `sm` up every control keeps its size, and a mouse still reveals the pencil on hover. No key, prop, export or breakpoint is added.
15+
16+
What to do: nothing.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@object-ui/fields': patch
3+
'@object-ui/plugin-form': patch
4+
---
5+
6+
fix(fields, plugin-form): the create and edit form's controls reach a 44 px touch target at phone width
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
Below the `sm` breakpoint (640 px) the field widgets a create or edit form draws now carry the same `min-h-[44px] sm:min-h-0` touch floor the form renderer's built-in controls already did. That covers the text, email, phone, URL, number, currency and percent inputs, the percent slider's hit area, the select trigger and its options, the lookup trigger with its clear, browse-all, search and quick-create controls, the record picker's search and filter buttons, the date picker's input, clear and calendar buttons, a 44 px calendar day, and the line-item grid's cells, row buttons and add-line button, and the file field's take-photo and per-file remove buttons. The modal, drawer and master-detail form footers' buttons do the same. From `sm` up every control keeps its previous height. No prop, export or metadata key changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
A member the Setup app refuses who opens an object's create form under the Setup segment, `/apps/setup/OBJECT/new`, now gets the same "You don't have access to this app" screen as the object list beside it, instead of the create form inside the default app's header and sidebar. The package-id spelling `/apps/com.objectstack.setup/OBJECT/new` draws the same screen. Admins see the form as before, and the record pages the approvals inbox links to (`/apps/setup/OBJECT/record/ID`) are unchanged.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/plugin-security': patch
3+
'@objectstack/rest': patch
4+
---
5+
6+
perf(security): the batch form of `security/explain` runs its object-level pass once, not once per record
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
`POST /api/v1/security/explain` with `recordIds` used to run a whole singular explanation for every id, one after another: the caller's admission, the explained principal's context (its grant rows read again), the principal's person row and the nine object-level layers were all redone per id before that id's record verdict was judged. A list page asking for its row menus' update and delete verdicts waited on that repetition.
12+
13+
- **What changed.** The REST door now hands the security service the whole batch. The service settles what no record id reaches once for the batch (the caller's admission, the explained context, the object-level pass) and then judges each distinct id with the record-grained pass alone. The sharing service's read filter, a question about the principal and the object, is also asked once per batch.
14+
- **What did not change.** The answers. The batch is the object-level decision plus `records[i]`, the record verdict the singular explanation of `recordIds[i]` gives: same order, same length, a duplicated id answered at each position, a missing or unreadable record answered as before. A refusal of the object-level question refuses the batch as before.
15+
- **A security service that predates this** answers a batch request with the object-level decision and no `records`; the door then asks each id singularly, as it always did.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
perf(app-shell): a platform admin reads the package list once per session for the app → Studio entries, not on every app page
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The app bar's Edit app pencil (and the app switcher's Studio row), the sidebar's Design entry and a page's Edit in studio pencil decide whether to draw by reading `GET /api/v1/packages`. That read was repeated on every app page a platform admin opened, and twice on one page when a reader mounted after the first read had settled, although the list is the largest response such a page reads. Those entries now hold the list for the session (the signed-in user and the active organization): an admin's session reads it once, and moving between apps reads nothing. Non-admins still send no such request.
11+
12+
Only these entries hold the list. Studio's own package reads (the switcher, the landing page, the writability gates) still read the server every time.
13+
14+
A held answer stays correct when the list changes: every package write the Console sends forgets it (create and edit, duplicate, the customization pair, the Packages page's publish, revert, discard, delete, adopt, enable/disable and import, and the marketplace install and uninstall), and a package id the held list does not name, such as a package an agent created on the server, is read again once. A writable verdict that changes outside this tab shows its previous posture until this tab writes a package, the session changes or the page reloads; Studio still opens on the verdict it reads itself, and the server's write gate is unchanged.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
fix(app-shell): Home asks for the objects it names instead of loading the whole object registry
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Every visit to `/home` read `GET /api/v1/meta/object` (the whole registry, the largest metadata payload of the page) and `GET /api/v1/meta/view`, for a few object names. Now:
11+
12+
- The command palette is mounted from its first open. Opened, it reads its host app's object scope over the objects its navigation lists, without views: the objects its record search reads.
13+
- Outside an app, the activity feeds' `sys_activity` check (`useObjectPresence`) and their roster's capability gate (`useNavMemberGates`) ask their names by name, without views.
14+
- Recent rows (Home's and the palette's) and activity rows read the object each one names, by name (`readObjectsByName`, `useNavTargetLabel({ byName: true })`, `useRecentItemLabel`, `ActivityObjectLabel`). A list-view row reads its object with its views.
15+
16+
Once something has loaded the whole list (inside an app, say), every one of these reads it and asks nothing more. What Home and the palette show is unchanged.

0 commit comments

Comments
 (0)