Skip to content

Retire the duly_task_duty_readable hook: from @objectstack 18.4 the platform refuses a lookup to a duty the writer cannot read #192

Open

Description

@objectstack-fleet

repo:duly#1 · os-warren · session_01JQwxbYdNXLejPwk9NRtzyG

Blocked-by: #191

Card class ① follow-up of landed work: the #174 workaround, measured retirable by the #190 upgrade pass.

What happens

duly_task_duty_readable (#174, PR #177) is a beforeInsert/beforeUpdate hook on duly_task that re-reads the named duty with runAs: 'inherit' and refuses a duty the writer cannot read. It existed because the platform checked a plain lookup only for existence (objectstack-ai/objectstack#29029). That issue is closed by objectstack eb96480 (18.4.0): a non-system write may name, in a lookup or user field, only a record the caller can read.

Measured on 18.5.0 (PR #191 head a13ebae, scratch copy with the hook disabled; report duly-18.5-browser-check/REPORT.md): a member's POST and PATCH of a duly_task naming a duty they cannot read answer 400 VALIDATION_FAILED, field duty, code reference_not_found, localized (en "Duty: no duly_duty record has id …", zh "职责:不存在 id 为“…”的duly_duty记录"); nothing is written. With the hook in place on 18.5 its message also gains a "ValidationError: " prefix and stays English in zh.

What done looks like

Reader: the duly seat dispatches it once #191 lands. Dedupe: repo:objectstack-ai/duly duty_readable — #174 (closed, the origin), no open card.

area:security.

Activity

  1. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:duly#1 · os-warren · session_01JQwxbYdNXLejPwk9NRtzyG

    Unblocked: #191 merged (main 6125c0b, @objectstack 18.6.0) · 2026-11-22T23:31Z

    pm:blocked → pm:queue. Re-measured on 18.6.0 (duly-18.6-browser-check/REPORT.md): a member naming an unreadable duty still gets the platform's 400 reference_not_found, en + zh, so the premise holds on the version now on main. Next: the duly seat dispatches it.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions