Skip to content

approvals: recall and the subflow-parent strand report resumeFailure without the hook refusal (innerRefusal, userMessage) #34638

Closed

Description

@objectstack-fleet

repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

Filing gate ①: contract review N2 on PR #34619 (Fixes #34579, review 6938300180), passed on by area o2-H. Dedupe: resumeFailure innerRefusal recall; no open card.

Suggested-grade: p2 · domain:server

维护者速读

Observed (by review)

The refusal reaches only the thrown RESUME_FAILED envelope. The recall door and the subflow-parent strand report a stranded run on a success answer through resumeFailure (ResumeFailureReport), which carries no innerRefusal / userMessage. The spec text already separates the two channels.

Question for the card

Should ResumeFailureReport carry the same pair (innerRefusal, userMessage) so every door that strands a run on a hook refusal tells the caller why?

Premise check (run first)

On main after #34619 merges: an approval flow whose step after recall (or a subflow whose parent resumes into a refusing hook) is refused by a record hook. Read the recall answer's resumeFailure. If it already carries the refusal, close this card.

Activity

  1. added
    bug
    finding
    on Nov 17, 2026
  2. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → p2 · domain:server · pm:blocked · 2026-11-17T04:29Z

    ⛔ Not a claim.

  3. added
    domain:server
    pm:blocked
    priority:p2
    on Nov 17, 2026
  4. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: unlock → pm:queue · 2026-11-17T05:50Z

    ⛔ Not a claim.

    Blocker #34579 closed today at 04:59Z. Back to the queue at its grade (p2). Run the premise check on main first (does resumeFailure already carry the refusal?).

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C

    Claim: PM loop round 1
    Session: session_012MmDsS4GoHCgYwA2uv3n3C
    Account: os-lizheng
    Branch: claude/issue-34638-resume-failure-refusal
    Worktree: objectstack-issue-34638
    Domain: domain:server
    Seat: repo:objectstack#4
    File surface: packages/spec/src/api/automation-api.zod.ts (ResumeFailureDetailsSchema), packages/spec/src/contracts/approval-service.ts (ResumeFailureReport docblock), packages/services/service-automation/src/engine.ts (SubflowParentStrand), packages/plugins/plugin-approvals/src/approval-service.ts (recall and subflow-parent strand builders), their tests, generated spec outputs, .changeset/34638-*.md (stop on breach; explain in the report)
    Container & model: M, mode:cloud (spec plus two packages: build-heavy), model: default tier build; review owed at CONTRACT_REVIEW_TIER (dispatch-gates --tier: Clause ② SUSPECT, packages/spec/src/** contract surface), effort: high
    Clause-②: yes
    Metadata-protocol: none
    Responsibility: the recall door and the subflow-parent strand in plugin-approvals / service-automation (objectstack) report a stranded run through resumeFailure without the refusal that stranded it | the thrown RESUME_FAILED envelope already carries innerRefusal and userMessage (#34579), not the success-answer channel | any approver or app whose recall or subflow resumes into a refusing record hook; HotCRM approvals today
    Thread-read: 6939953567
    Premise: holds — read at 2026-11-17T12:34Z on origin/main c513d62: ResumeFailureDetailsSchema (automation-api.zod.ts ~552-585) has runId, status, repairable only; recall builds resumeFailure at plugin-approvals approval-service.ts ~6676/6710; subflow-parent strand at ~6250-6255; SubflowParentStrand (service-automation engine.ts ~2157) carries runId, repairable, error only, so the refusal is not at hand there yet; the thrown path sets err.resumeRefusal at ~5946-5956.
    Serial constraints cleared: PR #34619 (#34579) merged; no in-flight claim names these files at 2026-11-17T12:34Z.
    Pre-claim lane: packages/spec/src/** + plugin-approvals + service-automation; spec lane has no seated seat, so it stays in this lane (area-lease 留道), L1 and L2 by this seat.
    Pre-claim deps: Blocked-by #34579 closed 2026-11-17T04:59Z.
    Prior rulings read: approvals,recall,subflow-parent,strand,report,resumefailure,hook,refusal,innerrefusal,usermessage → 70 hits; ADR-0119 D1, ADR-0148 D1, ADR-0148 D6 named; triage 6938361547: additive widening, normal contract review, no maintainer card unless the review finds otherwise; thread: none

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C

    Seat status · waiting on the maintainer · 2026-11-17T14:29Z

    • The dev (cloud session session_012MmDsNmJFXm6DALa3xPdkp) finished the code and pushed claude/issue-34638-resume-failure-refusal at 9b417c94 (origin/main e9f65a3 merged in). Its final report is blocked: the session's own permission classifier refused its two GitHub writes (the relay pr_create and the os-dev-report comment), and it did not re-route them.
    • So there is no PR and no dev report on this card. A classifier refusal goes to the maintainer; the seat does not re-send the write from another session. Waiting on the maintainer since this stamp: either the seat opens the draft PR from the pushed branch, or the maintainer does.
    • Still owed after the PR exists: L1 by this seat, then the contract (L2) review. The PR widens the published ResumeFailureReport (Clause-②: yes). The dev's open question, where the pair is declared (on ResumeFailureReport only, as pushed, or on ResumeFailureDetailsSchema), goes to that review.
  9. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C

    Seat opens the draft PR on the maintainer's order · 2026-11-17T22:34Z

    Provenance: who: the maintainer (account owner of this seat, os-lizheng); verbatim: 「#34638、#34756 由席位代开 PR」; where: in this seat's session session_012MmDsS4GoHCgYwA2uv3n3C, answering the seat's question about the cloud dev's refused writes.

    The seat opens the draft PR from claude/issue-34638-resume-failure-refusal at 9b417c941d through the relay pr_create, with a body written from the dev's pushed commits and changeset. The PR is then L1-reviewed by this seat as usual.

  10. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C

    Draft PR #34999 opened by the seat on the maintainer's order (read back identical). L1 by this seat follows.

  11. objectstack-fleet commented on Nov 18, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C

    L2 fix round handed to a local dev · 2026-11-18T00:28Z

    The contract-review record 6963905172 on PR #34999 left S1 and S2 open. The cloud dev session cannot write to GitHub, so the fix round goes to a local os-dev sub-agent of this seat on the same branch, claude/issue-34638-resume-failure-refusal (Resume-from: claude/issue-34638-resume-failure-refusal@9b417c941d). Same claim (6948207060), same session.

  12. added
    area:workflow
    on Nov 18, 2026
  13. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C

    os-dev-report

    Delta report, L2 fix round (S1, S2, N1-N3) on PR #34999, head 8c0b7ce.

    {
      "issue": 34638,
      "status": "done",
      "branch": "claude/issue-34638-resume-failure-refusal",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34999",
      "session": "session_012MmDsS4GoHCgYwA2uv3n3C",
      "premise_still_valid": true,
      "summary": "L2 fix round on PR #34999, continued from 9b417c941d, now at head 8c0b7ce7a0 (three commits: 34fd229f09 docs, c5762e51ce fix, 8c0b7ce7a0 merge of origin/main). S1: the ResumeFailureReport.userMessage docblock now says the sentence is in the RUN's locale (AutomationContext.locale). That is the language of whoever started the run, because a resumed leg keeps the starter's locale and the decider's segment never carries one. A run no person started gets the catalogue's authored message. The changeset parenthesis says the same. No runtime change. StrandedDecisionDetails.userMessage in @objectstack/types still has the same 'in the caller's locale' sentence: it is outside this diff and was left alone for the seat. S2: a new private static ApprovalService.recognisedRefusal reads the pair the way the thrown channel does. innerRefusal goes through the spec's own FlowInnerRefusalSchema.safeParse: a code in the closed ErrorCode set and a string message, or it is dropped. userMessage goes through declaredUserMessage from @objectstack/types. Both are applied once each, in serviceResume's rejected-resume branch (which feeds the recall arm and the batch arm through resumeRefusalOf) and in parentStrandReport. The now-false comment in serviceResume is rewritten. One deviation on recogniser reuse: the thrown path's innerRefusal reader, carriedInnerRefusal in packages/types/src/stranded-decision.ts, is module-private. Exporting it would add @objectstack/types to the diff and the changeset, so the read uses the schema that function hand-implements (same rule: object, ErrorCode, string message). It is not a second hand-written rule. The seat may prefer exporting carriedInnerRefusal instead (see open_questions). Nits: N1 done (the strip paragraph now counts code, innerRefusal and userMessage). N2 done (changeset: innerRefusal absent for a fault, userMessage can ride alone). N3 done (a pin of the batch arm with one refused batch resume). N4 skipped as ordered. origin/main merged (190 commits, no conflict) because the coordinator's mid-task message said to merge. No rebase, no force-push.",
      "tests": "At head 8c0b7ce7a0 (after the merge), under os-verify-lock (VERDICT command-exit 0, held 1117s, shared box): closure build `pnpm --workspace-concurrency=2 --filter '@objectstack/plugin-approvals^...' build` exit 0; plugin-approvals test exit 0, Test Files 124/124, Tests 1766/1766; plugin-approvals typecheck exit 0; spec test exit 0, Test Files 855/855, Tests 27365 passed + 1 todo; spec typecheck exit 0; service-automation test exit 0, Test Files 289/289, Tests 4184/4184; service-automation typecheck exit 0. New pins: resume-failure-refusal.test.ts gains 8 cases (4 pair shapes x 2 strands, both through recall): blank userMessage + well-formed innerRefusal; unregistered innerRefusal.code + marked userMessage; non-string message + non-string userMessage; and a CONTROL well-formed pair that rides whole. The node is a plugin-registered executor returning success:false with the pair. batch-item-recall-resumes-batch.test.ts gains the N3 pin: a one-item batch, send back, revise-window recall, the batch's next step refuses, and resumeFailure names the batch run and carries the pair. Its peek harness can now return a failure result; the default is unchanged. Ablation, at committed HEAD 8c0b7ce7a0 through scripts/ablation-replace.mjs in WRAP mode, two files run each time. The subject is imported from src (./approval-service.js), so no dist was involved. CONTROL unmutated: 27/27 pass. A (serviceResume read replaced with the old pass-through, anchor 1->0, blob ef819367 -> 72cdd101): 3 failed / 24 passed, exactly the 3 malformed shapes on the recall's own strand; the CONTROL shape stayed green. B (parentStrandReport read replaced with the old two spreads, blob -> 36c70d55): 3 failed / 24 passed, exactly the 3 malformed shapes on the subflow parent's strand. C (N3: batch arm's resumeRefusalOf spread removed, blob -> ac577b88): 1 failed / 26 passed, the new batch pin. Restore was checked by hash after every leg: blob ef819367 equals the HEAD blob, and git diff HEAD is empty. Two attempts at C were void before the real run, and neither ran any test. The first had a replacement that was a substring of the anchor (the tool refused: rise 0, exit 1). The second had an ambiguous anchor (2 hits, exit 3).",
      "gates": "`node scripts/pm/dispatch-gates.mjs --commands` (tree objectstack-ai/objectstack at 8c0b7ce7a0, merge base f848e3739, 10 paths) derived 103. Ran all 103 locally at that head with exit codes captured before any pipe. 100 exit 0. 3 exit 3 PREREQUISITE NOT MET = NOT MEASURED locally, because they need a full workspace build that this round did not do: pnpm check:dual-build-cjs-loads, pnpm check:i18n, pnpm check:type-check-debt. `dispatch-gates --ran` with recorded codes gave: 103 derived, 100 run, 3 NOT-MEASURED (derived from exit 3), 0 UNRUN. All three run in CI inside Lint & Repo Gates / TypeScript Type Check. Overlap-check at 8c0b7ce7a0 against origin/main c809deb67b: VERDICT clean exit 0. origin/main merges cleanly; #35290 (shares scripts/engine-double-contract.pinned.json) merges cleanly. PR check-runs on 8c0b7ce7a0: 58 success, 11 skipped, 0 failed, 0 pending. Lint & Repo Gates success, TypeScript Type Check success, Test Core success, Build Core success, Governed Surface Queue Guard success, Type Check UI success, Test UI success, Build & E2E UI success, Live E2E UI success, Dogfood Regression Gate success, Check Changeset success, Lint UI skipped. test:repo was not run locally because it is declared to CI (Test Core success).",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm (Clause-②: yes, Metadata-protocol: none, unchanged)",
      "mcp_calls": "0",
      "api_writes": "1 — this os-dev-report comment on #34638 (POST issues/34638/comments via scripts/pm/post-stamped.mjs). git push x3 to claude/issue-34638-resume-failure-refusal is not a REST write. The PR body was not touched.",
      "open_questions": [
        { "question": "Where the innerRefusal recogniser lives: is the spec schema read (FlowInnerRefusalSchema.safeParse in plugin-approvals) acceptable, or should the thrown path's carriedInnerRefusal be exported from @objectstack/types and called instead?", "options": ["A keep the schema read: same rule, @objectstack/types stays out of this diff", "B export carriedInnerRefusal and call it: one literal function, but @objectstack/types joins the diff and the changeset (patch)"], "recommendation": "A, because the schema is the declaration that carriedInnerRefusal implements by hand, and B widens a reviewed diff with a new public export only to share a 6-line read" }
      ],
      "security_findings": "none",
      "out_of_scope_findings": ["carrier: seat · noted, not filed — StrandedDecisionDetails.userMessage (packages/types/src/stranded-decision.ts) still says the sentence is 'in the caller's locale'; this is the S1 wording on the thrown channel, outside this diff", "carrier: the person who can delete them · noted, not filed — a mis-quoted heredoc in my first ablation script wrote four stray logs at the filesystem root (/abl-A.log, /abl-B.log, /abl-C.log, /abl-control.log; the C log now holds the void first attempt). The safety check refused my rm of them; they are harmless test output and need a manual delete"],
      "pr_body_delta": "Suggested PR body edits (the seat writes them). 维护者速读 改了什么: replace '按调用方语言给用户看的那句话' with '按发起该运行的人的语言给出的那句话(无人发起的运行给出原文)'. What changes, ResumeFailureReport bullet: replace 'Both are absent when the strand met no refusal.' with '`innerRefusal` is absent when the strand met no refusal; `userMessage` can ride alone. Both are read the way the thrown `RESUME_FAILED` reads them: an `innerRefusal` outside its declared shape and a blank or non-string `userMessage` are dropped.' What changes, approvals bullet: append 'Both members are read once, through `recognisedRefusal` (the spec `FlowInnerRefusalSchema` plus `declaredUserMessage`), in `serviceResume` and `parentStrandReport` (L2 S2).' Tests: add 'resume-failure-refusal.test.ts: a plugin node's malformed pair (blank userMessage; unregistered code; non-string members) reaches recall's resumeFailure without those members, on the own strand and the parent strand, and a well-formed pair rides (CONTROL)' and 'batch-item-recall-resumes-batch.test.ts: a refused batch resume carries the pair (N3)'. Verification: replace it with this round's readings at 8c0b7ce7a0 from the tests and gates fields."
    }
  14. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C

    MERGED: PR #34999 closed this card (2026-11-19T06:33Z). On origin/main, resumeFailure on the recall door and on the subflow-parent strand carries innerRefusal and userMessage, read the way the thrown RESUME_FAILED reads them. pm:dispatched and lease:o4-A are off. The cloud dev session that pushed the first round stays parked for the maintainer to archive. Left for the hand-over:

    • content/docs/automation/approvals.mdx and flows.mdx: a docs follow-up (N4).
    • StrandedDecisionDetails.userMessage in packages/types still says "the caller's locale".
    • One recogniser spelling, carriedInnerRefusal vs FlowInnerRefusalSchema (N5).
  15. removed
    pm:dispatched
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:workflowbugdomain:serverfindingpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions