Skip to content

Commit 0ffa47e

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-m0naih
2 parents 1119350 + b77c160 commit 0ffa47e

66 files changed

Lines changed: 1208 additions & 119 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): the push vendor docblocks read ADR-0012 §6.1 as amended
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The `PushVendorSchema` docblock and the push transport and stored device docblocks (`system/push-config.zod.ts`, `system/push-device.zod.ts`) no longer say the domestic Android vendors plug in as alternate channel plugins. They now say what ADR-0012 §6.1 decides: `vendor` is the token type the sender routes on (the direct transport today, the hosted relay, the default, once served), core ships `apns` and `fcm`, and phase 2 adds HMS / Honor / Xiaomi / OPPO / vivo behind the relay, with no per-vendor plugin and no per-vendor channel. A new `PushVendorSchema` value is still a spec change made together with the relay's routing for that vendor. Comment text only: no schema, `.describe()`, export or default changes, and `PushVendorSchema` stays `apns | fcm`.
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): the `contributions` array of `GetPackageCustomizationsResponseSchema` says a disabled package's fields are not listed
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The `.describe()` of the `contributions` array that `GET /api/v1/packages/:id/customizations` answers already left out a disabled package's flows and navigation items, but its field clause still read as listing the fields of every object extension from any package but the base and its pair. The server has not listed a disabled package's extension fields since the served object's fold began withholding a disabled package's extension; the field clause now says so, in the same parenthetical form as the flow and navigation clauses. Text only: no key, shape, default or export changes, and the reference page `content/docs/references/api/package-lifecycle.mdx` is regenerated from it.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec)!: the object parse refuses a `homeAmount.rateField` whose number field declares a `scale` below 12, the decimals an exchange rate carries; `CURRENCY_FRACTION_DIGITS` is documented as CLDR fraction digits, not ISO 4217 minor units
6+
7+
Clause-②: no (narrowing) — the object parse (`ObjectSchema`, so `os validate`, `os compile` and the metadata doors that parse an object) refuses an object whose `homeAmount.rateField` names a `number` field declaring `scale` 0 to 11, a declaration it accepted before. Nothing is widened.
8+
Metadata-protocol: narrowed
9+
Skills-docs: none — `skills/objectstack-data/rules/field-types.md` teaches `rateField` as a readonly `number` with no `scale`, which this change still accepts; the floor ships in the refusal text, the FROM → TO below and the upgrade-guide entry.
10+
11+
<!-- adr-0087: registered home-amount-rate-field-scale-floor -->
12+
13+
**BREAKING** accept-set narrowing in the object parse: `fields.AMOUNT.currencyConfig.homeAmount.rateField`.
14+
15+
- **Before.** A rate field declared `Field.number({ readonly: true, scale: 4 })` parsed. The engine stored the rate it used with all twelve decimals anyway (the rate row's own value, never rounded), so the declared `scale` only rounded the rate a reader was shown: `0.1389` for a stored `0.138912345678`, a rate that no longer reproduced the stored home amount.
16+
- **Now.** The parse refuses it at `fields.AMOUNT.currencyConfig.homeAmount.rateField`, naming the field, its `scale` and the floor 12, the rate's scale (ruling 6469382727: twelve digits after the decimal point, total precision 24). A rate field with no `scale` is accepted: on a `number` field an absent `scale` declares no fixed width, so the rate shows every digit it was stored with. `scale: 12` or more is accepted.
17+
- **Unchanged.** What the engine stores and computes, and every stored data row (record values).
18+
- **Metadata already on disk.** A built artifact whose object declares such a rate field is refused whole at load (its `ObjectStackDefinitionSchema` parse fails before anything registers): fix the source and rebuild. A stored `sys_metadata` object row is kept as authored and still loads and registers; boot logs `[metadata_spec_invalid]` at `fields.AMOUNT.currencyConfig.homeAmount.rateField`, and its next save is refused `422 INVALID_METADATA` until the rate field's `scale` is raised to 12 or more, or deleted.
19+
- **Docs.** `CURRENCY_FRACTION_DIGITS` and the currency page now say the table is CLDR's fraction digits, and list the sixteen codes where they differ from ISO 4217's minor units: IQD (CLDR 0, ISO 3) and AFN, ALL, COP, HUF, IDR, IRR, KPW, LAK, LBP, MGA, MMK, PKR, SOS, SYP, YER (CLDR 0, ISO 2), measured against SIX's ISO 4217 List One of 2024-06-25.
20+
21+
**FROM → TO.** `amount_rate: Field.number({ readonly: true, scale: 4 })` → `amount_rate: Field.number({ readonly: true, scale: 12 })`, or `Field.number({ readonly: true })` with no `scale`.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@object-ui/plugin-report': patch
3+
'@object-ui/plugin-dashboard': patch
4+
---
5+
6+
fix(plugin-report,plugin-dashboard): a report, chart, table or cross-tab drill on a filtered measure lists the records the number counted
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
A drill used to list the clicked bucket AND the report or widget filter only. The number also carries the dataset's own `filter` and the measure's own `filter`, so a drill on a filtered measure listed a superset: on the app-showcase Revenue Pulse dashboard, the Paid Invoices cell of the Sent row reads 0 and its drill listed all 4 sent invoices. The drill now also ANDs in the answer's `drillScopes` entry for the measure it stands for (the server's per-measure list filter; `{}` adds nothing, so a drill on an unfiltered measure is unchanged).
12+
13+
- **What a click stands for.** A chart mark stands for its series' measure (a pivoted chart for its one measure), a cross-tab or matrix cell for its column's measure, and a table row for every measure it holds.
14+
- **A table row whose measures select different records drills cell by cell.** When the row's measures all share one scope (one measure, or several plain ones), the row drills as before. Otherwise each measure cell with a scope is its own drill target (test id `dataset-drill-cell`) and the row is not.
15+
- **No list that does not match the number.** A measure with no `drillScopes` entry (a derived measure, or a scope naming a relationship path) offers no drill, and neither does any measure of an answer that carries no `drillScopes`. A comparison (`<measure>__compare`) series opens nothing. A chart none of whose drawn measures has an entry gets no click handler.
16+
- **Unchanged:** a report answer with no `object` (a server older than ADR-0021 D2) still hands the host its group-key fallback drill.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
feat(console): after a reload, the package page still says how many sample records a purge would delete
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
- **The count on any visit.** The package page of a local install now reads the runtime's count of the sample rows a purge would delete right now (`GET /api/v1/marketplace/install-local/:manifestId/sample-data`), on every visit and again after an install, a reseed or a purge. Before, the purge confirm and the banner that follows the installer to the app knew a count only for an install made in the same browser session; a reload lost it.
12+
- **The confirm.** The local purge confirm draws that count. When it cannot be read (refused, failed), it draws the count this session's install answered, as before. A read that began before an install, reseed or purge of this session answered is older than that answer and is not used.
13+
- **The banner.** A count above zero raises the sample-data banner on leaving the page, as an install of this session does. A count of `0` drops what the session knew: no banner, and no count line in the confirm.
14+
- **Types.** `marketplaceApi` gains `countLocalSampleData` and `LocalSampleDataCount`.
15+
- **Strings.** `@object-ui/i18n` rewords `marketplace.detail.purgeConfirmAtMost` (all plural forms) in all 10 locales: it no longer says the count is "the number this install loaded", which is not what the runtime's count is. It stays an upper bound ("Up to N sample records will be deleted."), true of both counts. No key is added.

‎content/docs/data-modeling/currency.mdx‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,11 @@ document date, the engine computes the home amount:
300300
`date` document date is its own day.
301301
- **The home amount** is the amount **divided by** the rate, computed in exact decimal
302302
arithmetic and rounded once, half away from zero, to the home currency's decimal
303-
places as CLDR gives them (its fraction digits): 0 for JPY, 2 for USD and CNY, 3 for
304-
KWD. For a few currencies CLDR's count differs from ISO 4217's minor units (IQD, HUF,
305-
COP, IDR and PKR among them), and CLDR's applies. USD 10,000 at a rate of 0.1389 into
306-
CNY stores ¥71,994.24.
303+
places as CLDR gives them (its fraction digits, not ISO 4217's minor units): 0 for JPY,
304+
2 for USD and CNY, 3 for KWD. For sixteen currencies the two differ, and CLDR's count
305+
applies: IQD has 0 (ISO 4217: 3), and AFN, ALL, COP, HUF, IDR, IRR, KPW, LAK, LBP, MGA,
306+
MMK, PKR, SOS, SYP and YER have 0 (ISO 4217: 2), so a home amount in any of them is
307+
rounded to whole units. USD 10,000 at a rate of 0.1389 into CNY stores ¥71,994.24.
307308
- **The rate field** stores the rate row's own value, unrounded, so the stored home
308309
amount always reproduces from the stored amount and rate.
309310
- **An amount in the home currency itself** stores rate `1` and needs no rate row.

‎content/docs/kernel/runtime-services/push-service.mdx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,11 @@ service its server gets.
8585

8686
Each vendor block is optional, and at least one is required. A vendor with no
8787
block is a vendor this deployment does not push to; devices registered on it are
88-
skipped. Other Android vendors (HMS, Xiaomi, OPPO, vivo) are not transports of
89-
this service: they plug in as separate channel implementations.
88+
skipped. Only `apns` and `fcm` ship today. The other Android vendors (HMS /
89+
Honor / Xiaomi / OPPO / vivo) are planned for a later phase behind the hosted
90+
relay (below), as further values of `vendor`, the token type the sender routes
91+
on (this service's transports today, the relay once it is served), and not as
92+
plugins or channels of their own.
9093

9194
### Credential references
9295

‎content/docs/references/api/package-lifecycle.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Per-package customization read: overrides, extensions and switched-off items of
173173
| **overrides** | `{ type: string; name: string; member?: string; basedOn?: string; … }[]` | ✅ | Every ACTIVE item of the base's paired `<base>.custom` package that declares `overrides.package` = the base and that the effective read serves over the base's item of the same name: the rows the served-override predicate admits (a declaration from any other package, and an undeclared pair item, are not listed), minus the stored rows every read declines (a shipped flow name). Ordered by type, name and member. |
174174
| **extensions** | `{ object: string; kind: Enum<'field' \| 'validation' \| 'index'>; name?: string; fields?: string[] }[]` | ✅ | Every field, validation rule and index the paired `<base>.custom` package declares in an object extension (`objectExtensions`) of an object the base owns, one entry per member, as the extension declares it. Ordered by object, kind and name. |
175175
| **switchedOff** | `{ type: string; name: string }[]` | ✅ | Every activation-ledger row (`sys_metadata_activation`) that records the base as its package and `active: false`: the base's items this deployment switched off. Ordered by type and name. |
176-
| **contributions** | `({ kind: Enum<'field' \| 'flow'>; object: string; name: string; packageId: string } \| { kind: 'nav'; app: string; group?: string; name: string; … })[]` | ✅ | Every field, flow and navigation item another installed package contributes to the base, one entry per item and contributing package: the fields of every object extension of an object the base owns, from any package but the base and its pair; every flow registered under such a package whose trigger object the base owns (a flow of a disabled package is not served, so not listed); and every navigation item such a package contributes to an app the base owns (a disabled package's are not listed). The entry shape is per `kind`: `object` for `field` and `flow`, `app` and an optional `group` for `nav`. Ordered: the `field` and `flow` entries first, by object, kind, name and package; then the `nav` entries, by app, group (an entry with no group first), name and package. |
176+
| **contributions** | `({ kind: Enum<'field' \| 'flow'>; object: string; name: string; packageId: string } \| { kind: 'nav'; app: string; group?: string; name: string; … })[]` | ✅ | Every field, flow and navigation item another installed package contributes to the base, one entry per item and contributing package: the fields of every object extension of an object the base owns, from any package but the base and its pair (a disabled package's are not listed, as the served object withholds its extension); every flow registered under such a package whose trigger object the base owns (a flow of a disabled package is not served, so not listed); and every navigation item such a package contributes to an app the base owns (a disabled package's are not listed). The entry shape is per `kind`: `object` for `field` and `flow`, `app` and an optional `group` for `nav`. Ordered: the `field` and `flow` entries first, by object, kind, name and package; then the `nav` entries, by app, group (an entry with no group first), name and package. |
177177
| **counts** | `{ overrides: integer; extensions: integer; switchedOff: integer; contributions: integer }` | ✅ | Each list's length, derived from the lists in this same answer. |
178178

179179
### Nested Shape: `GetPackageCustomizationsResponse.overrides[number]`

‎content/docs/references/system/push-config.mdx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ constructor instead. No `OS_PUSH_*` environment variable carries any of
8282
it: the vendor blocks hold no secret to override, and each `credentialRef`
8383
already names one.
8484

85-
Out of scope here: the other vendors ADR-0012 §6 routes to alternate
86-
channel plugins (HMS, Xiaomi, OPPO, vivo).
85+
Out of scope here: the domestic Android vendors (HMS / Honor / Xiaomi /
86+
OPPO / vivo). ADR-0012 §6.1 has the hosted relay front them in phase 2, as
87+
further values of `vendor`, the token type the sender routes on; there is
88+
no per-vendor plugin and no per-vendor channel.
8789

8890
<Callout type="info">
8991
**Source:** `packages/spec/src/system/push-config.zod.ts`

‎packages/spec/src/api/package-lifecycle.zod.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,8 @@ export const GetPackageCustomizationsResponseSchema = lazySchema(() => z.object(
600600
])).describe(
601601
'Every field, flow and navigation item another installed package contributes to the base, one entry per '
602602
+ 'item and contributing package: the fields of every object extension of an object the base owns, from any '
603-
+ 'package but the base and its pair; every flow registered under such a package whose trigger object the '
603+
+ 'package but the base and its pair (a disabled package\'s are not listed, as the served object withholds '
604+
+ 'its extension); every flow registered under such a package whose trigger object the '
604605
+ 'base owns (a flow of a disabled package is not served, so not listed); and every navigation item such a '
605606
+ 'package contributes to an app the base owns (a disabled package\'s are not listed). The entry '
606607
+ 'shape is per `kind`: `object` for `field` and `flow`, `app` and an optional `group` for `nav`. Ordered: '

0 commit comments

Comments
 (0)