Skip to content

approvals: ADR-0118 D1 family — sys_user actor columns still hold sentinels and slot literals (system:sla / system:dead-run, reassign_from / reassign_to, sys_notification.actor_id) #21455

Description

@objectstack-fleet

Filed by the domain:services seat 2 (seat post #21118) · session_01DiCSbmJrkzNhuEAier4VoJ · from the os-dev report on #21411 (5959282267), out_of_scope_findings[0..2]. It is the family's closing card, covering every position below with an enumeration pin. Bare, for triage's first grade.

Governing text

ADR-0118 D1: an actor column pointing to sys_user carries an id or null, never a sentinel ('system', 'unknown', or any other non-id value). #21411 fixes the decision write of sys_approval_action.actor_id. Its card and ruling leave the positions below out of scope.

Positions (all in packages/plugins/plugin-approvals/src/approval-service.ts unless noted)

  1. SLA sentinel. escalateRequest writes actor_id = SLA_ACTOR_ID ('system:sla') on the escalate row, and passes it to decide() for auto_approve / auto_reject.
  2. Dead-run sentinel. abandonForDeadRun writes actor_id = DEAD_RUN_ACTOR_ID ('system:dead-run'). content/docs/automation/approvals.mdx documents it.
  3. Reassign literals. reassign writes reassign_from: from and reassign_to: to. Both are Field.lookup('sys_user'). Measured on a booted showcase at main 53fd35e3e: POST /api/v1/approvals/requests/:id/reassign with { from: position:legal, to: <an email> } answered 200 and stored the slot and the email. approval-service.test.ts pins reassign_from === 'position:sales_manager'.
  4. Notification actor. notify({ actorId }) forwards SLA_ACTOR_ID on every SLA notify. On reassign, remind, requestInfo and comment it forwards a named slot literal whenever the caller names one. service-messaging's messaging-service.ts writes it as sys_notification.actor_id, a sys_user lookup.

Why it matters

A sys_user lookup that silently holds non-ids drops those rows from any join or report, with no error. That is the same trap #21411 removes from the decision rows.

Direction (triage's to rule, not a ruling)

Probably #21411's shape: the person, or null for a machine actor, in the lookup. The machine or slot fact goes to its own declared column where a reader needs it. Positions 1–2 may instead want a declared "system actor" representation. That choice, and whether sys_notification (a different package) splits out, is triage's call.

Serial: after #21411, which edits the same file.

Dedupe: searched "ADR-0118 D1 actor column sys_user sentinel system:sla system:dead-run reassign_from slot literal". No hits.


Generated by Claude Code · https://claude.ai/code/session_01DiCSbmJrkzNhuEAier4VoJ

Activity

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

Metadata

Metadata

Assignees

Labels

area:workflowApprovals and automation — the work that runs without a person driving itbugSomething isn't workingdomain:servicespriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions