---
title: "Seed the app modeling work frontier (internal)"
method: POST
path: "/appModeling/run/seedFrontier"
tags: ["AppModeling"]
---

# Seed the app modeling work frontier (internal)

`POST /appModeling/run/seedFrontier`

Upserts the app_model_coordinator row for the given application and seeds the work
frontier from the requested scope (all app-tagged tests by default). Called exclusively
by the TypeScript initiateAppModelingRun handler — not intended for external callers.
A full seed is idempotent: re-running on an existing frontier safely adds new tests and
removes de-tagged ones without re-opening what an earlier run already attempted. A
scoped seed deliberately re-opens the tests it names.

## Query parameters

- `workspaceId` string, required

## Request body

- SeedAppModelingFrontierRequest — Request to seed or reconcile the work frontier for an app modeling run.
  - `application_id` string, required — The application whose tests seed the frontier.
  - `run_session_id` string, required — The run coordinator session ID, stored on the coordinator row.
  - `scope` AppModelingRunScope — The subset of an application's tests a run covers. In a scoped mode (modified_since, explicit_tests) the run's scope becomes the frontier's pending set: the scoped tests are opened for modeling even if an earlier run already attempted them, tests already attempted outside the scope stay attempted, and tests left pending by an earlier run that ended early are deferred so this run does not drain them. A later full run restores deferred tests, so nothing is lost.
    - `mode` 'full' | 'modified_since' | 'explicit_tests', required — Which tests a run's work frontier is seeded from. full: every test that ran against this application in the last 90 days. The default, and the only mode that also drops de-tagged tests from the frontier and restores previously deferred ones. modified_since: the same run-history population, narrowed to tests whose content was last updated at or after the given timestamp. Intended for incremental knowledge-graph updates over recently-edited tests. explicit_tests: exactly the caller-supplied test invariant IDs.
    - `modified_since` string, date-time — Required for modified_since, rejected otherwise. Tests whose last update is at or after this instant are seeded.
    - `test_invariant_ids` string[] — Required for explicit_tests, rejected otherwise. Each ID must name a test that exists in this workspace and is not deleted; unknown IDs fail the request rather than being silently skipped.

## Response `200`

Frontier seeded successfully

- SeedAppModelingFrontierResponse — Response from seedAppModelingFrontier.
  - `seeded_test_count` integer, required — Number of test invariant IDs the run's scope opened for modeling.
  - `deferred_test_count` integer — Number of tests an earlier run left pending that this run set aside because they fall outside its scope. Always zero for a full run.

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `404` — Application not found
- `default` — Unknown error

## Changes

- **2026-09-04** `e170ce57c13c` — 2 info
  - added the new optional request property `scope`
  - added the optional property `deferred_test_count` to the response with the `200` status

[Change history](https://skmtc.dev/mabl/apis/mabl-api/changes/appModeling/run/seedFrontier/post.md)

---

[API](https://skmtc.dev/mabl/apis/mabl-api.md) · [All operations](https://skmtc.dev/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/e170ce57c13c/schema)
