Scorpio prepares a managed EduIDE (Theia) workspace when a session starts: it puts the project into the workspace, sets the git identity and warms up Gradle. It does not depend on Artemis; an Artemis exercise is one source of GIT_URI among others, such as a GitHub link.
- Automatic Repository Cloning: If
GIT_URIis set, clones the repository into the workspace root (and checks outGIT_REFif set, after a fresh clone only), but only into an empty workspace (one that holds nothing besides.vscode/settings.json,.theia,persisted, andlost+found). A workspace that already holds the repository (same host and path, whatever the scheme or credentials) is reused. Any other workspace with content is never cleared: the student gets a warning that the exercise was not cloned, and no Gradle pre-warm runs. Credentials inGIT_URI(user:token@) are not passed on thegit clonecommand line; afterwardsoriginis set toGIT_URIas given, because the Artemis extension pushes with plaingit push. Known limitation: that token stays in.git/configon the workspace volume. - Clone Repository into Workspace: The command
Scorpio: Clone Repository into Workspace(also the "Clone Repository" button in the empty Source Control view) asks for an http(s) URL and clones into the workspace root, so the repository's.vscodeconfig is found. It refuses a workspace that holds files. For a private repository it asks for a username and access token and retries once;originkeeps the bare URL, and the token goes to the configured git credential helper (in the standalone images the in-memory cache, 3 hours), never to disk by Scorpio. - Templates: If
GIT_URIis not set butTEMPLATEis, copies the template<id>from the templates directory (SCORPIO_TEMPLATES_DIR, default/home/theia/templates) into the workspace. A template is a folder that contains atemplate.jsonmanifest. This only happens when the workspace is empty, so a restart never overwrites files. "Empty" means it holds nothing besides.theia,persisted,lost+foundand.vscode/settings.json; if both the workspace and the template have a.vscode/settings.json, they are merged (top-level keys, the template's win; comments and trailing commas are accepted, comments are not kept in the merged file; if either file does not parse, the workspace file stays). A student who empties the workspace gets the template again on the next start. If the copy fails, Scorpio removes what it created and reports an error.GIT_URIalways wins overTEMPLATE. The template'stemplate.jsonmanifest is not copied, andgradlewis made executable. An unknown id shows a notification and the session starts with an empty workspace. - Progress Notifications: While the workspace is prepared, shows a "Preparing your workspace" notification with the current step (waiting for exercise details, cloning, applying a template) and short status bar messages when another window is cloning or Gradle is prepared in the background. Messages never contain credentials.
- Git Identity: Configures
user.nameanduser.emailglobally, with hostname fallback when credentials are unavailable. - Environment Variable Loading: Reads Theia environment variables via DataBridge or process environment (configurable via
SCORPIO_THEIA_ENV_STRATEGY), see README_THEIA.md. - Settings Protection: Prevents modification of
apiBaseUrlandrepoPathin Theia environments. - Gradle Pre-warming: After a clone or template copy, warms the Gradle build in the background (daemon, dependencies, or full compile) so the first build is faster. Configurable via
GRADLE_PREWARM; non-Gradle projects are skipped automatically. The repository's./gradlewis code from the repository, so the student is asked before it runs, unless the deployment setsGRADLE_PREWARM_AUTO_CONFIRM=trueand the landing page did not mark the repositoryGIT_SOURCE=external(a template copy is pre-warmed without asking).
scorpio.artemis.apiBaseUrl: Optional base URL of an Artemis server. Artemis sessions set it fromARTEMIS_URL; there is no default.scorpio.defaults.repoPath: Default path for repository cloning (absolute path).