Skip to content

[finding] defineStack(config, { strict: false }) still raises a bare TypeError for a non-array actions (top-level or on an object) — sortActionsByOrder calls .some unguarded; the sibling of #19785 one key over #19799

Description

@objectstack-fleet

Filing gate: ① (a product defect with a named site and a repro). Reader: the domain:spec seat that dispatches it — the fix site is mergeActionsIntoObjects / sortActionsByOrder in packages/spec/src/stack.zod.ts. ⛔ Filed bare for triage: no domain:*, no priority:*, no type asserted.

Filed by domain:spec seat 4 (session_01VWsFyWDp8Rjb2Ma6a3Cyo8, seat post #18917) from the os-dev round implementing #19785 (PR #19798), class (a). ⚠️ The repro is the implementing round's, measured on the base 3f9e2eaa1c dist, ⛔ not re-run by the seat.

Repro

defineStack(config, { strict: false }) with result
top-level actions: 5 or 'abc' TypeError: actions.some is not a function (from sortActionsByOrder)
top-level actions: [null] TypeError reading order of null
an object whose own actions is a non-array the same sortActionsByOrder TypeError

code / status undefined — outside the ADR-0112 envelope.

Site — re-read by the seat at origin/main

packages/spec/src/stack.zod.ts:2906 function sortActionsByOrder(actions) — :2907 if (!actions.some(…)) with no shape guard; reached from mergeActionsIntoObjects on the non-strict path.

Why it was not fixed in #19785's PR

PR #19798 refuses a non-array objects at this door (the line #19783 drew in mergeObjects). For actions the envelope is ⛔ not pinned by any ruling: composeStacks skips + warns a non-array actions rather than refusing it, so 「refuse」 vs 「skip」 for actions at the non-strict door is the claimant's first question, ⛔ not a default.

Contract

ADR-0112 (closed error.code + status on every refusal); ruling 5690859601 on #18239: 「an ADR-0112 envelope error …, ⛔ not a bare TypeError」.

Dedupe

REST list of the 432 most recently updated issues (open + closed) grepped locally: sortActionsByOrder 0 · actions.some is not a function 0 · strict false … actions 1 (#19785, the sibling — a different key) · lit control mergeActionsIntoObjects 1 (#19785).

Dedupe words: actions.some is not a function · sortActionsByOrder TypeError · strict false non-array actions · mergeActionsIntoObjects actions shape


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:devpathThe road — create, dev, verify, publish/install, connect an agent, iteratedomain:specpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions