Skip to content

Commit 19e661f

Browse files
committed
Merge origin/main into claude/project-thread-ej3tdk
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbYnNFzqeb7KM8Lpd7j
2 parents a721485 + 3482f3d commit 19e661f

72 files changed

Lines changed: 3969 additions & 1144 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.

‎.changeset/29341-connector-credential-literal.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ Metadata-protocol: none
1111
A declarative connector entry's four maps — `providerConfig.headers`, `providerConfig.defaultHeaders`, `providerConfig.transport.headers` and `providerConfig.transport.env` — are withheld whole on the metadata read path, but a literal credential in one of them is still stored in metadata. The same `credential-literal` predicate the `flow-credential-literal` advisory asks now judges those four maps and names each credential-shaped entry by its position (never its value), with the `auth.credentialRef` route:
1212

1313
- a header entry: move it to the connector's `auth: { type: 'bearer' | 'api-key' | 'basic', credentialRef }`, which the `rest` provider and an `mcp` http transport send themselves;
14-
- a stdio `transport.env` entry: a stdio MCP server takes no `auth`, so the warning says `auth.credentialRef` reaches the server only over an http transport.
14+
- a stdio `transport.env` entry: move it to the connector's `auth: { type: 'bearer' | 'api-key' | 'basic', credentialRef }` and name the variable in `providerConfig.transport.credentialEnv`; the `mcp` provider hands the resolved credential to the stdio server in that variable itself.
1515

