Projects, Workflows & Connections

Projects, workflows, and connections form the execution layer of your Loxtep data layer. Projects are bounded contexts where you build data products, workflows orchestrate multi-step data transformations, and connections bridge Loxtep to external systems.

Projects

A project is the execution boundary for a set of data products. It serves as the container for those products along with their workflows, schemas, and quality rules — a clean, owned scope even for a solo builder.

Choosing a project and domain

Start with one domain and one project unless a concrete boundary requires more:

DecisionUse it when
Reuse the projectOwnership, repository/deployment lifecycle, and runtime changes are shared.
New project in the same domainCode or execution needs isolation, but business vocabulary and semantic ownership remain shared.
New domainSemantic ownership, governance authority, or accountability differs.

A domain is not a folder for grouping repositories. It is a shared-meaning and governance boundary. Products may be shared between projects in the same domain at In Progress; sharing across domains requires Ready. When uncertain, reuse the existing domain and project and split only after a real boundary emerges.

Project Structure

Each project contains:

  • Data products — both source and consumer products owned within the project.
  • Workflows — the orchestration graphs that process data.
  • Connections — configured bridges to external systems.
  • Schemas — the structural contracts for data products.
  • Quality rules — validation constraints applied during processing.

Create a project with loxtep_workspace:

{
  "operation": "create_project",
  "name": "commerce-mesh",
  "description": "Commerce domain data products"
}

Choose the instance for a new project

The create_project operation (on the loxtep_workspace facade) and the SDK client.workspace.projects.create accept an optional instance_id. The value is the UUID of a live instance in this organization. Create stores that id on the project. A later update leaves the stored id unchanged. Studio's create dialog sends the instance selected in the app as instance_id. When no instance is selected, Studio omits the field.

A live instance has deleted_at null and a status other than deleted or deleting. Dedicated instances are managed or self-hosted. A detached instance (status detached) stays in that live set.

Send instance_id when the organization has two or more live dedicated instances. Omitting it then fails with status 409. error.details.code is ambiguous_instance. error.details.name is InstanceWorkspaceBucketError. error.details.organization_id is the organization. The message is Organization has <N> dedicated instances and the project workspace bucket is ambiguous. Refusing to fall back to the platform bucket. <N> is the number of live dedicated instances. Create inserts no project.

Omitting instance_id when the organization has one live dedicated instance, or none, stores no binding. The created project omits instance_id.

An instance_id that is not a live instance of this organization fails with status 404. error.details.code is target_instance_missing. error.details.name is InstanceWorkspaceBucketError. error.details.organization_id is the organization. The message is Instance <instance_id> is not a live instance for this organization. Refusing to fall back to the platform bucket. Create inserts no project. Sending a live instance id, including a live shared instance, stores that id. The created project includes instance_id.

An MCP create_project call that names the instance:

{
  "operation": "create_project",
  "name": "commerce-mesh",
  "instance_id": "<instance-uuid>"
}

MCP create_project returns error.details on the tool error. The tool text is the error message, with (URL: <request url>) appended when the tool recorded a request URL. Omitting instance_id when the organization has two or more live dedicated instances does not create the project. Hosted MCP tools/call is HTTP 400 with error_class validation. Wrapper error.details.code stays tool_failed. Forwarded details.code is ambiguous_instance. REST POST /workflows/projects is HTTP 409 with error.details.code ambiguous_instance. An id that is not a live instance of the organization is HTTP 404 target_instance_missing on hosted MCP tools/call (error_class not_found; wrapper error.details.code stays tool_failed; forwarded details.code is target_instance_missing) and on REST POST.

Open an existing workspace when the org has several dedicated instances

Studio workspace reads, saves, single-entity GET/PUT/DELETE, workflow graph GET/PUT, and workspace reindex accept an optional instance_id. Studio sends the instance selected in the deploy control / active instance.

When the organization has two or more live dedicated instances and the project has no stored projects.instance_id (and deployments do not pin exactly one), omitting instance_id on a workspace open (entities, save, graph) fails with status 409. error.details.code is ambiguous_instance. Reindex POST runs that same selection before enqueue. An omitted instance_id on that unbound project is HTTP 409 ambiguous_instance and nothing is enqueued. An explicit instance_id that is not a live instance of the organization is HTTP 404 target_instance_missing and nothing is enqueued. Passing the selected live instance opens that instance's code bucket. There is no soft prefer_instance_id; the caller must name the instance.

An explicit instance_id must match the project's unique deployment pin or stored projects.instance_id when either is set. A conflict is HTTP 409 instance_id_mismatch; the handler does not open a different instance bucket or the platform bucket. The stored id is not rewritten.

