Skip to content

Commit f73c11c

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-27114-migrate-meta-e2e
2 parents e0fa04c + 6817bf1 commit f73c11c

95 files changed

Lines changed: 1638 additions & 3941 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/client': minor
3+
---
4+
5+
feat(client): `data.fieldAccess(object, id)` reads the field projection of one record
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: added
9+
10+
`client.data.fieldAccess(object, id)` calls `GET /data/:object/:id/field-access` and resolves to `GetRecordFieldAccessResponse`: the fields the caller may read, and the fields the write gate admits on an update of that stored row. A field permission whose `when` names only some rows is unlocked on the rows it does not name. A row that is absent or unreadable rejects with the record read's 404.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/rest': minor
3+
---
4+
5+
feat(rest): `GET /data/:object/:id/field-access` serves the field projection of one record
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: added
9+
10+
A record's edit form can ask which fields it may write on THAT record: the route answers `{ success: true, data: { object, recordId, readable, editable } }` (`GetRecordFieldAccessResponseSchema`), with `editable` judged on the stored row by the write gate through the security service's `getRecordFieldAccess`. The record is read first exactly as `GET /data/:object/:id` reads it, so an absent row or one the caller cannot read answers that route's 404 and the projection discloses nothing more. The route takes no query parameter (a located 400 names any). Without a security service that offers the method it answers 501, and `/auth/me/permissions` remains the row-less reader.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/plugin-security': minor
3+
---
4+
5+
feat(plugin-security): `getRecordFieldAccess` — a record's field projection from the write gate's own verdict
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: added
9+
10+
The `security` service answers `getRecordFieldAccess(object, recordId, context)`. It reads the row as the caller reads it (the reader the write gate's pre-image comes from) and asks the field-level write gate itself, `computeForbiddenFieldWrites`, for an update of that row naming every field, over the same permission sets, posture and delegator intersection the gate takes. A field permission whose `when` names only some rows therefore locks the field only on those rows, and the answer cannot disagree with a write of that row. A row that is absent or unreadable answers `null`. `getWritableFields` and every other row-less reader are unchanged and still apply each row-conditioned entry as its lock.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec): a record-scoped field projection, judged on the stored row by the write gate
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: added
9+
10+
`GetRecordFieldAccessResponseSchema` (`@objectstack/spec/api`) declares the answer of `GET /api/v1/data/{object}/{id}/field-access`: `{ object, recordId, readable, editable }`, the field projection of ONE record. `ISecurityService` declares its source as the optional `getRecordFieldAccess(object, recordId, context)`: `editable` is the write gate's own verdict on an update of the stored row, so a field permission whose `when` names only some rows locks the field only on those rows, and `readable` is the row-blind read projection. `null` means the caller has no row there (absent or unreadable, deliberately the same answer); `undefined` means no answer.
11+
12+
The `FieldPermissionSchema.when` description now names that reader: the row-less readers (`/auth/me/permissions`, the object-wide field projections, the write preview on an update) keep reporting a row-conditioned entry as its lock, and the record-scoped projection judges it on the row. Nothing an author writes changes meaning.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/i18n': patch
3+
---
4+
5+
feat(i18n): `chatbot.tool.read_package_doc` and `chatbot.tool.search_package_docs` labels in all ten packs (#27002)
6+
7+
The spec registry `PLATFORM_TOOLS_BY_PACKAGE['service-ai']` now lists the cloud ask agent's two package-doc tools, so the chatbot's tool timeline can show them. Each pack gets a sentence in its own language ("Read the app guide", "Search the app guides" in English; "阅读应用文档", "在应用文档中查找" in Chinese), keeping the `toolLabels-locale-parity-7481` and `toolLabels-sentences-12724` tests green.
8+
9+
Clause-②: no
10+
Metadata-protocol: none
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec): `PLATFORM_TOOLS_BY_PACKAGE['service-ai']` lists `read_package_doc` and `search_package_docs`
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: added
9+
10+
The cloud `ask` agent gains two `service-ai` tools that list and read the installed packages' `doc` items behind the `/meta/doc` audience gate (cloud#3335, the cloud half of #26691). The registry now lists both names, in its alphabetical order, so `PLATFORM_PROVIDED_TOOL_NAMES` carries them: a skill whose `tools[]` names either resolves under ADR-0109 reference integrity instead of being reported as a fictional tool (`ai-skill-tool-unresolved`). That is the whole widening: two more accepted `skill.tools[]` values. No schema shape changes, no export is added or removed, and every other name in the registry stays where it was.

‎.github/workflows/ci.yml‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2997,9 +2997,22 @@ jobs:
29972997
packages/spec/json-schema/
29982998
retention-days: 30
29992999

3000+
# Keeps only the entries the build's run summary (`--summarize`, left in
3001+
# `.turbo/runs/` by the assertion above) names, as Test Core's prune step
3002+
# does (#25452): the restore step takes the newest seed by prefix and
3003+
# turbo never evicts its local cache, so a seed saved whole is every seed
3004+
# before it plus this run. No summary -- the build never finished --
3005+
# means no save, and the previous seed stays the newest.
3006+
- name: Prune the Turbo cache to this run's tasks (main only)
3007+
id: prune-turbo-cache
3008+
if: always() && github.event_name == 'push'
3009+
run: |
3010+
node scripts/ci/prune-turbo-cache.mjs --site 'Build Core' \
3011+
--cache .turbo/cache --run-summaries .turbo/runs
3012+
30003013
# Seed the shared Turbo cache from main only (see the restore step above).
30013014
- name: Save Turbo cache (main only)
3002-
if: always() && github.event_name == 'push'
3015+
if: always() && github.event_name == 'push' && steps.prune-turbo-cache.outputs.save == 'true'
30033016
uses: actions/cache/save@v6
30043017
with:
30053018
path: .turbo/cache

‎.github/workflows/docker-publish.yml‎

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,31 @@ jobs:
127127
console.log(`npm serves @objectstack/cli@${version} and ${seen.size - 1} @objectstack/* dependencies.`);
128128
NODE
129129
130+
- name: Decide which rolling tags this version may move
131+
# A rebuild of an older version must not move `latest`, `X.Y` or `X`
132+
# back onto it. Each rolling tag moves only when no stable
133+
# @objectstack/cli version on npm in that tag's range is newer, so a
134+
# release, or a rebuild of the current version, moves all three as
135+
# before. When npm cannot be read, a dispatch pushes only the exact tag,
136+
# and the release lane moves every rolling tag as before. The rules,
137+
# and both fail directions, are in the script's header (#26961).
138+
#
139+
# LANE cannot come from `github.event_name`. In a workflow_call run the
140+
# `github` context is the CALLER's, and release.yml's repair lane is a
141+
# workflow_dispatch too. `github.workflow_ref` names this file only
142+
# when it was dispatched directly.
143+
#
144+
# The self-test runs first. A pull request never runs this step, so
145+
# this is the last point where the decision can be checked before it
146+
# takes effect.
147+
id: rolling
148+
env:
149+
VERSION: ${{ steps.version.outputs.version }}
150+
LANE: ${{ contains(github.workflow_ref, '/.github/workflows/docker-publish.yml@') && 'dispatch' || 'release' }}
151+
run: |
152+
node scripts/ci/docker-rolling-tags.mjs --self-test
153+
node scripts/ci/docker-rolling-tags.mjs --version "$VERSION" --lane "$LANE"
154+
130155
- name: Set up QEMU (arm64 emulation)
131156
uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
132157

@@ -145,13 +170,22 @@ jobs:
145170
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
146171
with:
147172
images: ${{ env.IMAGE }}
148-
# Tag = CLI version. Rolling minor/major/latest tags move with every
149-
# publish; prereleases (x.y.z-rc.1) get only their exact tag.
173+
# Tag = CLI version. The rolling minor/major/latest tags move only as
174+
# far as the step above allows; prereleases (x.y.z-rc.1) get only
175+
# their exact tag.
176+
#
177+
# `latest` has TWO sources in this action: the raw line below, and
178+
# `flavor: latest=auto` (the default), which adds `latest` by itself
179+
# for any stable `type=semver` value. Both read the same output, so
180+
# gating only one of them still moves `latest`. For the newest
181+
# version the tag list is exactly what it was before this change.
182+
flavor: |
183+
latest=${{ steps.rolling.outputs.latest }}
150184
tags: |
151185
type=semver,pattern={{version}},value=${{ steps.version.outputs.version }}
152-
type=semver,pattern={{major}}.{{minor}},value=${{ steps.version.outputs.version }}
153-
type=semver,pattern={{major}},value=${{ steps.version.outputs.version }}
154-
type=raw,value=latest,enable=${{ !contains(steps.version.outputs.version, '-') }}
186+
type=semver,pattern={{major}}.{{minor}},value=${{ steps.version.outputs.version }},enable=${{ steps.rolling.outputs.minor }}
187+
type=semver,pattern={{major}},value=${{ steps.version.outputs.version }},enable=${{ steps.rolling.outputs.major }}
188+
type=raw,value=latest,enable=${{ steps.rolling.outputs.latest }}
155189
156190
- name: Build and push
157191
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0

‎.github/workflows/lint.yml‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3422,14 +3422,15 @@ jobs:
34223422
}
34233423
run_self_test node scripts/ci/scheduled-full-run-card.mjs --self-test
34243424
run_self_test node scripts/ci/nightly-tiers-card.mjs --self-test
3425+
run_self_test node scripts/ci/docker-rolling-tags.mjs --self-test
34253426
run_self_test bash scripts/ci/board-snapshot-r2-upload.selftest.sh
34263427
if [ -n "$failed" ]; then
34273428
echo ""
34283429
echo "Moved workflow step bodies self-tests — the following FAILED:"
34293430
printf "%s" "$failed"
34303431
exit 1
34313432
fi
3432-
echo "Moved workflow step bodies self-tests — all three ran and passed"
3433+
echo "Moved workflow step bodies self-tests — all four ran and passed"
34333434
34343435
# Gate-family selection self-test (#16496). The "Select the gate families
34353436
# this run pays for" step at the top of this job is a thin call into
@@ -5683,7 +5684,7 @@ jobs:
56835684
fi
56845685
if [ -n "$WHOLE" ]; then
56855686
echo "Type-checking the whole workspace -- $WHOLE."
5686-
pnpm exec turbo run typecheck "${UNIVERSE[@]}"
5687+
pnpm exec turbo run typecheck "${UNIVERSE[@]}" --summarize
56875688
exit 0
56885689
fi
56895690
pnpm exec turbo ls "${UNIVERSE[@]}" --output=json > "$RUNNER_TEMP/typecheck-universe.json"
@@ -5699,7 +5700,7 @@ jobs:
56995700
printf ' %s\n' "${SELECTED[@]}"
57005701
FILTERS=()
57015702
for P in "${SELECTED[@]}"; do FILTERS+=("--filter=$P"); done
5702-
pnpm exec turbo run typecheck "${FILTERS[@]}"
5703+
pnpm exec turbo run typecheck "${FILTERS[@]}" --summarize
57035704
57045705
# Seed the shared Turbo cache from main only (see the restore step above).
57055706
#
@@ -5720,8 +5721,21 @@ jobs:
57205721
# merge_group is deliberately NOT added to this condition — see the
57215722
# "why queue-branch saves are not the win they look like" note on the
57225723
# `typecheck` aggregator at the bottom of this file.
5723-
- name: Save Turbo cache (main only)
5724+
#
5725+
# The seed keeps only the entries this lane's two turbo runs used, as
5726+
# ci.yml Test Core's prune step does (#25452): the build's and the
5727+
# typecheck's `--summarize` summaries, both left in `.turbo/runs/`. A
5728+
# bookkeeping step, not a gate: no `continue-on-error`, and it exits 0 on
5729+
# every run-time path.
5730+
- name: Prune the Turbo cache to this run's tasks (main only)
5731+
id: prune-turbo-cache
57245732
if: always() && github.event_name == 'push'
5733+
run: |
5734+
node scripts/ci/prune-turbo-cache.mjs --site 'Type Check · workspace' \
5735+
--cache .turbo/cache --run-summaries .turbo/runs
5736+
5737+
- name: Save Turbo cache (main only)
5738+
if: always() && github.event_name == 'push' && steps.prune-turbo-cache.outputs.save == 'true'
57255739
uses: actions/cache/save@v6
57265740
with:
57275741
path: .turbo/cache

‎.github/workflows/pack-smoke-optin.yml‎

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,11 @@ jobs:
121121
- name: Setup workspace
122122
uses: ./.github/actions/setup-workspace
123123

124+
# Restore here, save at the end of the job: the save sits behind the
125+
# prune step below, which a combined `actions/cache` post-step cannot.
124126
- name: Setup turbo cache
125-
uses: actions/cache@v6
127+
id: turbo-cache
128+
uses: actions/cache/restore@v6
126129
with:
127130
path: .turbo/cache
128131
key: ${{ runner.os }}-turbo-${{ github.job }}-${{ github.sha }}
@@ -132,12 +135,38 @@ jobs:
132135
133136
# The driver's own prerequisite, asserted by the script itself: pack mode
134137
# fails fast unless packages/cli/dist and the create-objectstack bin exist.
138+
# `--summarize` writes the run summary the prune step below keeps.
135139
- name: Build
136-
run: pnpm run build
140+
run: pnpm run build --summarize
137141

138142
# SMOKE_MODE defaults to `pack`, so this is the same invocation
139143
# publish-smoke.yml's pack-smoke job makes. ⛔ Do not add flags or env here
140144
# to make a red go away: the assertions are #14000's deliverable and a
141145
# refusal this script reports is a refusal a user would get.
142146
- name: Publish smoke (packed tarballs)
143147
run: bash scripts/publish-smoke.sh
148+
149+
# Keeps only the entries the build's run summary (`.turbo/runs/`) names,
150+
# as ci.yml Test Core's prune step does (#25452): the restore step takes
151+
# the newest seed by prefix and turbo never evicts its local cache, so a
152+
# seed saved whole is every seed before it plus this run. The save keeps
153+
# the gate the combined `actions/cache` post-step had: a green job whose
154+
# exact key missed, and a save failure never fails the job.
155+
- name: Prune the Turbo cache to this run's tasks
156+
id: prune-turbo-cache
157+
if: success() && steps.turbo-cache.outputs.cache-hit != 'true'
158+
run: |
159+
node scripts/ci/prune-turbo-cache.mjs --site 'Packed-tarball smoke (opt-in)' \
160+
--cache .turbo/cache --run-summaries .turbo/runs
161+
162+
- name: Save turbo cache
163+
if: >-
164+
success()
165+
&& steps.turbo-cache.outputs.cache-hit != 'true'
166+
&& steps.prune-turbo-cache.outputs.save == 'true'
167+
uses: actions/cache/save@v6
168+
timeout-minutes: 5
169+
continue-on-error: true
170+
with:
171+
path: .turbo/cache
172+
key: ${{ runner.os }}-turbo-${{ github.job }}-${{ github.sha }}

0 commit comments

Comments
 (0)