1616
Always a `warning`; nothing is refused and every save lands. The rule runs on all three CLI commands and on the runtime publish gate for `connector` (`PUT /meta/connector/:name`), where it rides the save response's `advisories`. `os explain connector-credential-literal` carries the reasoning.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/connector-mcp': minor
3+
'@objectstack/lint': patch
4+
---
5+
6+
Clause-②: yes (widening)
7+
Metadata-protocol: added
8+
9+
`provider: 'mcp'`: a stdio MCP server can now take its credential from the secrets layer instead of a literal in `transport.env`. Declare the instance's `auth` with a `credentialRef` as for an http server, and name the environment variable the server reads in the new `providerConfig.transport.credentialEnv` key: the host resolves the reference (environment, Setup → Connector credentials, the host's resolver) and the provider hands the resolved secret (the `bearer` token, the `api-key` key, or the `basic` password) to the child in that variable. The value is never stored, logged, served on a metadata read or put in a message; a reference that resolves to nothing degrades the instance naming the reference and the server is not started.
10+
11+
```ts
12+
providerConfig: { transport: { kind: 'stdio', command: 'repo-mcp-server', credentialEnv: 'REPO_MCP_TOKEN' } },
13+
auth: { type: 'bearer', credentialRef: 'REPO_MCP_TOKEN' },
14+
```
15+
16+
Refused at materialization as configuration faults (a failed boot for the host's own entry): a `credentialEnv` that is not an environment-variable name, one on an `http` transport, one with no `bearer` / `api-key` / `basic` `auth`, and one naming a variable `transport.env` also sets. A stdio transport that names no `credentialEnv` is unchanged: it does not apply `auth`.
17+
18+
`@objectstack/lint`: the `connector-credential-literal` advisory's finding for a credential literal in `transport.env` now steers to this route (`auth.credentialRef` with `transport.credentialEnv`) instead of telling the author to move to an http transport.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
'@objectstack/platform-objects': patch
3+
'@objectstack/plugin-auth': patch
4+
'@objectstack/plugin-security': patch
5+
'@objectstack/spec': patch
6+
'@objectstack/cli': patch
7+
---
8+
9+
feat(platform-objects): `sys_personal_view`, a reader's own named list views (server step of the first version)
10+
11+
Clause-②: yes (widening)
12+
Metadata-protocol: none
13+
14+
A reader can now keep named list views of their own, as user data rather than view metadata. The new platform object `sys_personal_view` holds one row per saved list:
15+
16+
- its owner (`user_id`);
17+
- the object it lists (`object_name`);
18+
- the name the owner gave it (`label`);
19+
- the list configuration, in spec's `ListView` shape (`config`).
20+
21+
It is registered beside `sys_user_preference`, on the same template, and the generic data API serves it at `/api/v1/data/sys_personal_view`. Which view opens by default is not stored here: the reader's existing per-object pin holds a view id, and a personal view's id is one more value it can hold.
22+
23+
- **Owner only.**
24+
- The object declares the owner-only default row scope `user_id == current_user.id` for every operation. The table carries the organization column, so the organization wall bounds it too.
25+
- Another member gets nothing: no read by id (`404`), nothing listed, and no update (`404 RECORD_NOT_FOUND`).
26+
- A create naming another owner is refused `403 PERMISSION_DENIED`.
27+
- A view's owner is fixed when it is saved: an update that changes `user_id` is refused `403 PERMISSION_DENIED` for every caller but the system, platform administrators included. A save rule holds this, because for an organization member the `member_default` update floor (`created_by == current_user.id`) applies to an update in place of the object's own row scope.
28+
- **No back door for organization administrators.** `organization_admin`, and the derived `organization_admin_no_bypass`, name the object without the wildcard's super-user bits. An organization administrator reads, writes and deletes only their own views.
29+
- **Platform administrators are not limited.** The bare `admin_full_access` wildcard carries `viewAllRecords` and `modifyAllRecords`, so through the generic data API a platform administrator reads, edits and deletes any member's view. This is the same as `sys_user_preference` today. Whether that should change is an open question.
30+
- **The body is a `ListView` for the row's own object, judged on every save.**
31+
- A create, and an update that sends `config` or `object_name`, parse the resulting body with spec's `ListViewSchema`.
32+
- A body that does not parse is refused `400 VALIDATION_FAILED`, with one `fields[]` entry per issue, each path under `config`.
33+
- A body whose `data.object` names a different object than `object_name` is refused the same way, on `config.data.object`.
34+
- No new error code.
35+
- **Field security is not re-judged on save.** A view whose filter names a field the reader cannot read is still saved. The list query that applies the filter is refused `403 PERMISSION_DENIED` by the existing predicate guard.
36+
- **Not view metadata.** `/meta` never serves a personal view, the metadata write door never writes one, and a package export never carries one. Its id is the engine's record id, so it never takes the `object.key` view syntax.
37+
- **The owner's delete door.** `DELETE /api/v1/personal-views/:id` removes one personal view, and only the caller's own.
38+
- The row is read as the caller, so another member or an organization administrator gets the unknown-id `404 RECORD_NOT_FOUND`.
39+
- A row the caller can read but does not own is refused `403 PERMISSION_DENIED`.
40+
- Only then is the row removed, as the system, attributed to the caller and inside the caller's organization. Success is `200` with `{ id, deleted: true }`.
41+
- The door takes no query parameter (`400 VALIDATION_ERROR`) and serves signed-in callers only (`401 UNAUTHENTICATED`).
42+
- `AuthPlugin` mounts it on the kernel's HTTP server, in the shape of the comment-reaction unreact door.
43+
- **Grants.**
44+
- `member_default` grants read, create and edit on the object, and no delete. That set is bound to the `everyone` anchor, which carries no delete bit (ADR-0090 D5).
45+
- A member's generic data `DELETE` on a personal view is still refused `403 PERMISSION_DENIED`. The door above grants nothing.
46+
- External members (`external_default`) get no grant in this version. Whether they can save views is an open question for the Console half.
47+
48+
`PLATFORM_OBJECTS_BY_PACKAGE['platform-objects']` (`@objectstack/spec/system`) now lists `sys_personal_view`, so lint and cross-reference checks know the name is real. The CLI's organization-ownership inventory carries the new object's row.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
fix(spec): a served object keeps a field label and option labels that diverged from the packaged field, instead of overwriting them with the catalog
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`translateObject` (and so `translateMetadataDocument('object', …)`, which the REST `/meta` reads call) wrote the catalog's field `label` and option labels over every served field. A published object extension's `fieldPatches` label (ADR-0146 D10) was therefore served only by `GET /meta/object/:name/layers`; the read naming no package, the read naming the base and the list read all served the shipped label.
11+
12+
The two slots now follow the rule the field's `description`, `inlineHelpText` and `inlineTitle` and the object's own `label`, `pluralLabel` and `description` already follow (ADR-0029 D9.2a): the catalog applies only while the served value still equals the same field's, or the same option's, in the packaged base. With no packaged base the catalog applies as before. A picklist-bound field's options are the list's and keep the list's translations. A field the packaged base does not declare keeps its own label, as its other slots already did.
13+
14+
Side effect: a tenant overlay's rename of a field label, or of an option label, is now served over the catalog as well, the same way an object rename has been.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/react': patch
3+
'@object-ui/app-shell': patch
4+
'@objectstack/spec': patch
5+
---
6+
7+
fix(console): a record opens the record page scoped to the app it is opened in (`PageSchema.apps`)
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
A record page that names apps in `apps` now opens for its object inside those apps: in the Duly app a user record opens Duly's own `sys_user` page, while Setup → Users still opens the platform's `sys_user_detail`. Everywhere else, and wherever no page names `apps`, the object's `isDefault` record page opens exactly as before.
13+
14+
- `usePageAssignment` (`@object-ui/react`) now reads its existing `app` option, which names the owning app by its name (`AppSchema.name`): the record page whose `apps` lists that app opens before the object's default record page. The option's type is unchanged; it was reserved and read by nothing until now. Pass the app's name, never a route segment.
15+
- The console's record view resolves the route's app segment to its app (package id first, then name) and passes the app's name, on the record route and in the record drawer. Where a package ships two apps, its package-id segment opens the first app, so the second app's scoped page opens under that app's name segment.
16+
- The record route's object scope picks the same page, so the route reads the objects of the page it renders.
17+
- `@objectstack/spec`: the `PageSchema.apps` description drops its "planned, not yet rendered" marker, and the key's liveness verdict is now live, citing the console reader.

‎.claude/skills/pm-dispatch/references/security-findings.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
- 私卡 = 受影响仓上一份未发布的安全公告,只有管理员、安全经理与受邀协作者可见。
2121
- 首选中继 `advisory_create` 建草稿公告,再 `advisory_collaborators_add` 带具名账号进公告。
2222
- 读公告只走中继 `advisory_read`(席位账号读被拒):一次性密钥只在席位进程,只回密文。
23-
- `advisory_report` 只留给 App 无公告写权的仓:GitHub 按账号限每日新私报,全队共一个 App。
23+
- `advisory_report` 与 `advisory_create` 同铸公告写权,无此权的仓两者皆拒;私报另有账号日限。
2424
- ⛔ 席位永不以自身账号私报或写公告:GitHub 写只走中继,以 App 身份;发布归维护者。
2525
- 两操作皆被拒 ⇒ 会话专递(选 A):机制只在会话里交维护者,由其建草稿,⛔ 不换账号重发。
2626
- 私有仓无私密漏洞报告功能,那些操作上线后仍会话专递。

‎.github/workflows/ci.yml‎

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3885,23 +3885,56 @@ jobs:
38853885
# paths relative to ui/, the vitest root, passed as positionals with no
38863886
# `--`, the only spelling ui/scripts/vitest-invocation-guard.mjs admits.
38873887
#
3888-
# objectui's full-battery runs also pass its per-file timings reporter
3889-
# and upload the result for the weekly dataset refresh. Both belong to
3890-
# that refresh workflow, which is in the governance-workflow audit
3891-
# (sub-issue 4 of the epic); until it is ported the committed dataset
3892-
# is what the sequencer reads.
3888+
# THE PER-FILE TIMINGS (objectstack#29517). The whole suite also passes
3889+
# ui/scripts/test-file-timings.mjs, the per-file timings reporter, beside
3890+
# the two reporters it would otherwise displace. It writes this shard's
3891+
# report to $OBJECTUI_TEST_TIMINGS_OUT, and the step after this one
3892+
# uploads it on the full battery's events as `test-file-timings-N`.
3893+
# .github/workflows/ui-test-timings-refresh.yml merges those reports
3894+
# weekly into ui/scripts/test-shard-timings.json, the dataset the shard
3895+
# sequencer splits on. Report-only, by ruling: the reporter never throws
3896+
# into vitest (a failure is one stderr line and no report), and nothing
3897+
# here or there grades a duration. The affected speed passes no reporter:
3898+
# a slice of the suite is not a measurement of it.
3899+
# ui/scripts/__tests__/test-file-timings.test.ts holds this step, the
3900+
# upload and the refresh's `--shards` to the names that script spells.
3901+
# The reporter is spelled from the workspace root, never `./scripts/…`
3902+
# relative to ui/: the root's workflow readers (check-self-test-wired)
3903+
# key a `./scripts/` path to the ROOT `scripts/`, where it is not.
38933904
- name: Run the ui tests (shard ${{ matrix.shard }}/16)
38943905
env:
38953906
MODE: ${{ steps.select.outputs.mode }}
3907+
OBJECTUI_TEST_TIMINGS_OUT: ${{ runner.temp }}/test-file-timings/shard-${{ matrix.shard }}.json
38963908
run: |
38973909
if [ "$MODE" = 'affected' ]; then
38983910
mapfile -t filters < "$RUNNER_TEMP/affected-tests.txt"
38993911
echo "Affected speed: ${#filters[@]} vitest filter(s), shard ${{ matrix.shard }} of 16."
39003912
pnpm --dir ui exec vitest run --shard=${{ matrix.shard }}/16 --reporter=default --reporter=github-actions "${filters[@]}"
39013913
else
3902-
pnpm --dir ui run test --shard=${{ matrix.shard }}/16 --reporter=default --reporter=github-actions
3914+
pnpm --dir ui run test --shard=${{ matrix.shard }}/16 --reporter=default --reporter=github-actions --reporter="${GITHUB_WORKSPACE}/ui/scripts/test-file-timings.mjs"
39033915
fi
39043916
3917+
# Diagnostics only, so it can never red a shard: `continue-on-error`, and
3918+
# a missing report is a warning, not an error (the refresh's selector
3919+
# then skips this run by name). Uploaded on the full battery's events
3920+
# only, the deny-list of THE TWO SPEEDS above `jobs:`; a pull request that
3921+
# failed open to the whole suite writes a report and uploads nothing.
3922+
# `overwrite: true` so a re-run shard replaces its report, as the
3923+
# shard-attestation uploads do. The refresh reads only the newest
3924+
# completed `push` / `schedule` runs of this workflow on `main`, as many
3925+
# as its selector's own cap examines, so the retention below is
3926+
# deliberately more than that window needs; it is not a measurement of it.
3927+
- name: Publish this shard's per-file test timings
3928+
if: ${{ always() && github.event_name != 'pull_request' && github.event_name != 'merge_group' }}
3929+
continue-on-error: true
3930+
uses: actions/upload-artifact@v7
3931+
with:
3932+
name: test-file-timings-${{ matrix.shard }}
3933+
path: ${{ runner.temp }}/test-file-timings/
3934+
if-no-files-found: warn
3935+
retention-days: ${{ github.event_name == 'schedule' && 7 || 2 }}
3936+
overwrite: true
3937+
39053938
test-ui-gate:
39063939
# Stable required-check name for the sharded Test UI matrix (#26460, ruling
39073940
# A, comment 6435318516), in test-gate's shape and for test-gate's reason

‎.github/workflows/fleet-write.yml‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,14 @@ jobs:
151151
# also reaches cancel, re-run, delete, cache and artifact endpoints; the op table has no
152152
# row for any of them, and `validate.mjs --self-test` pins that none is reachable.
153153
permission-actions: ${{ steps.validate.outputs.permission_actions }}
154-
# THREE consumers, one at a time: the advisory rows — `advisory_report` (one private report),
155-
# `advisory_collaborators_add` and `advisory_state` (one advisory's PATCH). Minted ONLY for a
156-
# stroke carrying one of them, which travels alone, the same way as `permission-actions`: the
157-
# validator writes `permission_repository_advisories=write` for it and an EMPTY value for every
158-
# other stroke. Measured 2026-11-02 with this action and a control token minted without the grant
154+
# FOUR write consumers, one at a time: the advisory rows — `advisory_report` (one private report),
155+
# `advisory_create` (one draft advisory), `advisory_collaborators_add` and `advisory_state` (one
156+
# advisory's PATCH). Minted ONLY for a stroke carrying one of them, which travels alone, the same
157+
# way as `permission-actions`: the validator writes `permission_repository_advisories=write` for it
158+
# and an EMPTY value for every other stroke. Separately, `advisory_read` (one advisory's GET, also
159+
# alone) gets a READ-ONLY mint through this same input: the validator writes
160+
# `permission_repository_advisories=read` for its stroke, never `write`. Measured 2026-11-02 with
161+
# this action and a control token minted without the grant
159162
# (run 41415522766): the narrowed mint succeeds, and the grant opens an advisory's read and PATCH.
160163
# ⚠️ EXPECTED: such a run warns "Unexpected input(s) 'permission-repository-advisories'", because
161164
# the action's `action.yml` does not declare the input; its `lib/get-permissions-from-inputs.js`

‎.github/workflows/lint.yml‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,30 +1495,6 @@ jobs:
14951495
continue-on-error: true
14961496
run: pnpm check:pm-stale-finding
14971497

1498-
# Changeset-deadline census self-test (#16850) — same family and the same
1499-
# split as every step around it. The LIVE census reads the shared board
1500-
# over the API and is REPORT-ONLY by ruling: #16850 takes option 1 (detect
1501-
# the consumption) under this lane's standing rule that a NEW scan
1502-
# population — here, issue BODIES — is censused before anything is
1503-
# enforced. So a card whose changeset window closed is a fact about the
1504-
# board, not about the PR that happens to run CI next, and failing that
1505-
# PR would punish the wrong actor.
1506-
#
1507-
# ⛔ Do not "promote" the live census into this step, and ⛔ do not give it
1508-
# a failing exit on findings. Whether the number justifies an exit
1509-
# contract at all is the question the census exists to answer, and the
1510-
# answer it produced on 2026-09-09 is in the PR that landed this file.
1511-
#
1512-
# What the self-test instruments is the MATCHING RULE and the CONTROLS —
1513-
# the two things a clean tree cannot exercise. Weakening either (counting
1514-
# the glob spelling as a target; accepting a zero without its positive
1515-
# control) leaves a production run just as green, which is the shape
1516-
# `check:self-test-wired` requires this step for.
1517-
- name: Changeset-deadline census self-test
1518-
id: changeset-deadline-census-self-test
1519-
continue-on-error: true
1520-
run: pnpm check:pm-changeset-deadline-census
1521-
15221498
# Governed-merges audit self-test (#9495) — same family, same split as
15231499
# the half-state sweeper above: the live sweep enumerates the governed
15241500
# merges since a date/ref for the PM round report — report-only by

0 commit comments

Comments
 (0)