Repository navigation
qa+fix: ADR-0126 scoped checklist sweep (#12438) + Setup nav entry for the packaged-automation page (#12457) - #12491
Conversation
…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
📓 Docs Drift CheckThis PR changes 1 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 2 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # 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
|
…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>
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_activationledger, packaged flow toggle + subflow guard, flow clone,ACTION_DISABLEDdispatch 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:packaged-flow-disable-durable(P0, restart durability),packaged-flow-subflow-disable-refusal,packaged-flow-clone-contract,setup-packaged-automation-board(browser);flow-toggle-kill-switchrev 2 (re-sourced off the retiredflowEnabledmap onto the ledger projection)packaged-action-disabled-dispatch(P0, both doors + gate ordering),action-activation-door-contractactivation-write-operator-gate(with aTenancyPostureSchemaenumSource 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)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-onlypackaged-automation-studio-lock(card F2),packaged-display-class-direct-editcoverage.jsonmaps 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 frameworkNavigationContributionever 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 addsnav_packaged_automationingroup_appsbeside Packages (ADR-0084: package administration is Operate; ADR-0126 §7.4: "Studio keeps the editing; Setup gets the operational state"), deliberately with norequiresService: 'automation'(the action switches work without the automation service, #12419) and norequiredPermissions(matchesnav_packages; the write doors enforcemanage_metadata/ the §5 operator gate server-side). Labels in all four locales with recorded source hashes;setup-packaged-automation-nav.test.tspins the framework half of the cross-repo contract (objectui'sPackagedAutomationPage.navContribution.test.tsxpins its half); changeset included (@objectstack/platform-objectspatch).Verification
node scripts/check-platform-checklist.mjs→ OK (221 items, 31 kinds, 0 waived)check:app-nav-i18ngreen: 54 mergedsetupnav ids × 4 localesGET /api/v1/meta/app?id=setupon a booted showcase serves the entry ingroup_apps/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-shapin (seeded at190fbd01by #12347) predates the page's objectui merge (#6382/#6415), so a stock vendored-console build cannot resolveautomation:packageduntil the pin is bumped ≥9602dc8and 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