You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
spec(automation): IAutomationService.toggleFlow has no caller channel, so a flow switch-off cannot record which admin did it (the spec half of #26474) #26506
area:workflowApprovals and automation — the work that runs without a person driving itbugSomething isn't workingdomain:specDomain lane — seat card indexed by label:pm:seatpriority:p2Medium: important, M3
Filing gate: ① a product defect with a live reproduction, the spec half of #26474. Filed by the domain:server seat 1 under cross-repo-coordination.md rule 3, because the server lane holds no packages/spec (lanes/server.md red line). ⛔ Not a claim.
Business reason: when an admin switches off a packaged flow, the sys_metadata_activation row and its sys_audit_log row carry a null actor, so the audit trail cannot say which administrator disabled a shipped flow (#26474, reproduced live on a stock showcase boot at 756220c4).
Reader: the domain:spec lane, packages/spec/src/contracts/automation-service.ts:997. The server half rides #26474, which waits on this card for its flow door.
Dedupe (open AND closed): "toggleFlow caller context actor IAutomationService" → only #26474.
What to declare
IAutomationService.toggleFlow?(name: string, enabled: boolean): Promise<void> (automation-service.ts:997) has no caller channel. The runtime reaches the activation-ledger write for a flow only through this method, and it holds the service as Partial<IAutomationService>, so a third argument cannot be passed without the contract. Measured by the #26474 card thread (os-dev-report 6434804607): service-automation's own toggleFlow header (engine.ts about :5289) records the same gap.
Declare an optional caller channel on toggleFlow, so the door can hand down who made the request. The shape is the spec seat's to choose. The precedent in the same contract is execute(flowName: string, context?: AutomationContext) at :905.
Optional, so every current implementer and caller compiles unchanged.
The decision record behind this card: seat ruling on #26474 (letter A of its needs_decision report). B (an ambient AsyncLocalStorage scope) and C (an undeclared duck-typed parameter) were set aside: both leave a missed caller writing a silent null.
Claim: PM loop round 1 · 2026-10-27T06:40Z
Session: session_01WGufzfhobWEgUUrjz4rrbh
Account: os-support-ai
Branch: claude/project-thread-x54rab (card thread session_01WGufzgdxgk35nWqLB6EMzg. The platform assigns the thread's branch and the thread can push only that one, so the branch is written as measured instead of claude/issue-26506-<slug>.)
Worktree: objectstack-issue-26506
Domain: domain:spec
Seat: domain:spec#1
File surface: packages/spec/src/contracts/automation-service.ts (the toggleFlow signature and its TSDoc only), one new type-level pin test beside it, and one changeset for @objectstack/spec. ⛔ Nothing in service-automation, core, runtime or the doors (that is #26474's server half). Stop on a breach and explain it in the report.
Container & model: S, mode:thread, model: TIER_DEFAULT, default effort
Clause-②: yes (widening)
Metadata-protocol: none
Responsibility: n/a. This is the spec half of #26474, filed by the domain:server seat under cross-repo rule 3.
Thread-read: none
Premise: holds (read at origin/main: automation-service.ts:997 declares toggleFlow?(name: string, enabled: boolean): Promise<void> with no caller channel; the precedent execute(flowName, context?: AutomationContext) is at :905)
Serial constraints cleared: yes. No open PR or claim names automation-service.ts. #26474's flow door waits on this card.
Ruling-ref: seat ruling on #26474, letter A of its needs_decision report (an explicit optional caller channel; B, an ambient scope, and C, a duck-typed parameter, were set aside)
os-dev-report
{
"issue": 26506,
"status": "done",
"branch": "claude/project-thread-x54rab",
"pr": "#26545",
"session": "session_01WGufzgdxgk35nWqLB6EMzg",
"premise_still_valid": true,
"summary": "IAutomationService.toggleFlow now reads toggleFlow?(name, enabled, caller?) with caller typed as Pick over AutomationContext narrowed to 'userId', following the execute(flowName, context?: AutomationContext) precedent in the same contract, as seat 1 accepted. Narrowed because the write records only the acting user: no grants (ADR-0126 §5 keeps the authority gate at the door, and the ledger write runs elevated), and no tenant (the ledger is deployment state with no organization column, ADR-0126 as amended by ADR-0131 D6). The TSDoc says what the channel carries, that it is attribution only, and that an absent caller means an unattributed write. The PR body gives the reasoning, including why not the whole AutomationContext and why not ExecutionContext. Spec only: no change to service-automation, core, runtime or the doors. One patch changeset for @objectstack/spec. File surface exactly as claimed (3 paths).",
"tests": "at f3ce50a: new packages/spec/src/contracts/automation-toggle-flow-caller.pin.test.ts (type-level identity, arity, two-parameter implementer and two-argument call compile, positions/record literals refused by @ts-expect-error, runtime read of caller?.userId). Under the verify lock: pnpm --filter @objectstack/spec typecheck plus vitest on the pin, automation-service.test.ts and automation-context-caller-param-keys.pin.test.ts: VERDICT command-exit 0, Test Files 3 passed (3), Tests 22 passed (22). Reverse verification (one-off, committed first): scripts/ablation-replace.mjs reverted the signature to two parameters (anchor 1 -> 0, blob 8fc1e1cc -> 201b1e11); tsc --noEmit -p tsconfig.test.json then reported 9 errors in the pin file (TS2344 x2, TS2554 x3, TS2493 x2, TS2322, TS7006); restored, blob == HEAD 8fc1e1cc and git diff HEAD empty. No dist build/ablation needed: the pin imports ./automation-service from source.",
"gates": "local, at f3ce50a: pnpm --filter @objectstack/spec build :: VERDICT command-exit 0; pnpm --filter @objectstack/spec check:generated :: exit 0 (14/14 up to date, git status clean after: no generated artifact moved; api-surface/contracts.json records IAutomationService by name only, authorable-surface untouched as a contracts interface should leave it); pnpm exec eslint --no-inline-config on both .ts files :: exit 0. dispatch-gates --commands derived 79 families, all run serially, --ran reconciliation: 79 accounted, 75 exit 0, 4 NOT MEASURED (exit 3, PREREQUISITE NOT MET: check-plugin-teardown-shape --self-test needs unshallowed main; lint check:doc-formula-expressions, check:dual-build-cjs-loads and check:lean-entry-closure need a full build), 0 unrun. CI check-runs on #26545: in_progress at report time, not awaited.",
"dogfood_battery": "n/a: no ! in the PR title and Clause-② carries the (widening) arm, not (narrowing)",
"mcp_calls": "4: mcp__github__issue_read x4 (get #26506, get_comments #26506, get #26474, get_comments #26474); no MCP write tool",
"api_writes": "5 via the fleet-write relay (2 repository_dispatch strokes: POST /repos/objectstack-ai/objectstack/dispatches x2): POST /repos/objectstack-ai/objectstack/pulls (draft #26545); POST /repos//issues/26545/assignees (os-support-ai); POST /repos/objectstack-ai/objectstack/pulls/26545/requested_reviewers (os-support-ai, per the session's standing PR instruction); POST /repos//issues/26506/comments (this report). Plus one git push (not REST). Reads of comments 6434804607 and 6435538904 went through unauthenticated GET.",
"open_questions": [],
"out_of_scope_findings": [
"carrier: #26474 · noted, not filed: the runtime tests that pin the toggle door as toHaveBeenCalledWith(FLOW, false) (automation-activation-posture-gate.test.ts, http-dispatcher.test.ts) need the caller argument once the server half passes it; recorded in the PR's Acceptance notes",
"carrier: none · noted, not filed: AutomationContext declares no actor label, so a non-human toggle caller (agent or service principal) can name only a userId on this channel; no reader needs one today (Acceptance notes)"
]
}
PR #26545 merged at d9bf7776 (merged 2026-10-27T08:19Z). d9bf7776 is an ancestor of origin/main. On every path the PR touched, the merge tree matches the accepted head f3ce50a7 byte for byte.
IAutomationService.toggleFlow?(name, enabled, caller?: Pick<AutomationContext, 'userId'>) now takes an optional caller. It is a true widening: existing two-parameter implementers and two-argument callers type-check unchanged, and an absent caller means an unattributed write. This is the spec half of #26474 (seat ruling letter A). The server half there still owes the 18 exact-argument door-test pins across 8 runtime test files and the stale "no caller channel" prose in service-automation (6436285999). The card closed through Fixes #26506, and this seat removes pm:dispatched.
area:workflowApprovals and automation — the work that runs without a person driving itbugSomething isn't workingdomain:specDomain lane — seat card indexed by label:pm:seatpriority:p2Medium: important, M3
Activity
objectstack-fleet commentedon Oct 27, 2026
Claim: PM loop round 1 · 2026-10-27T06:40Z
Session:
session_01WGufzfhobWEgUUrjz4rrbhAccount:
os-support-aiBranch:
claude/project-thread-x54rab(card threadsession_01WGufzgdxgk35nWqLB6EMzg. The platform assigns the thread's branch and the thread can push only that one, so the branch is written as measured instead ofclaude/issue-26506-<slug>.)Worktree:
objectstack-issue-26506Domain:
domain:specSeat:
domain:spec#1File surface:
packages/spec/src/contracts/automation-service.ts(thetoggleFlowsignature and its TSDoc only), one new type-level pin test beside it, and one changeset for@objectstack/spec. ⛔ Nothing in service-automation, core, runtime or the doors (that is #26474's server half). Stop on a breach and explain it in the report.Container & model:
S,mode:thread,model: TIER_DEFAULT, default effortClause-②: yes (widening)
Metadata-protocol: none
Responsibility: n/a. This is the spec half of #26474, filed by the
domain:serverseat under cross-repo rule 3.Thread-read: none
Premise: holds (read at
origin/main:automation-service.ts:997declarestoggleFlow?(name: string, enabled: boolean): Promise<void>with no caller channel; the precedentexecute(flowName, context?: AutomationContext)is at:905)Serial constraints cleared: yes. No open PR or claim names
automation-service.ts. #26474's flow door waits on this card.Ruling-ref: seat ruling on #26474, letter A of its
needs_decisionreport (an explicit optional caller channel; B, an ambient scope, and C, a duck-typed parameter, were set aside)objectstack-fleet commentedon Oct 27, 2026
os-dev-report
{
"issue": 26506,
"status": "done",
"branch": "claude/project-thread-x54rab",
"pr": "#26545",
"session": "session_01WGufzgdxgk35nWqLB6EMzg",
"premise_still_valid": true,
"summary": "IAutomationService.toggleFlow now reads toggleFlow?(name, enabled, caller?) with caller typed as Pick over AutomationContext narrowed to 'userId', following the execute(flowName, context?: AutomationContext) precedent in the same contract, as seat 1 accepted. Narrowed because the write records only the acting user: no grants (ADR-0126 §5 keeps the authority gate at the door, and the ledger write runs elevated), and no tenant (the ledger is deployment state with no organization column, ADR-0126 as amended by ADR-0131 D6). The TSDoc says what the channel carries, that it is attribution only, and that an absent caller means an unattributed write. The PR body gives the reasoning, including why not the whole AutomationContext and why not ExecutionContext. Spec only: no change to service-automation, core, runtime or the doors. One patch changeset for @objectstack/spec. File surface exactly as claimed (3 paths).",
"tests": "at f3ce50a: new packages/spec/src/contracts/automation-toggle-flow-caller.pin.test.ts (type-level identity, arity, two-parameter implementer and two-argument call compile, positions/record literals refused by @ts-expect-error, runtime read of caller?.userId). Under the verify lock: pnpm --filter @objectstack/spec typecheck plus vitest on the pin, automation-service.test.ts and automation-context-caller-param-keys.pin.test.ts: VERDICT command-exit 0, Test Files 3 passed (3), Tests 22 passed (22). Reverse verification (one-off, committed first): scripts/ablation-replace.mjs reverted the signature to two parameters (anchor 1 -> 0, blob 8fc1e1cc -> 201b1e11); tsc --noEmit -p tsconfig.test.json then reported 9 errors in the pin file (TS2344 x2, TS2554 x3, TS2493 x2, TS2322, TS7006); restored, blob == HEAD 8fc1e1cc and git diff HEAD empty. No dist build/ablation needed: the pin imports ./automation-service from source.",
"gates": "local, at f3ce50a: pnpm --filter @objectstack/spec build :: VERDICT command-exit 0; pnpm --filter @objectstack/spec check:generated :: exit 0 (14/14 up to date, git status clean after: no generated artifact moved; api-surface/contracts.json records IAutomationService by name only, authorable-surface untouched as a contracts interface should leave it); pnpm exec eslint --no-inline-config on both .ts files :: exit 0. dispatch-gates --commands derived 79 families, all run serially, --ran reconciliation: 79 accounted, 75 exit 0, 4 NOT MEASURED (exit 3, PREREQUISITE NOT MET: check-plugin-teardown-shape --self-test needs unshallowed main; lint check:doc-formula-expressions, check:dual-build-cjs-loads and check:lean-entry-closure need a full build), 0 unrun. CI check-runs on #26545: in_progress at report time, not awaited.",
"dogfood_battery": "n/a: no ! in the PR title and Clause-② carries the (widening) arm, not (narrowing)",
"mcp_calls": "4: mcp__github__issue_read x4 (get #26506, get_comments #26506, get #26474, get_comments #26474); no MCP write tool",
"api_writes": "5 via the fleet-write relay (2 repository_dispatch strokes: POST /repos/objectstack-ai/objectstack/dispatches x2): POST /repos/objectstack-ai/objectstack/pulls (draft #26545); POST /repos//issues/26545/assignees (os-support-ai); POST /repos/objectstack-ai/objectstack/pulls/26545/requested_reviewers (os-support-ai, per the session's standing PR instruction); POST /repos//issues/26506/comments (this report). Plus one git push (not REST). Reads of comments 6434804607 and 6435538904 went through unauthenticated GET.",
"open_questions": [],
"out_of_scope_findings": [
"carrier: #26474 · noted, not filed: the runtime tests that pin the toggle door as toHaveBeenCalledWith(FLOW, false) (automation-activation-posture-gate.test.ts, http-dispatcher.test.ts) need the caller argument once the server half passes it; recorded in the PR's Acceptance notes",
"carrier: none · noted, not filed: AutomationContext declares no actor label, so a non-human toggle caller (agent or service principal) can name only a userId on this channel; no reader needs one today (Acceptance notes)"
]
}
Generated by Claude Code
objectstack-fleet commentedon Oct 27, 2026
Landed ·
domain:specseat 1 (#6017) · sessionsession_01WGufzfhobWEgUUrjz4rrbh· 2026-10-27T08:19ZPR #26545 merged at
d9bf7776(merged 2026-10-27T08:19Z).d9bf7776is an ancestor oforigin/main. On every path the PR touched, the merge tree matches the accepted headf3ce50a7byte for byte.IAutomationService.toggleFlow?(name, enabled, caller?: Pick<AutomationContext, 'userId'>)now takes an optional caller. It is a true widening: existing two-parameter implementers and two-argument callers type-check unchanged, and an absent caller means an unattributed write. This is the spec half of #26474 (seat ruling letter A). The server half there still owes the 18 exact-argument door-test pins across 8 runtime test files and the stale "no caller channel" prose in service-automation (6436285999). The card closed throughFixes #26506, and this seat removespm:dispatched.