Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

fix(app-shell): forward listImportMappings so identity import can offer saved mappings (objectui#7740) - #8910

Merged
huangyiirene merged 1 commit into
mainfrom
claude/issue-7740-identity-import-list-mappings
Sep 10, 2026
Merged

huangyiirene merged 1 commit into
mainfrom
claude/issue-7740-identity-import-list-mappings

Conversation

@claude

@claude claude Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #7740

Implements the director-seat ruling recorded on the card (comment 5565349507, decision batch #68, maintainer reply 「同意」, ledger objectstack#12708): option 乙 — identity import offers saved mappings; forward listImportMappings explicitly.

What was wrong

createIdentityImportDataSource spreads the base adapter, then explicitly clears six async-job/undo methods. The file states that design in its own docblock: the wizard feature-detects these methods, so clearing them cleanly hides the corresponding UI.

An object spread copies own enumerable properties only. ObjectStackAdapter declares listImportMappings in its class body, so it lives on the prototype and the spread never copied it.

Re-derived on this branch (the card's own citations were stale):

fact card said measured here
async listImportMappings data-objectstack/src/index.ts:4510 :5110
class opened at :2148 :2674
file length — 6406 lines

5110 > 2674 ⇒ inside the class body ⇒ on the prototype ⇒ dropped by the spread.

So on sys_user the wizard's probe failed and the saved-mapping selector was hidden — not by the design the file describes, but by a language rule nobody expressed. The adapter degrades a missing method to an empty list, so nothing anywhere said so.

The wrapper was already written for the "offered" answer: importRecords in the same function forwards mappingName to an identity endpoint that honours it. The one control that could set that field was the one control that could never render.

What changed

One method, forwarded explicitly beside the six deliberate undefineds, with a comment naming the ruling:

listImportMappings: (base as ImportMappingsCapableBase).listImportMappings?.bind(base),
  • The spread idiom is unchanged — widening it would bring back every prototype method of the base adapter without a census.
  • The six job surfaces stay withheld, and a pin now asserts that.
  • ?. keeps a base that genuinely lacks the method from gaining one.
  • ImportMappingsCapableBase is a local, non-exported type shaped to match the wizard's own probe, so what is forwarded is exactly what the feature detection reads.

Verification

All commands run from the repo root. Heavy runs went through the shared verify lock; verdicts quoted from the runner's own VERDICT command-exit line, never a bare $?.

Targeted pins — VERDICT command-exit 0, Test Files 2 passed (2) · Tests 22 passed (22)

Affected package, whole suite — pnpm exec vitest run packages/app-shell/
VERDICT command-exit 0, Test Files 670 passed (670) · Tests 6488 passed | 1 skipped (6489)

Type-check — pnpm run type-check in packages/app-shell (tsc --noEmit && tsc -p tsconfig.test.json) → VERDICT command-exit 0.
The first attempt returned exit 2 with Cannot find module '@object-ui/*' for every workspace package — PREREQUISITE NOT MET (workspace unbuilt), read as NOT MEASURED, not as red. Re-run after turbo run build --filter '@object-ui/app-shell^...' --concurrency=2 (28 successful, 28 total).

Lint — eslint . in packages/app-shell: 1131 files, 0 errors, exit 0. No narrowing was needed, so no narrowing is claimed. (2951 warnings are the package's pre-existing no-explicit-any baseline; the touched test file carried 11 of them before this PR and carries 16 after, in the same as any idiom the file already uses for an unknown-returning factory.)

Derived gates, all exit 0: check:control-bytes (7089 files) · check:vi-mock-inherit · check:vi-mock-specifiers · check:unreferenced-sources · check:phantom-deps · check:dist-completeness (922 emitted files) · check-changeset-presence (2 source file(s) of 1 released package(s) changed, and this change declares 1 changeset(s)).

All quoted at 07249a3e6, the final commit.

Ablation — the pins can actually fail

Reverted only identityImport.ts to its origin/main bytes, proved the mutation reached disk (forward-line marker 1 -> 0, type-decl marker 1 -> 0, blob c770eff to f3769f4), re-ran both files, then restored from HEAD under a trap ... EXIT INT TERM and proved the restore by git diff HEAD being empty and the on-disk blob matching HEAD exactly.

Predicted direction before running: goes red. Observed: Tests 7 failed | 15 passed (22), exit 1.

Red without the fix (7):

  • offers listImportMappings off a class-instance base — expected 'undefined' to be 'function'
  • binds the forward to the base, so this survives the hand-off
  • three-state PRESENT / NONE / REFUSED on sys_user
  • renders the selector when a mapping targets sys_user — Unable to find an element by: [data-testid="import-saved-mapping-bar"]
  • does not render the selector when no mapping targets sys_user — red because the probe never fires at all pre-fix

Green in both worlds, deliberately and stated as such in the test comments (3): "does not fabricate the capability when the base has none", "still withholds the six job surfaces", "does not render when the base adapter has no listImportMappings". Their discriminating power is against the wrong fix (an unconditional forward, or widening the spread), not against the defect.

No dist staleness channel: the root vitest config aliases @object-ui/* to src (vitest.config.mts:509, :513, :533), so both arms ran the mutated source directly.

Published surface — measured, not assumed

Built packages/app-shell on both arms and compared the emitted declaration:

  • createIdentityImportDataSource(opts: IdentityImportDataSourceOptions): unknown — signature unchanged.
  • ImportMappingsCapableBase is not emitted (local, unexported).
  • The only delta in dist/views/identityImport.d.ts is the three docblock lines added above the function.

⇒ the typed contract did not move. The runtime payload did: the object this published function returns now carries a listImportMappings key, and the published behaviour changes (the selector goes from never-rendering to rendering on sys_user). That is a new key on a published payload, so Clause-② is yes and needs:contract-review is attached to both this PR and the card.

Line-citation position axis

Judged on stored-vs-computed: only a literal that is stored and used as a key or compared for equality can go stale.

  • Confirmed carrier scripts/check-doc-example-types.mjs UNGATED_EXAMPLES: 90 rows, 0 naming any file this PR touches, 0 naming any app-shell file at all.
  • Whole-tree sweep from git ls-files for any identityImport…:NUMBER citation: 0 hits.
  • cross-file-line-citation-census.mjs: exit 0, 0 mentions of these files. (It cannot see UNGATED_EXAMPLES, which is why that carrier was measured separately.)
  • Re-measured on a real git merge --no-ff origin/main result tree in a throwaway detached worktree (merge clean, 14 files): same three readings — 90 / 0 / 0 / 0.

The card body's own :4510 / :2148 / :167-168 citations are stale, but they live in the GitHub issue, not in a tracked file, so nothing in the tree needs correcting.

Scope note the ruling did not have

On this endpoint a saved mapping can only rename columns. identityImport.ts sends writeMode, matchFields, runAutomations and skipBlankMatchKey explicitly, and the platform applies an artifact's write semantics only as defaults — those guards never open here. The blast radius is smaller than it was when the ruling was made, which points the same way the ruling does.

验收备注

Observations, none filed as cards (nothing here is a reproducible defect, a declared-contract violation, or a metadata trap):

  1. A wording tension in the ruling, surfaced rather than silently resolved. The ruling asks the pin to prove presence is expressed — "present when the base has it, absent when the base lacks it" — but its own prescribed spelling, base.listImportMappings?.bind(base), writes the key unconditionally, so literal key-absence is impossible: when the base lacks it the key is present with value undefined. The prescribed spelling was implemented verbatim, and "absent" is pinned as the fact the wizard actually reads (typeof … === 'function' is false, so the selector does not render). On the base-has arm the pin additionally asserts Object.hasOwn, which is red on main and compatible with either spelling. Flagged so a reviewer can confirm the reading rather than discover it.承接者: this PR's reviewer.
  2. The existing toBeUndefined() pin is left alone. For the six job keys it is sound — the object literal always writes them, so only their value is in question. It is unsound only if copied to a key whose presence is the question, which is exactly this card; the new suite says so in a comment so the next editor does not copy it. Not changed: it is correct where it stands. 承接者: this file's next editor.
  3. The comment above the return was incomplete, claiming a plain spread "would copy the generic job/undo methods along" — true for an own-property base, false for the class instance that production actually passes, which is the exact false premise that produced this bug. Extended in place (same lines, no idiom change).

Red lines honoured

Spread idiom unchanged · importRecords untouched · ObjectStackAdapter untouched · six job methods still cleared · content/docs/releases/ untouched · governed surface untouched (check-governed-queue-guard.mjs --test on all four paths: NOT GOVERNED — 4 path(s) checked against 5 governed surface(s); none matched) · changeset added · no force-push, no push to main, no merge.


Generated by Claude Code


Generated by Claude Code

…ffer saved mappings (objectui#7740)

`createIdentityImportDataSource` spreads the base adapter and then explicitly
clears six async-job/undo methods, per the file's stated design: the wizard
feature-detects these methods, so clearing them cleanly hides the UI.

An object spread copies own enumerable properties only. `ObjectStackAdapter`
declares `listImportMappings` in its class body, so it lives on the prototype
and the spread never copied it — the saved-mapping selector was hidden on
`sys_user` by a language rule rather than by the design the file describes, and
the adapter degrades a missing method to an empty list so nothing said so.

The wrapper was already written for the "offered" answer: `importRecords`
forwards `mappingName` to an identity endpoint that honours it, so the one
control that could set that field was the one control that could never render.

Director seat, decision batch #68 (ledger objectstack#12708) ruled that identity
import offers saved mappings. Forwarded as one explicit method bound to the
base, beside the six deliberate `undefined`s. The spread idiom is unchanged and
the six job surfaces stay withheld: widening the spread would bring back every
prototype method of the base adapter without a census.

Pins: presence is expressed in both directions (offered off a class-instance
base, not fabricated when the base lacks it), the six withheld surfaces stay
withheld, the objectui#7741 three-state read now reaches `sys_user` through the
wrapper, and the selector actually renders — real adapter, real wrapper, real
wizard, only `fetch` stubbed.

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

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3487.4 KB 3512.7 KB
Main entry chunk (gzip) 144.1 KB 350 KB
Entry file index-DC-UmOM8.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.69KB 6.21KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 500.23KB 114.67KB
core (index.js) 7.48KB 2.96KB
create-plugin (index.js) 26.68KB 8.94KB
data-objectstack (index.js) 200.01KB 55.77KB
fields (index.js) 246.97KB 62.30KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 6.57KB 2.76KB
i18n (index.js) 3.65KB 1.47KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.84KB 10.94KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 4.39KB 1.66KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.52KB 4.88KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.39KB 3.10KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 14.81KB 3.63KB
plugin-calendar (index.js) 49.03KB 13.93KB
plugin-charts (index.js) 71.39KB 19.92KB
plugin-chatbot (index.js) 194.54KB 46.34KB
plugin-dashboard (index.js) 131.71KB 34.50KB
plugin-designer (index.js) 215.51KB 44.29KB
plugin-detail (index.js) 252.45KB 65.33KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 136.26KB 34.13KB
plugin-gantt (index.js) 166.96KB 40.93KB
plugin-grid (index.js) 210.86KB 57.28KB
plugin-kanban (index.js) 57.53KB 16.46KB
plugin-list (index.js) 112.54KB 27.65KB
plugin-map (index.js) 20.49KB 6.83KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.42KB 11.92KB
plugin-timeline (index.js) 30.10KB 8.74KB
plugin-tree (index.js) 9.55KB 3.32KB
plugin-view (index.js) 84.42KB 20.80KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 81.07KB 26.86KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.55KB 2.45KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 20.57KB 5.88KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 13.64KB 4.59KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.73KB 2.28KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 14.27KB 5.47KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

Copy link
Copy Markdown
Collaborator

Contract review at CONTRACT_REVIEW_TIER — Verdict: PASS (audit reading; director seat, summon #18 segment 6, session_017Js5kTpTtxieBjPyScgxJ3, 2026-09-10T00xxZ)

PR objectui#8910 · head 07249a3e610ea0750f9ebf245993215c98257f95 (re-read at posting 00:05:43Z; unchanged since 23:13Z) · card objectui#7740.

  • Reviewed-by: isolated claude-fable-5-1 subagent, transcript-verified (85 harness model stamps, all claude-fable-5-1, zero residue; positive control 73 assistant / 50 user role tokens), adopted verbatim below.
  • Implemented-by: session_01611D6ZaRaMmwTNQmSbk8MH · branch claude/issue-7740-identity-import-list-mappings (newest Claim: 5609414746, PM-dispatched under os-zhuang). Distinct sessions ⇒ not a self-review.
  • Reading for the seat: PASS; one non-blocking hardening nit (F1, optional-chain the base dereference) the seat may fold in — if it does, head moves ⇒ re-verify CI and --pair before landing. ⛔ This seat cleared no carrier and touched no PR state at posting.

Verdict

PASS (Clause-② contract review). One non-blocking hardening nit (F1) the seat may fold into a patch commit before flipping ready; nothing else asked of the dev.

Head reviewed

07249a3e610ea0750f9ebf245993215c98257f95 — matches the expected prefix; PR API head.sha identical at review time (head did not move). Draft, base main, mergeable_state: clean, auto_merge: false. Diff vs origin/main (348725a7c): 4 files, +427/−1 — packages/app-shell/src/views/identityImport.ts (+31), two test files, one changeset.

Clause-② reading · claim match · --pair

  • Published-face delta (measured on source, not asserted):
    • identityImport.ts:151-157 new type ImportMappingsCapableBase — local, unexported ⇒ not emitted.
    • identityImport.ts:182 createIdentityImportDataSource(opts: IdentityImportDataSourceOptions): unknown — signature unchanged; :170-180 docblock +3 lines ⇒ the only dist/views/identityImport.d.ts delta is doc text.
    • Entry .d.ts unchanged: src/index.ts → views/index.ts:1 exports only ObjectView; package.json exports allows only . and ./styles.css ⇒ the factory is shipped bytes but not an importable symbol of @object-ui/app-shell.
    • identityImport.ts:260 new own key listImportMappings: (base as ImportMappingsCapableBase).listImportMappings?.bind(base). The returned data source is still the spread of the adapter instance's own props + own importRecords + six undefineds, now plus a bound listImportMappings; the wizard's probe (plugin-grid/src/ImportWizard.tsx:1695-1696, typeof list !== 'function') passes and this survives both the wizard's list.call(dataSource, …) (:1697) and a detached call (scratchpad control below).
    • Published behaviour delta: exported ObjectView on sys_user (admin, features.admin) now renders the saved-mapping bar when a mapping artifact targets sys_user.
  • Reading: yes is correct — conservative floor (new key on a runtime payload + behaviour change on an exported component); typed contract unmoved. Precision note only: the claim/PR call it "a published function"; it is not an exported symbol — the published face reached is ObjectView. Verdict unaffected.
  • Claim match: newest Claim: = card comment 5609414746 — session_01611D6ZaRaMmwTNQmSbk8MH · claude/issue-7740-identity-import-list-mappings; PR head.ref is that branch; PR footer names that session; Clause-②: yes appended to that comment in the fixed spelling (script read it). needs:contract-review on both PR and card.
  • check-clause2-carriers.mjs --pair 8910 → exit 0 ("both carriers agree", no widening tell).

Governed surface

node scripts/check-governed-queue-guard.mjs --test <4 paths> → NOT GOVERNED (0 of 5 surfaces), exit 0. CI "Governed Surface Queue Guard" success on head.

CI on head

33 check-runs on 07249a3e61: 30 success, 3 skipped (Test (coverage), coverage-shard matrix, dependabot — condition-skipped, not failures), 0 failure/cancelled. Lint ✓ Type Check ✓ Test shards 1-4 ✓ Build & E2E ✓ Changeset Bump Policy / Fixed Group / Declaration ✓. No red ⇒ no causation needed.

Findings

F1 — non-blocking hardening nit: hard dereference of base (identityImport.ts:260). (base as …).listImportMappings throws TypeError for base null/undefined; origin/main returned a wrapper there ({...undefined} is legal). Reproduced in a scratchpad harness against both arms (main: ok / PR: TypeError: Cannot read properties of undefined). Reachability: the only consumer builds the wrapper in a render-time useMemo (ObjectView.tsx:1548-1556); the Console gates on AppContent.tsx:688 (if (!dataSource …) return <LoadingScreen />) ⇒ unreachable in tree. But ObjectView is exported with dataSource: any and guards dataSource?. itself (:701, :715, :1120, :1585), so an external host passing none now crashes this one branch. One-token fix: (base as ImportMappingsCapableBase | null | undefined)?.listImportMappings?.bind(base) + a one-line pin. Seat's call.

F2 — wording (PR body / changeset), non-blocking. PR "Scope note": "identityImport.ts sends writeMode, matchFields, runAutomations and skipBlankMatchKey explicitly" — wrong file: identityImport.ts:207-218 sends mode/matchBy; the four are pinned by the server (objectstack packages/plugins/plugin-auth/src/admin-import-users.ts:299-307), and packages/rest/src/import-prepare.ts:336,339 applies artifact write semantics only as defaults (guards writeMode === undefined / matchFields.length === 0, never open here). The changeset (.changeset/7740-identity-import-saved-mappings.md:30-33) says "by the identity import path" — true read as the endpoint; its conclusion (a saved mapping renames columns and nothing more on this endpoint) is verified. Optional tighten to "by the identity endpoint".

F3 — test-comment accuracy, cosmetic. identityImport.test.ts "binds the forward…" says "Detached exactly the way the wizard detaches it"; the wizard re-attaches via list.call(dataSource, objectName) (ImportWizard.tsx:1697). The pin (detached, this undefined) is strictly stronger than the wizard's form and red on main — sound; comment misdescribes the wizard.

F4 — ruling wording tension, resolved here (director seat). Ruling 5565349507 says "absent when the base lacks it" but prescribes base.listImportMappings?.bind(base), which writes the key unconditionally (control: no-capability base → hasOwn=true, typeof undefined). Ruling: the prescribed spelling governs; "absent" = "not offered" as the wizard reads it (typeof), and present-with-undefined is exactly the file's own stated idiom for the six withheld methods. Dev's implementation and pins (typeof both directions; Object.hasOwn only on the has-arm) are the correct reading. Closed, no change.

F5 — newly reachable path, no defect. With the selector live on sys_user, handleSelectSavedMapping (ImportWizard.tsx:1712-1721) can set writeMode/matchFields from an artifact's mode/upsertKey; resolveIdentityWriteOptions (identityImport.ts:80-93) throws a clear pre-batch error for update or a non-email/phone key, surfaced by the wizard's error path (ImportWizard.tsx:2071-2078). Explicit refusal per the wrapper's documented contract; server pins mode/matchFields regardless. Recorded so the behaviour is expressed.

F6 — verification vs ruling bullet 3, note. "Confirm … renders the selector on sys_user in the Setup app" was delivered as identityImportSavedMapping.test.tsx (real ObjectStackAdapter → real wrapper → real ImportWizard, only fetch stubbed), not a browser run; no screenshot/live evidence. ObjectView→wizard wiring (:1548, :2978) is unchanged, so the RTL pin covers the changed seam. Accepted as sufficient; optional dogfood post-landing.

Checked clean:

  • Correctness vs card: listImportMappings reachable on the single consumer (ObjectView.tsx:2978 → wizard :1695). Census of wizard data-source reads: :1695 (now expressed), :2037/:2094 importRecords (own), :1883 dataSource?.create (fallback loop only when importRecords absent — never on identity). No other probed prototype method is dropped. Six withheld untouched (no -/+ on those lines). Adapter method confirmed on the prototype (data-objectstack/src/index.ts:5110, class opens :2674; card's :4510/:2148 stale, as the dev said).
  • Scope: 4 files, all app-shell + changeset; comment extension identityImport.ts:231-238 is adjacent and corrects the false premise; no content/docs/releases/; no unrelated files.
  • Changeset: '@object-ui/app-shell': patch — the only touched published package (package.json: no private, files: [dist, src/styles.css]); fixed group; not major; the three changeset CI checks green.
  • Tests: behavioural pins, not snapshots — three-state suite drives the real adapter through the wrapper with onMetadataReadWarning (production subscribes on the adapter, AdapterProvider.tsx:106 — matches the test's claim); "binds the forward" asserts base this saw the call. Control that fails on the spread: "offers … off a class-instance base" (expected 'undefined' to be 'function') — reproduced in scratchpad: main wizardProbe=false, PR true with this preserved under both .call(ds) and detached. Dev's ablation (7 red / 15 green) matches my count (2+3+2 red; 3 labelled both-green). clearSharedDiscoveryCache is a real export (index.ts:778).
  • Docs: content/docs/**, packages/*/README.md, skills/** — 0 hits for identity import / saved mapping / listImportMappings / meta/mapping; no doc surface to update.
  • Closing keywords: only Fixes #7740; no keyword adjacent to any other open card number in body, changeset, or commit.

Acceptance notes

  • Implemented-by: session_01611D6ZaRaMmwTNQmSbk8MH · branch claude/issue-7740-identity-import-list-mappings (newest Claim: 5609414746; PR head.ref and footer agree; no second claim). Reviewed-by: session_017Js5kTpTtxieBjPyScgxJ3 (director seat) — distinct ⇒ independent, not SELF-REVIEW.
  • Card carries two rulings: 5609090313 ((a), hide-by-design) was retracted by 5609550286; standing ruling is 5565349507 (乙, maintainer 「同意」, batch Simplify studio homepage to professional development tool aesthetic #68, ledger objectstack#12708). PR implements 乙 exactly. Dispatch-seat ACCEPT already on card (5610051948), deferring F4 to this review — resolved above.
  • Fixes #7740 is right: all three execution bullets of the ruling delivered; no follow-up split.
  • Landing: on this PASS, strip needs:contract-review from both carriers with a provenance comment citing this review; pre-checks ① PASS on card, ② --pair 8910 = 0 ✓, ③ all checks green on head ✓. If the seat folds F1 in, head moves ⇒ re-verify ③ and re-run --pair before landing.
  • Not executed here (read-only, no checkout): the PR's own test files and the full suite — relied on CI shards 1-4 green on head, the dev's VERDICT command-exit lines, and my scratchpad control of the core predicate. Nothing was posted to GitHub.

Generated by Claude Code

Copy link
Copy Markdown
Collaborator

Landing provenance — director seat, summon #18 segment 6 (session_017Js5kTpTtxieBjPyScgxJ3, 2026-09-10T00:14:25Z). Clearing needs:contract-review on both carriers (objectui#8910 + card objectui#7740) on the strength of the contract-review-tier PASS at #8910 (comment) (head 07249a3e61, unchanged). Landing pre-checks (contract-review.md ①②③): ① tier verdict on the card (pointer posted); ② check-clause2-carriers.mjs --pair 8910 exit 0; ③ 33 check-runs on head, 0 red / 0 in progress; governed-surface test exit 0 (not governed); mergeable_state: clean. Next: ready → auto-merge (SQUASH) → merge-queue entry, per landing-operations.md. Executed under the maintainer's 2026-09-09 13:4xZ order 「把当前的契约复审全部处理完」 precedent; the dispatching seat keeps ACCEPT/landing-window duties (MERGED confirmation + card close-out) if it is back before the queue finishes — otherwise this seat closes out.


Generated by Claude Code

@huangyiirene
huangyiirene marked this pull request as ready for review September 10, 2026 00:15
@huangyiirene
huangyiirene added this pull request to the merge queue Sep 10, 2026
Merged via the queue into main with commit e4f7f41 Sep 10, 2026
35 checks passed
@huangyiirene
huangyiirene deleted the claude/issue-7740-identity-import-list-mappings branch September 10, 2026 00:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

2 participants