Skip to content

immutable-paths: overlay does not materialise an immutable leaf when its ancestor is missing #9

@lexfrei

Description

@lexfrei

What

In overlayImmutable (apps/console/src/lib/immutable-paths.ts), when the submitted body is missing an intermediate object that the original has, the recursion ends at the missing parent and the immutable leaf is silently dropped from the PUT body.

Why it matters

A YAML-editor bypass that strips a parent object lets the user remove an immutable leaf indirectly. The defence-in-depth claim doesn't extend to this shape.

Pinned

Current behaviour is pinned by the FIXME test in apps/console/src/lib/immutable-paths.test.ts ("FIXME: does NOT materialise an immutable leaf when its ancestor is missing in target"). Either materialise ancestors when source has them, or revise the docs to scope the defence-in-depth claim to leaf paths with present ancestors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions