Skip to content

Commit 1ef1f46

Browse files
committed
Merge origin/main (c05a8a0) into claude/project-thread-rothb5
Claude-Session: https://claude.ai/code/session_01Utp6CaAqjP52wVTzs99H5G Co-authored-by: Claude <noreply@anthropic.com>
2 parents 566e095 + c05a8a0 commit 1ef1f46

36 files changed

Lines changed: 1913 additions & 146 deletions
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/objectql': patch
3+
---
4+
5+
fix(objectql): the engine's aggregate door answers a `sum` / `avg` / `min` / `max` over a `formula` with the stored-field remedy, not "count the rows"
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`engine.aggregate` already refused a value-reading aggregation over a `formula` field with `INVALID_FIELD` / 400 before any driver ran, but its route told the author to "aggregate a field of one of those types, or count the rows with count" — and a count substituted for a total is a plausible wrong number. The route for that pair is now the spec's one prescription, `VIRTUAL_FIELD_AGGREGATE_REMEDY` (`@objectstack/spec/data`, judged by `virtualFieldAggregateRemedy`): make it a field of its return type with the same `expression` (computed and stored on write) and aggregate that. It still comes right after "The query was NOT run.", inside the 500 characters the REST door keeps.
11+
12+
Which pairs are refused does not change, nor does any other pair's wording: a refused `sum` over a `text`, `select` or JSON-stored field keeps its accepted-types route.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/service-automation': patch
4+
'@objectstack/plugin-approvals': patch
5+
---
6+
7+
fix(approvals): a recall or subflow-parent strand reports the hook refusal that stranded the run
8+
9+
Clause-②: yes
10+
Metadata-protocol: none
11+
12+
When an approval decision strands its flow run because the next step was refused (a record hook's declared refusal, a validation rule, a permission), the thrown `RESUME_FAILED` already carries `innerRefusal` and the refusal's marked `userMessage`. Two doors report a stranded run on a success answer instead, through `resumeFailure`: the recall door, whose own resume stranded, and a subflow parent that stranded after the run this door resumed advanced (through `decide` and through `recall`). Those reports carried `code`, `runId`, `status` and `repairable` only, so the approver saw a stranded run with no reason.
13+
14+
- `ResumeFailureReport` (`@objectstack/spec/contracts`) gains two optional members, `innerRefusal` (`{ code, message }`, the engine's `AutomationResult.innerRefusal`) and `userMessage` (the declared sentence in the language of whoever started the run, since a resumed leg keeps the starter's locale; the authored message when no person started the run). The names and shapes are the ones the thrown `RESUME_FAILED` uses. `innerRefusal` is absent when the strand met no refusal (a fault), and `userMessage` is absent unless the failure carried a marked end-user text, so it can ride alone; neither changes how `code` and `repairable` are read. `ResumeFailureDetailsSchema` is unchanged. On the resume door these members already ride the error envelope.
15+
- `AutomationEngine.takeSubflowParentStrand` now returns the stranded parent's `innerRefusal` / `userMessage` beside `runId`, `repairable` and `error`, read from the parent's own result.
16+
- The approvals recall door and the subflow-parent strand fill both members whenever the strand met a refusal, read the way the thrown `RESUME_FAILED` reads them: an `innerRefusal` whose `code` is outside the registered error codes or whose `message` is not a string, and a blank or non-string `userMessage`, are dropped, so a node that returns a malformed pair answers the same on the success channel as on the thrown one.
17+
18+
No migration: the change only adds optional members, and a caller that ignores them reads exactly what it read before.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/cloud-connection': patch
3+
---
4+
5+
fix(cloud-connection): a dry-run re-install answers a refused installed copy or incoming package with a 422, never a 500
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`POST /api/v1/marketplace/install-local` with `dryRun: true` compares the installed copy (the body the last install stored) with the incoming version. When today's artifact resolver refused either body (for example, a stored copy that still carries a retired key such as a bare `indexes[].unique: true`), the dry run threw, and the transport answered `500 INTERNAL_ERROR`. It now answers the way the real install already does: the refusal's own `422` and code (`INVALID_ARTIFACT_PACKAGE_ENTRY` and its siblings). When the stored copy is refused, the message names that copy and the way out: uninstall the package, then install the new version. When the incoming package is refused, the message names the incoming package. Nothing is planned or written. A dry run whose two bodies both resolve answers the plan exactly as before.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/driver-sql': patch
3+
---
4+
5+
fix(driver-sql): `distinct()` and aggregate group keys read a stored text `'0'` / `'false'` boolean as `false`, as `find()` does
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A declared `Field.boolean` / `Field.toggle` column can hold the text `'0'`, `'1'`, `'true'` or `'false'` on SQLite: a column whose type changed to boolean without a rebuild keeps TEXT affinity, and rows a boot has not converged yet still hold the legacy text. Record reads presented those values as their boolean, but `distinct()` and an `aggregate()` group key presented them as `Boolean(value)`, so a stored `'0'` or `'false'` showed as `true`. A group-by over a yes/no field then counted un-ticked rows in a `true` bucket, and `distinct()` could answer `[true]` for a column with no ticked row.
11+
12+
Both doors now present a boolean through the same function the record read uses: `0`, `'0'` and `'false'` read as `false`; `1`, `'1'` and `'true'` read as `true`. Any other value reads as it did. Postgres is unchanged, since it stores a real boolean. `min` / `max` / `sum` / `avg` over a boolean still answer a number, as before. No metadata key, value or default changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/plugin-form': patch
3+
---
4+
5+
fix(plugin-form): the wizard's final-submit gate judges a `visibleWhen` that reads a formula on the computed value
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`WizardForm` re-checks every declared field when it submits, including the fields on steps the user skipped. The simple form's mobile stepper submits through the same check. That check now computes the object's `formula` fields over the record being written before it judges field rules, the same way the form renderer does (`planObjectFormulas`, ADR-0113). Before, it used the formula value from the last read. So after an edit that moved a required field out of its `visibleWhen`, the wizard still demanded the field even though the server does not require it. After an edit that moved the field into its `visibleWhen`, the wizard sent the save without the field and the server refused it.
11+
12+
The `visibleWhen` of a field that reads a formula the form cannot compute is handled as the step forms handle it: the field counts as shown and keeps its `required` flag. The plan is built from the object schema the wizard already reads. When that read fails, or no data source is given, the gate judges the record as it holds it, as before.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/plugin-chatbot': patch
3+
---
4+
5+
fix(plugin-chatbot): the chat composer's accept list reads the HTML `accept` grammar, so a picked CSV, PDF or spreadsheet attaches, and a file of a refused type is named to the user
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The vendored `PromptInput` compared every `accept` token with the file's MIME type, so the extension tokens of `ChatbotEnhanced`'s default list (`.pdf`, `.csv`, `.xlsx`, …) never matched: a picked CSV or PDF did not attach, and the refusal reached only `console.warn`. A token is now read the way the file picker reads it: `.ext` matches the end of the file name, `type/*` matches the MIME prefix, any other token matches the MIME type exactly, all case-insensitive.
11+
12+
A file that still fails is shown to the user: `ChatbotEnhanced` names it, with the accepted list, in the same notice above the composer that names an over-size file, in the user's language (the existing pack sentence `fields.file.typeNotAccepted`; no new key). When one pick refuses files for type and for size, the notice names both.
13+
14+
`PromptInput` now reports every type-refused file of a pick through `onError` with `code: 'accept'` and the refused files in `files`. Before, it reported only a pick where every file was refused, without `files`; a pick that mixed types attached the matching files and dropped the rest with no report. An `onError` handler that ignores `files` sees one more call, for a mixed pick, with the same `code`.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/components': patch
3+
---
4+
5+
fix(components): a list row's Edit or Delete greyed by `userActions.*.disabledWhen` says why
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
When an object's `userActions.edit.disabledWhen` (or `delete.disabledWhen`) held on a row, the data-table's row menu greyed Edit (or Delete) and said nothing about why. The item now gives the generic reason the record page gives for the same verdict ("Not available for this record", in every shipped language) as a visible second line under its label and as its accessible description; its accessible name stays the label. An item that is on, with no predicate or with a predicate that does not hold, gives no reason, as before.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
fix(spec): a deployment's validation override prints a written value exactly as written
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`renderValidationMessage` (`@objectstack/spec/system`) now asks a deployment's `validation.field.<messageKey>` override for its template, without the parameters, and fills the placeholders once. Before, the `i18n` service filled them and the renderer filled the result again, so a written value that itself contained a placeholder, such as a select value `{{label}} plan` refused as `invalid_option_value`, was expanded on the second pass and the refusal showed the field label where the user's own value should be. An override's text now quotes the value exactly as written, as the built-in sentence already did. Overrides that use only `{{name}}` placeholders read the same as before.
11+
12+
The `translate` option of `RenderValidationMessageOptions` and `RenderOperationMessageOptions` now says it is asked for the template with no params. Its type is unchanged. The error code, status and the shipped `value` field of the refusal are unchanged.

0 commit comments

Comments
 (0)