Skip to content

A member can create a duty with source catalog, another person as owner and a foreign business unit #178

Closed

Description

@objectstack-fleet

Found by the #176 card thread (F3) on main 94419c6, @objectstack 18.2.0, live pnpm demo as demo member Owen Pryce. The report is in the project file duly-176-task-provenance/step0.md. This is the duly_duty counterpart of #176, which fixes the same shape on duly_task only.

What happens

POST /api/v1/data/duly_duty with { source: 'catalog', owner: <Sami>, business_unit: <Quality> } answers 201, stored as sent, with review_status: to_confirm.

  • Owen cannot advance it himself (no allowEdit on the duty, 403).
  • It does reach an approver's queue. The approve option's visibleWhen (record.owner != current_user.id) passes for anyone except Sami, so a confirmation by somebody else dispatches work to Sami that he never agreed to, labelled as role-catalog work.

What done looks like


Generated by Claude Code

Activity

  1. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 7
    Session: session_011HyoSXGRy6L13mYq1Hp4n1
    Account: os-warren (the seat's linked user; the card's assignee)
    Branch: claude/project-thread-42z0rr (platform-assigned card-thread branch, at origin/main 94419c6)
    Worktree: duly-issue-178
    Domain: n/a. objectstack-ai/duly is a single-lane app repo with no domain:*.
    Seat: repo:duly#1
    File surface: src/security/permission-sets.ts (an FLS map on duly_duty: source, owner, business_unit not editable for member and manager, editable for duly_admin), src/hooks/duty.hook.ts (a business-unit stamp for a hand-made duty), src/hooks/index.ts only if a new hook export needs it, src/objects/duty.object.ts (comments only), test/duty-provenance.test.ts (new). No task files. Stop on any breach until the seat posts a Claim amendment.
    Container & model: M, mode:thread, model: TIER_DEFAULT (hand-derived), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: Make a duty's provenance server-owned for members and managers on every door through field-level security, which the 18.2 console honours on the form. Seat rulings: O1, owner is locked for member and manager. B1, a hand-made duty's business_unit is stamped from the writer's primary business unit, matching the field's own description. Seed, Apply catalog and Import keep writing these fields.
    Thread-read: none
    Premise: Step 0 on 18.2.0 at 94419c6 (project file duly-178-duty-provenance/step0.md): data POST and MCP create accept a forged source, owner and unit for member and manager; PATCH is 403 for both. FLS gives 403 'Field write denied' on REST and MCP, and the form renders the fields read-only and omits them. readonly is the wrong tool here, because Import maps readonly fields as match-only.
    Serial constraints cleared: #176 (task provenance) may also need src/security/permission-sets.ts and src/hooks/index.ts. Whichever lands second merges main (never rebase) and re-runs the gates. F2 (a duly_admin can self-approve) and F3 (the owner's confirm step is unreachable) are routed to decision #130; F4 (Apply leaves business_unit null in the demo) is a separate card.


    Generated by Claude Code

  2. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim amendment (duly lane seat, session session_011HyoSXGRy6L13mYq1Hp4n1, 2026-11-02T06:57Z).


    Generated by Claude Code

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions