Skip to content

actions: an action body has no refusal catalogue — a person-facing throw from an action stays in the author's language #34273

Closed

Description

@os-bob

What

Since 18.5.0 (#33214) a hook can declare a refusals catalogue and the server answers a hook refusal in the request's Accept-Language, with translations under hooks.HOOK.refusals.CODE.reasons.REASON.message in the package's translation packs.

An action body has no equivalent. A person-facing refusal thrown from an action body reaches the user in whatever language the author wrote it, with no way to declare or translate it.

Where we hit it

An app project on 18.5.0 moved all 83 hook refusals across 34 hooks into catalogues, with zh-CN, ja-JP and es-ES packs. Two person-facing throws in action bodies could not be moved and still answer in English in a Chinese UI:

  • an opportunity mass_update_stage action refusing a stage change;
  • a knowledge-article feedback action refusing an anonymous user (the "sign in" sentence).

Expected

An action can declare refusals the same way a hook does: code, optional reason, params, and {{ }} holes. The packs translate them under an actions.ACTION.refusals… key, and the REST and console answer carries the localized sentence on userMessage, like a hook refusal does.

Workaround

None that keeps the rule "no hook or action composes language itself". The app leaves these two sentences in English for now and does not work around the gap app-side.

Activity

  1. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:server · p2 · 2026-11-16T03:46Z

    ⛔ Not a claim.

    Since 18.5.0 (#33214) a hook can declare a refusals catalogue answered in the request's Accept-Language, but an action body cannot. A person-facing throw from an action stays in the author's language, so zh-CN users get English (or vice versa) on every action refusal. It is the same request-locale rule as #34060 (HotCRM), so p2.

  2. added
    domain:server
    pm:queue
    priority:p2
    on Nov 16, 2026
  3. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    coordinator#1 · os-project-manager · session_01FEkQ5p5codnUGsdGxBfaL9

    Ruling: claimable after batch 1 merges · batch 2 · maintainer 「分两批点名放行,不改级别」 (the option he chose on the decision card) · recorded 2026-11-16T14:25Z

    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, card cmsg_01TenzsRopZj4jMbvjX8uz1X3VzHFerEezFprpapKovrc1, choice record cmsg_01TenzsRopZj4jMbvjX8uz1X671t1eYHsegqWBBX4bNCyE.

    Thread-read: 6906711719 (the newest comment). Labels at the read: 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#1 seat 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:

    • 「分两批点名放行,不改级别」: 「第一批 6 张小而有实测的现在可认领,第二批 8 张等第一批合并后放开。级别保持 p2,p1 仍然优先。其余 7 张不作为新任务。」 (recommended)
    • 「两批都升 p1」: 「和前两次一样改标签,14 张都变成 p1。做法简单,但 p1 会从“数据错、安全、核心任务走不通”变成“你想先做的”,今天已升了 8 张。」
    • 「只放第一批 6 张」: 「只放开 6 张小卡,级别不改。要改协议或引擎的那 8 张,等手上的 p1 清完再问你。」
    • 「先不加」: 「本席手上已有 12 张 p1 在做、2 张待领。这 21 张都留在 p2,等你下次再排。」

    The batches, as listed in the file and the message he was given:

    The ruling

    This card is in batch 2 and may be claimed by the repo:objectstack#1 seat once batch 1 has merged, 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: An app project moved 83 hook refusals into catalogues in three languages; two person-facing throws in action bodies could not move. An action needs a declared refusal catalogue as a hook has, which is a protocol addition.

    State


    Generated by Claude Code

  4. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    Claim: PM loop round 1 (area o2-D, repo:objectstack#2; large card, built in its own card thread)
    Session: session_01ADHkmRXuRn93HphKp7kXEz
    Thread session: session_01ADHkmP879Ku8wbNev27oyN
    Account: os-steve
    Branch: claude/project-thread-wk8dv2
    Worktree: the card thread's own checkout
    Domain: domain:server
    Seat: repo:objectstack#2
    File surface: packages/spec (src/ui/action.zod.ts, src/data/hook-refusal-codes.ts, src/data/hook.zod.ts for the shared refusal shape, src/system/translation.zod.ts, src/system/i18n-resolver.ts, the liveness ledger and generated artifacts), packages/runtime (src/sandbox/body-runner.ts, src/sandbox/hook-refusal-catalogue.ts, src/app-plugin.ts, src/app-artifact-handlers.ts), packages/lint (validate-hook-refusal-templates, i18n-walk, validate-translation-references), packages/cli/test, content/docs, .changeset/ (stop on breach; explain in the report)
    Container & model: L, mode:thread, model: default judgment tier, effort: high
    Clause-②: yes (widening)
    Metadata-protocol: added
    Responsibility: n/a — not a defect card (a missing authoring surface: an action body has no refusal catalogue)
    Thread-read: 6919184064
    Premise: holds (no refusals key on the action schema on origin/main e8cba8f; HookSchema.refusals is the precedent)
    Ruling-ref: 6919184064 (batch 2, p2). Claim gate lifted by the maintainer: Steve, 2026-11-16T22:11:12Z, in this project's repo:objectstack#2 seat thread (message cmsg_01FdL1XeUyvVNxLreh3F4Qi97TypKfs1hiVQVo4vTBwnHd), verbatim 「我的分批裁决 没有限制认领」.
    Serial constraints cleared: SERIAL behind #34374 (p1, claim 6931101802, branch claude/project-thread-l1nf08): both declare person-facing text on the action schema and walk it in the same sandbox runner and lint i18n walk. Fold-or-serial answered: serial, not folded (a refusal answered in the request's language vs a sentence stored in the organization's language: different defect shape). This card's thread writes no code until #34374's PR has merged, then starts from that main. Translation keys follow the existing action layout (objects.OBJ._actions.ACT.refusals… / globalActions.ACT.refusals…; the top-level actions key in a pack is a refused alias), not the card face's actions.ACTION.refusals….
    Pre-claim lane: domain:server runners plus packages/spec/src/** and packages/lint riders kept in-lane (area-lease 留道 rule); large-card trigger (Clause-② yes, Metadata-protocol added) ⇒ own card thread, owes a contract-tier L2 review.
    Pre-claim deps: no Blocked-by: line; serial behind #34374 as above.
    Prior rulings read: HookSchema.refusals precedent, rulings 6431311681 (A) and 6879477573; new key on a precedent goes by the veto window (SKILL.md 升级与决策, precedent named: same word, same concept); thread: #34273; repo: objectstack-ai/objectstack

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 16, 2026
  6. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-steve · session_01ADHkmP879Ku8wbNev27oyN
    os-dev-report

    {
      "issue": 34273,
      "status": "done",
      "branch": "claude/project-thread-wk8dv2",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34719",
      "head": "2a25dade9108013cd07d1c2a6428e1acae5762ef",
      "session": "session_01ADHkmP879Ku8wbNev27oyN",
      "premise_still_valid": true,
      "summary": "A `script` action with a `js` body declares `refusals` (code-keyed {message, status?, reasons?, params?}, the hook catalogue's entry built by one shared factory `packages/spec/src/data/declared-entry.zod.ts`, which also builds HookRefusalSchema and #34545's HookTextSchema byte-identically). The body throws the code; the runtime (`resolveActionRefusal`, one answer path shared with hooks) answers the declared sentence in the caller's executionContext.locale on `userMessage` with the entry's status. Translations at objects.<o>._actions.<a>.refusals.<CODE>.message / globalActions.<a>.refusals.…; lint extract, coverage, undeclared-key and template-compile passes cover them. An action without `refusals` answers exactly as before.",
      "tests": "runtime action-refusal-catalogue.test.ts 16/16 (real QuickJS runner + real /actions door: 409 + zh-CN userMessage); spec ui/action-refusals.test.ts 29/29; spec full 940 files 28752 passed; lint 214 files 9126 passed, tsc 0; runtime sandbox + app-artifact-handlers 665 passed, tsc 0; ui core actions 770 passed; mcp 1226/1226 alone and beside runtime (11354 passed) at the head. Ablation: resolveActionRefusal(...) replaced by the raw throw => 12/16 runtime cases red, the 4 pass-through/door CONTROLs green; restored, blob == HEAD.",
      "gates": "dispatch-gates --commands at 2a25dade91: 131 derived, each run `< /dev/null` under os-verify-lock, all exit 0; --ran: 131 run, 0 NOT-MEASURED, 0 UNRUN (file /mnt/project-files/objectstack-seat2/34273-gates-ran.txt). CI at 2a25dade91: all check-runs success or path-skipped EXCEPT Test Core (3/8) + its Test Core rollup: @objectstack/mcp#test exited 1, failing case NOT MEASURED (output before the 5000-line log tail; blob URLs 403); not reproduced locally; rerun of the failed job asked on the PR (issuecomment-6944513139).",
      "line_budget": "51 files, +2037 -316; non-test non-generated +1204 -301",
      "files_changed": "spec: data/declared-entry.zod.ts (new), data/hook.zod.ts, data/hook-refusal-codes.ts, ui/action.zod.ts, system/translation.zod.ts, system/i18n-resolver.ts + generated (api-surface, json-schema, liveness, strictness ledger, dropped-refinements baseline, references, llms.txt); runtime: sandbox/hook-refusal-catalogue.ts, sandbox/body-runner.ts, app-plugin.ts, app-artifact-handlers.ts; lint: validate-hook-refusal-templates.ts, validate-expressions.ts, i18n-walk.ts, validate-translation-references.ts; ui/packages/core/src/actions/actionKeys.ts; docs ui/actions.mdx, ui/translations.mdx, protocol/objectui/actions.mdx; 2 generator-owned skills/*/references/_index.md lines; .changeset/34273-action-refusals.md; tests as listed in the PR body",
      "deviations": "Forced test edits (each named in the PR body): type-alias pin 857->858, reconciliation omit row for action.refusals, metadata-protocol action property count 53->54, lint translation coverage table refusals row, authored-site walk classification. skills/_index.md lines are pure gen:skill-refs output (precedent #34545).",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "reads only (transcript grep): issue_read, pull_request_read (get_check_runs), get_job_logs, get_check_run, actions_list, actions_get; no write tool",
      "api_writes": "3 relay writes: pr_create (PR #34719); post-stamped comment on PR #34719 (issuecomment-6944513139, the Test Core 3/8 reading); this report",
      "open_questions": [
        { "question": "需契约复审 at head 2a25dade9108013cd07d1c2a6428e1acae5762ef (Metadata-protocol: added; Clause-②: yes (widening)): ActionSchema.refusals, ActionRefusalSchema, actionRefusalMessageKey, resolveActionRefusal, the declared-entry factory module", "options": ["A send to the contract-tier review", "B hold"], "recommendation": "A, because the claim recorded Size L with contract review and the PR adds public names" }
      ],
      "security_findings": "withheld",
      "out_of_scope_findings": [
        "class: b · reach: named producer — the Studio action form has no `refusals` row (the reconciliation ledger records the omission; needs the eleven metadata-forms bundles) · dedupe words: action form refusals row · carrier: PR body, noted, not filed",
        "class: b · reach: named producer — skills/objectstack-i18n/SKILL.md lists only the hook refusal key and no skill teaches an action's `refusals` (changeset Skills-docs: follow-up) · dedupe words: skills action refusals teaching · carrier: PR changeset, noted, not filed"
      ]
    }

    Stamped 2026-11-17T09:49Z.


    Generated by Claude Code

  7. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    Claim amendment (file surface) for #34273 · claim 6931334915 · PR #34719 at head ff1ba6635716487e6d8b5a54f4834c9dce7bbc4a · 2026-11-17T11:46Z

    The PR reaches these paths outside the claimed file surface. Each is forced by the shared factory or by a gate; none adds behaviour beyond the card:

    Listed in the os-dev report 6944561600 (files_changed, deviations); L1 6947101819 read each as forced.


    Generated by Claude Code

  8. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    Hand-off · 2026-11-17T12:40Z · repo:objectstack#2 → repo:objectstack#3 (maintainer order 2026-11-17 12:33–12:34Z)

    Lease lease:o2-D is removed in this stroke. The assignee and pm:dispatched stay for seat 3's takeover claim to swap.

  9. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#3 · os-support-ai · session_01WGufzfr1xZSFZzCR8HnqXX

    Takeover · #34273 · PR #34719 · 2026-11-17T12:49Z

    Release: claim 6931334915 (session session_01ADHkmRXuRn93HphKp7kXEz, thread session session_01ADHkmP879Ku8wbNev27oyN, account os-steve), handed over, not abandoned. Provenance: seat 2's maintainer ordered the hand-over on 2026-11-17 at 12:33–12:34Z (quoted in seat 2's mailbox hand-off 6948334887 on #34585: 「L2 通过,但留了小问题要修:#34709、#34719…这些修好了也交接」, 「L1 L2 不继续审核了,让 3号席位跟进」); seat 3's maintainer ruled at 12:44Z in the seat 3 project thread that seat 3 takes every non-security PR seat 2 handed over. The area's hand-off on this card is 6948316290.
    Hand-off record: branch claude/project-thread-wk8dv2, last pushed sha 0169fc10be77711968755536013f9d09d48868a4 (one commit on ff1ba663 answering L2 S1, plus N2/N3, Skills-docs: follow-up #34824, Studio form follow-up #34823 named). CI on that head is running at this stamp.

    Claim: PM loop round 1 (area o3-J, repo:objectstack#3; takeover of a large card's open PR, fix round and review delta only)
    Session: session_01WGufzfr1xZSFZzCR8HnqXX
    Account: os-support-ai
    Branch: claude/project-thread-wk8dv2 (continued; no force-push)
    Worktree: objectstack-issue-34273
    Domain: domain:server
    Seat: repo:objectstack#3
    File surface: the claimed surface of 6931334915 as amended by 6947130200 (stop on breach; explain in the report)
    Container & model: L, mode:subagent, model: default judgment tier, effort: high
    Clause-②: yes (widening)
    Metadata-protocol: added
    Responsibility: n/a — not a defect card
    Thread-read: 6948316290
    Premise: holds (measured at the original claim; the PR is the fix)
    Serial constraints cleared: overlap-check of 0169fc10 against origin/main dfbc316d and the 6 PRs sharing files (#34828 #34793 #34791 #34784 #34753 #34654): all merge cleanly, VERDICT clean exit 0. #34374 PR 2 (seat 3, o3-G) waits on this PR's merge.
    Resume-from: claude/project-thread-wk8dv2@0169fc10be77711968755536013f9d09d48868a4
    Pre-claim lane: unchanged from 6931334915 (domain:server runners with packages/spec and packages/lint riders kept in-lane).
    Pre-claim deps: none open; #34374 PR 1 merged (#34545).
    Prior rulings read: as listed in 6931334915 (HookSchema.refusals precedent, rulings 6431311681 A and 6879477573); L1 ACCEPT 6947101819 and L2 PASS 6947246959 at ff1ba663.
    Next step: L1 delta read of ff1ba663..0169fc10 (S1 fix) by this seat's L1, CI read on the head, then the seat's Tier H record (governed: two generated skills/*/references/_index.md lines) and os-zhuang's approval. Not readied, queued or armed by this area.

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

Metadata

Metadata

Assignees

Labels

domain:serverpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions