Skip to content

Commit fbcf7fb

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-f1kiqr
2 parents 902d10c + d6c0a75 commit fbcf7fb

66 files changed

Lines changed: 3119 additions & 761 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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/core': patch
3+
'@objectstack/plugin-auth': patch
4+
---
5+
6+
fix(core, plugin-auth): a failed organization probe says `readFailed` too, and an auth mail no longer reads a failed settings read as "no default currency" (#27733, #27710)
7+
8+
Clause-②: no — `resolveLocalizationContext`'s result keeps its shape; the existing `readFailed?: true` member gains one more trigger. Nothing new is exported from a package entry.
9+
Metadata-protocol: none
10+
11+
- **Before.** For a caller that names no organization where no wall stands, `resolveLocalizationContext` first asks `sys_organization` which organization's rows it may read. A store fault on that probe answered the built-ins with no `readFailed`, so messaging graded a mail whose `{{ amount | currency }}` hole then had no default as permanent (`TEMPLATE_INVALID`) and dead-lettered it. And the auth mails (verification, password reset, invitations, magic link, notices) read every failed settings read as "the organization has no default currency": such a mail failed with `TEMPLATE_INVALID` and its "set localization.currency" remedy during a transient fault.
12+
- **Now.** A probe that throws `AuthzStoreUnavailableError` answers `readFailed: true`, the same as a failed `sys_setting` read, so messaging retries the delivery. That answer is cached in neither memo, since no value was read: the next request asks again. A posture that cannot be read is not a store fault and still answers no `readFailed`. The auth mail's currency read rejects on `readFailed`; when the render then refuses for want of a default, the mail is rendered once more without sending with the no-currency code `XXX`: if that renders, the mail fails with an error that names the failed read and carries no `TEMPLATE_*` code, so sending it again once the read succeeds works; if it still refuses, that refusal stands.
13+
- **Unchanged.** A read that succeeds and finds no default keeps today's refusal and remedy, on both paths. A template with no no-argument `currency` hole is sent during a read fault. The failure memo for a failed `sys_setting` read is unchanged.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/platform-objects': patch
3+
---
4+
5+
fix(platform-objects): Setup's user screens show a user's real state, and the copy-password line only when a password was generated
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Four rows of the Setup → Users pass, all on the platform's own `sys_user` metadata:
11+
12+
- **Create User / Set Password result.** The dialog no longer carries the sentence "If a temporary password was generated, copy it now — it is shown only once and never stored." on every result. A dialog-level description shows on both outcomes, and a typed password returns no temporary password, so the line asked the administrator to copy something that was not there. The instruction is now the label of the Temporary password field itself ("Temporary password: copy it now, it is shown only once and never stored"), which the dialog draws only when the server generated one. The zh-CN, ja-JP and es-ES packs carry the same change.
13+
- **User record, Details tab.** Details now shows the saved Locale (in Identity) and an Account Status section with Banned, Ban Reason and Ban Expires. These fields were hidden or in no section, and the details grid draws only its authored sections, so a banned user read as active.
14+
- **Users list.** The default `all_users` view gains Banned and Platform Role columns, so a banned user or an admin is spotted without opening each record.
15+
- **Locale help.** The help now says the setting is the language the user sees the interface in as well as their notifications. It used to say notifications only, while the console applies it to the whole interface. All four shipped packs carry it.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
'@objectstack/platform-objects': patch
4+
---
5+
6+
fix(plugin-auth): a role change that grants an org-admin permission set says which set it granted (#27862)
7+
8+
Clause-②: yes (widening: update-member-role's success answer gains outcome 'permission_set_granted' and grantedPermissionSet; the two sys_member actions gain outcomeMessages)
9+
Metadata-protocol: none
10+
11+
Raising a member to `admin` or `owner` grants an org-admin permission set as a side effect (`organization_admin`, or `organization_admin_no_bypass` on a wall-less posture). The role change used to answer the member row alone, so the console toasted "Member role updated" and the administrator later found a set on the user that nobody visibly assigned.
12+
13+
- **Now.** When the role change left the member holding an org-admin set they did not hold before it, `POST /api/v1/auth/organization/update-member-role` answers two more members beside the member row: `outcome: 'permission_set_granted'` and `grantedPermissionSet: { name, label }`, the label read from the security catalog. The `sys_member` actions Change Role and Make Owner show it: "Member role updated. The new role also granted the permission set Organization Administrator (no record bypass)."
14+
- **Unchanged.** A role change that grants nothing (admin to owner keeps the set already held, a demotion revokes it) and a refusal answer exactly as before. The member row's own columns are untouched. What is granted does not change: the grant is still written by `plugin-security`'s reconciler alone, and the new hooks only read.
15+
- **Fails toward silence.** A grant read that fails leaves the answer as the route wrote it, without the line.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
'@objectstack/types': patch
4+
'@objectstack/objectql': patch
5+
---
6+
7+
fix: a flow an administrator switched off is refused with a plain sentence, the same one a switched-off action reads as
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
- **The flow refusal** (`@objectstack/service-automation`). A packaged flow switched off under Setup › Packaged automation is still refused `FLOW_DISABLED`, at every door that runs it: its trigger, a direct run, and a parent flow that calls it as a subflow. The message now reads: "This flow is turned off for this deployment. An administrator can turn it on again under Setup › Packaged automation, or copy it there under a new name." It no longer names the ledger table or the ADR. The engine writes those, with the code and the flow's name, to an `info` log line each time it refuses one. A flow disabled by its own status (`obsolete` / `invalid`) still reads "Flow '…' is disabled", so the two reasons stay distinguishable.
13+
- **One sentence for both** (`@objectstack/types`, `@objectstack/objectql`). `describeTurnedOffPackagedItem('action' | 'flow')` builds the sentence. The action refusal (`ACTION_DISABLED`) reads from it too, and its wording is unchanged. Only the last clause differs: a flow can be copied under a new name, and an action cannot, so the action sentence still offers another action instead.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
---
4+
5+
fix(service-automation): a corrupt correlation cycle back to the resumed run no longer names that run as its own child
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The resume gate walks a run's linked-run chain to find the suspension a resume really continues. That walk now counts the caller's own run as already visited, so a corrupt `map:` / `subflow:` correlation that points back at it (A → B → A) ends the chain at B. The `409 RESUME_CHILD_PENDING` refusal then names the item run B to resume, never run A, the one the caller is already resuming.
11+
12+
The client's `resume()` docs, the service-automation README and the automation QA checklist now list `409 RESUME_CHILD_PENDING` beside the other resume refusals that leave the suspension intact.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/objectql': patch
3+
---
4+
5+
fix(objectql): a flow a composed stack declares only on its top level, beside package bodies that do not declare it, registers with the automation engine at boot
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: none
9+
10+
The engine's `manifest` service registers a multi-package stack's residual (top-level items no package body declares, ADR-0130 D4) objects and connectors under the stack's own `manifest.id`; it now registers the residual's flows the same way. The automation plugin's boot pull reads flows from the ObjectQL registry only, so a residual flow used to be listed by the metadata service and never registered with the engine: `getFlow` answered `null`, a run answered "not found", and its trigger never armed. Such a flow now registers and runs at boot. A flow a package body declares is still registered once, under that body; stacks whose top level repeats their bodies, and single-package stacks, are unchanged.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
---
4+
5+
fix(service-automation): a `runAs: 'user'` run carries its user's posture rung, so a flow run as the platform administrator is served the ledger's deployment-level rows its user's request is served (#28070)
6+
7+
Clause-②: yes (widening) — `RunIdentityContext` (barrel-exported), and so the data context `resolveRunDataContext` answers, gains an optional `posture` member, and `FlowUserGrants` gains one; a `runAs: 'user'` run seeded with `PLATFORM_ADMIN` is served the rows that rung admits.
8+
Metadata-protocol: none
9+
10+
A request carries the posture rung its user resolves to (`ExecutionContext.posture`, derived in `@objectstack/core`'s `resolveUserAuthzGrants` and copied on by `resolveAuthzContext`). A `runAs: 'user'` automation run seeded the same user's positions, permission sets, peers and email through the same resolver, and no rung. Every reader keyed on the rung then answered the run as for a principal below it. The measured case: after #26750 the compliance ledger's deployment-level rows (`tenant_id` NULL) are served to `PLATFORM_ADMIN` alone, so a flow run as the platform administrator was served organization rows only. That failed closed (fewer rows, never more).
11+
12+
- **Now.** Run setup takes the rung off the resolution it already makes for the run's user (the automation plugin's grants bridge forwards `resolveUserAuthzGrants`' own `posture`; nothing in this package derives one), seeds it beside the positions and permission sets, and every data node carries it to the data engine. The platform administrator's run is served the deployment-level rows, as their request is.
13+
- **Only with the grants it came from.** The rung is seeded exactly when the run's positions and permission sets are resolved at setup. A context that brought its own grants (a door's pre-resolved envelope, an agent's narrowed ceiling) gains no rung from a re-resolution, so a rung never stands beside grants it was not derived from. A value that names no rung is not carried.
14+
- **After an approval decision.** The decision switch removes the submitter's rung with their other facts, and the decider's segment carries the decider's own.
15+
- **Unchanged.** A `runAs: 'system'` run (elevated; no rung is resolved or carried). A member's run is served what the member's request is served, as before: a rung below `PLATFORM_ADMIN` admits nothing a missing one did not, and plugin-security's tenant-wall exemption already enforced the narrower of the carried rung and its capability probe.
16+
- **Still without a rung.** A run started through the REST or action door, which forwards the request's positions and permission sets but not its rung, keeps failing closed for the rung's readers until that door forwards it.

‎.claude/skills/pm-dispatch/references/contract-review.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
- 新 head 即清;点名现 head 时 (b) 不起;条件满足由持有车道挂等复核标记或落交接行。
3131
- 逾 24 小时条件未满的 hold 列入分诊轮次记录(`check-owed-reviews.mjs` 标出)。
3232
- 复核记录 = 一条评论落 PR 或卡,席内与子代理同形;散文、dev 自评、`os-dev-report` 恒不算。
33-
- 同形 = `## Contract review` 题头、`Head-sha:` 行独占码段、①②③ 逐项、独立性对、PASS/FAIL。
33+
- 同形 = `## Contract review` 题头之下 `Head-sha:` 行独占码段、①②③逐项、独立性对、PASS/FAIL。
3434
- 同形含首行 `Served-tier:`:值写该面所定档的常量名 `CONTRACT_REVIEW_TIER` 或 `TIER_DEFAULT`;
3535
无此行不成裁决;模板 `node scripts/pm/record-recognisers.mjs --template`,申报面加 `--face declaration`。
3636
- 同形带 `Local-runs:` 行:`none` 或 `probe — REASON` 具名唯一探针;有行必校,缺行旧记录不改判。

‎content/docs/permissions/record-view-auditing.mdx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,11 @@ A row about no organization (its `tenant_id` empty: a global settings change, a
224224
user-import run, a platform-admin standing change, a user account created or
225225
reset through the admin endpoints) is served to the platform
226226
administrator alone, in every tenancy posture, `single` included; no other
227-
reader is served one, this capability's holders included.
227+
reader is served one, this capability's holders included. A `runAs: 'user'`
228+
flow whose grants the engine resolves for its user (a record-change run, or the
229+
segment after an approval decision) carries that user's posture, so one run as
230+
the platform administrator is served these rows as their request is; a run
231+
started through the REST or action door is not, yet.
228232
Rows carry the
229233
ADR-0057 `audit` lifecycle class: retained hot for
230234
90 days, then archived for seven years where an `archive` datasource is

0 commit comments

Comments
 (0)