Workspace storage is always the selected instance’s bucket (#5024 / #5025). Shared may share the same physical store as the historical “platform” bucket — that is the shared instance’s bucket, not a platform source. Platform→dedicated migrate-on-open is removed. When .loxtep/project.json is missing on the opened instance bucket, readers fail closed with 409 project_metadata_unavailable (even if another bucket still has a copy). Materialize with Pull from git on that instance — do not copy from the platform bucket.

Pull from git → instance bucket

POST /workflows/projects/{project_id}/github/pull downloads the GitHub tree for a branch and writes it into the selected instance’s workspace bucket. It is not a local git checkout and not a platform migrate.

Studio Pull requires a selected instance. Studio always sends that instance_id. It never omits the field. Pull writes only the selected instance's bucket. Every Studio Pull control is disabled when no instance is selected (tooltip Select an instance before pulling from GitHub; the project page command menu uses subtitle Select an instance first). The Pull confirm button is also disabled. If Pull runs anyway, Studio throws Select an instance before pulling from GitHub. Pull writes into that instance's workspace. and does not POST. Checked against postGithubPull-instance.test.ts and GitHubSyncActions.test.tsx.

Studio Restore version requires a selected instance. With none selected, the Restore item in each version's menu is disabled and the Restore confirm button is disabled. If restore runs anyway, Studio shows Select an instance before pulling from GitHub. Pull writes into that instance's workspace. and does not POST. With an instance selected, restore sends instance_id and commit_sha and writes that instance's workspace. Checked against restoreVersion-instance.test.ts and useProjectVersions.test.ts. Restore uses the same instance_id gate as Pull. Callers must send instance_id. Studio never omits it. Omitting instance_id is not a supported user path. Hosted MCP restore_version requires version_id and instance_id and forwards both on Pull (commit_sha + instance_id).

CLI loxtep projects pull and SDK client.workspace.projects.github_pull require instance_id (fail closed): pass --instance-id or the attach value in .loxtep/project.json. They also accept optional branch / commit_sha. Shipped in loxtep-sdk#125. Pull PostInputSchema requires instance_id (UUID). A missing, blank, or non-UUID value returns HTTP 400 from validation. MCP restore_version uses the same gate.

Branch ownership (#5033):

ConcernOwner
Project / repo default branchProject settings → repository_branch (API github_branch is a compat alias of that project field; not a second knob and not an instance Pull alias)
Pull branch for this environmentInstance settings → Git branch for Pull (metadata.repository_branch)

Branch resolution for Pull (first non-empty wins): request branch, then that instance’s Pull branch, then the project’s repository_branch, then main. A configured project or instance branch is never silently ignored for a hardcoded main. Instance branch is not stored in git.

Pull returns HTTP 500 Corrupt instance metadata when instance_id names a live instance, the request branch is omitted or blank after trim, and that instance’s stored metadata is present but not a plain object. A string that is not JSON, an array, the string null, or any other non-object does this. error.details has instance_id and detail and no code. detail is unparseable JSON: <parser message>, metadata is not a plain object (got array), or metadata is not a plain object (got <type>). The string null parses to null, so detail is metadata is not a plain object (got object). Missing metadata, or a plain object with no usable branch, still uses the project’s repository_branch, then main. A request branch that is non-empty after trim is used first, and that metadata is not parsed. This happens before the bucket opens, so nothing is written. Instance update returns the same message.

Unverified example (from the handler WebError context, streamingWrapper, and errorResponse; the branch unit tests assert the thrown message only; not a live call). fields is omitted because it is undefined:

{
  "success": false,
  "error": {
    "message": "Corrupt instance metadata",
    "details": {
      "instance_id": "<instance_id>",
      "detail": "unparseable JSON: <parser message>"
    }
  }
}

The instance value is only metadata.repository_branch (no undocumented alias keys). That instance value is used only when instance_id names a live instance.

JSON body fields. Callers must send instance_id. commit_sha and branch stay optional. PostInputSchema requires instance_id (UUID). A missing, blank, or non-UUID instance_id returns HTTP 400 from validation.

FieldConstraint
commit_shaPull that commit. Omit it to pull the latest commit on the resolved branch.
instance_idUUID. Required. Missing, blank, or non-UUID is HTTP 400. Pull writes only that instance's workspace bucket.
branch1–255 characters. Optional override.

A Pull body that names the selected instance:

{
  "instance_id": "<instance-uuid>"
}

With instance_id, Pull writes only that instance's bucket.

A missing, blank, or non-UUID instance_id, invalid JSON body (the validator treats the body as empty, so instance_id is missing), or a branch outside 1–255 characters, fails validation with HTTP 400 before a bucket opens. error.message is Validation failed and error.code is VALIDATION_ERROR. error.details is the Zod issue list (field, message, code). Blank or non-UUID message is Instance ID must be a valid UUID.

An instance_id that is not a live instance of this organization fails before the branch is resolved and before a bucket opens. A live instance has deleted_at null and a status other than deleted or deleting. The response is HTTP 404. error.message is Instance <instance_id> is not a live instance for this organization. Refusing to pull into an unknown instance bucket. error.details is { "code": "target_instance_missing", "instance_id": "<instance_id>" } and has no name field.

Unverified example (from the handler WebError context, streamingWrapper, and errorResponse; the pull unit tests do not cover this 404; not a live call):

{
  "success": false,
  "error": {
    "message": "Instance <instance_id> is not a live instance for this organization. Refusing to pull into an unknown instance bucket.",
    "details": {
      "code": "target_instance_missing",
      "instance_id": "<instance_id>"
    }
  }
}

Export and an unbound loxtep projects clone return 409 project_metadata_unavailable when the opened dedicated bucket lacks .loxtep/project.json. The entities GET message is Project metadata is unavailable at <key>.

Workspace reindex POST (POST /workflows/projects/{project_id}/reindex) runs the full workspace instance selection before enqueue: pin or binding, then live dedicated instances. It does not open object storage. A pin or binding conflict is HTTP 409 instance_id_mismatch. error.details has code, name InstanceWorkspaceBucketError, and project_id. Nothing is enqueued. An explicit instance_id that is not a live instance of the organization is HTTP 404 target_instance_missing and nothing is enqueued. The message is Instance <id> is not a live instance for this organization. Refusing to fall back to the platform bucket. An omitted instance_id on an unbound project in an organization with two or more live dedicated instances is HTTP 409 ambiguous_instance and nothing is enqueued. The message is Organization has N dedicated instances and the project workspace bucket is ambiguous. Refusing to fall back to the platform bucket. Success returns {project_id, enqueued, correlation_id} (then wrapped as {success: true, data: {…}}). The event includes the resolved dedicated instance_id, including when the caller omitted it. The indexer bot opens that instance's bucket only. Entity PUT and DELETE indexer events also include instance_id when the request names one. reindex-all does not take instance_id.

Hosted MCP reindex_workspace accepts optional instance_id (UUID) and passes it to requestWorkspaceReindex, which uses the same resolve. Omit instance_id only when the workspace instance is unambiguous — fail-closed with ambiguous_instance on an unbound project in a multi-dedicated org. On that omitted unbound case the tool call fails before enqueue. The tool error text is the ambiguous_instance message. The tools/call response is HTTP 400 tool_failed with error.details.error_class validation. error.details.code is tool_failed. The domain code ambiguous_instance is not copied. When that omitted call selects a stored binding that is no longer live, the tool error text is the target_instance_missing message and the tools/call response is HTTP 404 tool_failed with error.details.error_class not_found. On success the event includes the resolved dedicated instance_id, and the success payload echoes instance_id when the caller supplied it. CLI loxtep push (saves the workflow bundle, then reindexes) and SDK projects.reindex still POST reindex with {} (no instance_id; SDK source read, call not sent). On that unbound project the POST returns HTTP 409 ambiguous_instance and nothing is enqueued. A workflow deploy passes the resolved target instance into the same open and reads that instance bucket only.

Create a blank project or one from a template

The create_project operation (on the loxtep_workspace facade) and the SDK client.workspace.projects.create create a blank project unless you pass template_slug. An omitted, empty, or whitespace-only template_slug means a blank project; no default template is filled in. A new organization's default project is also blank. A successful create returns the project in data. That success means the project was created. It does not mean a template or an imported repository has been cloned.

To start from a catalog template, pass template_slug. The canonical form is templates/projects/<name>. projects/<name> and the bare <name> also work, as do the template's own metadata.template_slug, configuration.template_slug, and configuration.repository_template_path values. Surrounding whitespace and trailing slashes are ignored; otherwise the match is exact. list_templates with category=projects (on the loxtep_connect facade) uses the same project-template set that create checks. Templates with catalog_visible: false are excluded unless the call sets include_hidden_from_catalog. A catalog file that cannot be read or parsed fails the refresh. The slug is not omitted, and it is not reported as unknown.

{
  "operation": "create_project",
  "name": "commerce-mesh",
  "template_slug": "templates/projects/<name>"
}

github_action omitted or "create_new", with a slug, uses this catalog path. github_action: "import_existing" does not. That path skips the catalog, omits template_slug from the project-created event even when you sent one, and does not store template_materialization. An unknown slug on an import is not a 400.

These create errors refuse the insert. The code is error.details.code. They do not set error.details.error_code.

  • Unknown catalog slug: Status 400 TEMPLATE_NOT_FOUND. The message starts Unknown project template slug "<slug>". TEMPLATE_NOT_FOUND. error.details holds code, template_slug, valid_slugs, and list_templates. An empty catalog after a successful load is this 400 with valid_slugs: [].
  • Catalog path missing in the template repository (GitHub getContent 404) before insert: Status 400 TEMPLATE_NOT_FOUND. The message is Project template "<slug>" is not in the GitHub template repository. TEMPLATE_NOT_FOUND. error.details holds code, template_slug, and list_templates. It does not include valid_slugs. No row is written.
  • Catalog file cannot be read or parsed: Status 500 TEMPLATE_CATALOG_FILE_INVALID. The message is Template file cannot be read or parsed: <file> (<detail>). error.details holds code, file, template_slug, cause, and list_templates. It does not set error.details.error_code.
  • Catalog could not be read (TemplateCatalogUnavailableError: the S3 read and the public-library read both throw): status 503 TEMPLATE_CATALOG_UNAVAILABLE. The message is Template catalog could not be read, so project creation with template slug "<slug>" was refused. error.details holds code, template_slug, cause, and list_templates. A broken catalog file is the 500 above, not this 503.
  • GitHub could not confirm the path (any failure other than that 404): Status 503 TEMPLATE_GITHUB_UNAVAILABLE. The message is GitHub could not confirm project template "<slug>", so the project was not created. error.details holds code, template_slug, cause, and list_templates.

Passing the catalog check does not mean the template can be cloned. Before insert, create calls GitHub repos.getContent on the canonical path. A 404 is the 400 above and no project is created. Any other failure from that check is the 503 above and no project is created. A successful getContent still does not mean the clone has finished: that success stores pending until the bot writes materialized or failed.

template_slug and github_repo_url together, unless github_action is import_existing, fail with status 400 TEMPLATE_SLUG_WITH_GITHUB_REPO_URL and do not create a project. The message is Choose a project template or a GitHub repository URL. To import a repository, set github_action to import_existing. To create from a template, omit github_repo_url. error.details is { "code": "TEMPLATE_SLUG_WITH_GITHUB_REPO_URL" }. That message does not contain the code. Import still accepts a slug and ignores it.

You cannot set metadata.template_materialization yourself. create_project and update_project fail with status 400 TEMPLATE_MATERIALIZATION_NOT_ALLOWED and do not insert or update. The message is metadata.template_materialization cannot be supplied by the caller. error.details is { "code": "TEMPLATE_MATERIALIZATION_NOT_ALLOWED" }. That message does not contain the code.

MCP create_project returns error.details on the tool error. The hosted MCP server classifies these messages as execution failures, so the MCP tool result has isError: true, structuredContent.status 500, and structuredContent.error_code tool_failed. The code above stays inside structuredContent.details. The tool text is the error message. MCP update_project forwards error.details the same way, so TEMPLATE_MATERIALIZATION_NOT_ALLOWED reaches the caller in structuredContent.details. The hosted tools/call wrapper classifies that message as execution (HTTP 500, tool_failed). When details are forwarded, structuredContent also includes correlation_id.

Check whether the template finished

After a catalog create succeeds, poll get_project (on the loxtep_workspace facade) or the SDK client.workspace.projects.get and read metadata.template_materialization.status. get_project returns the project, including metadata, in snake_case. Studio reads the same object as metadata.templateMaterialization. The create response already includes the pending object under data.metadata.

pending means the row is waiting for the clone bot. It does not mean the template finished, and it does not always move on. A project can stay pending when the clone bot does not process the event (see #3763). Repeated bot timeouts raise no alert yet (#3793). Each clone is bounded (#3788), so one large repository fails with TEMPLATE_CLONE_LIMIT instead of holding the bot.

Stored metadata for a catalog create that has not been processed yet:

{
  "template_materialization": {
    "status": "pending",
    "template_slug": "templates/projects/technology"
  }
}

materialized replaces that object. template_slug is not kept on it. The bot also sets template_cloned to true, template_clone_error to null, and template_cloned_at to an ISO timestamp. Other metadata keys are left in place.

{
  "template_materialization": {
    "status": "materialized"
  },
  "template_cloned": true,
  "template_clone_error": null
}

failed replaces that object and keeps the row. error is the message the bot stored.

Each clone, catalog template or import, gets 60 seconds of GitHub reads and 64 MiB (67,108,864 bytes) of decoded file content. The decoded size is each file's size in bytes. The 60 seconds start when the clone starts. The repos.get that reads the default branch, and the repos.getContent slug check, are not part of that limit. For a catalog template, only files under the template path count toward the 64 MiB. The clone still reads the whole repository git tree, so a tree GitHub returns truncated fails too. Over a limit the project is marked failed with error_code TEMPLATE_CLONE_LIMIT instead of staying pending. The message is Project <project_id> repository <repo_url> exceeded the clone limit: <detail>. <detail> is the remaining time and the GitHub call (time limit <ms>ms during <call>), a truncated tree, a truncated flag that is not a boolean, a missing or non-finite declared size, or a declared or decoded size over 67,108,864 bytes. The call is repos.get, git.getRef, git.getCommit, git.getTree, or git.getBlob <path>.

A file that cannot be downloaded fails the clone with TEMPLATE_CLONE_FAILED and the message Project <project_id> repository <repo_url> failed to fetch blob <path>: <detail>. The clone fails, and that file is not dropped.

Every blob the clone reads must be valid UTF-8. A catalog template reads only blobs under the template path. Other blobs are skipped before git.getBlob, so only those files must be UTF-8. A binary file under that path (an image, archive, font, compiled file, or data file such as parquet) fails the clone with TEMPLATE_CLONE_FAILED. The message is one of:

Project <project_id> repository <repo_url> blob <path> is not valid UTF-8

Project <project_id> repository <repo_url> blob <path> encoding is "<encoding>", expected "base64"

Project <project_id> repository <repo_url> blob <path> content is not a base64 string

Project <project_id> repository <repo_url> blob <path> content is not valid base64

<encoding> is the JSON form of the encoding GitHub returned, so a string stays quoted. The clone stops on the first such file. That file is not skipped, and none of the repository files are uploaded. .loxtep/project.json is written from the project row before the clone, and this failure leaves that file in place. Remove binary files from the template path. The stored message names the file path.

The limit message, the download message, and these blob messages are stored as-is. They do not get a did not materialize prefix. The row is kept. The catalog row stores template_materialization { "status": "failed", "error_code": "TEMPLATE_CLONE_FAILED", "error": "<message>" } and template_clone_error { "code": "TEMPLATE_CLONE_FAILED", "message": "<message>" }.

{
  "template_materialization": {
    "status": "failed",
    "error_code": "TEMPLATE_CLONE_LIMIT",
    "error": "Project <project_id> repository <repo_url> exceeded the clone limit: <detail>"
  },
  "template_cloned": false,
  "template_clone_error": {
    "code": "TEMPLATE_CLONE_LIMIT",
    "message": "Project <project_id> repository <repo_url> exceeded the clone limit: <detail>"
  }
}

Other catalog clone failures still use Project template "<slug>" did not materialize: <detail>.

A security scan that finds critical issues is not a clone failure. The bot keeps the row, does not store the template files, and does not mark the project materialized. The event is not retried. When the create used a catalog template_slug, it stores template_materialization { "status": "failed", "error_code": "SECURITY_SCAN_BLOCKED", "error": "Security scan failed - critical issues found: <issue messages>" }. error is Security scan failed - critical issues found when the scan reported no messages. Up to eight issue messages are joined with ; , then ; and <N> more when more remain. The same write stores template_cloned: false, security_scan_status, security_critical_issues, requires_approval, and security_scan_details. It does not store template_clone_error.

A scan that throws is not retried and is not marked materialized. With a catalog template_slug the bot stores { "status": "failed", "error_code": "SECURITY_SCAN_ERROR", "error": "Security scan did not finish: <message>" } and template_cloned: false. It does not store template_clone_error or the scan summary keys. If that metadata write throws, the queue result carries the write error and the same error_code, and the project is still not marked materialized.

An import (no catalog slug) does not get template_materialization. A critical issue still stops the clone before any template files are stored. The bot sets template_cloned false and, for a block, the same scan summary keys. The stored reason is the SECURITY_SCAN_BLOCKED message above. A thrown import scan sets template_cloned false and does not store template_clone_error. The queue result is success: false with error_code SECURITY_SCAN_ERROR and error Security scan did not finish: <message>.

{
  "template_materialization": {
    "status": "failed",
    "error_code": "SECURITY_SCAN_BLOCKED",
    "error": "Security scan failed - critical issues found: Use of eval() is forbidden"
  },
  "template_cloned": false,
  "security_scan_status": "failed"
}

If the project-created event cannot be queued, the create fails with status 500 Failed to emit project created event. When stored metadata is an object, the row is updated to template_materialization.status "failed" with error_code "project_created_event_not_emitted" and error set to the queue error. error.details.error_code is project_created_event_not_emitted (this 500 uses error_code, not code). If that metadata write also fails, the 500 includes persist_error and the row can stay pending. Studio toasts the error and does not start polling.

The bot calls repos.getContent again on that same path. Its TEMPLATE_NOT_FOUND failure happens only when that second check is a 404, which means the path disappeared between the create call and the bot run. Create already refused a 404 before insert, so that create-time miss never reaches the bot. The bot keeps the row and stores template_materialization.status "failed" with error_code TEMPLATE_NOT_FOUND, error set to the bot message, and template_cloned false. It does not set deleted_at or is_active false. A later get_project returns the project. If the status write fails, the queue result carries the write error and error_code TEMPLATE_NOT_FOUND, and the row can stay pending.

Import an existing repository

An import does not use template_materialization. When github_action is import_existing, create stores github_repo_url from github_import_url. The project-created event includes github_import_url, and the clone bot clones that URL. If the row has no github_repo_url, the bot writes the import URL onto that column before cloning. An import_existing event with neither URL fails. Studio's import form sends github_import_url and does not send github_repo_url. Studio shows Project created successfully and closes as soon as the create succeeds. That toast is the insert. It is not a clone result.

When github_repo_url is set, a finished clone stores template_cloned: true and template_clone_error: null. A clone failure or an empty repository keeps the row and stores template_cloned: false plus:

{
  "template_cloned": false,
  "template_clone_error": {
    "code": "TEMPLATE_CLONE_FAILED",
    "message": "The imported repository has no commits yet. Push an initial commit to the default branch (e.g. main) and retry."
  }
}

A clone over the 60 second or 64 MiB limit, or a git tree GitHub returns truncated, uses the same object with code TEMPLATE_CLONE_LIMIT and message Project <project_id> repository <repo_url> exceeded the clone limit: <detail>. A file that cannot be downloaded uses code TEMPLATE_CLONE_FAILED and message Project <project_id> repository <repo_url> failed to fetch blob <path>: <detail>. An import reads the whole repository tree, so every file must be UTF-8. A binary file (an image, archive, font, compiled file, or data file such as parquet) cannot be imported. code is TEMPLATE_CLONE_FAILED. The message is one of:

Project <project_id> repository <repo_url> blob <path> is not valid UTF-8

Project <project_id> repository <repo_url> blob <path> encoding is "<encoding>", expected "base64"

Project <project_id> repository <repo_url> blob <path> content is not a base64 string

Project <project_id> repository <repo_url> blob <path> content is not valid base64

<encoding> is the JSON form of the encoding GitHub returned, so a string stays quoted. The clone stops on the first such file. That file is not skipped, and none of the repository files are uploaded. .loxtep/project.json is written from the project row before the clone, and this failure leaves that file in place. Remove binary files from the repository before importing it. The stored message names the file path. That failure stores template_clone_error { "code": "TEMPLATE_CLONE_FAILED", "message": "<message>" } only. Other GitHub read failures keep code TEMPLATE_CLONE_FAILED and message Clone failed: <detail>. There is no template_materialization on these rows. A security-scan block or a scan that throws is not one of these clone errors. An import does not store template_materialization for those outcomes.

After that clone metadata is written, webhook registration runs when the project has github_repo_url, created_by, and a user GitHub token. A registration that throws or returns a failure stores webhook_setup_error { "code": "WEBHOOK_SETUP_FAILED", "message": "<message>" } and ends the event as one routed error. Clone metadata already written stays on the row. <message> is the registration error, or GitHub webhook registration failed when that error has no text. That result is a queue event, not a create error.

When the project has github_repo_url and the project-created event has no created_by, the bot stores webhook_setup_error { "code": "WEBHOOK_SETUP_FAILED", "message": "created_by is missing; GitHub webhook was not registered" } and ends the event as one routed error. No webhook is registered, and created_by stays unset.

When the project has github_repo_url and created_by, and that user has no GitHub access token, the bot calls routeWebhookSetupFailure. It stores webhook_setup_error { "code": "WEBHOOK_SETUP_FAILED", "message": "no user GitHub token available; GitHub webhook was not registered" } and ends the event as one routed error. No webhook is registered.

Open Project settings. Under Auto-sync webhook, that message appears in red under "Register a webhook to auto-sync on every push to the configured branch." It shows only while the webhook is not active. Once a webhook is registered, Studio hides the message.

What Studio shows

The create dialog checks the new project every 1 second only when it was opened from a template. The form has no slug field. It reads the camel-cased metadata.templateMaterialization.

  • materialized: success toast Project created successfully, and the dialog closes.
  • failed: error toast with the stored error, or the stored error_code if error is empty, or Template materialization failed. The dialog stays open. SECURITY_SCAN_BLOCKED and SECURITY_SCAN_ERROR use this same toast. The dialog has no per-code branch.
  • No finished status within 15 seconds: error toast This project exists and is still pending. Open project on that toast opens the project in the builder (/products/projects/{project_id}). Studio refreshes the project list, closes the dialog, and clears the form, so you cannot submit a duplicate. The project already exists, and metadata.template_materialization.status is still pending. Open the project and check that status later. Do not create the project again.

A 404 on that follow-up check means the project is no longer available. Studio does not retry that 404. It shows This project is no longer available. Create it again if you still need it. The dialog stays open, and the filled form stays ready so you can create the project again. Any other error on that check is retried up to 2 times for that poll. The dialog keeps waiting until the 15-second limit.

A create that was not opened from a template (a blank project, or an import) toasts Project created successfully and closes as soon as the create succeeds. It does not poll, and that toast does not mean a repository was cloned.

Replace project metadata

update_project (and the SDK client.workspace.projects.update) treats metadata as a full replacement. When the body includes metadata and omits template_materialization, the stored template_materialization is copied onto the new object and every other stored key is dropped, including template_cloned, template_clone_error, and security_scan_*. Omitting metadata leaves the column unchanged. Stored metadata that is a string and not valid JSON fails with status 500 PROJECT_METADATA_UNREADABLE and does not update the row. error.details is { "code": "PROJECT_METADATA_UNREADABLE", "project_id": "<project_id>" }. The message is Project <project_id> metadata is not valid JSON. The project was not updated.

GitHub repository path

When a project is linked to GitHub, github_repo_path is the directory inside that repository that holds this Studio project. Leave it empty when the project lives at the repo root. One repository can back more than one Loxtep project when each project uses a different path.

Studio exposes the field in two places:

  • Project settings → GitHub → Repository path (optional). Saving an empty path clears it so the project is bound to the repo root. The project card shows Path: <directory> when a path is set.
  • Create project → Import existing repository → Repository path (optional). Same meaning; omit it when the imported tree is at the repo root.

Studio, MCP (create_project / update_project), and the SDK (client.workspace.projects.create / client.workspace.projects.update) all use the same validator for github_repo_path; Studio shows the validator's error under the field before saving. They reject .. / . segments, absolute paths, Windows drive prefixes, backslashes, control characters, empty segments, leading/trailing whitespace on a non-empty value, and values over 500 characters. Bad input is never silently stripped or normalized. Pass null, "", or whitespace-only to clear the path (stored as NULL / repo root).

  • SDK (client.workspace.projects.create, client.workspace.projects.update) fails with status 400. error.message is github_repo_path: <reason>. For ../x that message is github_repo_path: github_repo_path must not contain '..' segments. error.details.code is VALIDATION_ERROR. error.details.issues is [{ "path": "github_repo_path", "message": "<reason>" }]. error.details.details keeps { field, message, code }.
  • MCP create_project / update_project check the value before the project is created or changed, so a bad path is never stored. The MCP tool result has isError: true, the message Validation failed: github_repo_path: and the reason as its text, and structuredContent { "status": 400, "error_code": "invalid_tool_input" }. tool_name is the flat tool (update_project or create_project); mcp_facade is loxtep_workspace when the call went through that facade. Other tool failures are errors too. A result { success: false } that is not this validation error has isError: true with error_code tool_failed (status 404, 400, or 500 from its error_class). A bad facade operation is 400 invalid_facade_arguments. An empty error message is 500 tool_error_message_missing, not the text Tool execution failed and not the log text Unknown error. An unknown tool is 404 tool_not_found. A tool result with no content array is isError: true with error_code tool_result_content_missing (status 500). The raw JSON is not returned as the tool text.

The following MCP update_project binds an existing project to the loxtep directory inside its repo:

{
  "operation": "update_project",
  "project_id": "<project_id>",
  "github_repo_path": "loxtep"
}

Pass github_repo_path as "" on update_project to clear the path. GitHub push writes the project's files under this path, and pull reads only the files under it.

GitHub push and pull (CLI loxtep projects push and loxtep projects pull, SDK client.workspace.projects.github_push and client.workspace.projects.github_pull, and MCP create_snapshot and restore_version on the loxtep_workspace facade) check the stored github_repo_path again with the same validator before they read or write any files. A NULL, "", or whitespace-only value means the repo root. A valid path is used exactly as stored; push and pull do not trim it or strip slashes. A stored value can still be invalid (for example /loxtep/ or loxtep/). Push or pull then fails with status 422 with error.message set to Project has an invalid stored github_repo_path: <reason> and error.details holding code (github_repo_path_invalid), field (github_repo_path), reason, project_id, and action. Nothing is pushed or pulled. To fix it, set a valid path or clear it to "" (repo root) in project settings or with update_project, then retry.

Every file a pull reads must be valid UTF-8 (#3909). A binary file among those files (an image, archive, font, compiled file, or data file such as parquet) fails the pull. Nothing is written to S3, and the pull does not record a commit. Remove that file from the files the pull reads, or move it outside github_repo_path, then pull again. Pull reads project files under github_repo_path. When that path is empty, it reads the same project files at the repo root: workflows/, domains/, .loxtep/, bots/, and the root files project.json, package.json, tsconfig.json, deployment-manifest.json, and README.md. Directories named node_modules, .git, dist, coverage, .next, build, vendor, target, .turbo, or out are skipped. A file larger than 1,000,000 bytes is read only when its path contains /workflows/ or /.loxtep/.

That pull fails with status 422. error.message is GitHub pull failed. error.details holds validation_passed set to false and errors with one string:

Failed to download <n> project file(s) from GitHub: <path>: The encoded data was not valid for encoding utf-8

<n> is how many files failed to decode. When more than one fails, paths are separated by ; , and the string lists at most 5 paths. A leading UTF-8 BOM is kept, so a successful pull stores the same bytes as the repository file. When github_repo_path is empty and more than one directory contains .loxtep/, pull chooses a directory only when .loxtep/project.json is valid UTF-8, parses as JSON, and its project_id matches this project. When exactly one nested directory contains .loxtep/ or project.json, pull uses that directory from its name. Checked against the code, not a live API.

Project Isolation

Projects provide isolation at multiple levels:

  • Data isolation — data products in one project are not visible to another project by default.
  • Workflow isolation — workflows execute within their project's resource allocation.
  • Access control — RBAC grants are scoped to projects, controlling who can read, write, and deploy.

Cross-project data sharing is gated by readiness stage: Raw is project-only, In Progress permits cross-project sharing within the same domain, and Ready is required to cross domain boundaries.

Workflows

A workflow is a directed graph of processing steps that orchestrates data movement and transformation. Workflows are the runtime layer that makes data products operational.

Workflow Types

Loxtep supports multiple workflow types:

TypePurposeUsed by
IngestionIngest data from external systemsSource data products
data-product-consumptionProject and deliver composed viewsConsumer data products
TransformationApply multi-step data transformationsInternal processing
ValidationRun quality checks across productsGovernance

Workflow Graph

A workflow is defined as a graph of nodes connected by edges. Each node represents a processing step:

  • Source nodes — read from a connection or data product.
  • Transform nodes — apply mappings, filters, aggregations, or enrichments.
  • Validation nodes — check data against quality rules.
  • Approval nodes — pause one event until a person decides it in Inbox. The step follows another step, and the next step is the approved path.
  • Sink nodes — write to a data product or external target.

Manage workflow graphs via MCP:

{
  "operation": "patch_workflow_graph",
  "project_id": "proj_commerce",
  "workflow_id": "wf_ingest_orders",
  "operations": [
    {
      "op": "add_node",
      "node": { "type": "transform", "config": { "expression": "total_amount / 100" } }
    }
  ]
}

Workflow Templates

Templates provide reusable project and workflow patterns for common scenarios. List templates with loxtep_connect, then pass the selected template_slug when you create the project:

{ "operation": "list_templates" }

Templates codify best practices — field mappings, validation rules, and delivery configurations — so teams start from proven patterns rather than building from scratch.

Connections

A connection is a configured bridge between a workflow node and an external system. Connections encapsulate the authentication, endpoint details, and protocol specifics needed to read from or write to an external service.

Connection Types

Connections support a range of protocols and systems:

  • Database — PostgreSQL, MySQL, MongoDB (read/write).
  • SaaS API — Shopify, Stripe, HubSpot (read via polling or webhook).
  • Object Storage — S3, GCS (file-based ingestion and delivery).
  • Message Bus — SQS, EventBridge (event streaming).
  • Webhook — inbound and outbound HTTP event delivery.

Connection Lifecycle

Connections go through a defined lifecycle:

  1. Create — configure the connection with credentials and endpoint details.
  2. Test — verify connectivity and authentication.
  3. Link — attach the connection to a workflow node.
  4. Monitor — track connection health and throughput.

Test its connector before using the connection in production:

{ "operation": "test_connector", "connector_id": "<connector-uuid>" }

Connection Security

Connection credentials are stored encrypted and never exposed in logs or API responses. Access to connections is controlled through project-level RBAC — only team members with the appropriate role can view or modify connection configurations.

Deployment

Projects and their workflows are deployed to runtime instances. A deployment takes the project's workflow definitions and makes them operational on a specific instance.

Deploy an entire project with loxtep_build:

{ "operation": "deploy_project", "project_id": "<project-uuid>", "instance_id": "<instance-uuid>" }

Or deploy a single workflow for incremental updates:

{
  "operation": "deploy_workflow",
  "project_id": "<project-uuid>",
  "instance_id": "<instance-uuid>",
  "workflow_id": "<workflow-uuid>"
}

save_workflow_bundle refuses a workflow_id the catalog already assigns to another project. The result is success: false, with validation_errors[0].code WORKFLOW_ID_OWNED_BY_OTHER_PROJECT (field workflow_id, entity_type workflows, relative_path workflow.json). The check runs before dry-run handling, so dry_run: true is refused too. Nothing is written. Use a new workflow_id when you copy a flow. This save was not run live. Unverified.

The deployment_id from deploy_workflow can be read at once with get_deployment. The call's status is requested. The stored row is pending, then in_progress, then deployed or failed. The first read of that id is pending. A missing row for an id this call just returned is a platform fault. This poll was not run live. Unverified.

Runtime Instances

Instances are the compute environments where workflows execute. Each instance has a deployment type that determines resource isolation and management:

Instance typeDescription
sharedMulti-tenant instance with shared resources (default)
managedSingle-tenant instance with dedicated resources
self-hostedDeployed to the customer's own AWS account

Products lists and the selected instance

Products Overview (/products), In Progress (/products/in-progress), and Ready (/products/ready) follow the selected instance. Each page loads the catalog, keeps products for that instance's environment, then applies a Products-page instance multiselect. The multiselect is separate from the sidebar instance switcher.

The environment is the selected instance's metadata.environment_key. That key is an open string. stage, prod, and dev are examples. A franchise or location slug such as franchise-austin is its own environment. Peers are instances whose keys are equal after trim and lowercase. The only aliases are staging as stage and production as prod. A product stays only when its own environment matches that key, using the same two aliases. A product with no environment is left out. Products with different keys do not appear together. A missing or blank key on the selected instance yields an empty list. There is no default of prod.

The multiselect lists active or provisioning instances that share that environment, including the selected instance. It starts with all of those peers selected. Choosing a different instance in the sidebar resets the multiselect to that instance's peers. You can narrow the selection or clear every peer. Clearing every peer yields an empty list. When the selected instance has no environment key, the multiselect is disabled and the list is empty.

After the environment match, a product with a runtime binding (runtime_bindings) or a deployment binding (deployment_bindings.instance_id) appears when any of those bound instances is still selected. A product with neither binding stays in the list for that environment while at least one instance remains selected. Narrowing the multiselect hides a product only when every instance it is bound to has been cleared.

GET /dataproducts?view=catalog returns each product's environment_key, logical_key, deployment binding, and runtime bindings. These pages filter on environment_key and the binding instance ids. logical_key stays on the row as the sibling identity.

On Overview, the In Progress, Raw, Ready, and All products tabs are views of that same filtered list. The All products tab stays on /products.

All products (/products/catalog) follows the selected instance's environment: the same key, aliases, and fail-closed rule as Overview. It shows products for every active or provisioning peer that shares that environment. There is no instance multiselect on this page. A missing or blank environment key on the selected instance yields an empty list. The Raw, In Progress, and Ready counts (the medallion strip and the table tabs) come from that scoped list.

The same canvas also renders /source/data-products (source products; All products re-exports this page) and /products/projections (consumer products). Both lists use that environment scope.

It is the Products nav item, and the All products link on Overview, In Progress, and Ready. Usable by you (/use/catalog) and the product lists in Connect, Inbox, Meaning, and Studio are not limited to the selected instance.

When the organization has more than one active or provisioning instance, the sidebar switcher shows the instance's environment beside its name. staging is shown as stage. production is shown as prod. When no environment is stored, the switcher shows env missing in amber. With one instance, the switcher shows the name only.

Configure Instance on the organization Instances page has a free-text field labeled Environment key. The placeholder examples are stage, prod, and franchise-austin. Leaving the field blank clears the key. The switcher then shows env missing. Saving a changed field sends metadata.environment_key. The dialog trims the value, lowercases it, and applies staging as stage and production as prod before the PUT. A blank field sends an empty string.

Hosted MCP update_instance and create_instance do not accept metadata or environment_key. The update schema allows instance_id, name, connection_details, and force_runtimes_redeploy only. A live MCP call was not made for this page (unverified).

Someone who can update instances (instances:update) sets or clears the key with PUT /organizations/instances/{instance_id}. The body shallow-merges metadata. The handler stores the string you send. It does not lowercase or apply aliases on write. Readers lowercase the value and apply the two aliases above.

Set a franchise location:

{ "metadata": { "environment_key": "franchise-austin" } }

Clear the key with an empty string. The merge stores that value. A missing, blank, or null key shows env missing, and the Products lists for that instance stay empty.

{ "metadata": { "environment_key": "" } }

Clear the key with JSON null:

{ "metadata": { "environment_key": null } }

(Unverified examples: not run against a live instance.)

The CLI and SDK in loxtep-sdk#127 (open; not checked on published npm — unverified) send that same PUT. An empty --environment-key clears:

loxtep instances update <instance_id> --environment-key franchise-austin
loxtep instances update <instance_id> --environment-key ""

Node client.workspace.instances.update(instanceId, { environment_key }) and the Python instances.update call do the same. null, None, or "" clears. A top-level environment_key wins over metadata.environment_key. Those clients trim, lowercase, and apply the two aliases before the PUT.

When the switcher shows an environment, it reads the stored field and shows the normalized value (staging as stage, production as prod). HTTP create stores dev when instance_config.metadata.environment_key is omitted. That default is a convenience, not a closed list of environments. Create stores a value you send in lowercase and does not map staging to stage on write. You can send that field on create. If you cannot call the API, ask an org admin who can update instances, or Loxtep support.

Versioning and Snapshots

Projects support versioning for safe iteration and rollback:

  • Snapshots — capture the full state of a project at a point in time.
  • Version comparison — diff two versions to see what changed.
  • Restore — roll back to a previous version if a deployment causes issues.

Create a snapshot before making changes:

{ "operation": "create_snapshot", "description": "pre-v2-migration", "snapshot_type": "manual" }