Description
repo:hotcrm#1 · huangyiirene · session_01J8VVAjSbVCwcyoaiYadYJW
Filing gate ① a reproduced defect (user-visible), measured from HotCRM 6.4.0 on platform 18.5.0 during the end-to-end customer test, zh-CN organization.
What happens
A zh-CN user edits a record that an approval has locked. The refusal comes back in English, while the platform's other refusals on the same request come back in Chinese.
Request (Accept-Language: zh-CN, zh-CN org) |
Answer |
|---|---|
PATCH /api/v1/data/crm_project/<id> while the initiation approval is pending |
409 Project '华东仓储客服平台实施' is locked while an approval is in progress, and cannot be edited until that approval is complete |
POST /api/v1/data/crm_timesheet with a lookup to a project the caller cannot read (same session) |
400 项目:不存在 id 为“p7Rkvm07v92Z9zmo”的crm_project记录 (localized) |
The console shows the English sentence as the toast on a record a user cannot save.
Seam
packages/plugins/plugin-approvals/src/lifecycle-hooks.ts:294 (recordLockRefusal, origin/main e71ecc1) builds the sentence as an English template literal. The rule landed by #32655 (closed; ruling C on #32440) says user-facing refusal text is in the request locale.
Suggestion
Translate the lock refusal through the platform's message catalogue like the other record-door refusals, keeping the object label and record title interpolated. While there, check that the locale packs carry the same sentence for the bulk-row status path (record-lock-batch-row-status.integration.test.ts pins the English text).
Business reason
Every approval-locked record (large deals, project initiation, timesheets, expenses, account approval in HotCRM) answers a Chinese, Japanese or Spanish user in English at the exact moment they are blocked. The sentence is what tells them why they cannot save.
Reader: the objectstack server lane (plugin-approvals).
Grade suggestion: priority:p2: user-visible on every approval lock in non-English orgs. Size: S.
Dedupe: gh api search/issues on repo:objectstack-ai/objectstack is:issue approval lock refusal locale (6 hits). #32655 (closed) is the rule, #25809 (closed) fixed flow-tripped validation messages, and #26883 (closed) fixed inbox labels. None covers the record-lock refusal.
Activity
objectstack-fleet commentedon Nov 15, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Path: none
Triage: first touch →
domain:server· p2 · 2026-11-15T17:46Z⛔ Not a claim.
In a zh-CN organization, the approval record-lock refusal comes back in English while the other refusals on the same request are Chinese, against the request-locale rule (#32655). Measured by HotCRM 6.4.0 on 18.5.0 in its end-to-end customer test, so p2.
objectstack-fleet commentedon Nov 16, 2026
coordinator#1 · os-project-manager · session_01FEkQ5p5codnUGsdGxBfaL9
Ruling: claimable now · batch 1 · maintainer 「分两批点名放行,不改级别」 (the option he chose on the decision card) · recorded 2026-11-16T14:22Z
Recorded by the project's decision thread. The maintainer's standing rule sends every decision through a dedicated thread that evaluates it and puts it to him there. He chose at 2026-11-16T14:19:33Z. Decision thread
cmsg_01TenzsRopZj4jMbvjX8uz1X2H6qQ8ciHX7XMq2gtnGnNg, cardcmsg_01TenzsRopZj4jMbvjX8uz1X3VzHFerEezFprpapKovrc1, choice recordcmsg_01TenzsRopZj4jMbvjX8uz1X671t1eYHsegqWBBX4bNCyE.Thread-read: 6898651288 (the newest comment). Labels at the read:
bug,priority:p2,pm:queue,domain:server; unassigned.The question he was asked
He named 21 open p2 cards and asked whether they should be the next tasks. His intake rule of 2026-11-16 for the
repo:objectstack#1seat is 「除了前任的任务继续处理,后续只认领 p1 或者阻塞 p1 的任务」, so the seat cannot claim a p2 card. The thread sorted the 21 into a first batch of 6, a second batch of 8, and 7 that are not new tasks. Which of them become the seat's next work, and how?The four options on the card, as he read them:
The batches, as listed in the file and the message he was given:
untrusted_key#34166, audit seal: a host checkpoint signer that fails to resolve stops the sealer instead of signing with the local key #34280, actions: an action body has no refusal catalogue — a person-facing throw from an action stays in the author's language #34273, Engine: a predicate delete on an object with delete-family lookups re-deletes by id, so its predicate never reaches the DELETE (a conditional delete is not atomic) #34373, objectstack start exits on SIGTERM before its serve child stops (measured twice; reopens the premise of #32149) #34337, Console: the organization's Localization language never decides a no-locale user's language — the Console always states a language, so the server's deployment-default rung never answers #34392.The ruling
This card is in batch 1 (position 4 of 6) and may be claimed by the
repo:objectstack#1seat now, at its p2 grade. The grade does not change. p1 work still comes first.This adds one sentence to his intake rule for this seat: after the p1 cards, the seat may claim the p2 cards he named here, batch 1 first and batch 2 after batch 1 has merged. It names these 14 cards and no other p2.
Why this card, as told to him: A zh-CN user who edits a record locked by an approval gets an English sentence. Measured by the HotCRM 6.4.0 end-to-end test on 18.5.0.
State
priority:p2andpm:queueuntil the seat claims it with this record as its Ruling-ref./mnt/project-files/pm-orders/objectstack/next-batch-2026-11-16.md.Notify: rulingto therepo:objectstack#1mailbox, PR pm:mailbox — repo:objectstack#1 · os-project-manager #34367, and to the triage mailbox, PR pm:mailbox — triage#1 · hotlong #32588.Generated by Claude Code
objectstack-fleet commentedon Nov 16, 2026
repo:objectstack#1 · os-project-manager · session_01FEkQ5kgF3mo9f7LXuv5hac
Claim · #34060 · 2026-11-16T18:21Z
Claim: repo:objectstack area-lease mode, area o1-C, lease
lease:o1-C(named p2, batch 1, under the maintainer's 「分两批点名放行,不改级别」; the grade stays p2) · built by anos-devsub-agent (mode:subagent) · posted at 2026-11-16T18:21ZSession:
session_01FEkQ5kgF3mo9f7LXuv5hacAccount:
os-project-managerBranch:
claude/issue-34060-approval-lock-refusal-localeWorktree:
objectstack-issue-34060Domain:
domain:serverSeat:
repo:objectstack#1File surface:
packages/plugins/plugin-approvals/src/lifecycle-hooks.ts(recordLockRefusaland its call sites, including the bulk-row status path), the plugin's message catalogue or locale packs, and their tests (record-lock-batch-row-status.integration.test.tsand the lock refusal pins); new tests; a patch changeset. Stop on a breach and explain it in the report.Container & model:
S,mode:subagent,model: default,effort: defaultClause-②: no (the refusal's status and code are unchanged; only its sentence follows the request locale. The dev confirms this against the diff.)
Metadata-protocol: none
Responsibility:
objectstack platform: plugin-approvals builds the record-lock refusal as an English template literal | none: the other record-door refusals already follow the request-locale rule (#32655) | every approval-locked record in a non-English org; measured from HotCRM 6.4.0 on 18.5.0Thread-read: 6919084325
Premise: holds (seat
lifecycle-hooks.ts:290recordLockRefusalon main 2026-11-16; the dev re-measures against main first)Shape: the card's suggestion. Translate the lock refusal through the platform's message catalogue, the way the other record-door refusals are translated, keeping the object label and record title interpolated, in the request locale per #32655 (ruling C on #32440). The bulk-row status path carries the same sentence. English stays the fallback.
Ruling-ref: 6919084325 (maintainer 「分两批点名放行,不改级别」, batch 1, 2026-11-16T14:19Z)
Pre-claim lane: repo:objectstack lane (the seat's area o1-C).
Pre-claim deps: none open; no open PR on the lock refusal found.
Prior rulings read: #32655 / ruling C on #32440 (refusal text in the request locale); no ⛔ conflict.
State change:
pm:queue→pm:dispatched, addlease:o1-C, assignedos-project-manager.Generated by Claude Code
objectstack-fleet commentedon Nov 16, 2026
repo:objectstack#1 · os-project-manager · session_01FEkQ5kgF3mo9f7LXuv5hac
os-dev-report
{ "issue": 34060, "status": "done", "branch": "claude/issue-34060-approval-lock-refusal-locale", "pr": "https://github.com/objectstack-ai/objectstack/pull/34449", "head_sha": "b5c0292deeeabbef3a246bfe39572dcd74e12003", "session": "session_01FEkQ5kgF3mo9f7LXuv5hac", "premise_still_valid": true, "summary": "Re-measured on main a121e29c28 through a REST boot (bootStack, real approvals and trigger plugins, a locking approval flow, a zh-CN pack labelling the object 项目). With Accept-Language zh-CN, PATCH answered 409 \"Project '华东仓储客服平台实施' is locked while an approval is in progress, ...\", and updateMany carried the same English sentence. The fix renders the RECORD_LOCKED per-row refusal through the shared Operation Message Catalog (renderOperationMessage, the channel the record door's other refusals and this plugin's approval_recall_not_submitter already use). Four new keys (record_locked, _untitled, _unlabeled, _opaque) ship in en/zh-CN/ja-JP/es-ES. The locale comes from HookContext.session.locale, and the object label is the objects.OBJECT.label pack entry in that locale (readerLabelsFor), else the declared label. After the fix the same boot answers zh-CN 409 '项目「华东仓储客服平台实施」正在审批中,已被锁定,审批完成前无法编辑'. en-US and xx-YY answer the unchanged English sentence. Batch rows carry the same sentence. Code, 409, the RECORD_LOCKED prefix and the error's property set are unchanged.", "declarations": "Clause-②: no · Metadata-protocol: none — confirmed against the diff: no Zod schema, error code, status or authorable key moved, and the English text is byte-identical. The new keys are built-in catalog constants plus their existing errors.KEY override address. Both lines are in the PR body and the changeset.", "files_changed": [ ".changeset/34060-record-lock-refusal-locale.md", "packages/plugins/plugin-approvals/src/approvals-plugin.ts", "packages/plugins/plugin-approvals/src/lifecycle-hooks.ts", "packages/plugins/plugin-approvals/src/record-lock-batch-row-status.integration.test.ts", "packages/plugins/plugin-approvals/src/record-lock-user-facing-message.test.ts", "packages/spec/src/system/operation-message.test.ts", "packages/spec/src/system/operation-message.ts" ], "tests": "At head b5c0292dee, under os-verify-lock. (1) pnpm --filter @objectstack/plugin-approvals exec vitest run --maxWorkers=2: Test Files 121 passed (121), Tests 1714 passed (1714). (2) pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/system/operation-message.test.ts: Tests 50 passed (50). (3) Targeted: record-lock-user-facing-message + record-lock-batch-row-status + record-lock-refusal-writer-fls: Test Files 3 passed, Tests 26 passed. (4) pnpm --filter @objectstack/plugin-approvals typecheck (includes check:test-typecheck): exit 0. pnpm --filter @objectstack/spec typecheck: exit 0. (5) REST re-measure, a throwaway dogfood file run via pnpm --filter @objectstack/dogfood exec vitest run and not committed. Main: PATCH zh-CN -> 409 English sentence; updateMany zh-CN -> 207, row RECORD_LOCKED/409, English. Fix: PATCH zh-CN -> 409 {\"error\":\"项目「华东仓储客服平台实施」正在审批中,已被锁定,审批完成前无法编辑\",\"code\":\"RECORD_LOCKED\"}; updateMany zh-CN row -> 'RECORD_LOCKED: 项目「…」…' httpStatus 409; en-US and xx-YY -> the unchanged English sentence. New pins: real ObjectQL + sqlite + the real hook, covering zh-CN titled and untitled, bare zh, en-US, xx-YY falling back to English, no locale, no i18n service, a deployment override, and a throwing i18n service. Batch-row pins cover the real updateManyData and batchData upsert with zh-CN and en-US.", "ablation": "node scripts/ablation-replace.mjs --file packages/plugins/plugin-approvals/src/lifecycle-hooks.ts, anchor 'recordTitleOf(schema, asServed, recordId), locale, translate)' -> 'undefined' in place of locale. Anchor 1 -> 0, blob 4278df5777aa -> 297b98bb7ab7, 'ok mutation landed'. Run: Test Files 2 failed, Tests 7 failed | 14 passed. The 7 failures are the six zh/zh-CN hook cases plus the batch-row locale case, and the English cases stay green. Restore: blob == HEAD 4278df5777aa and git diff HEAD empty. The subject is imported from src by relative path, so no dist rebuild leg was needed. VERDICT command-exit 1 (the expected red).", "gates": "node scripts/pm/dispatch-gates.mjs --commands at b5c0292dee derived 93 commands, all run locally. 91 exited 0 on the first pass. check:dual-build-cjs-loads exit 3 (PREREQUISITE NOT MET, no dist) -> re-run after the full build: exit 0 (124 entries / 72 packages load). check:type-check-debt exit 3 (lock queue-timeout) -> re-run under the lock: VERDICT command-exit 0, 'OK — 128/131 workspace packages type-checked, 0 in the DEBT ledger'. dispatch-gates --ran: '93 derived, 93 run, 0 NOT-MEASURED, 0 UNRUN'. check:platform-checklist is not among the derived families. #34435 is in the base, so it did not show. CI check-runs at report time, PR #34449 head b5c0292dee: Check Changeset, Lint · (ESLint, PM dispatch-gates, docs & code guards, repo & tooling, CI/release/engine, scoped x3), Type Check · (workspace, source gates, consumer gates, debt ledger), Governed Surface Queue Guard, PR-body guards, Spec property liveness and Check PR Size were all in_progress. Not waited on. test:repo is CI-owned and was not run locally.", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 — (1) fleet-write relay pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/34449/assignees os-project-manager; read-back 7173 bytes sent = stored, identical); (2) post-stamped.mjs comment on #34060 (this os-dev-report). git push is not counted.", "deviations": [ "PR body: the dispatch asked for a last-line signed HTML-comment trailer. os-dev.md forbids dev-written HTML comments in GitHub text and wins on conflict, so the body was sent without it and ends with the session-URL footer. The relay's PR_BODY_TRAILER_SHAPE is the seat's issue_patch rewrite shape, so the seat can add the trailer on its first body rewrite.", "Commit trailers are model-free (Claude-Session + Co-authored-by: Claude), per AGENTS.md and the dispatch, not the harness reminder's model-named line.", "File surface: besides lifecycle-hooks.ts and its tests, the diff touches packages/spec/src/system/operation-message.ts and its test, which is the platform message catalogue the ruling's Shape names. It also touches approvals-plugin.ts, the one call site of bindApprovalLockHook, which now passes the lazily read i18n service.", "The REST re-measure ran as a throwaway dogfood test file, deleted before commit. The permanent pins are real-engine, not REST-level." ], "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }objectstack-fleet commentedon Nov 16, 2026
repo:objectstack#1 · os-project-manager · session_01FEkQ5kgF3mo9f7LXuv5hac
Delivered · #34060 · 2026-11-16T21:04Z
PR #34449 merged through the queue as
3a08833202(2026-11-16T21:03Z);Fixes #34060closed this card. L1 ACCEPT 6927119665 (L1-b); L2 CONTRACT_REVIEW_TIER PASS 6927238180 (review#1), S1 closed on the same head by 6927381955; landing record 6927889884.Delivered: plugin-approvals' record-lock refusal is worded in the writer's locale, through the built-in operation messages in
packages/spec/src/system/operation-message.ts, and a deploymenterrors.*override still wins.Left: #34454. The override lookup for this refusal and for
approval_recall_not_submitteris asked with the raw tag, not the negotiated one, so a barezhwriter skips a deployment's zh-CN override. The card also covers the review's two nits.State change:
pm:dispatchedandlease:o1-Cremoved in this stroke.Generated by Claude Code