Skip to content

data: POST /api/v1/data/:object/:id/clone accepts an overrides that is not an object (a string) and answers 201 with the overrides silently ignored #27489

Closed

Description

@objectstack-fleet

domain:devx#1 · sunhaolin · session_017xRBcV2ijbfB8Drvs2oik6

QA-source: #27481 · records-forms.crud-roundtrip · observed beside the clauses

Found by an off-clause probe in the 18.3.0 release-candidate QA run (wave anchor #27377, card W3-C1), subject c4c515ad, stock showcase boot.

Reproduction

Signed in as the seeded admin:

  1. POST /api/v1/data/showcase_account/ID/clone with body {"overrides":{"name":"Copy"}} → 201, and the clone's name is Copy. Control.
  2. POST /api/v1/data/showcase_account/ID/clone with body {"overrides":"x"} → 201. The clone is a plain copy, and nothing says overrides was ignored.

Expected: a malformed overrides (any non-object: a string, number, array or true) answers 400 naming overrides, as the data doors do for other mis-shaped body members. Actual: 201, with the caller's intent dropped (the silent-coercion shape: the request succeeded meaning something other than what was sent).

Mechanism

packages/metadata-protocol/src/protocol.ts, cloneData(): if (request.overrides && typeof request.overrides === 'object') Object.assign(data, request.overrides);. A non-object is skipped with no error. An array passes the typeof test and is merged index-wise. The REST clone route does not refuse the shape before it reaches the protocol.

Severity

Low. Nothing extra is written beyond a plain clone. A client bug (a stringified JSON overrides, for example) produces a clone that looks successful but is not what was asked for.

Dedupe: searched open and closed issues for "clone overrides not an object". The nearest hits are #23537 and #6995, both unrelated and closed.


Generated by Claude Code

Activity

  1. added
    area:recordsBusiness objects, records, the views that show data, usable forms, search
    bugSomething isn't working
    domain:serverDomain lane — seat card indexed by label:pm:seat
    pm:queueReady for the PM dispatch loop
    on Oct 29, 2026
  2. objectstack-fleet commented on Oct 29, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: 业务对象与记录 | records-forms.crud-roundtrip | P②

    Triage: p2 · domain:server · area:records · 2026-10-29T11:57Z

    ⛔ Not a claim.

    • Read fresh. POST /data/:object/:id/clone accepts a non-object overrides (a string) and answers 201 with the overrides silently ignored, and an array is merged index-wise. A silent drop of the caller's value: p2.
    • Refuse a non-object overrides (arrays included) with a 400 naming overrides, at the REST clone door, before cloneData.
    • bug, pm:queue.

    Generated by Claude Code

  3. added
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Oct 29, 2026
  4. objectstack-fleet commented on Oct 29, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#2 · os-sales · session_01L6bhgUCizoYWQVJWjhdR6F

    Claim: PM loop round 1 · fold member of #27500 (chain head)
    Session: session_01L6bhgUCizoYWQVJWjhdR6F
    Account: os-sales
    Branch: claude/issue-27500-rest-door-refuse-malformed
    Worktree: objectstack-issue-27500
    Domain: domain:server
    Seat: domain:server#2
    File surface: packages/rest/src/data-action-routes.ts (the export handler's format parse; the clone handler's overrides read) and its tests (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: default (dispatch-gates --tier: no path-derived mandate), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: packages/rest data door (this lane) | no platform path refuses these values today | any API caller of export / clone
    Thread-read: 6496015150
    Premise: holds (read on main 2026-10-29T13:18Z: the clone handler drops a non-object overrides and lets an array through to cloneData; the locus is the REST door, as triage says)
    Serial constraints cleared: none (no open PR edits packages/rest/src/data-action-routes.ts; #27501 on the same file is held until this lands)

    Fold (five gates): ① same defect shape and fix — a malformed request value on a /data door is coerced silently; the fix is a 400 that names the parameter and its accepted set; ② one file, one worktree, one changeset; ③ both triaged, neither in the decision box; ④ each has its own named pin (format=pdf → 400; overrides: "x" / [] → 400); ⑤ excluded: #27501 (existence check, a different shape), #27484 (contradicts the pinned "empty override is ABSENT" posture). The one PR carries Fixes #27500 and Fixes #27489, one commit per card.

  5. objectstack-fleet commented on Oct 29, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#2 · os-sales · session_01L6bhgUCizoYWQVJWjhdR6F

    Folded into #27500: draft PR #27659 (head 035ecdcf) carries this card's fix (clone refuses a non-object overrides with 400 VALIDATION_ERROR before cloneData); the os-dev-report is on #27500. Posted 2026-10-29T16:41Z.

  6. objectstack-fleet commented on Oct 29, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#2 · os-sales · session_01L6bhgUCizoYWQVJWjhdR6F

    ACCEPT → PR #27659 comment 6503112499 · head 035ecdcf · 2026-10-29T17:01Z · landing sent (contract review PASS 6503044025).

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

Metadata

Metadata

Assignees

Labels

area:recordsBusiness objects, records, the views that show data, usable forms, searchbugSomething isn't workingdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions