IT168 — task-graph security envelopes, saga compensation claims, the A2A store's row
boundary, and live dispatcher taint gating with compensation, against a live database (deterministic,
mutating, server transport).
TGS1: a submitted graph's parent and every child carry the submitting run's envelope in
Task.SecurityEnvelope, and an edit to it on an existing row is refused (MJTaskEntityServer).
TGS2: two compensation rows for one forward step cannot both exist — CompensatesTaskID's unique
index lets exactly one of two concurrent inserts land, which is what makes materializing a saga
compensation a claim across dispatchers.
TGS3: the durable A2A task store reads a task-graph step's ID as "not found" and will not write over
or cancel it, while an A2A task saves under the A2A Task type and reads back.
TGS4: runs a small graph through the real dispatcher on the test DB, asserting that taint from an
untrusted action propagates through a Decision step to gate a downstream action, failing the graph
and triggering saga compensation of completed compensatable steps. The gate itself is the check's
stub action runner, not MJServer's TaskGraphActionRunner (see checkDispatcherTaintGateAndCompensation).
TGS5: the real gate. A tainted one-step graph whose step is Send Single Message (shipped with
Config.disallowWhenTainted) runs through the real dispatcher configured with MJServer's real
TaskGraphActionRunner, which refuses the step before the action runs (see checkRealRunnerRefusesTaintedEgress).
TGS6: a person's review clears taint in a real graph, where every Human step is assigned to the submitter
the graph runs as, and server code acting as the submitter can neither complete a Human step nor rewrite what
the graph trusts (see checkPersonsReviewClearsTaint).
TGS7: the same through the step's request: only the dispatcher raises one, the submitter's own answer clears
taint, and server code's answer settles the step but clears nothing (see checkServerAnsweredRequestClearsNothing).
TGS8: a step completed outside the dispatcher before the fetch feeding it has finished leaves its next step
tainted (see checkEarlySettleClearsNothing).
TGS9: only the task-graph service creates a workflow, adds a step to one, or changes its edges; ordinary tasks are
unaffected (see checkOnlyTheServiceMakesWorkflows).
TGS10: the REST entity handler, which validates before it saves, renames an ordinary subtask and still cannot rename
a workflow step or create a workflow (see checkRestEditsOrdinaryTasks).
Fixtures: one start-paused Human-only graph (so no dispatcher picks it up) and the rows the checks
create, all removed in teardown, rows that reference another first.
Fileoverview
IT168 — task-graph security envelopes, saga compensation claims, the A2A store's row boundary, and live dispatcher taint gating with compensation, against a live database (deterministic, mutating, server transport).
Task.SecurityEnvelope, and an edit to it on an existing row is refused (MJTaskEntityServer).CompensatesTaskID's unique index lets exactly one of two concurrent inserts land, which is what makes materializing a saga compensation a claim across dispatchers.A2A Tasktype and reads back.TaskGraphActionRunner(see checkDispatcherTaintGateAndCompensation).Send Single Message(shipped withConfig.disallowWhenTainted) runs through the real dispatcher configured with MJServer's realTaskGraphActionRunner, which refuses the step before the action runs (see checkRealRunnerRefusesTaintedEgress).Fixtures: one start-paused Human-only graph (so no dispatcher picks it up) and the rows the checks create, all removed in teardown, rows that reference another first.