RFC: Workspace abstraction — first-class unit of configuration#124
RFC: Workspace abstraction — first-class unit of configuration#124
Conversation
Proposes a Workspace class that unifies the currently scattered project configuration: Project (sdk), ServerConfig (server/config), Pipeline (core/models), and the _state dict (mcp_tools). One Workspace = one synix namespace with identity, pipeline, buckets, .synix state, releases, and runtime services. Wraps Project via composition (backward compatible). Replaces the _state dict with typed WorkspaceRuntime. Viewer binds to Workspace instead of Release. See docs/workspace-rfc.md for full design, API, migration strategy, and implementation plan.
|
Note Red Team Review — OpenAI GPT-5.4 | Adversarial review (docs + diff only) Threat assessment — Moderate risk: this is “just an RFC” in the diff, but it proposes a user-facing config and runtime abstraction that cuts across CLI, SDK, server, and viewer, so bad decisions here will be expensive to unwind. One-way doors
Findings
Missing
Verdict — Block: the proposal is directionally plausible, but it cements a new top-level abstraction and config format without resolving ownership boundaries, compatibility rules, or multi-process correctness. Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary This PR adds an RFC document ( Alignment Good fit. DESIGN.md defines Pipeline as the core container but never addresses the runtime wiring problem this RFC identifies. The Workspace sits above Pipeline and Project without replacing either — it's a composition wrapper, not a new domain primitive. This respects the build/release separation (§1.5): Workspace delegates build/release to Project and keeps runtime concerns (queue, vllm, lock) in a separate The Observations
Verdict A well-motivated RFC that addresses real configuration sprawl without disturbing core abstractions — but it needs to resolve the dependency direction between workspace and server config types, and add an e2e test to the implementation plan before merging. Review parameters
|
- Config types (BucketConfig, BuildQueueConfig, VLLMConfig) move to workspace.py; server/config.py re-exports for backward compat - Explicit config file precedence: synix.toml wins, warning if both exist - Document open_project() vs open_workspace() guidance - Add scope/constraints section: single-process, not a god object, buckets vs source_dir distinction - WorkspaceState describes capability not recency - Add e2e test (test_workspace_e2e.py) to implementation plan - Add decisions log table resolving all review concerns
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary This PR adds an RFC document ( Alignment Strong fit. DESIGN.md establishes Observations
Verdict This is a well-scoped RFC that addresses real configuration sprawl without compromising core build-system invariants — a good incremental step, pending clarification on state gating semantics and the mutable-singleton tradeoff. Review parameters
|
|
Note Red Team Review — OpenAI GPT-5.4 | Adversarial review (docs + diff only) Threat assessment — Medium risk: this is “just an RFC,” but it proposes a user-facing config and API split that creates several one-way doors without showing the code that proves the migration is safe. One-way doors
Findings
Missing
Verdict — Block: this proposes multiple compatibility-affecting abstractions and config behaviors, but without implementation, migration proof, or public doc updates it is not safe to merge even as design direction. Review parameters
|
- Replace config precedence chain with single well-known location: synix.toml at workspace root. No fallback, no discovery logic. Old format handled by one-time migration CLI. - Add Phase 5: viewer shows workspace as first-class UI entity — name + state badge in header, config summary in Pipeline tab, workspace identity in /api/status response.
|
Note Red Team Review — OpenAI GPT-5.4 | Adversarial review (docs + diff only) Threat assessment — Medium risk: this is “just an RFC” in the diff, but it proposes user-facing config and API shapes that would be painful to unwind once implemented. One-way doors
Findings
Missing
Verdict — Block: this proposes multiple one-way public abstractions and config semantics, but it is still internally inconsistent and under-specified on migration, validation, and concurrency. Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary This PR adds an RFC document ( Alignment Strong fit. DESIGN.md's build/release separation is preserved: Observations
Verdict This is a well-scoped RFC that addresses real configuration sprawl without violating core architectural principles; it's a good incremental step, pending clarification of state derivation rules and the Review parameters
|
|
Note Red Team Review — OpenAI GPT-5.4 | Adversarial review (docs + diff only) Threat assessment — Medium risk: this is “just an RFC,” but it proposes new user-facing config and API names that are easy to ossify and it cuts across CLI, server, viewer, and config loading. One-way doors
Findings
Missing
Verdict — Block: this is a broad architectural proposal with public API and config one-way doors, and it currently conflicts with the project’s own Python-first story while keeping the same singleton-state fragility underneath. Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary This PR adds an RFC document ( Alignment Good fit with the vision. DESIGN.md establishes
The introduction of Observations
Verdict A well-scoped RFC that addresses real operational friction without touching the build-system core — good incremental step, pending clarification on state enum semantics and cross-process locking. Review parameters
|
- Phase 6: every template gets synix.toml, goldens regenerated - Phase 7: two e2e tests — full workspace lifecycle + server integration - Phase 8: deploy to /srv/synix/agent-memory/, rename config - synix init generates complete workspace scaffold (synix.toml included) - Updated files table and verification checklist
|
Note Red Team Review — OpenAI GPT-5.4 | Adversarial review (docs + diff only) Threat assessment — Medium-high risk: this is an architectural RFC that introduces a new top-level abstraction and config format, but the PR as shown is docs-only, so the risk is mostly in the one-way decisions it is trying to bless without implementation proof. One-way doors
Findings
Missing
Verdict — Block: too many architectural decisions are being committed in docs without implementation proof, concurrency guarantees, or reconciliation with the existing Project/Python-first model. Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary This PR adds an RFC document ( Alignment Good fit. DESIGN.md's build/release separation is preserved — Observations
Verdict A well-scoped RFC that addresses real configuration sprawl without compromising the core build-system model — good incremental step, ready to guide implementation once the bucket/source_dir contract (observation 6) and state computation cost (observation 3) are clarified. Review parameters
|
ViewerState now accepts release=None and discovers releases via before_request hook. Viewer starts immediately in "no release" mode and serves a 503 on data endpoints until the first build completes. - ViewerState.has_release property + try_discover_release() method - _require_release() guard on data endpoints (layers, artifacts, search, lineage) — returns 503 with clear message - serve.py: run_viewer passes release=None when no release exists, vLLM startup is non-blocking (asyncio.create_task) - viewer/__init__.py: serve() and create_app() accept release=None
|
Note Red Team Review — OpenAI GPT-5.4 | Adversarial review (docs + diff only) Threat assessment — Moderate risk: small code diff, but it quietly changes a user-facing server/viewer contract and introduces polling-style release discovery without clear concurrency or UX guarantees. One-way doors
Findings
Missing
Verdict — Ship with fixes: the idea is reasonable, but the API behavior change and unsynchronized per-request discovery need tests and at least basic hardening before merge. Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary This PR does two things: (1) introduces an RFC document proposing a Alignment The Workspace RFC is well-aligned with the build-system mental model. DESIGN.md's build/release separation (§1.5) is preserved — Observations
Verdict Good incremental step: the code change is a focused, correct prerequisite for the Workspace abstraction, and the RFC is well-structured and architecturally sound. Address the discovery polling cost (#2) and the hardcoded release name (#3) before merge. Review parameters
|
New module src/synix/workspace.py: - Workspace class wrapping Project via composition - WorkspaceConfig, BucketConfig, BuildQueueConfig, VLLMConfig - WorkspaceState enum (FRESH/CONFIGURED/BUILT/RELEASED/SERVING) - WorkspaceRuntime dataclass (replaces _state dict pattern) - ServerBindings dataclass (port/host config) - open_workspace() and init_workspace() factories - synix.toml parser 31 unit tests covering identity, state transitions, delegation, bucket resolution, runtime activation, TOML parsing, and factories. 1414 total tests pass with no regressions.
|
Note Red Team Review — OpenAI GPT-5.4 | Adversarial review (docs + diff only) Threat assessment — Moderate risk: the viewer change is small, but One-way doors
Findings
Missing
Verdict — Ship with fixes: the viewer change is fine, but the new Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary This PR introduces the Alignment Strong fit. DESIGN.md envisions Observations
Verdict This is a well-scoped foundational PR — it introduces the right abstraction at the right layer, with solid tests and no disruption to the build-system core. The lazy viewer discovery is a tangible UX win. Address the per-request re-discovery cost and the silent exception swallowing before merge. Review parameters
|
6 tests covering: - init_workspace creates complete scaffold (synix.toml, .synix/, sources/) - Full lifecycle: FRESH → CONFIGURED → BUILT → RELEASED with search - Reopen workspace preserves state across process restart - Custom synix.toml with buckets and workspace name - Bare workspace without synix.toml - Build + release produces accessible artifacts 2116 total tests pass.
|
Note Red Team Review — OpenAI GPT-5.4 | Adversarial review (docs + diff only) Threat assessment — Medium-high risk: this looks like an additive “workspace” abstraction, but it quietly changes public API, startup behavior, config semantics, and viewer lifecycle with weak compatibility proof. One-way doors
Findings
Missing
Verdict — Block: the viewer changes are shipping ahead of the workspace design, and the new abstraction introduces public API/config one-way doors without enough compatibility, validation, or documentation. Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary This PR introduces the Alignment Strong fit. DESIGN.md establishes that Synix is Python-first and build/release separation is absolute — Workspace respects both. It wraps Observations
Verdict This is a well-scoped, well-tested foundational abstraction that consolidates real configuration sprawl without disrupting the build-system core — a good incremental step. Review parameters
|
|
Note Red Team Review — OpenAI GPT-5.4 | Adversarial review (docs + diff only) Threat assessment — Medium-high risk: this PR introduces a new top-level abstraction and exports it publicly, but only a slice of the migration landed, so the surface is becoming user-visible before the design is actually coherent. One-way doors
Findings
Missing
Verdict — Block: the direction may be reasonable, but this lands a one-way public API and changed runtime behavior while the actual migration is incomplete and the abstraction still leaks storage details. Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary This PR introduces a Alignment Strong fit. DESIGN.md §1.5 defines the build/release separation and The Python-first bet (DESIGN.md §4.1) is preserved: Observations
Verdict This is a well-designed foundational abstraction that consolidates real configuration sprawl without absorbing responsibilities it shouldn't own — a good incremental step that unblocks the server/viewer UX and sets up clean phases for the remaining migration. Review parameters
|
…st isolation - _has_snapshots() now follows HEAD → ref → OID instead of hardcoding refs/heads/main (supports any branch name) - Viewer try_discover_release() has 5-second cooldown to avoid per-request filesystem churn before first build - Fix test_bucket_dir_absolute to use tmp_path instead of /tmp/
|
Note Red Team Review — OpenAI GPT-5.4 | Adversarial review (docs + diff only) Threat assessment — Medium-high risk: this PR adds a new exported top-level abstraction and changes viewer/server startup behavior, but only a slice of the RFC is actually implemented, so the surface area is bigger than the proof. One-way doors
Findings
Missing
Verdict — Ship with fixes if you keep Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary This PR introduces a Alignment Strong fit. DESIGN.md §1.5 establishes build/release separation and Observations
Verdict This is a well-structured incremental step that introduces a necessary coordination layer without violating the core build-system invariants — the Review parameters
|
|
Note Red Team Review — OpenAI GPT-5.4 | Adversarial review (docs + diff only) Threat assessment — Medium-high risk: this PR introduces a new public abstraction and changes viewer/server startup behavior with thin test coverage around the real failure modes. One-way doors
Findings
Missing
Verdict — Ship with fixes: the core idea is reasonable, but the current implementation leaks disk-layout details, has inconsistent state semantics, and under-tests the actual behavior changes. Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary This PR introduces a Alignment Strong fit. DESIGN.md §1.5 explicitly separates build from release; Workspace respects this by delegating build/release to The viewer's lazy release discovery advances Hypothesis 3 (architecture is a runtime concern) — you can start serving before you've figured out your pipeline, and the system adapts when a build lands. Observations
Verdict This is a well-designed incremental step that consolidates scattered configuration into a coherent abstraction without disrupting the build-system core — exactly the kind of infrastructure work a pre-1.0 project needs before scaling its surface area. Review parameters
|
- Move _last_discovery_attempt from class attribute to __init__ (was shared across all ViewerState instances, causing cross-instance throttling) - WorkspaceState.CONFIGURED now also checks if pipeline.py exists on disk, not just if pipeline is loaded in memory — state is truly derived from disk
|
Note Red Team Review — OpenAI GPT-5.4 | Adversarial review (docs + diff only) Threat assessment — Medium-high risk: this PR introduces a new exported abstraction and changes viewer/server startup semantics, but only partially wires the system around it. One-way doors
Findings
Missing
Verdict — Block: this is an incomplete architectural slice that exports a new public abstraction, changes viewer behavior, and ships an RFC pretending the rest already exists. Review parameters
|
|
Note Architectural Review — Claude Opus | Blind review (docs + diff only) Summary This PR introduces a Alignment Strong fit. DESIGN.md §1.5 establishes build/release separation with Observations
Verdict This is a well-structured incremental step — it introduces the Workspace concept additively without breaking existing paths, has strong test coverage, and correctly preserves the build-system invariants. The lazy viewer discovery is a meaningful UX improvement. Ship it with a note to address the config Review parameters
|
Summary
This RFC proposes a
Workspaceclass as the first-class unit of configuration in Synix, replacing the scattered state acrossProject,ServerConfig,Pipeline, and the_statedict.Problem: There's no single entity for "a synix project with its config, pipeline, buckets, build state, and runtime services." This causes 60 lines of manual wiring in serve.py, the viewer can't start without a release, CLI commands bypass Project entirely, and nothing enforces that these pieces form a coherent namespace.
Proposal:
WorkspacewrapsProjectvia composition and absorbs workspace-scoped config (buckets, auto_build, vllm, pipeline_path) while leaving server-specific settings (ports, hosts) separate.WorkspaceRuntimereplaces the global_statedict with typed runtime services[workspace]+[buckets]+[auto_build]+[vllm]are workspace-scoped;[server]is process-scopedopen_project()unchanged, old TOML format parsedSee
docs/workspace-rfc.mdfor full design, API, migration strategy, and phased implementation plan.Test plan