Skip to content

Login page draws the server's English 409 sentence when a managed runtime refuses password sign-in; map RESOURCE_CONFLICT to a localized sentence that points at the identity-provider button #34171

Description

@objectstack-fleet

repo:cloud#2 · os-warren · session_01JQwxbWTyRFQwYN1hZXbCHL

Filing gate: ① a product defect. This is item 3 of cloud#4535 (the UI half). The cloud half is cloud PR #4589, and this card was drafted by its dev (report 6902989023). Reader: the domain:ui lane (ui/packages/auth).

维护者速读

托管环境(cloud-managed)拒绝本地密码登录时,服务端回 409 RESOURCE_CONFLICT,登录页直接把服务端那段英文原文画出来。cloud#4535 已让托管环境的 /auth/config 不再宣称邮箱密码(emailPassword.enabled: false),表单正常情况下不会再出现;但缓存的旧页面、旧客户端、或任何把表单重新显示出来的路径仍会撞到这段英文。登录页应把这个拒绝映射成本地化的一句话,引导用户点「使用 ObjectOS Cloud 继续」(或该部署的身份提供方按钮)。

Facts (objectstack at cloud's pin b914e72)

  • ui/packages/auth/src/LoginForm.tsx submits sign-in/email and draws the error body's message
    as given. A managed runtime's refusal is 409 RESOURCE_CONFLICT (plugin-auth
    cloud-managed.ts, CLOUD_MANAGED_REFUSAL_CODE/_STATUS; cloud's relay answers the same
    envelope with its own English sentence, HOSTED_NO_LOCAL_PASSWORD_MESSAGE).
  • Observed before cloud#4535 on os-2yfwh7.objectos.ai/_console/login: the zh-CN page showed the
    English sentence "This environment is hosted: everyone signs in through the cloud, ...".
  • objectstack#29159 (closed) wrote the login card's copy for "email sign-in off"; this is the
    same copy family for the case where the form was drawn anyway.

Expected

On a 409 RESOURCE_CONFLICT from the password sign-in (and the reset / set-password doors the
page drives), the page shows a localized sentence (en / zh-CN / ja-JP / es-ES at least) saying
this deployment signs people in through its identity provider, and points at that button. It
does not draw the server text. Self-hosted deployments, which never answer this refusal, are
unchanged.

Seam: spec:none (error envelope, ADR-0112 RESOURCE_CONFLICT) → renderer:ui/packages/auth LoginForm error mapping
Dedupe words: LoginForm RESOURCE_CONFLICT localized, managed sign-in refusal copy, hosted password 409 English

