workspace
workspace
¶
Workspace and environment configuration models.
Defines models for isolation, workspace lifecycle, cross-sheet context, logging, AI review, and feedback.
Classes¶
IsolationMode
¶
Bases: str, Enum
Isolation method for parallel job execution.
IsolationConfig
¶
Bases: BaseModel
Configuration for execution isolation.
Worktree isolation creates a separate git working directory for each job, enabling safe parallel execution where multiple jobs can modify code without interfering with each other.
Example YAML
isolation: enabled: true mode: worktree branch_prefix: marianne cleanup_on_success: true
WorkspaceLifecycleConfig
¶
Bases: BaseModel
Configuration for workspace lifecycle management.
Controls how workspace files are handled across job iterations, particularly for self-chaining jobs that reuse the same workspace.
When archive_on_fresh is True and --fresh is used, Marianne moves non-essential workspace files to a numbered archive subdirectory before clearing state. This prevents stale file_exists and command_succeeds validations from passing on previous iteration's artifacts.
Example YAML
workspace_lifecycle: archive_on_fresh: true archive_dir: archive max_archives: 10 preserve_patterns: - ".iteration" - ".marianne-*" - ".coverage" - "archive/" - ".worktrees/"
LogConfig
¶
Bases: BaseModel
Configuration for structured logging.
Controls log level, output format, and file rotation settings.
AIReviewConfig
¶
Bases: BaseModel
Configuration for AI-powered code review after batch execution.
Enables automated quality assessment of code changes with scoring.
CrossSheetConfig
¶
Bases: BaseModel
Configuration for cross-sheet context passing.
Enables templates to access outputs from previous sheets, allowing later sheets to build on results from earlier ones without manual file reading. This is useful for multi-phase workflows where each sheet needs context from prior execution.
FeedbackConfig
¶
Bases: BaseModel
Configuration for developer feedback collection (GH#15).
When enabled, Marianne extracts structured feedback from agent output after each sheet execution. Feedback is stored in SheetState.agent_feedback.
Example YAML
feedback: enabled: true pattern: '(?s)FEEDBACK_START(.+?)FEEDBACK_END' format: json
Functions:¶
resolve_workspace_root
¶
Root directory for conductor-managed workspaces (#58).
Defaults to ~/workspaces — the convention that every Marianne score's
workspace lives under one home-rooted tree, never scattered beside the
score file or inside a repo. An operator may override the root via the
MARIANNE_WORKSPACE_ROOT env var; the test suite uses this to redirect
auto-derived workspaces into a temp dir instead of a real home.
Source code in src/marianne/core/config/workspace.py
sanitize_workspace_name
¶
Reduce a score name to a single filesystem-safe path segment.
Collapses any run of characters outside [A-Za-z0-9._-] to a single
hyphen and trims separators from the ends, so "DJ GestAIt v2" becomes
"DJ-GestAIt-v2" and "fix/emzihypno" becomes "fix-emzihypno".
Falls back to "job" if nothing usable remains.
Source code in src/marianne/core/config/workspace.py
default_workspace_for
¶
The auto-derived workspace for a score that omits workspace: (#58).
<workspace-root>/<sanitized-name> — e.g. ~/workspaces/my-score.