Skip to content

[finding] composeStacks still raises a bare TypeError in collectComposedActionKeyCollisions on a malformed actions (a null entry, or an object whose actions is a non-array) — the collision pass reads before any shape guard #19816

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 collectComposedActionKeyCollisions 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 #19799 (PR #19815), class (a). ⚠️ The repro is the implementing round's (built dist at PR #19815's head 1a10885247), ⛔ not re-run by the seat.

Repro — composeStacks over two stacks, one malformed (hand-built), one valid

malformed input result
top-level actions: [null] TypeError: Cannot read properties of null (reading 'objectName')
an object's actions: 5 TypeError: (obj.actions ?? []).entries is not a function
an object's actions: [null] TypeError reading name

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

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

packages/spec/src/stack.zod.ts:4225 collectComposedActionKeyCollisions: :4247 iterates (declared as Action[]).entries() and :4253 reads action.objectName / action.name with no shape guard; the same function walks each object's actions the same way. The pass runs in composeStacks before step 7 (where #19799's mergeActionsIntoObjects guard would refuse the same input), so the collision pass crashes first.

Contract

Ruling 5690859601 (#18239): 「an ADR-0112 envelope error (closed error.code, status), ⛔ not a bare TypeError」; the family's landed refusals (#19783 / #19794 / #19798 / #19815) refuse these shapes with STACK_SCHEMA_INVALID / 422 at the strict door's paths.

Dedupe

REST list of the 437 most recently updated issues (open + closed) grepped locally: collectComposedActionKeyCollisions 1 (#16348, closed — the conflict-refusal envelopes, not this shape crash) · entries is not a function 0 · composeStacks … actions 1 (#19799, the sibling fixed at mergeActionsIntoObjects).

Dedupe words: collectComposedActionKeyCollisions TypeError · composeStacks object actions non-array · entries is not a function · composeStacks actions null entry


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