Workspace Operations Policy¶
Read the Workspace Policy first. This annex is mandatory for materialization, topology, shared orchestration, packaging, managed forks, workspace documentation/policy, normalization, and automation runtime work.
Layout And Ownership¶
repos\emulebb-toolingowns shared policy, helper docs, hooks, and static audits.repos\emulebb-buildowns topology, materialization, worktrees, dependency pins, build/validation/package/release orchestration, and the workspace lock.repos\emulebb-build-testsowns shared harness code.workspaces\workspace\deps.jsonandrepo-roles.jsonare generated contracts. Consumers useworkspace.repos; the deterministic server resolves throughworkspace.repos.ed2k_server. Selected repository profiles are recorded in both contracts, and non-core repositories are exposed separately rather than implied by paths. Consumers do not reconstruct old names or establish an independent topology authority.- The canonical MFC worktrees are
emulebb-main,emulebb-community-baseline, andemulebb-community-tracing-harnesson topology-defined branches.repos\emulebbis their branch-store anchor. - Retired pre-rename
eMule*paths are historical references only. - Output-root children are
builds,logs,reports,artifacts,packages,release,tmp,tools,cache, andprofiles. Canonical build roots areEMULEBB_WORKSPACE_OUTPUT_ROOT\builds\app,EMULEBB_WORKSPACE_OUTPUT_ROOT\builds\tests,EMULEBB_WORKSPACE_OUTPUT_ROOT\builds\amule,EMULEBB_WORKSPACE_OUTPUT_ROOT\builds\third_party, and the Rust targets. Package-only generated inputs useEMULEBB_WORKSPACE_OUTPUT_ROOT\packages\build. Runtime tool payloads usetools, includingtools\amule. Third-party orchestration prefersbuilds\third_party. - The core persisted-profile diagnostic-soak exception permits an explicitly selected operator-owned profile outside the output root. It does not create a second workspace output root: orchestration state, manifests, archived diagnostic segments, summaries, and promoted evidence remain under the configured output root, and generic cleanup never owns the external profile.
repos\ed2k-serveris the sole local deterministic ED2K server and an upstream-contribution reference. Follow upstream closely, prefer harness-side adaptation, and keep server changes minimal, generic, and upstreamable. Its candidate stages undertools\ed2k-server\bin; retired Go-server providers are not selectable workspace infrastructure.
Python topology in repos\emulebb-build\emule_workspace is the source of truth.
python -m emule_workspace validate fails generated-contract drift. Setup and
sync configure the shared hook and must not overwrite dirty managed work.
Environment And Tooling¶
- Never override an already-present
EMULEBB_*variable. RequiredEMULEBB_WORKSPACE_ROOTandEMULEBB_WORKSPACE_OUTPUT_ROOTare read exactly; the latter remains outside the workspace. EMULEBB_RELEASE_VERSIONselects release orchestration; its default is pinned byemulebb-build.- Windows is authoritative for WSL launches from this workspace. Persisted
Python launchers may translate valid roots and derive a separate
builds\rust\target-wsl, recording the mapping without changing the parent. X_LOCAL_IPcrosses into WSL only for LAN-bound control/probe traffic. Loopback-only control planes may omit it.- Diagnostic, package, VM-lab, and documentation environment knobs remain owned
by their orchestration modules. Diagnostics use
EMULEBB_ENABLE_STARTUP_DIAGNOSTICS,EMULEBB_ENABLE_PACKET_DIAGNOSTICS,EMULEBB_ENABLE_UPLOAD_SLOT_DIAGNOSTICS,EMULEBB_ENABLE_DOWNLOAD_SLOT_DIAGNOSTICS,EMULEBB_ENABLE_BAD_PEER_DIAGNOSTICS, andEMULEBB_ENABLE_KAD_DIAGNOSTICS. Package staging usesEMULEBB_PACKAGE_ROOT_NAME,EMULEBB_RELEASE_ASSET_ROOT_NAME, andEMULEBB_RUNTIME_SCRIPT_PATHS. The VM lab usesEMULEBB_VM_TEST_PASSWORD,EMULEBB_VM_HIDE_ME_SETTINGS_PATH,EMULEBB_OFFLINE_SOFTWARE,EMULEBB_OFFLINE_SYSTEM, andEMULEBB_OFFLINE_DEFAULT_USER. - Toolchain overrides
(
EMULEBB_VS_PLATFORM_TOOLSET,EMULEBB_MSYS2_ROOT,EMULEBB_CMAKE_GENERATOR,EMULEBB_CMAKE_PLATFORM) are shell/CI diagnostic inputs only and require recorded justification for release or CI use. NO_MKDOCS_2_WARNINGmay silence the MkDocs upgrade notice.
Build And Validation¶
- Interactive build, validation, test, live-test, and packaging commands go
through
python -m emule_workspace. Never run competing operations or direct MSBuild from app/test worktrees. - Changes receive scoped validation and the smallest relevant build/test set. Toolchain, dependency-pin, build-system, and broad integration changes receive the relevant full matrix.
- Routine validate runs build, branch, dependency, documentation-path,
PowerShell-boundary, entrypoint, warning, localization, English-language, and
normalization audits.
check-clean-worktree.pyis reserved for CI, release-prep, or explicit hygiene work. - Prefer build-level fixes over third-party source edits when the issue is orchestration, toolchain, or warning policy.
Managed Repositories¶
- The default
coreprofile contains the active Rust product, the MFC seed and all three diagnostic/release worktrees, their required third-party forks, workspace support repos, the single aMule reference, the stock eMule 0.72 reference, and the sole local Rust ED2K server. MFC remains buildable and shippable for diagnostics and critical fixes; it is not a historical-only lane. - Public-presence repositories use an explicit optional profile. Historical analysis repositories are not workspace profiles and must not be materialized by setup or synchronization. Normal operations must not pull archived, stale, paused, frozen, or unrelated product-family repositories.
stale/*branches are Git provenance only. Inspect one only when a task names the exact historical comparison; do not create a persistent workspace clone or worktree for it.- Build output stays outside source trees. CMake uses out-of-source output below
the output root, staged tools use
tools\<name>, and Rust follows the Rust Product Policy. repos\ed2k-serveris a transitional integration dependency whose desired end state is stockandrey23127/ed2k-serverat a reviewed, tested upstream commit. The eMuleBB remote exists to keep current CI/CD and interoperability workflows deterministic while that transition remains incomplete; it is not a parallel product, an independent roadmap, or a fork that the workspace aims to maintain indefinitely.- Local
ed2k-servercode changes are frozen by default. A local patch is permitted only when stock upstream demonstrably blocks a current approved build, validation, deterministic harness, or interoperability workflow and no reasonable fix can live inemulebb-build,emulebb-build-tests, oremulebb-tooling. A potential defect, proactive hardening opportunity, refactor, dependency refresh, observability improvement, or CI convenience is not by itself a workflow blocker. - An exceptional local server patch requires explicit operator approval and must be minimal, generic, upstreamable, covered by focused evidence, tracked in an upstream issue or pull request, and paired with an exit condition for removing it. Do not add eMuleBB-specific product behavior, provider logic, fixtures, workflow policy, or release ownership to the server repository.
- Prefer an upstream issue or pull request and keep temporary compatibility in the harness or orchestration layer whenever possible. Once reviewed upstream stock supports the required workflows, materialization and validation must move to that upstream commit and the eMuleBB fork must stop acting as the local implementation authority.
- Official
amule-org/amuleunderrepos\amuleis the single managed moving interoperability and offline-fixture reference. Sync may fast-forward only a cleanmaster; parity evidence records the tested commit. The archivalemulebb/amulefork may remain a secondary remote, not a second checkout, product worktree, or release gate. - Stock eMule 0.72 under
repos\emule-stockis the single clean moving stock compatibility reference. Instrumented eMuleBB MFC branches remain in the canonical app seed and worktrees; they do not replace the clean stock oracle. - Shared tests are extended in
emulebb-build-testsrather than forked into parallel per-client suites.
Documentation And Backlog¶
- Active Markdown belongs under
repos\emulebb-tooling\docs.DOCS-POLICY.mdowns taxonomy, uppercase-slug naming, navigation, and browser readability. - Workspace-wide rules live in the core or routed annexes. Repo READMEs and AGENTS point to them rather than copying them.
- GitHub Project #3 and the owning product repo issue own workflow state for externally actionable items; local items own durable specifications, acceptance criteria, implementation notes, and evidence. Explicitly local, historical, exploratory, and provenance-only items are exceptions.
- GitHub Project #3 is
https://github.com/orgs/emulebb/projects/3. MFChttps://github.com/orgs/emulebb/projects/2andhttps://github.com/emulebb/emulebb/issuesare archive/provenance by default. - Historical handoffs stay under
docs\history. Root state/progress notes are disposable after durable conclusions move into docs, history, or issues.
Files And Automation¶
- Honor
.editorconfigand.gitattributes, normalize edited tracked files, keep active text LF, and do not leave mixed EOL. Usehelpers\source-normalizer.pyfor uncertain, generated, or bulk edits. hooks\pre-commitis the shared hook; workspace sync configurescore.hooksPath.- Repeatable workspace automation is persisted Python in the owning repo. Search existing modules first and extend the closest owner before adding a file.
- PowerShell is limited to basic interactive inspection/invocation. Persisted soak, live, profiling, monitoring, build, package, and support workflows are Python. Do not add batch launchers.
- New tracked PowerShell is forbidden except package-owned runtime setup assets
below
repos\emulebb-build\emule_workspace\release_assets\emulebb\scripts\*.ps1and automation examples belowrepos\emulebb-build\emule_workspace\release_assets\emulebb_automation_examples\automation\*.ps1. Those assets stage undereMuleBB\scriptsor examples automation, use names such asStart-eMuleBB.ps1andRegister-Prowlarr.ps1inVerb-Noun.ps1form, declare#Requires -Version 5.1, and remain Windows PowerShell 5.1 compatible. New.cmdor.batlaunchers are forbidden.