Skip to content

qa+fix: ADR-0126 scoped checklist sweep (#12438) + Setup nav entry for the packaged-automation page (#12457) - #12491

Merged
os-zhuang merged 2 commits into
mainfrom
claude/new-session-3qgti9
Aug 27, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/new-session-3qgti9

Conversation

@baozhoutao

Copy link
Copy Markdown
Collaborator

Two commits, one scope — the ADR-0126 packaged flow/action disable+clone surface (acceptance card #12438, Epic #12150).

1. qa(checklist) — scoped coverage sweep (#12438)

The shipped ADR-0126 surface (sys_metadata_activation ledger, packaged flow toggle + subflow guard, flow clone, ACTION_DISABLED dispatch consult, §5 operator gate, Setup packaged-automation board) had zero checklist coverage. Three read-only gap hunters (routes/runtime · Setup/Studio UI · docs claims) → 14 new items across 5 areas + 1 revision, ledger 207 → 221:

  • automation ×4: packaged-flow-disable-durable (P0, restart durability), packaged-flow-subflow-disable-refusal, packaged-flow-clone-contract, setup-packaged-automation-board (browser); flow-toggle-kill-switch rev 2 (re-sourced off the retired flowEnabled map onto the ledger projection)
  • api-backend ×2: packaged-action-disabled-dispatch (P0, both doors + gate ordering), action-activation-door-contract
  • access-security ×3: activation-write-operator-gate (with a TenancyPostureSchema enumSource pin), packaged-flow-write-door-parity, packaged-permission-set-lifecycle (card F1 / Studio save of a package-declared permission set forks it into a silent, undiscoverable overlay #11513 regression guard)
  • platform-core ×3: activation-ledger-registration-home (card G1 / Ledger convergence: registration home + one store implementation (ADR-0126 §4/§8, maintainer-ruled) #12419), activation-ledger-row-contract (scope wall: rows only for flow/action), packaged-object-extend-only
  • studio-authoring ×2: packaged-automation-studio-lock (card F2), packaged-display-class-direct-edit

coverage.json maps every new item (still 0 waivers). FOLLOW-UPS.md §8 carries what is NOT a checklist item: product defects D16–D22 found while grounding (each captured as an expected-fail probe), docs drift, card-accuracy notes for the tester, and fixture asks. Validator green: 221 items, 31 kinds mapped, traps 19/19, all provisioning recipes resolved.

2. fix(platform-objects) — Setup nav entry for the packaged-automation page (fixes #12457, = D16)

The page shipped complete in objectui (component ref automation:packaged) but no framework NavigationContribution ever named the ref — Setup's sidebar carried no entry and the page was reachable only by a hand-typed URL (card A1 failed by construction). This adds nav_packaged_automation in group_apps beside Packages (ADR-0084: package administration is Operate; ADR-0126 §7.4: "Studio keeps the editing; Setup gets the operational state"), deliberately with no requiresService: 'automation' (the action switches work without the automation service, #12419) and no requiredPermissions (matches nav_packages; the write doors enforce manage_metadata / the §5 operator gate server-side). Labels in all four locales with recorded source hashes; setup-packaged-automation-nav.test.ts pins the framework half of the cross-repo contract (objectui's PackagedAutomationPage.navContribution.test.tsx pins its half); changeset included (@objectstack/platform-objects patch).

Verification

  • node scripts/check-platform-checklist.mjs → OK (221 items, 31 kinds, 0 waived)
  • platform-objects vitest suites green (204 tests incl. i18n parity / tombstone / source-hash / the new nav pin)
  • check:app-nav-i18n green: 54 merged setup nav ids × 4 locales
  • Server-authoritative: GET /api/v1/meta/app?id=setup on a booted showcase serves the entry in group_apps
  • Browser (objectui main HMR console → the booted server): admin signs in → sidebar shows "Packaged Automation" → sidebar click (not a typed URL) lands on /component/automation/packaged → page renders 29 packaged flows (toggle + Clone) and the 143-row packaged-actions section; no "Component not registered" (screenshots on 缺陷:Setup 导航缺「Packaged automation」入口 —— objectui 页面已合并,framework nav contribution 从未落地(ADR-0126 §7.4,验收卡 A1 必失败) #12457)

Out of scope, flagged for the maintainer

The .objectui-sha pin (seeded at 190fbd01 by #12347) predates the page's objectui merge (#6382/#6415), so a stock vendored-console build cannot resolve automation:packaged until the pin is bumped ≥ 9602dc8 and the console bundle rebuilt. That bump moves ~700 objectui PRs of console delta — deliberately not ridden on this PR (detail on #12457).

Refs #12438 · Epic #12150 · ADR-0126 · fixes #12457

🤖 Generated with Claude Code

https://claude.ai/code/session_01SKUXt6sKgAeCEtjiuwNuhq


Generated by Claude Code

claude added 2 commits August 26, 2026 03:28
…n disable+clone (#12438)

Scoped sweep triggered by acceptance card #12438 (Epic #12150). The shipped
ADR-0126 surface (sys_metadata_activation ledger, packaged flow toggle +
subflow guard, flow clone, ACTION_DISABLED dispatch consult, operator gate,
Setup packaged-automation board) had zero checklist coverage.

- 14 new items across 5 areas (automation x4, api-backend x2,
  access-security x3, platform-core x3, studio-authoring x2), ledger
  207 -> 221; every clause grounded in source, expected-fail probes for
  the defects found while grounding (FOLLOW-UPS SS8a D16-D22)
- automation.flow-toggle-kill-switch rev 2: re-sourced off the retired
  flowEnabled map onto the ledger projection (ADR-0126 SS7.2)
- coverage.json: new items mapped into flow/action/permission/object/
  view/dashboard kinds; still 0 waivers
- FOLLOW-UPS.md SS8: product defects (Setup nav entry missing - card A1
  will fail; /automation write-door lock bypass; clone engine-only;
  dead subflow remedy; extension-field override), docs drift, card
  accuracy notes, fixture asks
- enumSource pin added: TenancyPostureSchema (3 postures)

Validator green: 221 items, 31 kinds mapped, 0 waived, traps 19/19.

Refs #12438, Epic #12150, ADR-0126

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SKUXt6sKgAeCEtjiuwNuhq
…ge (#12457)

ADR-0126 SS7.4's Setup page shipped complete in the console (objectui
app-shell, component ref automation:packaged) but no framework
NavigationContribution ever named the ref - the page was reachable only
by a hand-typed URL and Setup's sidebar carried no entry (epic #12150
L5/L6-UI closed with the framework half missing).

- SETUP_NAV_CONTRIBUTIONS: nav_packaged_automation (type component,
  componentRef automation:packaged) in group_apps beside Packages
  (ADR-0084: package administration is Operate). Deliberately no
  requiresService (action switches work without the automation service,
  #12419) and no requiredPermissions (matches nav_packages; write doors
  enforce manage_metadata / the SS5 operator gate server-side)
- labels in all four locales + recorded source hashes
- setup-packaged-automation-nav.test.ts pins the framework half of the
  cross-repo contract (objectui's navContribution test pins its half)
- FOLLOW-UPS SS8a D16 row updated with the filed issue ref
- changeset: @objectstack/platform-objects patch

Validated: platform-objects vitest suites green (204 tests incl. i18n
parity/tombstone/source-hash), check:app-nav-i18n green (54 merged setup
nav ids, 4 locales).

Fixes #12457. Refs #12438, Epic #12150, ADR-0126 SS7.4

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SKUXt6sKgAeCEtjiuwNuhq
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/platform-objects, touching 5 documentable anchor(s).

1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ui/setup-app.mdx (via SETUP_NAV_CONTRIBUTIONS (symbol))
What this run could not see
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 2 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 04600d939b291a4c070313726bf2e9cf6c1e2b3d → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 1edd3560000273095e99492cddf8b20be3a3a894 — the merge of head 763adcde4cf546b5b9f6de8d41770cd4354aacff into base 04600d939b291a4c070313726bf2e9cf6c1e2b3d, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 1edd3560000273095e99492cddf8b20be3a3a894 && git checkout 1edd3560000273095e99492cddf8b20be3a3a894
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 04600d939b291a4c070313726bf2e9cf6c1e2b3d 763adcde4cf546b5b9f6de8d41770cd4354aacff && git checkout -B drift-repro 04600d939b291a4c070313726bf2e9cf6c1e2b3d && git merge --no-ff 763adcde4cf546b5b9f6de8d41770cd4354aacff

node scripts/docs-audit/affected-docs.mjs --json 04600d939b291a4c070313726bf2e9cf6c1e2b3d

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 04600d939b291a4c070313726bf2e9cf6c1e2b3d → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Aug 26, 2026
@os-zhuang
os-zhuang added this pull request to the merge queue Aug 27, 2026
Merged via the queue into main with commit e0abc38 Aug 27, 2026
32 checks passed
@os-zhuang
os-zhuang deleted the claude/new-session-3qgti9 branch August 27, 2026 09:52
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…n entry they can open, not on Packaged Actions (objectstack-ai#33410)

<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DXuamRUC67fx2TTYrFfyuSH)_

Fixes objectstack-ai#33224 — the Setup landing half (the navigation half is objectstack-ai#33349).
Route A, as the seat ruled.

Clause-②: no — the served `GET /meta/app/setup` tree is unchanged for
every caller except that `nav_packaged_actions` now carries `visible:
current_user.can('sys_metadata_activation', 'read')`, which the console
asks with the member's `/auth/me/permissions` map. A member who may read
the ledger is shown the entry and lands as before (the platform
administrator still lands on System Overview). A member who may not read
it stops being shown an entry whose page rendered only `activation
ledger HTTP 403`; nothing they could use is withdrawn.
Metadata-protocol: none

## Maintainer quick read

- What changes: Setup's Packaged Actions entry is shown only to a member
who may read the activation ledger its page reads. Everyone else lands
on the first Setup entry they can open.
- Why: Packaged Actions is the first entry Setup serves, and the
console's object-read prune judges `type: 'object'` entries only. So
every member landed on it, including a separation-of-duties officer (an
auditor holding `view_all_audit_log`) whose ledger read answers 403, and
their Setup opened on `activation ledger HTTP 403`.
- Risk and rollback: low. Admins (who read the ledger) see the same menu
and landing as before. The entry still carries no `requiredPermissions`
and no `requiresService`; the activation write doors keep their
server-side gates. Rollback is a revert.
- Read first:
`packages/platform-objects/src/apps/setup-nav.contributions.ts` (the
`visible` and its comment).
- Two-minute check: `pnpm --filter @objectstack/cli exec vitest run
test/setup-landing-audience.pin.test.ts`; expect 4 green cases.
- Needed from you: nothing.

## What changes

- `packages/platform-objects/src/apps/setup-nav.contributions.ts` —
`nav_packaged_actions` gains `visible:
"current_user.can('sys_metadata_activation', 'read')"`. The console asks
a nav entry's `visible` in both its sidebar and its landing walk
(`AppRootLanding` → `findFirstRoute` over the tree `useNavMemberGates`
gates, `ui/packages/app-shell/src/console/AppContent.tsx`), with `can`
bound to `/auth/me/permissions` (pinned in ui/ by
`UnifiedSidebar.navCanPermissions-12700.test.tsx`). No Setup entry used
`can` before; HotCRM and `examples/app-crm` already do.
-
`packages/platform-objects/src/apps/setup-packaged-actions-nav.test.ts`
— the pin header no longer calls the entry deliberately ungated. It says
the earlier "no audience" was a developer choice (objectstack-ai#12491), not a ruling,
and why the entry now carries the ledger-read audience. A new case pins
the predicate exactly. The "no `requiresService`" and "no
`requiredPermissions`" cases stay, with their reasons.
-
`packages/platform-objects/src/system/sys-metadata-activation.object.test.ts`
— the "no shipped app or nav names the ledger" pin now allows exactly
this one predicate (a permission question no row changes) and still
refuses any other mention.
- Changeset: `@objectstack/platform-objects` patch.

## Tests

- New `packages/cli/test/setup-landing-audience.pin.test.ts` (unit
tier): composes `SETUP_APP`, `SETUP_NAV_CONTRIBUTIONS` and
`AuditPlugin`'s contribution through the real `SchemaRegistry`, reads
`GET /api/v1/meta/apps/setup` through the real `RestServer` route, and
walks the served tree the way the console lands (groups walked, `url`
skipped, first `object`/`page`/`dashboard`/`report`/`component` wins;
`visible` asked with the real CEL engine and the member's object map; an
`object` entry pruned without read on its object):
- Packaged Actions is served with the predicate, and is still the first
landing-type entry for the officer (so the predicate, not the order,
moves the landing);
- an officer holding `view_all_audit_log` who may read `sys_audit_log`
and `sys_user` but not the ledger lands on `nav_users` (People & Org ›
Users);
- the same served tree, with ledger read, lands on
`nav_packaged_actions`;
- the platform administrator still lands on `nav_system_overview` and is
still shown Packaged Actions.

## Verification

- `pnpm --filter @objectstack/platform-objects exec vitest run`: 120 of
122 files green; the 2 failing cases are
`object-collapsed-sections-echo-decisions.test.ts`, which fails
identically on `origin/main` in this worktree (stale local build), so
not this change.
- `packages/cli`: `setup-landing-audience`, `console-page-nav-entries`,
`setup-integrations-order`, `i18n-contributed-nav-coverage`,
`translation-contributed-nav-validate-door`: 5 files / 22 tests passed
(`platform-objects` rebuilt first; the cli suite reads its `dist/`).
- Pre-push hooks passed.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` is not touched.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants