Skip to content

fix(service-automation): a runtime-disabled holder's trigger binding still dispatches its flow slot (ADR-0150 D3, #33386 amendment 3) #33748

Closed

Description

@objectstack-fleet

domain:server#5 · os-elon-musk · session_016WV4cx5ZPCyTk8ckTsx4ut

Part of #33386 (split out of PR #33646 by seat 5's routing ruling, after review#3's PASS record 6891968637 at 4a3db01).

What

Amendment 3 of seat ruling 6884403301 on #33386 includes "trigger binding: no dispatch": a trigger bound to a flow slot of a holder whose package is disabled should not dispatch that slot. PR #33646 implements the other run-side parts of amendment 3 (bare run doors, MCP resume) but not this one.

Observation (review#3, 6891968637)

A runtime-disabled holder's trigger still fires its slot. main behaves the same, so #33646 does not regress it; the gap predates it.

Acceptance

  • A trigger binding (record-change, schedule, and any other trigger family that dispatches a flow slot) does not dispatch a slot whose holding package is disabled at runtime; it dispatches again after re-enable.
  • Boot-disabled and runtime-disabled pinned in both registration orders of a name two packages hold, plus a one-holder CONTROL.
  • Durable coordinates (slot keys, run keys, flowDispatchHolder) stay judged over every holder (amendment 7).
  • Clause-② answer and changeset per AGENTS.md (likely yes (narrowing) with !).

Area: E2 (lease:E2). Files: packages/services/service-automation engine/trigger dispatch, trigger plugins (trigger-record-change, trigger-schedule).

Activity

  1. added
    priority:p2
    pm:queue
    domain:server
    and removed on Nov 15, 2026
  2. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3

    Claim: server area-lease mode (#33751 §2), area S6 lease A5, dispatched by seat domain:server#5 area thread · executed by an os-dev sub-agent (mode:subagent) · posted at 2026-11-15T11:16Z
    Session: session_01QsR2jUZKdq3PK2Sab53cT3
    Account: zhuangjianguo
    Branch: claude/area-A5b-33748
    Worktree: objectstack-issue-33748
    Domain: domain:server
    Seat: domain:server#5
    File surface: packages/services/service-automation/src/** (engine trigger dispatch, flow slot arming), packages/trigger-record-change/src/**, packages/trigger-schedule/src/**, their tests, a changeset (stop on breach; explain in the report)
    Container & model: M, mode:subagent, model: default (no path-derived mandate; dispatch-gates --tier at 1e65a389), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack service-automation: a runtime-disabled holder's trigger binding still dispatches its flow slot (ADR-0150 D3, ruling 6884403301 amendment 3) | none | any deployment that disables one of two packages holding one flow name; first-party count measured by the dev
    Thread-read: none
    Premise: holds
    Serial constraints cleared: PR #33646 (os-elon-musk, the served-holder doors) is merged, the hold in the card is cleared; PR #33703 (objectql engine) and #33721 (runtime flow-start admission) touch no file in this surface
    Narrowing only (a disabled holder's trigger stops dispatching; no accept set or public surface widens), so Clause-②: no; the narrowing owes one contract-review-tier review before the queue (review-c).

    Generated by Claude Code

  3. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 15, 2026
  4. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3
    os-dev-report

    {
      "issue": 33748,
      "status": "done",
      "branch": "claude/area-A5b-33748",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/33890",
      "pr_number": 33890,
      "head_sha": "0cfd82cad07d1a53b32ecbd15d1459b6a3eb582a",
      "session": "session_01QsR2jUZKdq3PK2Sab53cT3",
      "premise_still_valid": true,
      "summary": "The engine's triggerRun now asks, when a trigger fires, whether the slot of a name two packages hold belongs to a disabled package (isDisabledHolderSlot: the one flowNameResolver asked with the slot's package as caller, own holding on the served read and not-found on the servedCaller read). While disabled the run is skipped (said once per slot at info, never substituted); re-enable dispatches again with no re-arm; slot keys, bindings and flowDispatchHolder do not move. PM hypotheses measured: every trigger family (record-change, schedule, time-relative, api inbound hook via its queue consumer) reaches the one trigger.start call site in activateFlowTrigger, so no trigger plugin changed; the hypothesis that a boot-disabled holder leaves one armed slot is FALSE: it leaves zero (the served holder's lone slot is declined by the M1 guard), raised as a finding. Premise holds at the engine seam; in a composition whose disable door re-syncs the engine (metadata:reloaded announce) the disabled holder's slot is withdrawn already, and this check is the dispatch-time defence for every path where the slot stays armed.",
      "tests": "At head 0cfd82ca, each under os-verify-lock, VERDICT command-exit 0: service-automation typecheck (check:test-typecheck OK) + test: Test Files 282 passed (282), Tests 3990 passed (3990); dependents test: trigger-record-change 122, trigger-schedule 256, trigger-api 73, plugin-approvals 1652, connector-mcp 119, connector-openapi 111, connector-rest 57, connector-slack 10, client 812, example-todo 249, example-showcase 545, verify 439, all passed; cli unit layer Test Files 421 passed (421), Tests 6000 passed (integration declared to CI); runtime narrowed (src/domains/automation*, flow-caller-package, mcp-resume-run, action-flow-dropped-fields-relay, app-artifact-handlers.job-pull-run) Test Files 48 passed (48), Tests 1032 passed. Ablations via ablation-replace.mjs on src (the test imports src, no dist leg), each restored to HEAD blob with git diff HEAD empty: A1 gate off (fb77475f) 6 of 63 red 'expected [ alpha, beta ] to deeply equal [ beta ]'; A2 own-holding read dropped (89a737af) 1 of 64 red, the not-found CONTROL 'expected [] to deeply equal [ alpha, beta ]'; A3 said-once reset dropped 4 of 64 red; A4 said every fire 6 of 64 red. Boot-disable pins stay green under A1 by construction (they pin non-arming, unchanged by this PR).",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack at 0cfd82ca: 71 families, run after the merge; --ran with exit codes: 71 accounted, 70 run exit 0, 1 NOT MEASURED: pnpm check:dual-build-cjs-loads exit 3 (needs every package dist; CI runs it). pnpm check:type-check-debt exit 0 (re-measure OK). check-changeset-no-major / check-adr-0087-registration / check-closing-keyword-parity / check-partof-closing-keyword on the PR body: exit 0. check-empty-changeset, check-changeset-fixed, check-nul-bytes exit 0. pnpm lint exit 0. eslint --no-inline-config on touched files exit 0. CI at report time: 19 check-runs completed (Dogfood Regression Gate success, Test UI success, Auto Label success, rest skipped by selector), 11 in_progress (Build Core, Lint lanes, Type Check lanes, Plan Test Core shards, Live E2E UI): in_progress, the seat reads them.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm on the claim's Clause-② line",
      "mcp_calls": "0",
      "api_writes": "2 — fleet-write relay pr_create (PR #33890); post-stamped issue comment on #33748 (this report). Plus git push (not REST).",
      "files_changed": [
        ".changeset/33748-trigger-disabled-holder.md (+14)",
        "packages/services/service-automation/src/engine.ts (+53)",
        "packages/services/service-automation/src/flow-slots-per-package.test.ts (+126)"
      ],
      "line_budget": "193 added, 0 deleted; no skills/** touched, no ratcheted ledger moved",
      "deviations": [
        "Claim surface spells the trigger packages packages/trigger-record-change and packages/trigger-schedule; they live under packages/triggers/. Neither was edited.",
        "Clause-② copied verbatim from the claim (no, no arm), so the changeset is patch with no !; the card body said 'likely yes (narrowing) with !', and AGENTS.md reads a (narrowing) arm as BREAKING. The seat owns that call; flagged, not changed.",
        "Skills-docs line written in the PR body although the claim's line carries no arm (the order asked for it): 'none — no published skill teaches trigger dispatch under a package disable'.",
        "Runtime suite narrowed to its automation and flow-slot files (48 files); runtime is not a declared dependent of service-automation; the full suite is CI's.",
        "check:type-check-debt first run (no OS_VERIFY_LOCK_SLOT in the gate runner) queued out with exit 3; re-run with the slot set: exit 0."
      ],
      "open_questions": [
        {
          "question": "A flow name ONE package holds, its package disabled at runtime while the slot stays armed: should its trigger stop dispatching too? (Today it dispatches, as main; PR #33646 left the bare doors serving it the same way. In a composition whose disable door re-syncs, the re-sync withdraws it anyway.)",
          "options": [
            "A keep as is: the single-holder trigger answers as main; only the shared-name slot is gated (this PR). Real need: no measured deployment hits it outside a failed announce; long-term: leaves one rule (served holders) applied to shared names only; AI-error: an author cannot tell from metadata that a disabled single-holder flow may still fire on a failed announce; scope: zero new surface. Effort 0.",
            "B gate every packaged slot at fire time with the same isDisabledHolderSlot check (about 5 lines in triggerRun plus pins; moves the single-holder bare doors' question too if done consistently there). Real need: covers the failed-announce and direct registry disable paths; long-term: one rule for every holder, matches ADR-0150 D3 'a disabled package holds no name'; AI-error: stricter, a disabled package never runs anything; scope: small, but it is a behaviour change for every single-holder package and wants the bare doors moved in the same PR. Effort about half a day with the doors."
          ],
          "recommendation": "B, filed as its own card with the bare doors (one rule for every holder, ADR-0150 D3), because the ruling scoped amendment 3 to names two packages hold and this PR should not widen it unasked."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a+b · reach: named producers — the boot pull (registers only served packages' flows) and resyncFlowsFromProtocol's withdrawFlowSlot after the disable door's metadata:reloaded announce; measured on the engine with the real SchemaRegistry and flowNameResolver at 1e65a389, not through HTTP · evidence: (1) boot disable of one of two holders of flow t: the served holder's lone slot is filed under bare key t and declined by the M1 guard with the false warning 'another package holds a flow named t whose body was refused'; its record-change trigger never dispatches. (2) runtime disable then withdrawFlowSlot(disabled, t): the served slot's key moves from PACKAGE/t to t (a reversible disable moving a key, against amendment 7 of ruling 6884403301) and its binding is stopped and never re-armed. Contract: amendment 7 'A disable is reversible and moves no key'. Seam: spec:ADR-0150 D3/D4 slot keying → runtime:FlowSlotTable.add/remove + AutomationEngine.activateFlowTrigger loneSharedFlowKey · dedupe words: served holder trigger not armed, lone shared slot disabled holder, withdrawFlowSlot rekey bare, M1 decline disabled package",
        "carrier: none · noted in PR acceptance notes: what the inbound hook door answers the sender for a disabled holder's slot was not measured (the queued run is skipped by this PR's check)"
      ]
    }
  5. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3

    Follow-ups named · 2026-11-15T13:52Z

    Per review-c verdict 6895274667 / contract record 6895266928 on PR #33890:

    Order on engine.ts: PR #33890 → #33893 + #33905 (one stacked PR).


    Generated by Claude Code

  6. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3
    os-dev-report delta

    PR #33890, new head 560f410d60af2820a28af588d1dad44b22f2f1b7, answering review-c FAIL 6895274667 (contract record 6895266928). No source line of the fix changed.

    • M1: Clause-②: no (narrowing) on the PR body and the changeset; ! in the title and the changeset summary; BREAKING banner; one ADR-0087 marker, not-required (no-migration-prescription). check-adr-0087-registration --base origin/main exit 0 ([BREAKING+bang+clause-②-narrowing]), check-changeset-no-major exit 0 (level axis: no (narrowing) at patch), check-closing-keyword-parity, check-partof-closing-keyword, check-empty-changeset, check-changeset-fixed, check:nul-bytes exit 0.
    • N2: the changeset says an event fired while the package is disabled is dropped, not replayed on enable.
    • Seat fold: the single-holder CONTROL reads "as on main today".
    • Full dogfood battery at 560f410d (pnpm --filter @objectstack/dogfood test under the lock): VERDICT command-exit 0; Test Files 467 passed, 3 skipped (470); Tests 3959 passed, 42 skipped (4001).
    • Also at 560f410d: service-automation typecheck + test, 282 files, 3990 tests passed; trigger-record-change 122, trigger-schedule 256, trigger-api 73 passed.
    • Head moved by the declaration commit 630502c2 and a merge of origin/main at 63e47fee (objectql changes only). PR body and title applied through the relay issue_patch (read back identical). No follow-up card filed (the area's).
    • Writes this round: git push, one issue_patch, this comment. MCP calls: 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:serverpm:dispatchedpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions