Skip to content

Workflows: Null conditions, node id, trigger registry, step outputs, compensation and executor (closes #1118) - #1136

Merged
arnelirobles merged 13 commits into
release/5.0.0from
bugfix/1118-workflow-engine
Oct 13, 2026
Merged

arnelirobles merged 13 commits into
release/5.0.0from
bugfix/1118-workflow-engine

Conversation

@arnelirobles

Copy link
Copy Markdown
Contributor

What changed and why

Batch C6 of the 5.0 plan: the workflow engine. One commit per ticket, then a merge of release/5.0.0 and two commits for the review findings.

Null conditions (#1118). The run queue and the engine read Conditions and Content.Data without a
null check, so a workflow stored with conditions: null threw and took every other workflow on the
event with it. Both read null as empty, a save stores {}, and the response never serves null. A
workflow stored with actions: null also stopped the credential pass and failed the list with 500;
both are guarded. Workflows that silently never ran will now run, as the changelog says.

Short host names (#1127). The runner's node id was cut to 40 characters with a range that threw on a
short machine name and dropped the random part on a long one. The name is cut now, the guid never is.

Trigger registry (#908). Modules name triggers in IBarakoModule.ConfigureWorkflowTriggers and fire
them with IWorkflowTriggers.FireAsync, which queues runs in the caller's tenant only and refuses
core triggers and unregistered names. The validator checks against the registry. IWorkflowEngine
is [Obsolete], removed in 6.0. Deleted was already emitted (4.x, QueueDeletedAsync), and saving
on an unregistered trigger was already 400, so no request that used to save is refused by this item.

Action outputs (#575). WorkflowActionResult.Success(outputs), a RunAsync(WorkflowContext) default
overload, a per-action capture allowlist (D37), kept outputs on the attempt and served as outputs,
and {{actions.N.name}} read only from the workflow's own templates: a reference is swapped for a
per-resolve token before the entry's placeholders are resolved and the output put back after, so
neither an output nor an entry value is read as a placeholder. A missing output fails the reading
action, retryably.

Compensation (#577). compensate per action; a run rolls back when a Halt action fails for good in
a workflow that declares any compensation, or on POST /api/workflow-runs/{id}/abandon
(retry_workflow_actions). Compensations run last first with their own key and the action's outputs;
attempt and run show compensation, with NotDeclared and Incomplete for what was not undone. A
workflow that declares none halts exactly as before.

Executor (#698). executor on a workflow, null for the built-in runner; the runner claims only its
own runs; routing and invariants internal and documented.

Breaking, HTTP surface: saving a workflow now refuses a malformed capture, compensate or
executor, fields that were ignored before. ApiContract.Version moves 7 to 8; the delivery number
does not move. Package surface: additive only (IWorkflowTriggers, IModuleWorkflowTriggers,
IBarakoModule.ConfigureWorkflowTriggers with a default, WorkflowContext, the new model members);
IWorkflowEngine obsolete. BarakoCMS.Abstractions goes to 5.0.0.

After review, merged with release/5.0.0. The branch was 3 commits behind (#1128 workflow PUT,
#1132 key ring, #631 method-length gate). Merged, conflicts in WorkflowEndpoints.cs and
docs/workflow-runs.md resolved, and the review findings closed:

  • PUT /api/workflows/{id} keeps or refuses a compensation's credentials on the same rule as an
    action's, so a console round trip no longer drops a compensation's Secret. It also stores null
    conditions as none (Conditions ??= [] moved into WorkflowSave.Normalise, shared by create and PUT).
  • The key ring re-wrap reaches compensation credentials, and one no key opens is counted and logged
    as compensate.<name>.
  • Security: an entry value holding {{actions.N.name}} no longer pulls in another action's captured
    output, and cannot make an action fail or start a rollback.
  • A workflow stored with actions: null, or an action with parameters: null, no longer throws in
    the queue and drops the other workflows' runs on the same event.
  • Abandon refuses a run that finished with every action succeeded (409).
  • The method-length check passes on the merged tree: refusals, success outcome, content load and
    parameter stamping, capture validation, executor validation and the save warnings are their own
    methods. No --update; three baseline numbers went down.

Fixes #1118
Fixes #1127
Fixes #908
Fixes #575
Fixes #577
Fixes #698

How to test

dotnet restore --locked-mode && dotnet build -c Release --no-restore
dotnet run --project BarakoCMS.Tests --no-build -c Release -- \
  -class BarakoCMS.Tests.Features.Workflows.WorkflowOutputTests \
  -class BarakoCMS.Tests.Features.Workflows.WorkflowUpdateTests \
  -class BarakoCMS.Tests.Features.Workflows.WorkflowCompensationTests \
  -class BarakoCMS.Tests.Features.Workflows.WorkflowNullConditionsTests \
  -class BarakoCMS.Tests.SecretKeyRingTests

Which test fails without this change

The review fixes were each shown red before the fix: with the tests written and the production
change not yet made, 7 tests failed for the expected reason (entry text substituted with a captured
output; compensation Secret dropped on a PUT round trip, and a changed compensation saved instead of
refused; both compensation re-wrap tests; NullReferenceException in WorkflowRunQueue.NewRun; abandon
of a finished run returned 200). An_update_with_null_conditions_is_stored_with_none was shown red by
moving Conditions ??= [] back out of WorkflowSave.Normalise into create only. The PUT credential
hunk is not bound below because holding it out alone does not build (the apply loop is a second hunk);
its two tests in WorkflowUpdateTests are the red-first evidence.

- test: BarakoCMS.Tests.Features.Workflows.WorkflowNullConditionsTests
  breaks: barakoCMS/Features/Workflows/WorkflowRunQueue.cs "foreach (var condition in workflow.Conditions ?? [])"
- test: BarakoCMS.Tests.Features.Workflows.WorkflowNullConditionsTests
  breaks: barakoCMS/Features/Workflows/WorkflowEngine.cs "foreach (var condition in workflow.Conditions ?? [])"
- test: BarakoCMS.Tests.Features.Workflows.WorkflowNullConditionsTests
  breaks: barakoCMS/Features/Workflows/WorkflowEndpoints.cs "workflow.Conditions ??= [];"
- test: BarakoCMS.Tests.Features.Workflows.WorkflowNullConditionsTests
  breaks: barakoCMS/Features/Workflows/Actions/WebhookSigning.cs "if (workflow.Actions is null)"
- test: BarakoCMS.Tests.Features.Workflows.WorkflowTriggerRegistryTests
  breaks: barakoCMS/Infrastructure/Services/WorkflowSchemaValidator.cs "!string.IsNullOrWhiteSpace(workflow.TriggerEvent) && !_triggers.IsRegistered"
- test: BarakoCMS.Tests.Features.Workflows.WorkflowOutputTests
  breaks: barakoCMS/Features/Workflows/WorkflowRunner.cs "ActionOutputs.Mask(actionType, parameters)"
- test: BarakoCMS.Tests.Features.Workflows.WorkflowOutputTests
  breaks: barakoCMS/Infrastructure/Services/TemplateExpression.cs "barakoCMS.Features.Workflows.ActionOutputs.IsReference(hole.Name)"
- test: BarakoCMS.Tests.Features.Workflows.WorkflowCompensationTests
  breaks: barakoCMS/Features/Workflows/WorkflowRunner.cs "ApplyToRun(latest, attempt, outcome);"
- test: BarakoCMS.Tests.Features.Workflows.WorkflowCompensationTests
  breaks: BarakoCMS.Abstractions/Models/WorkflowRun.cs "var stopped = StopCompensations(now);"
- test: BarakoCMS.Tests.Features.Workflows.WorkflowCompensationTests
  breaks: barakoCMS/Features/WorkflowRuns/Endpoints.cs "/api/workflow-runs/{id}/abandon"
- test: BarakoCMS.Tests.Features.Workflows.WorkflowExecutorTests
  breaks: barakoCMS/Features/Workflows/WorkflowRunner.cs "WorkflowExecutors.DueFor(WorkflowExecutors.BuiltIn, now);"
- test: BarakoCMS.Tests.Features.Workflows.WorkflowNullConditionsTests
  breaks: barakoCMS/Features/Workflows/WorkflowRunQueue.cs "var actions = workflow.Actions ?? [];"
- test: BarakoCMS.Tests.SecretKeyRingTests
  breaks: barakoCMS/Features/Workflows/Actions/WebhookSigning.cs "compensate.{name}"
- test: BarakoCMS.Tests.Features.Workflows.WorkflowCompensationTests
  breaks: barakoCMS/Features/WorkflowRuns/Endpoints.cs "run.Status == RunStatus.Succeeded ? "
- test: BarakoCMS.Tests.ContractSurfaceVersionTests
  breaks: barakoCMS/Features/Monitoring/Meta/ApiContract.cs "public const int Version = 8;"
- untested: barakoCMS/Features/Workflows/WorkflowRunner.cs "internal static string NodeId(string? machineName)"
  why: the hunk adds the NodeId method WorkflowRunnerNodeIdTests calls, so held out the tests do not build. Shown red by extracting NodeId with the old body first: 7 of 8 failed
- untested: BarakoCMS.Abstractions/Features/Workflows/IWorkflowAction.cs #1
  why: the runner calls the new overload, so held out the tree does not build. WorkflowOutputTests and WorkflowCompensationTests run every action through it
- untested: BarakoCMS.Abstractions/Features/Workflows/IWorkflowEngine.cs #1
  why: an attribute and a doc comment, no behaviour. PublicSurfaceTests and the build's CS0618 cover it
- untested: BarakoCMS.Abstractions/Features/Workflows/WorkflowActionResult.cs #1
  why: Outputs is read by the runner, so held out the tree does not build. WorkflowOutputTests covers it
- untested: BarakoCMS.Abstractions/Models/WorkflowDefinition.cs #1
  why: new stored fields the core reads, so held out the tree does not build. WorkflowOutputTests, WorkflowCompensationTests and WorkflowExecutorTests cover them
- untested: BarakoCMS.Abstractions/Modules/IBarakoModule.cs #1
  why: a member with a default the registry calls, so held out the tree does not build. WorkflowTriggerRegistryTests and ModuleWorkflowTriggerTests cover it
- untested: barakoCMS/Extensions/ServiceCollectionExtensions.cs #1
  why: registrations; held out, every workflow route fails to resolve its validator. ModuleWorkflowTriggerTests and WorkflowExecutorTests run through them
- untested: barakoCMS/Features/Workflows/CreateWorkflowRequest.cs #1
  why: the property and its copy are two hunks that reference each other, so either held out alone does not build. CreateWorkflowRequestTests and WorkflowExecutorTests pin the field
- untested: barakoCMS/Features/Workflows/ValidateWorkflow/Endpoint.cs #1
  why: as CreateWorkflowRequest.cs. CreateWorkflowRequestTests pins that validate reads what create reads
- untested: barakoCMS/Features/Workflows/WorkflowResponse.cs #1
  why: response fields read by WorkflowOutputTests, WorkflowCompensationTests and WorkflowExecutorTests; the conditions and actions guards are in the hunks WorkflowNullConditionsTests reaches through the list
- untested: barakoCMS/Infrastructure/Services/TemplateVariableExtractor.cs #1
  why: Encode made internal for ActionOutputs, so held out the tree does not build
- untested: barakoCMS/TypeForwards.cs #1
  why: a pragma around an existing forwarder, no behaviour

Gates on the final tree: dotnet restore --locked-mode 0; dotnet build -c Release --no-restore
0 with 4523 warnings, the same count and no new message against the merge of release/5.0.0; 32
classes in one process (the touched workflow classes plus TenantProfileWriteTests,
SwitchTenantRequestTests, MetaEndpointTests, ContentLifecycleTests, PublicSurfaceTests,
ArchitectureTests, OpenApiTagTests, SuiteCompositionTests, SystemCapabilitiesTests) 425 passed, 0
failed. scripts/preflight.sh exits 1 at the dash and banned-word scan only because
/root/.claude/CLAUDE.md is missing in the agent container; every step before it passed (locked
restore, build, the 32 classes, holdout fixtures, holdout with 15 bindings, changelog fragments,
module versions, upgrade plan, migrations, method length, pinned versions, quickstart backup). Added
lines were checked by hand for characters at or above U+2000: none.

Checklist

  • A test covers this, and I confirmed it fails without the change
  • dotnet build is clean, with no new warnings
  • Public API changes keep existing consumers compiling, or the break is called out below
  • Docs updated if behaviour or configuration changed

Anything reviewers should know

Part of the 5.0 plan (#1125). Targets release/5.0.0, not master. Reviewed by a separate agent; its
findings were fixed by another agent, not the author.

Breaking, HTTP: ApiContract.Version moves 7 to 8 (capture, compensate and executor now refuse
values that were ignored). Other 5.0 batches may also move it to 8; that is one move for the release.
Abandon refusing a finished, all-succeeded run is a change to a route this PR adds, so it breaks no
released client.

Left open:

  • CLAUDE.md section 6 should list WorkflowContext with IWorkflowAction and WorkflowActionResult
    (it is in PublicSurfaceTests.Allowed). Agents do not edit CLAUDE.md; the owner should add it.
  • DECISIONS.md D37 may collide with another 5.0 batch's number.
  • Follow-ups: named steps ({{steps.name.x}}) and query/calculate actions from the An action cannot produce a value, so a workflow is a list of side effects and not a chain #575 comment; a
    GET of registered triggers for the console; outputs and compensation on the obsolete
    IWorkflowEngine path.
  • needs-review.sh diffs against origin/master, so on this branch it also lists everything already
    on release/5.0.0. The lines this PR is responsible for: Configure() in WorkflowRuns/Endpoints.cs
    and WorkflowEndpoints.cs; DI wiring in ServiceCollectionExtensions.cs; secret handling in
    WebhookSigning.cs, WorkflowEndpoints.cs, WorkflowRunQueue.cs, WorkflowRunner.cs,
    ActionOutputs.cs, WorkflowResponse.cs, WorkflowTriggerRegistry.cs, IWorkflowTriggers.cs,
    IWorkflowAction.cs; background/concurrency in WorkflowRun.cs, WorkflowRunner.cs,
    WorkflowRuns/Endpoints.cs; destructive delete in WorkflowRunner.cs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01A1zCYm4uzgoS7C1T9yziZH


Generated by Claude Code

claude added 12 commits October 12, 2026 11:57
Output references are read from the workflow's own templates, so an entry
value holding {{actions.N.name}} is sent as text. PUT keeps or refuses a
compensation's credentials on the action rule, and the key ring re-wrap
reaches compensations. PUT stores null conditions as none. A null actions
list or null parameters no longer drop the other runs on an event. Abandon
refuses a run that finished with every action succeeded. Long methods are
split so the method-length check passes on the merged tree.

Copy link
Copy Markdown
Contributor Author

Branch / Backend (.NET) failed on 2d59b97 with one test: CollectionPushTests.A_body_over_the_push_size_limit_is_413, HttpRequestException: Error while copying content to a stream / Broken pipe.

Not this PR's: the diff touches no collection push code, request size limit or Kestrel setting, and the same test passes on the current release/5.0.0 head. The test sends an oversized body with Expect: 100-continue; HttpClient stops waiting for the server's answer after its default 1 s Expect100ContinueTimeout and starts sending, so on a slow runner Kestrel can answer 413 and close the connection while the client is still writing, and the client sees a broken pipe instead of the 413. No fix exists yet; the robust version gives that test a client whose SocketsHttpHandler.Expect100ContinueTimeout is long enough that the body is never sent before the 413 arrives.

Re-ran the failed job once to confirm.


Generated by Claude Code

@arnelirobles
arnelirobles merged commit dff9e20 into release/5.0.0 Oct 13, 2026
15 checks passed
@arnelirobles
arnelirobles deleted the bugfix/1118-workflow-engine branch October 13, 2026 04:33
arnelirobles added a commit that referenced this pull request Oct 14, 2026
…, blocks and field change jobs, workflow compensation, Marten 9.49 (#1150)

* CI: OpenAPI contract gate, architecture tests, method-length ratchet, performance budget and report (closes #631) (#1129)

* Diff the served OpenAPI document against a reviewed baseline in CI

* Add architecture tests for the CLAUDE.md layout rules

* Stop methods over 70 lines from growing

* Budget image size, memory at rest, startup and delivery latency per pull request

* Measure methods with tuple return types in the length ratchet

* Tighten the OpenAPI and budget gates after review

* Report where the API's memory, threads and latency go, with ranked follow-ups

* Do not measure an object initializer inside a call as a method

* Prove the contract version check, and correct the performance report

---------

Co-authored-by: Claude <noreply@anthropic.com>

* Console: API asks for barakoBrew, counts, metrics window, tenant roles, workflow PUT, analytics window (closes #1120) (#1128)

* Report the legacy role fallback on GET /api/me

* Add permission-aware content status counts

* Add a 24 hour window, p95, cache hits and uptime to the metrics summary

* Return the caller's roles per tenant on GET /api/me/tenants

* Add PUT /api/workflows/{id}

* Take from and to on the analytics routes, and return the previous series

* Add the workflow PUT to the role and capability gate inventories

* Refresh the OpenAPI baseline with the console API additions

---------

Co-authored-by: Claude <noreply@anthropic.com>

* Security: Keep stored secrets under a key ring, and add a throttled public lookup (closes #900) (#1132)

* Keep stored secrets under a key ring with ids, re-wrapped at startup (#900)

* Answer a public lookup by reference plus an identifier, throttled (#804)

* Refuse an empty key ring entry or a CurrentKey with no keys, and document a rolling rotation (#900)

* Set the per-reference lookup Retry-After from its window (#804)

* Refresh the OpenAPI baseline with the key ring routes

* Split the key reading and prefixed-value migration out of two long methods

---------

Co-authored-by: Claude <noreply@anthropic.com>

* Diagnostics, FeatureFlags: incidents view, Sentry-compatible forwarder and OFREP evaluation (closes #893) (#1131)

* Add an incidents view across failure sources, grouped and redacted on the server

* Forward captured browser errors to a Sentry-compatible receiver when configured

* Serve OpenFeature remote evaluation beside the feature flags route

* Bump BarakoCMS.Abstractions for the incident source contract

* Close redaction gaps and bound the incidents view's work after review

* Keep OFREP reasons neutral and accept weak or listed ETags

* List the OFREP flag's Key as a flag name in the replay rules

* Refresh the OpenAPI baseline with the incidents and OFREP routes

---------

Co-authored-by: Claude <noreply@anthropic.com>

* Files: per-tenant storage, image sizes, S3 ACL default off, offsite backup copy (closes #781) (#1130)

* Default Files:S3:UsePublicReadAcl to false

* Store and return image width and height, with variants reporting their own

* Let a tenant choose and test file storage through the API

* Copy the nightly backup to S3-compatible storage when configured

* Declare manage_storage in the Files module and name the 6.0 removal

* Refresh the OpenAPI baseline with the storage settings routes

* Split the scan and variant storing out of three long Files methods

* Give the refused offsite run its own second so its archive is not overwritten

---------

Co-authored-by: Claude <noreply@anthropic.com>

* Audit: Record sensitive reads, one-query public lists, per-tenant site origin (closes #916) (#1133)

* Audit reads of sensitive fields and share link redemptions (#916)

* Read the public list page and total in one query, add changedSince (#508)

* Link feeds, sitemaps and links.public to each tenant's own site (#923)

* Audit history and rollback reads, record the route template and API key (#916)

* Tag the feed and sitemap with the site type, note the origin precedence (#923)

* Point removals at webhooks, not the change feed, and test an offset changedSince (#508)

* Keep the changed endpoints inside the method-length ratchet

* Pin the workflow variable count at sixteen for links.public (#923)

* Split the variable list without reindenting it

* Add changedSince to the OpenAPI baseline (#508)

---------

Co-authored-by: Claude <noreply@anthropic.com>

* Content types: Field types, site schema and blocks (closes #928, #924, #929) (#1134)

* Let an array field declare the type of its items (refs #928)

* Check json fields against a declared schema, make site Mode a choice, refuse undeclared fields (refs #924)

* Declare a parent field on a type and read the Pages tree per tenant (closes #929)

* Add a blocks field type checked against the tenant's registered block schema (refs #926)

* Keep block presets and data bindings as tenant data with CRUD (refs #926)

* Return each bound block's entries from page resolve (refs #926)

* Brace the single-statement ifs in the new field type code

* Ship the block and page settings tables as migrations, and close the review findings on blocks and trees

* Fix tests the undeclared-field refusal broke, and declare the Pages capability

* Declare the Pages capability defaults and seed them

---------

Co-authored-by: Claude <noreply@anthropic.com>

* Config: one export, plan and apply engine for every configurable document, and Seed:File (closes #921) (#1140)

* Config: export, plan and apply engine with content type and role sections (refs #921)

* Config: workflow, permission rule, connector and site settings sections (refs #921)

* Config: forms and contents sections, Portability bundles through apply, Portability obsolete (refs #921)

* Seeding: apply the config document Seed:File names on first start (refs #905)

* Config: compare workflow branch children without response flags so a Conditional round-trips (refs #921)

* Config: answer 409 when a write lands before the commit, and clear caches whatever happens (refs #921)

* Config: name other tenants in a rule removal note only to a caller allowed to write the rules (refs #921)

* Audit: chain an entry off one the session has not saved yet (refs #921)

* Seeding: say a skipped destructive change is a likely cause, and document what a skip covers (refs #905)

* Config: stage writable sections past an unwritable one, keep deferred appends internal, bound the contents export query (refs #921)

* Workflows: brace the early return in the flag-free redaction (refs #921)

* Keep config documents out of idempotent replay and name Portability's removal version in place (refs #921)

---------

Co-authored-by: Claude <noreply@anthropic.com>

* Build: Marten 9.49 with one 5.0 schema step, upgrade check from 4.x, MIT modules, secret store sources, Alba and Aspire spikes (closes #1000) (#1135)

* Move Marten to 9.49.0 and JasperFx to 2.84.1 with one 5.0 schema step

The new Marten replaces mt_quick_append_events; migrations/5.0.0 carries the
db-patch output against a 4.9.0 database and its rollback. Drops the Dependabot
hold on both packages.

* Start the upgrade check from 4.9.0 and 4.1.0, not 3.21.0

The job is renamed Upgrade from 4.x. A 3.x database upgrades to 4.9 first,
which the new docs/upgrading-to-5.0.md says.

* License the modules, Testing, Suite and template under MIT

The core and the contract package stay MPL-2.0 (D24). The licence is set by
rule in Directory.Build.props and checked by scripts/check-licences.sh. CLA.md
names the licence per location with a patent grant for MIT contributions, and
THIRD-PARTY-NOTICES.md says what ImageSharp's licence meant for Files 4.4.0.

* Add BarakoCMS.Secrets.Aws, a configuration source over AWS Secrets Manager

Maps configuration keys to secrets under Secrets:Aws:Map, authenticates as the
instance role, and stops startup naming a secret it cannot read.

* Add BarakoCMS.Secrets.Gcp and load both secret stores in the Suite

The Google Secret Manager source mirrors the AWS one. The Suite host adds both
before AddBarakoCMS; each adds nothing until a secret is mapped.

* Pilot Alba on ApiContractVersionHeaderTests and write up the result

The class runs as Alba scenarios on a host built from the fixture's own
configuration. docs/internal/alba-pilot.md compares the two styles and
recommends dropping Alba.

* Spike an Aspire AppHost for the local stack and write up the findings

aspire/ is not in the solution and nothing shipped references it.
docs/internal/aspire-spike.md has the timings, the compose diff and the
recommendation.

* Say the 5.0 Marten file exists for the schema check, not a bug barakoCMS hit

barakoCMS appends in Marten's Rich mode and never calls mt_quick_append_events.

* Release the secrets packages and test their store adapters

Adds both to PACKAGE_PROJECTS with a check that no packable project is left
off, tests the AWS and Google adapters against stub clients, refuses a binary
AWS secret, and pins the Suite's source order.

* Tighten the licence check and align the CLA patent clause with Apache-2.0

The Testing and Templates exception ends at their 5.x version, an unevaluable
project fails, and aspire/ is not evaluated.

* Check the 4.6.0 and 5.0.0 files together leave the function Marten builds

* Allow THIRD-PARTY-NOTICES.md at the repository root

* Give the AWS secrets host test a live resolver of its own

* Compare the first core rollback, now that a module adds a 5.0.0 file

* Run the upgrade-check self-tests from supported 4.x starts

The HR role cases start from 4.1.0, the default start is 4.9.0, and a 3.x
start is asserted to be refused before anything runs.

* Check every 5.0.0 core file and its rollback order, now there are three

* Revert "Pilot Alba on ApiContractVersionHeaderTests and write up the result"

This reverts commit 773f46a.

* Keep the Alba write-up, marked as dropped

---------

Co-authored-by: Claude <noreply@anthropic.com>

* Workflows: Null conditions, node id, trigger registry, step outputs, compensation and executor (closes #1118) (#1136)

* Workflows: read null conditions as none and store none on save

* Workflows: build the runner node id for any machine name

* Workflows: let modules register and fire triggers, obsolete IWorkflowEngine

* Workflows: let an action return outputs a later action reads, kept by allowlist

* Workflows: undo the actions that succeeded when a run halts or is abandoned

* Workflows: let a workflow name its executor, with the built-in runner as the default

* Workflows: close the review findings on the merged branch

Output references are read from the workflow's own templates, so an entry
value holding {{actions.N.name}} is sent as text. PUT keeps or refuses a
compensation's credentials on the action rule, and the key ring re-wrap
reaches compensations. PUT stores null conditions as none. A null actions
list or null parameters no longer drop the other runs on an event. Abandon
refuses a run that finished with every action succeeded. Long methods are
split so the method-length check passes on the merged tree.

* Workflows: keep the trigger checks inline so the validator diff stays small

* List the abandon route in the gate inventories and accept it in the OpenAPI baseline

---------

Co-authored-by: Claude <noreply@anthropic.com>

* Give the over-the-limit Kestrel tests a client that waits for the 413 (#1144)

The default handler sends the body after one second without an answer, so a slow runner could see a broken pipe instead of the status.

Co-authored-by: Claude <noreply@anthropic.com>

* Content types: Field change jobs, dry run and numbering (closes #934, #584) (#1139)

* Change a field through one endpoint, and apply a rename by a resumable job (refs #934)

* Convert a field through a mapping and remove one, refusing a destructive change without the flag (refs #934)

* Rebuild a field's search text for a sensitivity change on the job runner (refs #934)

* Answer a dry run on content type and entry writes with the checks and a diff, storing nothing (refs #892)

* Number a content type's entries by a declared rule, add sequence and hi-lo strategies, and move Accounting onto the core allocator (closes #584)

* Ship the field change table as a migration (refs #934)

* Close the review findings on field changes, dry run and numbering

* Count the module migrations both branches added

* Treat a session that cannot query field changes as having none running

---------

Co-authored-by: Claude <noreply@anthropic.com>

* Tenants: Lifecycle status, sign-up and sign-in policy, tenant-owned roles (closes #894) (#1137)

* Give tenants a status and refuse a non-active tenant at resolution

* Add a per-tenant sign-up policy that registration, social sign-in and invitations read

* Let a tenant require MFA, limit sign-in methods and shorten sessions

* Give roles a tenant or platform owner, with a migration that keeps permissions

* Scope the roles routes and member role assignment to the caller's tenant

* Set Tenant.Status instead of the obsolete IsActive in tests, and tidy the batch's new code

* Bump Abstractions to 5.0.0 for the model changes

* Resolve VisibleToRoles names among the roles the writing tenant reaches

* Check the tenant's sign-in methods when a code is verified, not only when it is requested

* Join an Open tenant through social sign-in only with an account the sign-in created

* Refuse to delete a role a tenant names as its sign-up or MFA role

* Find a seeded role by name only among the deployment's roles

* Tell a paused tenant's status only to a token that names it, and document that an omitted status reactivates

* Split methods the batch grew past the length ratchet, and refresh its baseline

* Refresh the OpenAPI baseline with the tenant status, sign-up, sign-in and role owner fields

* List on /api/me/tenants only the roles that grant something in each tenant

* Keep the role list filter on /api/me/tenants in one hunk, and own the blueprint test's role by its tenant

* Set Tenant.Status in the public lookup tests

* Set Tenant.Status in the incidents and storage settings tests

* Add a rollback for role-tenancy.sql that restores the name index

Without it the rollback left 5.0's tenant and name index on mt_doc_roles,
so 4.x and 3.x refused to start under CreateOnly. Unchanged copies fold
back into their role, other roles sharing a name are renamed, and the
index on the name alone comes back.

* Build the Register endpoint in unit tests with the tenant-aware constructor

* Scope the config engine's roles and permission rules to the caller's tenant

* Set Tenant.Status in the seed file and the config test tenants

* Rename the seeded HR role in place in the admin contract test so it stays a platform role

* Add a rollback for tenant-status.sql, which changes nothing

* Make a role held globally a platform role in role-tenancy.sql

* Take only a platform role as a global role, and grant nothing from another tenant's role held globally

* Note a platform role change in the config plan, keep apply on the planned role, and cover the membership and seed paths

---------

Co-authored-by: Claude <noreply@anthropic.com>

* Content types: A field change reaches block bindings, and config apply follows the field routes' rules (closes #1145) (#1146)

* Keep block bindings and config apply in step with field changes

A rename renames the field in every binding of the type. A remove, and a
config apply dropping the field, answer 409 while a binding names it.
Config apply answers 409 while a field change runs on the type, and
refuses dropping a field the numbering rule or lookup names.

* Name config conflicts when a seed file is refused

* Pin the config seam's new Conflicts list, run seam test changes directly

---------

Co-authored-by: Claude <noreply@anthropic.com>

* Release 5.0.0: prepare versions, changelog and package licences (#1147)

* Release 5.0.0: versions, changelog, Testing and Templates licences

* Move the 5.0 removal deadlines to 6.0 and make the deadline test read every attribute form

* Give the OFREP tests their own rate-limit bucket and assert the evaluation reason (#1149)

Co-authored-by: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants