Skip to content

Commit 366f694

Browse files
committed
Merge origin/main into claude/project-thread-jsuo72
Claude-Session: https://claude.ai/code/session_01ADHkmShAaJxw2RfTSQnjrX Co-authored-by: Claude <noreply@anthropic.com>
2 parents 8c4049e + d3bea96 commit 366f694

29 files changed

Lines changed: 1098 additions & 119 deletions

‎.changeset/33563-revert-commit-honest-outcome.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Metadata-protocol: none
99

1010
`revertCommit` now reports an item whose row was written but whose next step did not land in `failed[]`, not `reverted[]`, and the answer's `success` is `false`. The steps are: the runtime registry refusing the restored object, its storage not following the restored body (the `object-storage-sync-refused` advisory stays on `advisories`), the mutation projector failing, and any step after the row write throwing. The entry names the row state ("its row was restored to the body of version N", or "its row was removed from sys_metadata") beside the step that failed, and quotes no driver text. The revert's own commit still records the row change. Before, each of these answered `success: true` with the item in `reverted[]`, against the method's own contract ("a revert that answers `success: true` is one the running process has already acted on"). `rollbackToPackageCommit` carries each such item into its own `failed[]` and answers `success: false`.
1111

12-
A write-through fault the registry helper only logs (every metadata type other than `object`) is still not seen by the revert.
12+
The same holds for an item of any other metadata type: a restored item whose registry write-through throws, and a removed item whose registry heal stops, so that the registry may still serve the removed row.
1313

1414
A revert is now itself revertible, as ADR-0067 D3 says. The revert's own commit records, for each row it changed, the version that row held before the revert, so reverting the revert brings that body back, and an item the revert removed is written again. An item recorded as existing before the commit but carrying no version to restore, which is how every revert commit recorded by an earlier release records the items it restored, is named in `failed[]` with nothing written. Before, it was skipped: it appeared in neither `reverted[]` nor `failed[]`. To undo such an older revert, restore each item from its own version history (`GET /api/v1/meta/:type/:name/history`, then `POST /api/v1/meta/:type/:name/rollback`).
1515

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@objectstack/platform-objects': patch
3+
'@objectstack/spec': patch
4+
---
5+
6+
Clause-②: no
7+
Metadata-protocol: none
8+
9+
Setup → Invitations no longer offers **Resend Invitation** on a cloud-managed environment. A resend is a call to invite-member, which a cloud-managed environment refuses with `409 RESOURCE_CONFLICT`, so the action now carries the same `features.cloudManaged != true` gate as the four Invite User mirrors and Copy Invite Link, and is booked in `PUBLIC_AUTH_FEATURES.cloudManaged.gatedInputs`. Off a managed environment it is offered exactly as before.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
---
4+
5+
fix(scenarios): a card that keeps to working days stays on working days on every run date
6+
7+
Clause-②: yes (widening) — new optional key `ScenarioCardSchema.workingDays` (`.`)
8+
Metadata-protocol: none
9+
10+
A scenario card can declare `workingDays: true`. The run-date rebase then moves its `asOf` onto the run
11+
date and every other date by whole working days instead of whole days, so a Monday-to-Friday leave day,
12+
and the weekday an ask names, stays on a working day however far from `asOf` the card runs (a weekend run
13+
date moves them as for the Friday before it). The loader refuses such a card when its `asOf` or any other date
14+
it holds falls on a weekend, or it has no `asOf`. The `leave_balances` card declares it, so its request days,
15+
balances and truths keep their meaning on every run date.
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 catalog connector descriptor saved active through `PUT /api/v1/meta/connector/:name` now gets the inert-connector warning at once
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The warning `[Automation] N declarative connector(s) declare actions but are not registered …` used to run only at boot and on `metadata:reloaded`. A direct active save raises neither, so a descriptor with actions and no runtime connector behind it stayed unreported until a later publish or a restart. The audit now also runs after the connector reconcile that a connector metadata change queues, so the save door reports it.
11+
12+
The warning is now printed when the set of inert descriptors changes, and it still names the whole set. A publish raises both the mutation signal and `metadata:reloaded`, and it still prints the warning once. A reload or save that leaves the set as it was prints nothing new. Before, every reload repeated the warning.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the query skill teaches that a column with no value fails an ordering filter, and where a per-measure filter runs
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
objectstack-query's `rules/filters.md` gains the rule that `$gt` / `$gte` / `$lt` / `$lte` / `$between` never match a row whose column is null or absent, in `where`, an aggregation's `filter` and `having` alike, with the `$or` + `$null: true` spelling that keeps those rows; the same section says `null` is not an ordering comparand. `rules/aggregation.md` no longer says a per-measure `filter` always forces the in-memory path: a driver that declares `supports.aggregationFilter` (`driver-sql`; `driver-turso` outside remote mode) runs it in the database, where it answers and is refused as the same condition is in that datasource's `where`, text collation included; on any other driver the engine evaluates it over the scoped rows. Its `having` section says `avg` / `min` / `max` over no rows is `null` and so fails an ordering test. One eval case covers the rule in a measure filter. Two restatements in `filters.md` were removed to pay for the new text: the case-sensitivity paragraph SKILL.md § String Operators carries, and a second `$between` example.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
'@objectstack/rest': patch
4+
---
5+
6+
fix(metadata-protocol): on PostgreSQL the `sys_metadata` ACTIVE overlay key becomes the partial NULL-safe unique index, as on SQLite, instead of the declared NULL-distinct constraint
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
On PostgreSQL the declared `idx_sys_metadata_overlay_active` is a UNIQUE constraint over `(type, name, package_id, bundle_member)`. `bundle_member` is NULL on nearly every row, so this constraint enforced nothing. Two ACTIVE overlays for one `(type, name, package)` could both be stored, and which one a metadata read returned was undefined. The runtime migration that replaces the constraint ran `DROP INDEX` on it. PostgreSQL refuses that (2BP01), so every process printed one `[sql-driver] DATABASE_ERROR … (2BP01)` line at its first `sys_metadata` read, kept the constraint and reported nothing else.
12+
13+
The migration now gets the dialect and a seam that returns rows, so it takes the PostgreSQL path the `sys_setting` and `sys_notification_preference` identity migrations already take. That path frees the name with `ALTER TABLE … DROP CONSTRAINT`, builds `UNIQUE (type, name, COALESCE(package_id, ''), COALESCE(bundle_member, '')) WHERE state = 'active'`, and checks the result by reading the index definition back. The 2BP01 line no longer appears.
14+
15+
If the database already holds two ACTIVE rows for one key, the old constraint stays and no row is deleted. One `[metadata-protocol] cannot rebuild 'idx_sys_metadata_overlay_active'` line is printed at `error`. It names the key that is not enforced, gives the query that lists the blocking rows and points to `os migrate duplicates`. Resolve the duplicates and restart, and the next boot builds the index. If the name cannot be freed at all, the line says the existing index is unchanged. The step never reports success it did not get.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
- 复核记录 = 一条评论落 PR 或卡,席内与各子代理同形;散文、dev 自评、`os-dev-report` 不算。
3434
- 同形 = `## Contract review` 题头之下 `Head-sha:` 行独占码段、①②③逐项、独立性对、PASS/FAIL。
3535
- 同形含首行 `Served-tier:`:值为该面所定档常量名 `CONTRACT_REVIEW_TIER` 或 `TIER_DEFAULT`;无此行不
36-
成裁决;模板 `node scripts/pm/record-recognisers.mjs --template`;前者只经写工具带 `--tier-evidence=`
37-
贴:子代理(调用显式传该档 model)给其输出文件,卡线程或席内复核给本会话
38-
`~/.claude/projects/*/<id>.jsonl`;`verify-review-tier.mjs` 拒即重跑 ⛔ 不改档名。
36+
成裁决;模板 `node scripts/pm/record-recognisers.mjs --template`;前者只经写工具带 `--tier-evidence=`贴:
37+
子代理(显式传该档 model)给输出文件;卡线程或席内复核未起他 agent、未发消息、未调 Skill
38+
才给本会话 `~/.claude/projects/*/<id>.jsonl`;`verify-review-tier.mjs` 拒即子代理重跑 ⛔ 不改档名。
3939
- ④ 设计判断欠 schema、governed 规则文本、收窄三面:逐 `hits` 文件判改动对所引代码与
4040
验收场景是否成立,ADR 另判首个消费者与执行计划;①–④ 合称完整复核,余面同形无 ④。
4141
- 实质 head 各欠一轮完整复核,发现逐条定 must-fix/should-fix/nit(无碍正确与契约);有前两级才由

‎docs/qa/scenarios/README.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ Chinese and an English title, and every reader picks one of the two explicitly.
4848
unique across the library. The app lives in the namespace `demo` + code (`democrm`) wherever
4949
it is built, scored or exported, and every item it declares carries that prefix.
5050

51+
**The run moves the card's dates.** `asOf` is the card's today as written, not the day it runs on.
52+
Before a card runs, the runner moves its dates onto the run date: `asOf` becomes the run date, and
53+
every ISO date under `run` and `iterate`, and every date an `ask` writes in its text, moves with it
54+
(one whole-day delta, so every interval between two dates is kept; truths over a calendar window
55+
are computed again over the moved seed). An author therefore must not rely on a fixed calendar
56+
date or on the day of the week: a date written as a Wednesday may run as a Sunday, an ask's weekday
57+
name is written again for the moved date, and a `this_month` window holds whatever the moved seed
58+
puts in it. A card whose dates keep to working days (leave taken Monday to Friday, a day count that
59+
skips weekends) declares `"workingDays": true`: `asOf` and every other date it holds must then fall
60+
on a Monday to Friday, or the card is refused, and the run moves those dates by whole working days
61+
instead, so a working day stays a working day on every run date and N working days between two
62+
dates stay N (a weekend run date moves them as for the Friday before it). Public holidays are out
63+
of scope either way.
64+
5165
**Counts.** The default band is 8–10 questions and 4–6 operations. A card below 8 questions
5266
or 4 operations states why in `run.countsReason`, or it is refused; a `starter` or `delivery`
5367
card has no such excuse ([Tiers](#tiers)).

0 commit comments

Comments
 (0)