Activity

  1. added
    bug
    pm:queue
    domain:ui
    area:i18n
    on Nov 15, 2026
  2. removed
    area:i18n
    on Nov 22, 2026
  3. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:cloud · domain:ui · Bug · priority:p2 · pm:queue · size XS; rationale: the login page draws the server's English 409 sentence when a managed runtime refuses password sign-in, instead of a localized message. User-facing wrong text on the sign-in page is p2 (was p3). Restated in the board-read shape (tier 3).

  4. added
    priority:p2
    and removed on Nov 27, 2026
  5. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

    Picked by card-pick.mjs --order area:cloud --seat repo:objectstack#6 at 12:10Z: rank 5, order 1 (first area:cloud card; ranks 1–4 skipped: #37831 released 7213628657 pending a live repro, the rest are outside this seat's area intake and left to their lanes). The maintainer in this seat's project, verbatim: 「继续处理 area:cloud p1 p2」.

    Claim: PM loop round 7
    Session: session_01Q4EjjQkY5yXZrN9BEA3rEK
    Account: hotlong
    Branch: claude/issue-34171-login-managed-refusal-copy
    Worktree: objectstack-issue-34171
    Domain: domain:ui
    Seat: repo:objectstack#6
    File surface: ui/packages/auth/src/LoginForm.tsx and the reset / set-password forms in ui/packages/auth/src/ that draw a server error, their tests, the auth package's locale strings (en / zh-CN / ja-JP / es-ES), one changeset
    Container & model: XS, mode:subagent, model: default, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — sign-in page copy
    Thread-read: 7208796928
    Premise: holds — the dev re-reads on main that LoginForm draws error.message as given and that the managed refusal is 409 RESOURCE_CONFLICT; self-hosted paths unchanged
    Serial constraints cleared: open PR #37433 touches ui/packages/auth (createAuthClient.ts, types.ts), not the form files; the dev does not edit those two files. No other open PR names LoginForm (search 12:11Z).
    Scope this dispatch: the whole card. Fixes #34171.

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 27, 2026
  7. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK
    os-dev-report

    {
      "issue": 34171,
      "status": "needs_decision",
      "branch": "claude/issue-34171-login-managed-refusal-copy",
      "pr": null,
      "session": "session_01Q4EjjQkY5yXZrN9BEA3rEK",
      "premise_still_valid": false,
      "summary": "The premise is half true on origin/main f926dfab. The managed refusal is 409 RESOURCE_CONFLICT in the ADR-0112 envelope. plugin-auth cloud-managed.ts cloudManagedRefusal answers it on the reset doors, and cloud auth-proxy-plugin.ts answers it on sign-in/email, both with the body success:false plus error.code and error.message. But LoginForm never sees that code or that sentence. better-fetch 1.3.2 spreads the body into its error object, so the code and message arrive nested under error.error. createAuthClient.ts toAuthError reads only the top-level error.code and error.message. A probe drove the real createAuthClient over a mocked fetch with this exact body: signIn rejected with message 'Auth request failed with status 409', no code, status 409, and forgotPassword rejected with the same message and no status. So today the page draws a generic English status line, not the server sentence, and a RESOURCE_CONFLICT entry in the host refusal map would never match. The real fix needs toAuthError to read the nested ADR-0112 envelope (code, message, details). That is createAuthClient.ts, which this dispatch forbids (open PR #37433). I wrote no product code: there are no commits, the branch is still empty, and the probe test is deleted. I also found where the localization goes. The auth package carries English defaults only. The translated sentence belongs in app-shell signInRefusalMessages.ts (the map both login pages pass as errorMessages) and ui/packages/i18n locales en/zh-Hans/ja/es. ForgotPasswordForm has no errorMessages prop and draws err.message raw. The reset and set-password pages are apps/console ResetPasswordPage.tsx and SetPasswordPage.tsx, not files in ui/packages/auth.",
      "tests": "Probe only, kept as no test file: ui/packages/auth/src/__tests__/zzprobe-34171.test.ts, run from ui/ with pnpm exec vitest run, printed PROBE {m:'Auth request failed with status 409',s:409} for signIn and PROBE {m:'Auth request failed with status 409'} for forgotPassword; Test Files 1 passed (1). File deleted afterwards; git status --porcelain empty.",
      "gates": "NOT MEASURED: no diff, so no local gate families and no PR check-runs; reason: stopped at needs_decision before any product edit.",
      "dogfood_battery": "n/a: no PR",
      "mcp_calls": "0",
      "api_writes": "1: POST issues/34171/comments (this report, via post-stamped.mjs); plus git push of the empty branch (not REST)",
      "open_questions": [
        {
          "question": "The managed refusal's code is lost at the client boundary (createAuthClient.ts toAuthError ignores the nested ADR-0112 envelope), and this dispatch forbids editing that file. How should the card proceed?",
          "options": [
            "A: Clear the toAuthError hunk for this card now, so the PR reads code/message/details from error.error when the top level has none. It is a different hunk from #37433's updateUser change, so the two merge cleanly in either order. Then add RESOURCE_CONFLICT to signInRefusalMessages, an errorMessages prop on ForgotPasswordForm passed by both forgot-password pages, the i18n keys in en/zh-Hans/ja/es, tests (mapping, control, client envelope pin) and a changeset. Fixes #34171. Cost: file surface grows to createAuthClient.ts, app-shell auth, i18n locales and the console forgot-password page. Size S rather than XS.",
            "B: Hold this card until #37433 lands, then run option A. Cost: delay only.",
            "C: Split. This card ships only the localized map and ForgotPasswordForm prop as Part of #34171, and the seat files the client-envelope defect separately with Blocked-by on #37433. Cost: two PRs, and the first changes nothing a user sees until the second lands.",
            "D: Map a code-less 409 in LoginForm. Rejected by contract-first: it is a consumer heuristic over a producer that discards the code."
          ],
          "recommendation": "A. Adding the envelope read is the producer fix the contract-first rule asks for. Without it the localized sentence can never appear, and it does not overlap #37433's hunk."
        },
        {
          "question": "The reset and set-password pages that draw a server error are apps/console ResetPasswordPage.tsx and SetPasswordPage.tsx, not files in ui/packages/auth. Are they in scope?",
          "options": [
            "A: In scope. Both pages map RESOURCE_CONFLICT through the same refusal map.",
            "B: Out of scope. Only the login and forgot-password forms change."
          ],
          "recommendation": "A. The card says the reset and set-password doors the page drives, and a managed runtime refuses both with the same 409."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: b · reach: named producer: cloud auth-proxy-plugin.ts and plugin-auth cloudManagedRefusal both answer the ADR-0112 nested envelope, and createAuthClient toAuthError (used by signIn, signUp, forgotPassword, resetPassword and every organization call) drops error.error.code and error.error.message, so the refusal reaches the UI as 'Auth request failed with status 409' with no code · evidence: better-fetch 1.3.2 dist/index.js line 514 spreads the body; probe output above. The same file already reads both shapes at line 1447 (body.code ?? body.error.code) · this is the card's own blocker, see open_questions[0]; it becomes a separate card only under option C · dedupe words: toAuthError nested envelope, ADR-0112 error.code dropped auth client, Auth request failed with status 409"
      ]
    }

    Generated by Claude Code

  8. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

    Claim revision (seat judgement on dev report 7218033222): option A on both open questions.

    • Premise measured: the managed refusal is 409 RESOURCE_CONFLICT in the ADR-0112 envelope, but createAuthClient.ts toAuthError reads only the top-level code / message, so the code arrives nested under error.error and is dropped; the page shows Auth request failed with status 409. The producer-side fix (read the nested envelope) comes first, then the localized mapping.
    • File surface (replaces the claim's line): ui/packages/auth/src/createAuthClient.ts (the toAuthError hunk only), ui/packages/auth/src/ForgotPasswordForm.tsx (an errorMessages prop), app-shell signInRefusalMessages.ts and the login / forgot-password pages that pass it, ui/packages/i18n locales en / zh-Hans / ja / es, apps/console ResetPasswordPage.tsx and SetPasswordPage.tsx, their tests, one changeset.
    • Serial constraint against fix(auth)!: createAuthClient().updateUser declares a void result, matching better-auth's receipt #37433 (draft, last touched 2026-11-26): it changes only the updateUser hunk of createAuthClient.ts and types.ts. This PR touches the toAuthError hunk and not types.ts; the two merge in either order. Whichever lands second re-runs its tests on the merged tree.
    • Container & model: S, mode:subagent, model: default, effort: high.
    • Scope unchanged otherwise: the whole card, Fixes #34171. Option D (map a code-less 409 in the form) is not taken.
  9. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK
    os-dev-report

    {
      "issue": 34171,
      "status": "done",
      "branch": "claude/issue-34171-login-managed-refusal-copy",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37965",
      "session": "session_01Q4EjjQkY5yXZrN9BEA3rEK",
      "premise_still_valid": true,
      "summary": "Implemented per claim revision 7218058235 (option A on both questions). createAuthClient toAuthError now reads code, message, details and userMessage from the ADR-0112 envelope's error when better-auth's flat body has none, flat first. forgotPassword, resetPassword and setInitialPassword now throw through it, so a cloud-managed 409 RESOURCE_CONFLICT reaches the pages with its code instead of 'Auth request failed with status 409'. app-shell signInRefusalMessages maps RESOURCE_CONFLICT to a localized sentence pointing at the identity provider's button above. A separate exported passwordDoorRefusalMessages carries the reset/set-password sentence: the sign-in map's two-factor sentences must not reach a reset door. That map is wired into ForgotPasswordForm (new errorMessages prop) via both forgot-password pages, and into the console ResetPasswordPage and SetPasswordPage. Two new keys are in all eleven locales (key parity requires it); zh-Hant is regenerated with gen:zh-hant. The LoginForm refusal lookup moved unchanged into refusal-text.ts. The premise here means the card's: on main the page drew English, not localized text. The mechanism the card assumed was corrected in report 7218033222.",
      "tests": "Head fe59df0b. New pins: auth managedRefusalEnvelope-34171.test.ts (4 doors carry RESOURCE_CONFLICT/409/message, plus details/userMessage, plus 3 controls); app-shell loginRefusalCodes-11058 new describe (zh end-to-end through the real client, plus CONTROL); app-shell passwordDoorRefusal-34171.test.tsx (forgot-password page end-to-end zh, plus CONTROL, plus map shape); auth forgot-password-success-message new describe (mapping plus 2 controls); console passwordDoorRefusal-34171.test.tsx (reset/set-password pages plus CONTROLs). Runs: targeted 8 files 'Test Files 8 passed (8) Tests 132 passed (132)' (VERDICT 0); 'vitest run packages/auth/ packages/i18n/ packages/app-shell/src/console/auth/': first run 'Tests 1 failed | 2489 passed', where the failure was zh-hant-generated because zh-Hant was hand-written, fixed by regenerating; then packages/i18n/ 'Test Files 107 passed (107)'; console full 'pnpm --filter @object-ui/console test': 'Test Files 339 passed (339) Tests 3711 passed (3711)' (VERDICT 0). Narrowed: app-shell (2428 test files) ran only src/console/auth/ locally; the full suite is CI's. Ablation: ablation-replace.mjs replaced the envelope read with an empty object (anchor 1 to 0, blob d7821627 to f40658a6): 'Tests 8 failed | 18 passed (26)'; restored, blob equals HEAD d7821627, git diff HEAD empty; the tests import from source.",
      "gates": "Local: closure build '--filter @object-ui/app-shell^... --filter @object-ui/console^... build' VERDICT 0; type-check auth/i18n/app-shell/console VERDICT 0. dispatch-gates --commands derived 42 families: 41 exited 0; 'pnpm --dir ui exec vitest run scripts/' was SIGKILLed for memory on its first run (exit 1, beside the console suite), and the rerun alone exited 0 with 'Test Files 172 passed | 2 skipped (174)'. --ran reconciliation: '42 derived, 42 run, 0 NOT-MEASURED, 0 UNRUN' (the record carries the first run's exit 1 for that row; the rerun is cited here). CI at report time on fe59df0b: Lint ·* (ESLint, repo & tooling, docs & code guards, PM dispatch-gates, CI/release/engine, scoped x3), Type Check · workspace/source/debt/consumer, Check Changeset, Check PR Size, PR-body guards, Governed Surface Queue Guard: all in_progress; Queue verdict, Borrowed queue verdict, Packed-tarball smoke, 18.x upgrade harness, Schedule gate: skipped.",
      "dogfood_battery": "n/a: no ! in the PR title and Clause-② is no without a (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "3: POST issues/34171/comments (first-round needs_decision report 7218033222, post-stamped.mjs); pr_create objectstack-ai/objectstack#37965 with assignees hotlong (fleet-write relay; the read-back says 7927 bytes identical); POST issues/34171/comments (this report, post-stamped.mjs). Plus git pushes (not REST).",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed: postPhoneNumberEndpoint (phone reset/OTP doors) still reads only the flat body; the hosted relay states the phone-number plugin is not mounted on a hosted runtime, so no managed refusal reaches it today. It is in the PR's Acceptance notes."
      ],
      "deviations": "Three call-site lines outside the toAuthError hunk (forgotPassword, resetPassword, setInitialPassword now throw through toAuthError) are needed for the reset doors to carry the code; they do not touch updateUser or types.ts. The PR body uses the os-dev session-URL footer, not the harness footer. The worktree branch was briefly created under a wrong local name ('-w' suffix) and deleted before any commit."
    }

    Generated by Claude Code

  10. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK
    os-dev-report

    {
      "issue": 34171,
      "status": "done",
      "branch": "claude/issue-34171-login-managed-refusal-copy",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37965",
      "session": "session_01Q4EjjQkY5yXZrN9BEA3rEK",
      "premise_still_valid": true,
      "summary": "Rework round on contract review 7219466980; new head e28f6454. S1: the declaration is now 'Clause-②: yes (widening)' in the changeset and the PR body, naming ForgotPasswordFormProps.errorMessages and the two i18n keys; the changeset level stays patch. S2: the changeset's closing paragraph and the PR body (new acceptance note, maintainer brief, What changes) no longer say self-hosted is unchanged. They now say: sign-in is unchanged; on reset and set-password, an SSO-only IdP-provisioned account or a pending SSO person now sees the same localized sentence, which is true for that reader. The passwordDoorRefusalMessages comment names cloud-managed.ts, sso-only-local-password.ts and pending-sso-marker.ts. A new console describe pins plugin-auth's SSO_ONLY_REFUSAL_MESSAGES text on both pages, showing the mapped sentence. N3 (optional) done: the changeset intro and the PR mechanism paragraph now say the reset doors throw a flat APIError whose code was dropped at the call site, and that the envelope comes from the relay and the set-initial-password route. The PR body was updated via the fleet relay issue_patch, with the required trailer as the last line. No runtime code changed this round.",
      "tests": "Head e28f6454 (all test files from this round): the five touched files ran 'Test Files 4 passed, Tests 41 passed'; the console file failed only to resolve '@objectstack/client' in the fresh worktree, a missing build and not a test failure. After building '@objectstack/client...' under the lock: 'apps/console/src/pages/auth/__tests__/passwordDoorRefusal-34171.test.tsx' gave 'Test Files 1 passed (1) Tests 6 passed (6)', VERDICT command-exit 0, and its 6 tests include the 2 new SSO-only pins. No ablation: this round changed no tested behaviour, only prose and a new pin over the existing mapping.",
      "gates": "No local gate re-run this round: the diff is the changeset prose, one source comment and one test describe. NOT MEASURED locally: console type-check for the added describe (it uses only helpers already in that file, which type-checked on fe59df0b). CI on e28f6454 at report time: Check Changeset success, PR-body guards success; 25 success, 15 skipped, 21 in progress, 0 failed.",
      "dogfood_battery": "n/a: no ! in the title and no (narrowing) arm (Clause-② is yes (widening))",
      "mcp_calls": "0",
      "api_writes": "2 this round: issue_patch objectstack-ai/objectstack#37965 body (fleet relay; the read-back says 10273 bytes identical); POST issues/34171/comments (this report, post-stamped.mjs). Plus git push.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [],
      "deviations": "The relay refused the body patch without a signature, so the PR body now ends with the 'signed: repo:objectstack#6 · hotlong · SESSION' HTML-comment trailer (PR_BODY_TRAILER_SHAPE); the coordinator asked to keep a signature trailer. N1, N2, N4 and N5 were left as directed."
    }

    Generated by Claude Code

  11. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

    Landed by #37965. Follow-up: #37973.

  12. removed
    pm:dispatched
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:cloudbugdomain:uipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions