# TeamForge — full AI-readable project context > Generated from canonical repository documentation during GitHub Pages deployment. Historical raw work-state notes and the full source tree are intentionally not inlined here; use repository-manifest.json when you need exhaustive discovery. --- ```json { "schemaVersion": 1, "product": "Unity TeamForge", "productVersion": "0.5.1", "releaseId": "0.5.1-wp5.1-path-resilience", "workPackage": "UX Bootstrap WP5.1 Path Resilience & Automatic Short Workspace", "target": "win-x64", "status": "FIELD_BLOCKED", "protocols": { "realtime": 1, "projectTransfer": 1, "projectManifest": 1, "runtimeManifest": 1, "launcherManifest": 1, "releaseManifest": 1 }, "unity": { "packageLine": "6000.3", "testedEditor": "6000.3.21f1" }, "node": { "version": "24.19.0", "supportedMajors": [ 22, 24 ], "minimumVersions": { "22": "22.23.2", "24": "24.18.1" }, "sourceArchive": "node-v24.19.0-win-x64.zip", "sourceArchiveSha256": "57f71ab3652e797d84acddc79c81cc9ff1c6ddb2a1974cdb83f00fee9bff4c73" }, "ws": { "version": "8.23.0", "integrity": "sha512-wCkmX8QMOrKjgO8HW2WyDbTSGeqkocxgDzS9iR79rEAexty6/2qzilx3Ag8Tqf9ykop3irLKle0MtVn5qjVnoQ==" }, "dotnet": { "targetFramework": "net10.0-windows", "runtimeVersion": "10.0.11", "testedSdk": "10.0.303" }, "npm": { "version": "11.19.0", "lockfileVersion": 3, "auditRequired": true, "registrySignatureVerificationRequired": true }, "launcher": { "deployment": "self-contained-folder", "signed": false } } ``` --- # TeamForge — Real-time Collaboration for the Unity Editor **Build together. Stay in sync.** *Zero-config first, never zero-control.* ![Status: Early Public Preview](https://img.shields.io/badge/status-early%20public%20preview-orange) [![License: AGPL-3.0](https://img.shields.io/badge/license-AGPL--3.0-blue.svg)](LICENSE) **English** | [한국어](README.ko.md) | **[How it works](docs/HOW_IT_WORKS.md)** | **[Current status](docs/STATUS.md)** | [Changelog](CHANGELOG.md) | [Roadmap](docs/ROADMAP.md) | [Discussions](https://github.com/Eun-si123/teamforge-unity-collab/discussions) | [Contributing](.github/CONTRIBUTING.md) | [Security](.github/SECURITY.md) **TeamForge** *(working name)* is an open-source real-time collaboration project for the Unity Editor. It explores **live Scene synchronization, connected-user presence, same-Scene Hierarchy collaboration, locking and ownership, and direct P2P project bootstrap and transfer** so small teams can work together with less project-copy friction. > [!WARNING] > **Early Public Preview — source is available, but general installation is not recommended yet.** > > TeamForge is still being stabilized and is not ready to be the only copy or recovery mechanism for an important Unity project. Keep backups and prefer disposable projects for early testing. See **[STATUS.md](docs/STATUS.md)** for the exact release-readiness state and remaining field blockers. ## Demo ![TeamForge live Unity Editor collaboration demo](TeamForge-readme-demo-hq-1280-12fps.gif) A development capture showing two Unity Editor instances connected through TeamForge and sharing Editor changes in real time. It demonstrates prototype behavior, not production readiness. Want to understand what happens behind the UI when a Host starts, a fresh Guest joins, a project transfers, or a Scene edit is synchronized? Start with **[How TeamForge works](docs/HOW_IT_WORKS.md)**, then continue to the architecture or code map when you want deeper implementation detail. ## At a glance | Area | Current state | | --- | --- | | Connected-user presence | ✅ Prototype exists | | Selection / Editor awareness | ✅ Prototype exists | | Transform synchronization | ✅ Prototype exists | | Same-Scene Hierarchy create/delete/rename/reparent/order | 🟡 Implemented / stabilizing | | Object Lock / Ownership | 🟡 Implemented / stabilizing | | Project bootstrap / Collaboration Invite | 🟡 Implemented / stabilizing | | Direct P2P Project transfer | 🟡 Implemented / stabilizing; direct reachability required | | Resume, integrity checks, staging, diagnostics, recovery | 🟡 Implemented / stabilizing | | Windows path resilience / managed short execution path | 🟡 Implemented / stabilizing | | Collider property collaboration (M1) | 🟡 Source opt-in merged; one-Editor/Node CI passed; not in published r10 or field-certified | | Collider add/remove (M2) | 🟡 Source opt-in merged to main, late-join fix included; one-Editor/Node CI passed; not in published r10 or field-certified | | Built-in shared Cube/Sphere primitives (M3) | 🟡 Opt-in source merged; 3-version Unity Editor+Node CI passed, physical two-Editor/packaged evidence NOT RUN | | General Component / Inspector / Prefab / Asset collaboration | ⏳ Arbitrary Components, Inspector, Prefabs and Assets not supported outside M1–M3 | | General-user packaged alpha | ⏳ Not ready yet | Current source product version: **`0.5.1`** · Packaged target: **Windows x64** · Current candidate state: **FIELD BLOCKED** For exact release ID, candidate tag, runtime/protocol identity, field evidence, and remaining release gates, use **[STATUS.md](docs/STATUS.md)** and **[release-contract.json](release-contract.json)**. For packaged artifact and SHA-256 identity rules, see **[builds/README.md](builds/README.md)**. ## Why TeamForge? TeamForge did not begin as a public developer-tool project. I was building a Unity game with a friend and started wondering: **what would it look like if two Unity Editor instances could communicate, share useful editing context, and collaborate in real time?** That question became an experiment we might eventually use ourselves. While building it, I started wondering whether the same idea could also help friends, students, small teams, and indie developers who run into their own collaboration friction. Version control is extremely useful, and TeamForge is **not intended to replace Git, Unity Version Control, or another version-control / backup system**. It focuses on the awkward moments around close collaboration inside the Editor, such as: - "Which version of the project do you have?" - "Can you send me the project?" - "Did you move that object, or did I?" - "Are you editing this Scene right now?" - "Why does it work on your PC but not mine?" - waiting for project files before another developer can begin working The experiment is to combine **live Editor collaboration** with **project bootstrap / transfer tooling** while keeping failure, recovery, identity, networking, and trust boundaries visible instead of hiding them behind "magic." ## Intended workflow The long-term common path should feel closer to: 1. Open a Unity project. 2. Start Collaboration. 3. Invite another developer. 4. The other developer gets what they need to join. 5. Both Editors connect. 6. Useful project and Scene changes can be seen collaboratively instead of constantly being passed back and forth manually. There are difficult synchronization, identity, networking, security, and recovery problems hidden inside those six steps. TeamForge exists to explore them seriously. ## Important current boundaries TeamForge is still an experimental collaboration layer, not a finished production platform. In particular: - Same-Scene Hierarchy operations are narrower than general Scene / Prefab / Asset collaboration. - General Component / Inspector / Prefab / Asset synchronization is not a supported current workflow. - Persistent server/session restart recovery is not implemented. - `P2P` currently means **direct Project Peer payload transfer**. The same PC, LAN, or a managed VPN can provide direct reachability, but TeamForge does not currently provide automatic peer discovery, WebRTC/ICE/STUN/TURN, relay, or automatic Internet NAT traversal. - The normal end-user path expects packaged runtime/launcher artifacts that are intentionally not committed as canonical source, so the source Git URL is **not a complete end-user installation path**. - The current Windows Launcher is not Authenticode-signed. - Arbitrarily deep Windows paths are not a supported promise; the current WP5.1 lineage uses a bounded managed path / short execution-path strategy. - TeamForge has not completed an independent professional security audit and cannot guarantee safety against every data-loss scenario, malicious peer, implementation mistake, or edge case. See **[STATUS.md](docs/STATUS.md)** for the full current validation, limitation, and release-readiness record. ## Source and validation The current source is available for **testing, review, security feedback, and contribution**. Start with **[docs/SOURCE.md](docs/SOURCE.md)** for the source-tree and contributor workflow. Major areas are: - `unity-package/com.eunsung.teamforge/` — Unity Editor package source and Editor tests - `server/` — coordination/session server source and tests - `project-peer/` — project bootstrap / direct-transfer tooling and tests - `launcher/` — Windows Launcher source and tests; packaged `win-x64/` output is generated separately - `scripts/` — development, source-validation, release-validation, and packaging helpers - `docs/` — current architecture/status plus historical test, release, and engineering records Generated runtimes, packaged executables, release ZIPs/manifests, local credentials, private keys, and machine-specific state are intentionally **not** committed as canonical source. ### Fresh-clone validation For an ordinary public source checkout: ```powershell npm run install:all npm run validate npm test ``` `npm run validate` is the **public-source validator** and does not require generated Runtime/Launcher/release-audit files. `npm run validate:release` is the stronger **staged release-candidate validator** and is expected to fail in a normal source checkout where those generated artifacts are intentionally absent. For named validation scenarios, use **[Test Lab](docs/TEST_LAB.md)**. For example, `npm run testlab -- plan all-local` shows what an ordinary local validation scenario contains without pretending Unity or physical field evidence ran. ### Automated checks GitHub Actions checks the Server, Project Peer, launcher runtime-loader, and .NET Windows launcher paths. Relevant pull requests and `main` pushes also run Unity `6000.3.21f1` EditMode / real-server E2E automation, deterministic authority/recovery chaos testing, and repository security automation. Green CI and automated scanning are useful evidence, but they are not substitutes for independent review or exact physical field validation. The current evidence and remaining two-PC Windows gates are tracked in **[STATUS.md](docs/STATUS.md)**. ## Development history TeamForge has been developed incrementally from the initial Editor connection prototype through Presence, Transform/Lock synchronization, P2P project bootstrap, Hierarchy synchronization, and later stabilization work. - **[Changelog](CHANGELOG.md)** — version-history entry point with links to detailed package history - **[Phase notes](docs/phases/)** — Phase 0 through Phase 4 development records - **[Work-state notes](docs/work-state/)** — implementation, debugging, hotfix, decision, and handoff notes Some work-state files began as internal engineering notes and may be rough or superseded by newer documentation. They remain visible so the project's implementation and debugging history can be inspected rather than rewritten into a cleaner story after the fact. ## Help and feedback wanted I do not want TeamForge to be validated only by the same person who is building it. Help is especially useful in these areas: - 🧪 **testing and breaking the prototype on disposable projects** - 🧩 **Unity / C# review** - 🌐 **networking and P2P review** - 🔐 **security review** - 📝 **documentation, UX, and translations** Start with **[Help wanted: testers, Unity/C# reviewers, networking & security feedback](https://github.com/Eun-si123/teamforge-unity-collab/issues/2)** or **[CONTRIBUTING.md](.github/CONTRIBUTING.md)**. For open-ended questions and ideas, use **[GitHub Discussions](https://github.com/Eun-si123/teamforge-unity-collab/discussions)**. Early criticism is useful too. Questions I am especially interested in include: - How do you currently collaborate on Unity projects? - What part of that workflow causes the most friction? - Would live Scene / Editor collaboration actually help you? - Is easier project sharing / bootstrap more valuable than live editing? - What would make you refuse to use a tool like this? - What would TeamForge need before you would trust it on a real project? You can also reply to **[Would you use TeamForge? Early feedback wanted](https://github.com/Eun-si123/teamforge-unity-collab/issues/1)**. ## AI-assisted development transparency TeamForge is developed using a **human-directed, spec-driven workflow with substantial AI assistance**. I provide project intent, goals, desired behavior, constraints, feedback, test evidence, and final decisions; AI tools assist with requirements, design options, implementation, tests, analysis, and documentation. This does **not** mean every line was manually written or professionally reviewed by me. TeamForge contains substantial AI-assisted and AI-generated material, and AI output is not treated as automatically correct. Independent review remains important, especially for architecture, race conditions, security, data-loss scenarios, and edge cases. AI-assisted contributions are welcome as long as contributors meaningfully review, test, and take responsibility for what they submit. See **[CONTRIBUTING.md](.github/CONTRIBUTING.md)**. ## Safety and security Treat every current TeamForge build as experimental software: - keep backups - prefer disposable test projects during early testing - expect incomplete behavior and compatibility changes - do not publish credentials, access tokens, invite secrets, or sensitive data in logs - treat unfamiliar forks and builds as untrusted until you have reason to trust them Security-sensitive reports should follow **[SECURITY.md](.github/SECURITY.md)**. If GitHub Private Vulnerability Reporting is available, prefer it for sensitive findings. ## Open-source direction and license TeamForge is an open-source project under the **GNU Affero General Public License version 3 (AGPLv3)**. The AGPLv3 was chosen because TeamForge is networking software and I want modified covered versions to remain inspectable rather than quietly becoming closed black boxes. Open source makes inspection possible, but it does **not** automatically make a build safe. **TeamForge was originally conceived, initiated, and developed as a project by [Eun-si123](https://github.com/Eun-si123) / BlackProtogen.** Later contributors and forks should receive credit for their own work as well. See **[LICENSE](LICENSE)**, **[NOTICE](NOTICE)**, and **[AUTHORS.md](AUTHORS.md)** for the actual project terms and attribution information. ## Repository guide | Resource | What it is for | | --- | --- | | [HOW_IT_WORKS.md](docs/HOW_IT_WORKS.md) | User-action-to-internal-flow explanation: Host, Guest, transfer, realtime edit, reconnect, recovery | | [STATUS.md](docs/STATUS.md) | Current capabilities, validation, limitations, and alpha readiness gates | | [release-contract.json](release-contract.json) | Exact current product/release/runtime/protocol identity | | [builds/README.md](builds/README.md) | Current/superseded packaged artifact classification and hash identity rules | | [architecture.md](docs/architecture.md) | Current as-built topology and authority/trust boundaries | | [CODEMAP.md](CODEMAP.md) | Question-to-code navigation for implementation and tests | | [TEST_LAB.md](docs/TEST_LAB.md) | Named validation scenarios and PASS/FAIL/INCOMPLETE evidence semantics | | [CHANGELOG.md](CHANGELOG.md) | Version milestones and links into detailed historical engineering records | | [docs/phases/](docs/phases/) | Phase 0–4 development history | | [docs/work-state/](docs/work-state/) | Raw implementation, debugging, and stabilization notes | | [docs/SOURCE.md](docs/SOURCE.md) | Public source tree, fresh-clone validation, and review entry point | | [ROADMAP.md](docs/ROADMAP.md) | Development direction and future work | | [CONTRIBUTING.md](.github/CONTRIBUTING.md) | How to test, review, document, or contribute | | [SECURITY.md](.github/SECURITY.md) | Security expectations and reporting | | [SUPPORT.md](.github/SUPPORT.md) | Where to ask questions or report different kinds of problems | | [AUTHORS.md](AUTHORS.md) | Project origin and contributor credit | | [NOTICE](NOTICE) | Attribution / origin terms accompanying the AGPLv3 license | | [LICENSE](LICENSE) | GNU AGPLv3 license text | ## Development pace TeamForge is a **personal open-source project, not a full-time job or a company-backed product**. Development may slow down or pause around school, rest, friends, games, other hobbies, or everyday life. A quiet period does **not automatically mean the project has been abandoned**. I would rather build TeamForge at a sustainable pace than pretend I can promise constant updates. --- # TeamForge current status **English** | [한국어](STATUS.ko.md) | [简体中文](STATUS.zh-Hans.md) _Current release-metadata review: 2026-11-21 (UTC). r11 is the latest published Windows test candidate and passed exact automated ZIP validation. Historical r9/r10 two-PC field reports are preserved, but the newly packaged M1–M4 features have NOT been validated on two physical Windows Editors. Readiness remains FIELD BLOCKED._ > [!WARNING] > **Early Public Preview — do not use TeamForge as the only copy or recovery mechanism for an important Unity project.** > > r5–r9 historical evidence applies only to each original immutable artifact. r9 passed exact Windows Release validation and reported physical two-PC baseline collaboration/reconnect on 2026-10-20. Published r10 passed its **automated** exact ZIP/Windows validation and has additional reported two-PC evidence, but neither installed PC hash nor the full failure-path field gate has been verified; readiness remains **FIELD BLOCKED**. This file is the **canonical human-readable source for current capability and release-readiness claims**. Other documents should link here instead of maintaining their own competing copy of current blocker or validation state. For exact product/runtime/protocol selections, use [`../release-contract.json`](../release-contract.json). For packaged byte identity and superseded-build rules, use [`../builds/README.md`](../builds/README.md). For detailed bug discussion and historical reproduction notes, use the linked GitHub issues. ## Current state at a glance **Source and package update (2026-11-21 UTC):** M1 Collider collaborative properties, M2 bounded Collider structure changes, M3 Cube/Sphere creation and optional M4 durable confirmed Session recovery are merged and now included in the immutable r11 Windows test ZIP. This is new packaged evidence, **not** new physical two-Editor acceptance. The earlier r9/r10 two-Windows-PC tests were actually performed and their reported PASS results remain valid for their original packages/scenarios. Source, CI, published ZIP and physical field evidence must remain separate. ### Mainline source progress and unmerged work — reviewed 2026-11-21 (UTC) **2026-11-22 live source checkpoint (not a release):** Public `main` through [`35215b5`](https://github.com/Eun-si123/teamforge-unity-collab/commit/35215b5c7b6d0673864c3dc534fd14504c4813e1) now includes [#578](https://github.com/Eun-si123/teamforge-unity-collab/pull/578) (Guest review of signed Project updates and Active/Publisher trust coordination), [#611](https://github.com/Eun-si123/teamforge-unity-collab/pull/611) (independent agent claim records), [#610](https://github.com/Eun-si123/teamforge-unity-collab/pull/610) (bounded Direct Transfer cancellation), [#613](https://github.com/Eun-si123/teamforge-unity-collab/pull/613) (imported Unity Asset folder coverage), [#608](https://github.com/Eun-si123/teamforge-unity-collab/pull/608) (lifecycle argument validation), and [#612](https://github.com/Eun-si123/teamforge-unity-collab/pull/612) (Swarm numeric limit validation). [#607](https://github.com/Eun-si123/teamforge-unity-collab/pull/607) remains a **Draft** for ordinary Unity native editing; live imported Prefab instantiation ([#600](https://github.com/Eun-si123/teamforge-unity-collab/pull/600)) and new two-physical-Windows-Editor acceptance are **not complete**. These are **source-only** changes; they do not update the immutable r11 Windows ZIP. Release readiness remains **FIELD BLOCKED**. The 2026-11-21 paragraphs below are historical evidence, not the current open-PR list. **As-built, not a release claim:** The public `main` source at [`0da2a77603f1`](https://github.com/Eun-si123/teamforge-unity-collab/commit/0da2a77603f120ca1876b330b9a048844640db0a) includes M1 Collider property collaboration ([#533](https://github.com/Eun-si123/teamforge-unity-collab/pull/533)), M2 allowlisted Collider add/remove ([#559](https://github.com/Eun-si123/teamforge-unity-collab/pull/559), follow-up [#565](https://github.com/Eun-si123/teamforge-unity-collab/pull/565)), M3 built-in shared Cube/Sphere ([#569](https://github.com/Eun-si123/teamforge-unity-collab/pull/569)), and opt-in M4 SQLite-backed confirmed Session restoration ([#572](https://github.com/Eun-si123/teamforge-unity-collab/pull/572)). These source features have CI/one-Editor-with-Node-peer evidence as described below, **not new physical two-Windows-Editor acceptance or an updated published ZIP**. Post-M4 source hardening merged by this review includes: runtime file hash streaming ([#570](https://github.com/Eun-si123/teamforge-unity-collab/pull/570)), placeholder field-evidence refusal ([#573](https://github.com/Eun-si123/teamforge-unity-collab/pull/573)), Pages generated-output secret guarding ([#575](https://github.com/Eun-si123/teamforge-unity-collab/pull/575)), forged NUnit XML comment/CDATA result refusal ([#577](https://github.com/Eun-si123/teamforge-unity-collab/pull/577)), malformed Guest machine-identity refusal ([#579](https://github.com/Eun-si123/teamforge-unity-collab/pull/579)), and invalid UTF-8 SSH control-frame refusal ([#585](https://github.com/Eun-si123/teamforge-unity-collab/pull/585)). The latest observed `main` CI for `0da2a77603f1` succeeded; this is **source/check evidence**, not packaged or physical certification. **Source merged during the 2026-11-21 follow-up:** [#574](https://github.com/Eun-si123/teamforge-unity-collab/pull/574) (review/resubmit preserved Transform edits), [#580](https://github.com/Eun-si123/teamforge-unity-collab/pull/580) (Hierarchy name), [#583](https://github.com/Eun-si123/teamforge-unity-collab/pull/583) (same-Scene reparent), [#584](https://github.com/Eun-si123/teamforge-unity-collab/pull/584) (sibling order), and M5's **read-only Host saved-change preview** [#586](https://github.com/Eun-si123/teamforge-unity-collab/pull/586) are now on `main` through merge commit [`50b9b38cb170`](https://github.com/Eun-si123/teamforge-unity-collab/commit/50b9b38cb170d6d868aae10d1e24bff66baa195d). Their latest-base PR required Server/Peer/Launcher/Dependency checks passed before each merge, with previously verified native Unity+Node feature evidence; some *additional post-update Unity matrix* jobs were still pending at merge time. This does not prove completed exact Windows packaged or physical two-Editor field verification. **Additional source merged on 2026-11-21:** [#601](https://github.com/Eun-si123/teamforge-unity-collab/pull/601) now connects ordinary Unity menu **built-in Cube/Sphere** creation to the same signed M3 Scene/Collider authority path without requiring the custom TeamForge creation menu (`main` merge `401d714`; required CI PASS, source Unity E2E passed on 6000.3.21f1, 6000.3.28f1 and experimental 6000.6.8f1). Non-default meshes, imported materials and Prefab instances are **not silently substituted** for primitives; unsupported edits remain local. [#602](https://github.com/Eun-si123/teamforge-unity-collab/pull/602) merged a real signed Project Peer initial-baseline transfer regression using synthetic external Prefab, FBX, Material, Texture and script files plus `.meta` GUID sidecars (`53df750`; 9/9 focused peer tests PASS and byte-exact Guest Active verification). **Initial Project file transfer is not live Prefab instantiation or post-join asset import**; those remain open in [#600](https://github.com/Eun-si123/teamforge-unity-collab/issues/600). No new packaged ZIP or two-physical-Editor acceptance has been completed. In the [post-merge Unity run](https://github.com/Eun-si123/teamforge-unity-collab/actions/runs/44908009678), LTS 6000.3.21f1 and 6000.3.28f1 E2E succeeded, but the experimental 6000.6.8f1 Realtime lane **did not execute tests because Unity Personal license activation assigned no seat**; do not count this as a source regression or a pass. Release status remains **FIELD BLOCKED**. **Historical 2026-11-21 hold (superseded):** [#578](https://github.com/Eun-si123/teamforge-unity-collab/pull/578) was previously held for Publisher trust-pin timing, interruption after activation and publication-freshness review. It was **subsequently merged on 2026-11-22**, as recorded above. Its source merge is not field or release acceptance. Draft [#587](https://github.com/Eun-si123/teamforge-unity-collab/pull/587) (primitive deletion recovery), live external Asset/Prefab placement, and physical M5 end-to-end validation remain incomplete. **Next honest acceptance gates:** The immutable r11 Windows ZIP has been built, published and exact-validated. Now test the exact same ZIP on two Windows PCs for M1 Collider edits/conflict/conditional Undo, M2 stable Component identity/save/reopen, M3 primitive replication, and explicitly enabled M4 persistence after a real Coordinator restart. Independently check each installed ZIP SHA-256, reconnect/failure paths, previous verified Active preservation and multi-client conditions before changing FIELD BLOCKED. - Product line: **`0.5.1`** - Source lineage: **`0.5.1-wp5.1-path-resilience`** - Latest published packaged candidate: **v0.5.1-prealpha-wp5.1-r11** - r11 source/tag commit: **5868efe02975aa94b2acd79f5dec39a7b830aa26** - r11 Windows ZIP: **Unity-TeamForge-0.5.1-WP5.1-path-resilience-candidate-r11-win-x64.zip** - r11 artifact SHA-256: **28774bccb9fb20da0d72fce38d9bab7645dac1b876de182fbd33ee421170a989** - Packaged target: **Windows x64** - Release-readiness state: **FIELD BLOCKED** - Unity line: **`6000.3`**; recorded candidate test Editor: **`6000.3.21f1`** - Realtime Protocol: **v1** - Project Transfer Protocol: **v1** - Project Manifest Schema: **v1** ### Source versus packaged candidate The latest [r11 Windows test pre-release](https://github.com/Eun-si123/teamforge-unity-collab/releases/tag/v0.5.1-prealpha-wp5.1-r11) was published 2026-11-21 (UTC) from 5868efe02975aa94b2acd79f5dec39a7b830aa26. The immutable ZIP SHA-256 is 28774bccb9fb20da0d72fce38d9bab7645dac1b876de182fbd33ee421170a989 and [r11 Exact Release Validation #44869428591](https://github.com/Eun-si123/teamforge-unity-collab/actions/runs/44869428591) succeeded for the published bytes. It includes the merged M1–M4 features and scoped recovery/Host-preview work. **No post-r10 physical Windows two-Editor acceptance has been claimed.** The [r10 pre-release](https://github.com/Eun-si123/teamforge-unity-collab/releases/tag/v0.5.1-prealpha-wp5.1-r10) was published 2026-11-03 (UTC) from 693d3a9d647f9a511012f1ebba3209834531656e. Its ZIP passed [r10 Exact Release Validation #41630492102](https://github.com/Eun-si123/teamforge-unity-collab/actions/runs/41630492102) on the published source SHA; the older [r9 validation #39147057920](https://github.com/Eun-si123/teamforge-unity-collab/actions/runs/39147057920) remains historical. Automated packaging validation does not establish the installed bytes or physical field results on both PCs. 2026-10-20 user-reported physical r9 results: Host and Guest Unity Test Lab smoke PASS; bidirectional Cube Transform PASS; same-Scene create/rename/delete PASS; basic Lock contention PASS; Guest close/reopen after Host changed position/name restored exact new state PASS. See [#301](https://github.com/Eun-si123/teamforge-unity-collab/issues/301), [#302](https://github.com/Eun-si123/teamforge-unity-collab/issues/302), [#67](https://github.com/Eun-si123/teamforge-unity-collab/issues/67). Newly created objects lack Mesh/Renderer/Collider components by current design ([#303](https://github.com/Eun-si123/teamforge-unity-collab/issues/303)). Seed port collision, process-loss recovery and full field matrix remain unverified on exact r9. On [2026-11-04, the tester reported r10 two-PC field results](PHYSICAL_FIELD_EVIDENCE_2026-11-04_R10.md): Host Ready, signed Publisher trust, Guest transfer/activation, Unity 6000.3.21f1 realtime join, basic Presence/Transform/Lock/Hierarchy, Host restart/recovery, resume, late join, bad-code rejection, and a long destination all **reported PASS**. Both installed Host/Guest ZIP hashes and complete step traces were **not independently confirmed**, so this is not byte-for-byte exact-r10-on-both-PC certification. Actual Guest Wi-Fi/NIC disconnection was **NOT RUN** to avoid losing headless remote management ([#457](https://github.com/Eun-si123/teamforge-unity-collab/issues/457)); repeated Launcher double-clicks caused multiple instances on r10, with [post-r10 PR #456](https://github.com/Eun-si123/teamforge-unity-collab/pull/456) merged as a source fix, not retroactively part of r10. Full field recovery/failure checks remain blocked. Previous r8 Release automation remains historical. Changes on current `main` do not retroactively change the immutable published r10 ZIP; source and packaged evidence must again be treated separately. Later source changes on `main` are not retroactively included in r10. ### Later r7-on-Host blockers, now packaged for r8 retest The [2026-10-04 r7 field follow-up](PHYSICAL_FIELD_EVIDENCE_2026-10-04.md#later-r7-on-host-follow-up-new-blockers-exposed) exposed stale Host Ready with no discoverable Direct Project Peer (baseline_unavailable), and an Existing-Active launch bypassing the short path and failing with DirectoryNotFoundException. Source review also identified the risk of selecting a child Project UUID directory as its own managed root. [PR #209](https://github.com/Eun-si123/teamforge-unity-collab/pull/209) merged on 2026-10-08 with ongoing Direct-Seed health, identity-bound Existing-Active execution-alias recovery, and a nested-root guard. Its source CI/Unity checks passed; these changes are now included in **r8**, and r8 package validation passed. The precise original Seed disappearance cause remains unconfirmed, and **none** of these three field failures has yet been physically re-tested on exact r8. Readiness stays **FIELD BLOCKED**. ### Post-r5 stabilization and r6 field fix now packaged in r7 r7 includes the bounded behavior that was newer than r5, plus the field-discovered retry fix: - Windows LAN firewall onboarding that can create narrow Coordinator/Seed inbound rules after explicit user and UAC approval, scoped to the Private profile and `LocalSubnet`, with TeamForge-owned reconciliation/cleanup behavior; - Seed startup recovery when the preferred/default port is occupied or unavailable, including Windows bind-context `EACCES`, with one fallback to an OS-assigned port and advertisement of the actual selected endpoint; - Project identity creation serialization and Windows crash recovery using an OS-owned named-pipe live lock plus a permanent compatibility fence for older writers. Recent Node 22/24 Windows identity-recovery jobs passed; issue #182 remains open as an intermittent-CI watch rather than a demonstrated persistent incompatibility; - Guest managed-root retry now recognizes only the exact bounded TeamForge-owned Windows v2 `project-identity.lock` compatibility fence instead of rejecting TeamForge's own fence as unmanaged content; malformed or modified fence content remains fail-closed; - Coordinator rejection cleanup, HTTP cancellation/deadline hardening, improved Host diagnostic context, WebSocket client-role logs, clearer Launcher Invite versus `TF1` code wording, and the current `TeamForge · Locked by ` SceneView feedback. Issue #79 remains open because visual feedback does not necessarily eliminate all transient local Gizmo motion. Linux/macOS Project identity stale-lock recovery remains outside the Windows-specific recovery implementation. ## Capability status ### M1 source integration — Collider property collaboration **Source evidence refresh: 2026-11-18 (KST).** M1 PR #533 merged into main. Its exact source-head [Unity CI](https://github.com/Eun-si123/teamforge-unity-collab/actions/runs/43329700733) passed real one-Editor/Node-peer Collider edits, conditional Undo and reconnect. This is **not** physical two-Editor Windows LAN, a new packaged candidate or a retrospective PASS for the published r10 ZIP. Release readiness stays **FIELD BLOCKED**. The M1 integration branch reuses the existing WP6 PR stack and adds a real signed-source admission → Session Authority → WebSocket → Unity Collider path. It is an **explicit source opt-in**, separate from the published r10 ZIP. BoxCollider/SphereCollider trigger, center and size/radius are allowlisted; initial admission verifies actual stored signed Scene/meta bytes and the complete saved non-Prefab Collider inventory. Subsequent dirty-Scene edits use the in-memory runtime ledger, common Session revision/history and GameObject lease. Property and future structure capabilities are separate. The Editor's Collider Collaboration window provides join/status, conditional own Undo/Redo and a project-local recovery inbox with explicit resubmission. Server commit, Editor apply report and dirty/saved disk state are displayed separately. An Editor report is a receiver claim, not independent attestation. | M1 evidence stage | State | | --- | --- | | Implementation | **Merged into main via PR #533**; explicit source opt-in, not in published r10 | | Automated validation | Real Node WebSocket success/conflict/retry/late-join/reconnect and signed-source tests pass; exact final-head evidence is recorded in the PR/checkpoint | | Unity integration | **Exact PR #533 Unity CI PASS** on 6000.3.21f1, 6000.3.28f1 and experimental 6000.6.8f1 for one real Editor + Node peer; Linux-local Unity and physical two-Editor Windows tests are **NOT RUN** | | Package / physical Windows validation | **NOT RUN** for M1. No new candidate or field promotion; r10 evidence is unchanged | Current source bounds: one admitted Scene per Session; at most 128 retained Collider Sessions; at most 512 Colliders / 1536 properties, finite values within the documented ±100/0–100 limits. Unsupported Components/fields remain local. Component add/remove, Prefab changes and deletion of an admitted Collider owner or its ancestor require M2 and are refused in this active M1 path. All peers editing that Scene must negotiate/join the compatible property capability. In the original M1-only runtime, disconnecting all peers retains the in-memory ledger but a Coordinator restart loses it. The separately configured, merged M4 durable mode (#572) now persists accepted Session state; a project-local inbox for unconfirmed edits alone is not server durability. Physical two-Editor, three-Editor late join, save/reopen, 8-Editor/one-hour soak and exact Windows artifact checks remain separate gates. Operator configuration and Editor steps are in [server/README](../server/README.md). The [approved roadmap](ROADMAP.md) tracks the remaining milestones; M3 and M4 source integration have now merged, but M4 physical/package evidence and later features remain pending. Source implementation, CI, packaging and physical field evidence remain distinct. ### M2 source integration — Collider component lifecycle On 2026-11-18, [M2 PR #559](https://github.com/Eun-si123/teamforge-unity-collab/pull/559) **merged into `main`** (merge commit `1e1054096278182a26f8849a0f847bfb8a2df330`), including the late-joining Editor fix [#565](https://github.com/Eun-si123/teamforge-unity-collab/pull/565). In the opt-in structure path, an authorized Editor can add/remove BoxCollider and SphereCollider components using exact shared logical IDs, including same-type siblings, saved Scene reopen, reconnect and bounded conditional Undo/Redo. Structural synchronization requires M1 property synchronization, a managed signed Project root, compatible participating Editors and the explicit `TEAMFORGE_COMPONENT_STRUCTURE_SYNC=1` server flag; it is **off by default**. This is a narrow supported source path, **not arbitrary Component/Prefab/Inspector synchronization**. The combined PR head passed **36 CI check contexts** with no failures, including real Unity Editor + Node peer E2E on three configured Unity versions and source-linked evidence. One Editor + Node peer is **not** simultaneous physical Windows LAN collaboration between two Editors. Physical multi-Editor Windows LAN, soak, a fresh packaged artifact and installed ZIP identity remain **NOT RUN** for M2. The published immutable r10 package does not contain M1/M2; release readiness stays **FIELD BLOCKED**. ### M3 source integration — built-in shared Cube and Sphere On 2026-11-19, [M3 PR #569](https://github.com/Eun-si123/teamforge-unity-collab/pull/569) merged into main (merge commit 3fa4232e445d65f449b686687f74307225059d70). In a joined saved non-Prefab Scene, an Editor can use GameObject → TeamForge → Create Shared Cube / Create Shared Sphere. Unity creates its built-in Mesh and Renderer with the exact Box/SphereCollider identity. An authorized lock owner can move it, edit its Collider, or use Delete Selected Shared Primitive. The Coordinator commits Hierarchy and Collider topology in one revision/epoch; exact retries, late join, Scene save/reopen and reconnect are covered in the supported path. The feature is off by default: it requires TEAMFORGE_PRIMITIVE_TEMPLATE_SYNC=1, the existing M1/M2 flags, managed signed Project source, and capable participating Editors. This is not arbitrary Mesh/Asset/Prefab replication and is limited to built-in templates in saved non-Prefab Scenes. Automated evidence: the [exact-head Unity CI](https://github.com/Eun-si123/teamforge-unity-collab/actions/runs/44423032945) and [ordinary CI](https://github.com/Eun-si123/teamforge-unity-collab/actions/runs/44423033586) succeeded (40 PR checks, no failures), including real Unity Editor and Node peer on 6000.3.21f1, 6000.3.28f1 and experimental 6000.6.8f1. Physical two-Editor Windows LAN, 8-Editor soak, exact new package/installed ZIP identity: **NOT RUN**. Published immutable r10 excludes M3 and release readiness stays **FIELD BLOCKED**. ### M4 source integration — durable Coordinator Session recovery On 2026-11-20, [M4 PR #572](https://github.com/Eun-si123/teamforge-unity-collab/pull/572) **merged into `main`** (merge commit `f3b33413ecaa7f06c87e99734694d336a8acf4c6`). M4 is **opt-in source behavior**, not part of the published r10 ZIP. With `TEAMFORGE_DURABLE_SESSION_DB` pointing to a local SQLite database and `TEAMFORGE_COMPONENT_PROJECT_ROOT` to the approved managed signed Project store, the Coordinator persists confirmed Hierarchy, Transform and Collider Session state and operation outcomes **before acknowledgement**. After restart, the same signed Session restores under a **new authority epoch**, without restoring old connections, Presence or locks; invalid source, corrupted storage and failed writes must fail closed. See [Coordinator setup](../server/README.md#m4-coordinator-restart-recovery). **Automated evidence:** The merged M4 PR passed **36 latest-head CI checks**, including SQLite/restart/process-loss paths and a real Unity Editor plus Node peer on Unity 6000.3.21f1, 6000.3.28f1 and experimental 6000.6.8f1. This does **not** prove a new Windows release package, two physical Editors concurrently testing M4, or long-duration soak. **Field evidence boundary:** Earlier r9/r10 [real two-Windows-PC tests](PHYSICAL_FIELD_EVIDENCE_2026-11-04_R10.md) **already reported PASS** for basic collaboration, Guest reconnect, and Host Stop/Start. Those tests did **not** exercise newly implemented M4 **SQLite durable Session restoration**; that specific scenario is **NOT RUN on two physical Editors**. Preserved local Transform review/resubmission is now merged via [#574](https://github.com/Eun-si123/teamforge-unity-collab/pull/574), but its new source path has **no two-physical-Editor field acceptance**. The published r10 ZIP and overall **FIELD BLOCKED** readiness remain unchanged. | Area | Current source state | Current evidence boundary | | --- | --- | --- | | Connected-user presence | ✅ Implemented / exercised | Physical two-PC baseline worked; broader external testing remains useful | | Selection / Editor awareness | ✅ Implemented / exercised | Broader external testing remains useful | | Transform synchronization | 🟡 Implemented / stabilizing | Exact r5 two-PC late-join/contention recovery passed; r7 exact-package automation passed; broader physical coverage and #79 UX follow-up remain | | Basic locking / ownership | 🟡 Implemented / stabilizing | Exact r5 contention/recovery passed; r7 includes foreign-lock SceneView feedback; #79 remains open for transient-edit prevention/clarity | | Same-Scene Hierarchy create/delete/rename/reparent/order | 🟡 Implemented / stabilizing | Supported subset was exercised physically; broader field coverage remains useful | | Project bootstrap / Collaboration Invite | 🟡 Implemented / stabilizing | Exact r5 saved-Guest reconnect passed; r7 packages Windows Project identity crash recovery plus the Guest fence-retry fix and passed exact-package automation; physical process-loss/conflict recovery remains pending | | Direct P2P project transfer | 🟡 Implemented / stabilizing | Exact r5 `5091` Stop/Start + real transfer passed; r7 packages firewall onboarding, unavailable-port fallback, and the Guest retry fix found during the r6 field pass; actual two-PC LAN lifecycle evidence remains pending | | Diagnostics / recovery UX | 🟡 Implemented / stabilizing | r7 packages the later diagnostics/recovery refinements and privacy-safe support-bundle path; broader field usability remains useful | | Windows path resilience / execution alias | 🟡 Implemented / stabilizing | Exact r5 real long/deep-path handoff passed; exact r7 Windows path/junction automation passed; malicious/unrelated alias refusal remains fail-closed coverage | | Collider and built-in primitive collaboration | 🟡 M1/M2/M3 source opt-ins merged | Collider properties, exact Box/SphereCollider add/remove and built-in Cube/Sphere shared creation/deletion are in main; actual single-Editor/Node CI passed. Physical two-Editor, exact package and field evidence NOT RUN. General Inspector/Prefab/Asset replication and arbitrary SerializedProperty sync are not supported | | Prefab / general Asset collaboration | 🟡 Initial Project file transfer only verified | #602 proves signed initial Project transfer of synthetic Prefab/FBX/Material/Texture/scripts and byte-exact `.meta` GUIDs. Live Prefab instantiation and post-join asset updates remain unimplemented/unverified under #600 | | Durable server/session restart recovery | 🟡 M4 opt-in source merged (#572) | Confirmed shared state persists in SQLite and restores under a new epoch in source CI. M4 physical two-Windows-Editor, new exact package and soak tests NOT RUN; without M4 configuration, the runtime remains memory-resident | | Automatic Internet NAT traversal / relay | 🔬 Research / future | No WebRTC, ICE, STUN, TURN, relay, discovery, or automatic NAT traversal | ## Exact r5 physical closure record The following table replaces the older wording that incorrectly treated the original blocker set as still awaiting exact physical validation. | Issue | Exact r5 physical result | Remaining boundary today | | --- | --- | --- | | [#67](https://github.com/Eun-si123/teamforge-unity-collab/issues/67) — saved Guest reconnect | **PASS** — legitimate collaborative edit/save → Guest Unity close → same verified Active Project reopen → realtime rejoin without `guest_handoff_mismatch` | Fresh/unverified identity rejection remains protected by strict implementation and automated regression coverage | | [#68](https://github.com/Eun-si123/teamforge-unity-collab/issues/68) — fresh late-join snapshot conflict | **PASS** — fresh Guest received authoritative Hierarchy/Transform/Lock state and later live Transform without false protected conflict | Broader scenarios remain useful, but this original field blocker is closed | | [#74](https://github.com/Eun-si123/teamforge-unity-collab/issues/74) — stale lock-contention protected conflict | **PASS** — losing-side contention recovered to authoritative state and collaboration remained usable | UX clarity while another peer owns the lock is tracked separately in #79 | | [#69](https://github.com/Eun-si123/teamforge-unity-collab/issues/69) — receive shutdown | **PASS** — Launcher was force-ended during receive multiple times; verified partial data was reused and resume completed without reproducing the original CLR/application error | Future runtime changes should keep regression coverage, but this original r5 field blocker is closed | | [#70](https://github.com/Eun-si123/teamforge-unity-collab/issues/70) — Seed/firewall onboarding | **PARTIAL FOR r5 PRODUCT GOAL / PASS FOR STABLE-SEED PATH** — packaged Host Stop/Start rebound on TCP `5091` and a real Guest transfer succeeded once firewall access existed | Fresh automatic Windows firewall onboarding and newer unavailable-port fallback were added after r5 and still need exact replacement-package physical evidence | | [#71](https://github.com/Eun-si123/teamforge-unity-collab/issues/71) — execution-alias handoff | **PASS** — long/deep destination triggered path optimization, Unity opened, and realtime collaboration worked | Malicious/unrelated/retargeted alias refusal remains automated fail-closed coverage | Detailed timelines belong in the GitHub issues. This page owns their current release effect. ## Automated and local evidence Before PR #81 merged, its final integrated head passed the repository protection gates recorded in `docs/MAIN_PATCH_STATUS_2026-08-27.md`: - CI run #216: Server, Project Peer, Launcher runtime loader, Windows Launcher, and public-source contract — **PASS** - Dependency Review run #140 — **PASS** - Unity Tests run #73 — **PASS** - Unity Lock Contention E2E - Unity Realtime Authority E2E - Realtime Authority Chaos E2E - Project Transfer Resume E2E - Earlier local Unity Test Runner: **143 / 143 locally runnable tests PASS**; two CI-only real-server tests intentionally ignored locally - Same-machine A/B contention recovery — **PASS** - A/B/C late-join Hierarchy/Transform convergence — **PASS**, zero protected conflicts in the recorded run Later source hardening has also been exercised by focused Project Peer/Launcher/Unity tests and the normal repository quality gates. In particular, the Windows Project identity crash/concurrency suite passed on supported Node 22 and Node 24 lines, and the unavailable-Seed-port regression path passed the full Project Peer suite on the reproduced Windows environment. The published r7 artifact additionally passed Exact Release Validation run `37118580632`: Release download/hash identity, release-manifest file hashes, Korean/space-path fresh extraction from a foreign CWD, staged public/source validation, bundled Runtime/Node verification, Launcher fail-closed Runtime behavior, and exact-candidate Windows path-resilience/real-junction checks all passed. This is package evidence for those automated checks; it is not a substitute for the remaining two-PC LAN/UAC/process-loss/realtime field scenarios. ## Recorded physical two-PC evidence ### 2026-10-03/04 r6 → r7 field pass A physical r6 pass on two Windows PCs first confirmed the unauthenticated-LAN fail-closed gate, external-local-package refusal, Windows firewall onboarding, and Host Ready after rule configuration. The Host Unity process in that pass was already elevated, so a clean non-elevated UAC prompt remains unverified. The first Guest connection attempt hit `coordinator_timeout`; a retry then exposed `destination_contains_unmanaged_content` because TeamForge's own Windows v2 `project-identity.lock` compatibility fence was not recognized by Guest destination validation. PR #200 fixed that contradiction without accepting arbitrary lock files, and the exact r7 Guest physically re-used the real r6-managed root without reproducing the self-blocking error. The remaining Coordinator timeout was then isolated to Windows network policy in this run: the Host Coordinator was listening on `0.0.0.0:5080`, while TeamForge's inbound rules were correctly Private-only but the active Host Wi-Fi profile was Public. After the trusted LAN was changed to Private, Guest TCP 5080 succeeded and the same r7 flow advanced through Publisher trust, Project receive, Unity launch, and a user-reported TeamForge connection. See `PHYSICAL_FIELD_EVIDENCE_2026-10-04.md` for the dated evidence boundary. ### 2026-08-22 baseline Before the targeted blockers were isolated, the recorded physical Windows flow demonstrated: - Host → signed Collaboration Invite → fresh Guest → authentication → direct Project transfer → Publisher trust → verified Active Project → Unity realtime connection; - Presence and bidirectional Transform synchronization; - normal lock/ownership contention; - supported same-Scene Hierarchy create/rename/reparent/sibling-order/delete; - unsaved Guest exit/reopen with authoritative Hierarchy/Transform/Lock recovery from the still-running session; - Coordinator TCP interruption → retry → automatic reconnect without restarting Unity. ### 2026-08-31 exact r5 closure The exact r5 ZIP/SHA pair was then used on two physical Windows PCs to close the targeted saved reconnect, fresh late-join, repeated receive-resume, long/deep-path and lock-contention recovery scenarios described above. The same field pass also verified the packaged stable-Seed `5091` Stop/Start path and a real LAN transfer, while recording that fresh firewall onboarding still required manual allowance at that time. ## Evidence boundaries A result proves only what it exercised. - Source CI does not prove a packaged ZIP is correct. - Unity automation does not reproduce every SceneView input ordering, Windows process condition, LAN/firewall state, or second-machine timing path. - Same-machine multi-project testing strengthens confidence but still shares one OS, network stack, timing environment, and hardware. - Exact r5 physical evidence proves the r5 bytes and scenarios that were exercised; it does not prove r6/r7-specific networking/identity behavior. - Exact r7 automated Release validation proves the r7 artifact/hash/manifest/extraction/Runtime/Launcher/path checks that ran. The mixed r6 Host / exact-r7 Guest field pass additionally proves the fixed Guest retry and one real LAN bootstrap path after correcting the Host Windows network profile; it still does not prove exact-r7-on-both-machines, fresh non-elevated UAC/firewall onboarding, preferred-port fallback, physical process-loss recovery, or SceneView UX timing. - Exact r8 Windows Release validation run 38019297086 passed for its immutable ZIP and hash. Exact r10 Windows Release validation run 41630492102 also passed for the r10 packaged ZIP. Neither automated result establishes verified installed hashes on both PCs, Wi-Fi/NIC loss, UAC/firewall, port fallback, identity process-loss recovery or SceneView interaction behavior. - Product version alone is not byte identity; exact packaged evidence requires the exact artifact filename and SHA-256. - A closed bug does not automatically prove that every later implementation touching the same subsystem has package/field evidence. - Historical phase/work-state/evidence notes remain valid for their recorded snapshots but do not override this page for current readiness. ## Remaining release-readiness gate Before release promotion, use the immutable r11 ZIP/hash for the new M1–M4 physical collaboration and recovery/negative gates. Preserve older r5–r10 field evidence rather than assigning it to r11. 1. Record the r11 tag, source commit, ZIP filename and SHA-256; verify the exact downloaded ZIP independently on each Host/Guest PC. Never replace or repack any previously published immutable release bytes. 2. Test **exact r11 on both physical Windows PCs**: fresh Host → signed Invite → Guest verified receive → Active Project → Unity launch → realtime connection; then Host Stop/Start and a new transfer. 3. Reproduce or safely simulate missing Host Direct Seed while Host is Ready; verify that stale Ready is revoked and the Guest receives truthful, recoverable diagnostics instead of misleading availability. 4. Reopen a previously verified Existing-Active project under long/deep paths; confirm identity-bound short execution alias and no old Unity PackageCache DirectoryNotFoundException. Selecting an individual Project UUID directory as the managed root must fail closed without creating nested UUID directories. 5. From a fresh non-elevated Windows Host, verify UAC/firewall onboarding and Private + LocalSubnet rules. Keep Public-profile refusal; do not broaden exposure merely to obtain a PASS. 6. Occupy the preferred Seed port, verify fallback and advertised reachability, stop/start, and a second successful transfer; test process-loss Project identity recovery without admitting ambiguous/conflicting identities. 7. Exercise realtime Presence/Transform/Hierarchy and foreign-owner Lock feedback on two Editors. PR #217's later warning-repaint refinement is not part of the r8 ZIP; issue #79 still tracks transient Gizmo motion clarity. 8. Watch intermittent Windows Node 22 Project identity issue #182 without weakening fail-closed assertions. Preserve historical r5–r10 evidence and record only newly observed r11 outcomes. Test safe Guest Wi-Fi/NIC loss only when remote administration is protected (#457). 9. Test r11-specific M1 Collider concurrent edits/Undo, M2 Component identity/save/reopen, M3 primitive replication and opt-in M4 durable SQLite recovery after an actual Coordinator process restart. Historical r10 Host Stop/Start is not M4 evidence. Keep Installer/Update/Uninstall and UX work independently tracked (#590). Package and source checks do not substitute for these field scenarios. ## Information ownership To avoid documentation drift, use these sources for these questions: | Question | Canonical source | | --- | --- | | What works now? What is blocked? | **This `STATUS.md`** | | What exact versions/runtimes/protocols are selected? | [`release-contract.json`](../release-contract.json) | | What exact packaged bytes are current/superseded? | [`builds/README.md`](../builds/README.md) + GitHub Release SHA-256 | | How does TeamForge work end to end? | [`HOW_IT_WORKS.md`](HOW_IT_WORKS.md) | | What is planned? | [`ROADMAP.md`](ROADMAP.md) | | How is the current system structured? | [`architecture.md`](architecture.md) | | Why was an architecture decision made? | [`architecture-decisions.md`](architecture-decisions.md) | | How are named validation scenarios run? | [`TEST_LAB.md`](TEST_LAB.md) | | What is the detailed state of a bug? | GitHub Issues | | What happened in an older test or stabilization pass? | Dated phase/work-state/evidence notes | --- # How TeamForge works This page explains **what happens inside TeamForge when a person hosts, joins, transfers a project, edits a Scene, disconnects, or recovers from a failure**. It is intentionally a guided explanation rather than a complete protocol specification or source-code map. - For the current supported/blocked feature set, use [STATUS.md](STATUS.md). - For the authoritative as-built topology and trust boundaries, use [architecture.md](architecture.md). - For file-level implementation navigation, use [CODEMAP.md](../CODEMAP.md). - For why important design choices were made, use [architecture-decisions.md](architecture-decisions.md). ## The 60-second model TeamForge currently has two deliberately separate data paths: ```mermaid flowchart LR HU["Host Unity Editor"] -->|"Realtime operations\nWebSocket"| S["TeamForge Server\nSession Authority"] GU["Guest Unity Editor"] -->|"Realtime operations\nWebSocket"| S HU --> HP["Host Project Peer / Seed"] GL["Guest Launcher"] --> GP["Guest Project Peer"] HP <-->|"Project payload\nDirect HTTP"| GP GP -->|"Verified Active project"| GU S -.->|"Signed coordination metadata"| HP S -.->|"Signed coordination metadata"| GP ``` The important separation is: - **Realtime authority** goes through the TeamForge Server. - **Project file payload bytes** move directly between Project Peers. - The Server coordinates project metadata but does not become the project-file relay. - The Guest does not open received content until trust, integrity, activation, and Unity-handoff checks pass. That separation keeps large project transfer away from latency-sensitive collaboration traffic while leaving one clear realtime authority. ## The main processes ### Unity Editor package The Unity package is the Editor-facing part of TeamForge. It provides the Host flow, realtime connection lifecycle, Presence, supported Transform/Lock and same-Scene Hierarchy collaboration, diagnostics/recovery presentation, and the application of approved remote state to the local Scene. The Unity client **observes authority**. A local Scene value does not become authoritative merely because it exists in one Editor. ### TeamForge Server The Server has two distinct responsibilities: 1. **Session Authority** — membership, shared revision/order, locks/leases, retained supported Scene state, replay/idempotency protection, and realtime effects. 2. **Project Coordinator** — signed project/publisher/baseline/peer coordination metadata. The Server does not store or relay the normal project Manifest/File/Chunk payload. ### Project Peer Project Peer owns project bootstrap and transfer behavior: signed invite validation, deterministic manifests and hashes, direct HTTP transfer, verified resume, staging, immutable Active revisions, filesystem/path safety, and project/publisher trust checks. A successful network download is not enough to activate a project. Content still has to pass the complete verification and trust path. ### Windows Guest Launcher A fresh Guest starts outside Unity because there may be no Unity project to open yet. The Launcher verifies its bundled TeamForge Runtime, checks the invite and trust state, receives the project through Project Peer, validates the final Active project and required Unity version, then hands off to Unity. Normal packaged Guests do not need to install or manually operate system Node.js/npm. For troubleshooting, current Launcher source can also create a **manual local support bundle**. That ZIP is a bounded/redacted observation artifact; it is not uploaded automatically, does not grant authority, and does not bypass invite, trust, activation, Runtime, path, or Unity-handoff validation. Whether a packaged candidate contains that action depends on the exact artifact that was built; [STATUS.md](STATUS.md) and [../builds/README.md](../builds/README.md) distinguish current source from published packages. ## What happens when the Host starts collaboration At a high level: ```text Host chooses Publish & Start ↓ Unity Host flow checks the local project / saved Scene prerequisites ↓ Project Peer prepares a deterministic project baseline ↓ Files and chunks receive integrity identities ↓ Host Project Peer starts the direct transfer Seed ↓ Project / publisher / baseline / peer metadata is coordinated with the Server ↓ TeamForge creates a signed Collaboration Invite ↓ Host becomes ready for Guests ``` The exact implementation contains additional fail-closed checks, but the important user-visible idea is that **Host Ready means more than “a port opened.”** TeamForge has established the project-transfer and realtime-session contracts needed by the Guest flow. The **ordinary signed Collaboration Invite** does not contain the access code, private signing key, or arbitrary local project path. The recommended default is to share any reusable Server access code separately. For a trusted private exchange, current source also offers an **explicit opt-in clipboard-only “Copy invite + code (sensitive)”** action on Host Ready. It creates a distinct plaintext `teamforge-guest-share-v1` envelope containing the original signed invite and reusable Server access code, **not** a new signed or encrypted invite, single-use token, or revocable/expiring capability. The Guest Launcher must explicitly choose **“Paste invite + code…”** and confirm a warning; it then separates the original invite from the masked in-memory access-code input. The normal signed-invite inspection, Publisher trust confirmation, and verified Project activation are unchanged. Do not post, log, or publicly save this sensitive envelope; anyone holding it may reuse the access code until Host rotation, and normal clipboard sync/history can retain copies. The ordinary invite file export deliberately remains credential-free. This convenience option does not implement the intended future independently scoped one-paste capability. ## What happens when a fresh Guest joins The Guest flow is deliberately staged: ```text Open Windows Guest Launcher ↓ Verify bundled TeamForge Runtime ↓ Load / paste Collaboration Invite ↓ Validate invite structure and signature ↓ Inspect Project / Owner / Publisher identity and trust ↓ Contact the coordinated Host / Seed ↓ Receive descriptor / manifest / inventory information ↓ Download only required project chunks ↓ Verify chunk, file, manifest and project integrity ↓ Build in staging ↓ Verify complete candidate project ↓ Create immutable Active revision ↓ Move the small current-project pointer ↓ Validate required Unity executable and final handoff ↓ Open the verified project in Unity ``` TeamForge intentionally avoids treating an arbitrary partially downloaded directory as the current project. The previous verified Active revision can remain available while a newer revision is being received or if activation fails. ### Resume is verification-aware When transfer is interrupted, TeamForge can reuse already verified content where the transfer contract allows it. Reuse does not mean “trust whatever file happens to be on disk”; hashes and the activation contract remain authoritative. ## What happens when someone edits a supported Scene object A simplified Transform example looks like this: ```text User moves a supported GameObject ↓ Unity Transform service observes the local change ↓ Resolve the authority-canonical object identity ↓ Check lock / lease and current connection authority ↓ Send a Transform operation over the realtime WebSocket ↓ Server Session Authority validates the operation ↓ Server applies ordering / revision / idempotency rules ↓ Approved effect is broadcast to the other clients ↓ Remote client updates its observed Authority View ↓ Unity applies the approved remote Transform safely ``` This is why several concepts appear throughout TeamForge. ### Identity Two Editors need to mean the **same logical object**, not merely two objects that happen to have the same name or Hierarchy path. Saved Scene objects use stable Unity identity as their baseline identity, while supported session-created objects can receive TeamForge logical identity after authoritative binding. Ambiguous identity fails closed rather than silently guessing by name, sibling index, or path. ### Authority The Server decides the accepted shared realtime state. Clients report intent and apply accepted results; they do not each maintain an independent competing truth. ### Revision and ordering Accepted operations advance shared authoritative ordering. Revision information lets clients reason about stale state, late joins, replay, and whether an operation was evaluated against the expected shared state. ### Lock / lease Supported edits use authority-controlled locking/leases so two users do not silently overwrite the same object at the same time. Leases expire rather than becoming permanent locks when a client disappears. ### Replay / idempotency protection Network clients can retry. TeamForge therefore distinguishes a legitimate retry of the same operation from a different operation attempting to reuse an identity. A retry must not mutate shared state twice merely because the message was delivered twice. ## Hierarchy changes Supported same-Scene create/delete/rename/reparent/sibling-order changes use a separate authoritative Hierarchy path rather than pretending they are ordinary Transform changes. Hierarchy authority is important because a Transform is relative to object structure. If two peers disagree about parentage or identity, applying identical local Transform numbers can still produce different Scenes. General Component/Inspector/Prefab/Asset synchronization and arbitrary cross-Scene structure must not be inferred from the currently supported Hierarchy subset. Check [STATUS.md](STATUS.md) for the current boundary. ## Reconnect and connection epochs A reconnect is not treated as proof that old client authority is still current. Conceptually: ```text Connection lost ↓ Stop trusting connection-scoped authority ↓ Reconnect / handshake ↓ Receive current negotiated capabilities and authoritative state ↓ Re-bind supported object authority for the new connection epoch ↓ Resume normal collaboration only after required state is ready ``` Persisted aliases or local cached identities may help resolution, but they do not grant authority by themselves after reconnect. ## Failure and recovery TeamForge tries to preserve verified state instead of “forcing through” an unknown state. Examples: - damaged Runtime → stop before executing unverified packaged code; - invalid or conflicting invite → keep the existing project binding unchanged; - transfer failure → preserve verified reusable progress where allowed; - activation failure → do not replace the previous verified Active project; - Unity path problem → use only a separately validated TeamForge-owned path-resilience strategy; - baseline/identity mismatch → require reconciliation/update rather than silently guessing; - unknown process on a required port → do not kill it just because TeamForge wants the port. Recovery actions are therefore **state-driven**. A Retry, Paste New Invite, Use Latest Project, Open Existing Verified Project, or Choose Unity action is offered only for states where that action has a defined safe meaning. **Diagnostics are observational, not recovery authority.** Copy diagnostics and the manual support bundle help a user or bug report describe the current run. Saving a bundle does not change the selected Project, retry an operation, trust a Publisher, activate content, or relax any safety check. The support bundle intentionally collects a bounded safe-state view rather than broad Project/machine data, and it should still be reviewed before public sharing. ## Why project transfer and realtime collaboration are separate It can be tempting to put everything through one server and one socket. TeamForge intentionally does not do that today. Realtime collaboration benefits from small ordered authority messages. Project bootstrap can involve many files and large byte streams, retries, resume, hashing, staging, and disk work. Keeping these surfaces separate avoids making project bytes a hidden server bottleneck and makes their security/failure boundaries easier to reason about. The trade-off is that the Host Project Peer must actually be reachable by the Guest. Current direct transfer therefore fits same-PC, reachable LAN, or managed-VPN environments. Automatic Internet discovery/NAT traversal/relay is a separate future transport problem, not something implied by the word P2P. ## Where state lives Not every TeamForge state has the same lifetime. | State | Current lifetime / owner | | --- | --- | | Realtime Session Authority | Server memory for the live session | | Project coordination registry | Server memory | | Client Authority View | Current Unity connection | | Project transfer content / staging | Managed Project Peer storage | | Verified Active project revisions | Durable managed Project storage | | Current Active pointer | Small durable metadata pointer | | Launcher diagnostics history | Bounded current-run history | | Manually saved support bundle | User-created local bounded/redacted ZIP; no automatic upload | This distinction matters when considering server restart, reconnect, project resume, or recovery. A durable downloaded project does not imply durable realtime authority history, and a saved diagnostic artifact does not become part of collaboration authority. ## Follow one behavior into the source If this explanation answers **what happens** but you want to see **where it is implemented**, continue with [CODEMAP.md](../CODEMAP.md). Typical paths are: - realtime connection → Unity `TeamForgeConnectionService` + Server WebSocket host; - Transform/Lock → Unity Transform service + Authority View + Server Session Authority; - Hierarchy → Unity Hierarchy service + Server Hierarchy model / Session Authority; - Project bootstrap/transfer → Project Peer Host/Guest orchestrators + direct-transfer source + content store; - Guest startup/recovery → Windows Launcher + Launcher Core + Guest orchestrator; - support diagnostics → Launcher diagnostics UI + Launcher Core support-bundle/redaction path; - path resilience → Launcher Core + shared Project Peer path-resilience contract. For exact file names and tests, use the code map rather than copying them into this guide. That keeps this explanation useful even when implementation files are refactored. --- # TeamForge code map This document maps a TeamForge question to the **smallest relevant current source area and tests**. Product intent and user-acceptance scenarios: [owner interview contract](docs/PRODUCT_DECISIONS_2026-11-23.md) ([한국어](docs/PRODUCT_DECISIONS_2026-11-23.ko.md)). This is a proposed direction, not implementation evidence; see [STATUS](docs/STATUS.md) for live capability and release readiness. It is a navigation reference, not a release-status document. Routes describe checked-in source, not necessarily the published package or unmerged integration PRs. M5 preview, signed Guest refresh and checkpoint rotation are distinct; do not infer a complete operational M4-to-M5 transition from preview or storage primitives. - Current capability/readiness: **[docs/STATUS.md](docs/STATUS.md)** - End-to-end conceptual behavior: **[docs/HOW_IT_WORKS.md](docs/HOW_IT_WORKS.md)** - Exact runtime/protocol/release selections: **[`release-contract.json`](release-contract.json)** - Current architecture and trust boundaries: **[docs/architecture.md](docs/architecture.md)** - Source setup and validation workflow: **[docs/SOURCE.md](docs/SOURCE.md)** - Product feature-to-regression review: **[docs/FEATURE_REGRESSIONS.md](docs/FEATURE_REGRESSIONS.md)** (small machine-readable subset; no pass claims) - Named validation scenarios: **[docs/TEST_LAB.md](docs/TEST_LAB.md)** - Planned direction: **[docs/ROADMAP.md](docs/ROADMAP.md)** ## Start here by question | Question | Read first | Then inspect | | --- | --- | --- | | What is TeamForge and what is ready? | [README.md](README.md), [docs/STATUS.md](docs/STATUS.md) | `release-contract.json`, relevant GitHub Issues | | What happens end to end when someone hosts, joins, transfers a Project or reconnects? | [docs/HOW_IT_WORKS.md](docs/HOW_IT_WORKS.md) | [docs/architecture.md](docs/architecture.md), then the relevant module below | | How do the major processes fit together structurally? | [docs/architecture.md](docs/architecture.md) | [docs/architecture-decisions.md](docs/architecture-decisions.md) | | How does Unity connect to realtime authority? | [Unity package README](unity-package/com.eunsung.teamforge/README.md) | `TeamForgeConnectionService.cs`, `server/src/teamforge-server.mjs`, `server/src/session-authority.mjs` | | Where is Presence implemented? | `Editor/Presence/TeamForgePresenceService.cs` | `server/src/session-authority.mjs` | | Where is Transform / Lock synchronization implemented? | `Editor/TransformSync/TeamForgeTransformSyncService.cs` | `Editor/Authority/TeamForgeAuthorityView.cs`, `server/src/session-authority.mjs` | | Where is same-Scene Hierarchy synchronization implemented? | `Editor/HierarchySync/TeamForgeHierarchySyncService.cs` | `server/src/hierarchy-model.mjs`, `server/src/session-authority.mjs` | | Where are the WP6 Component foundations and preflight checks reused by live M1–M3 synchronization? | `docs/ROADMAP.md` (WP6) | `server/src/component-foundation.mjs`, `server/src/component-property-foundation.mjs`, `server/src/component-structure-foundation.mjs`, `server/src/component-operation-preflight.mjs`, `server/src/component-authority-preflight.mjs`, paired `server/test/component-*foundation.test.mjs`, `server/test/component-*preflight.test.mjs` and `server/test/component-property-snapshot.test.mjs` (**identity, typed/bounded snapshots, exact target lookup, structural/property candidates and read-only replay/lease checks; live admission and mutations are owned by the collaboration runtime below**) | | Where are live Collider property, structure and primitive operations admitted and applied? | `server/src/component-collaboration.mjs`, `server/src/component-property-transaction.mjs` | `Editor/ComponentSync/`, `Editor/PrimitiveSync/`; `server/test/component-collaboration.test.mjs`, `server/test/primitive-collaboration.test.mjs`, Unity Collider E2E tests | | Where is M4 confirmed-state recovery implemented? | `server/src/durable-session-runtime.mjs`, `server/src/durable-session-store.mjs` | `server/src/teamforge-server.mjs`, `server/test/durable-session-store.test.mjs`, `server/test/primitive-collaboration.test.mjs`, `Editor/Connection/` | | Where are unconfirmed local edits and object identities preserved? | `Editor/TransformSync/TeamForgeSessionRecoveryWindow.cs`, `Editor/HierarchySync/TeamForgeHierarchyIdentityRegistry.cs` | Recovery stores, Collider bindings and scoped recovery tests below; local records are not server authority | | Where is Scene compatibility checked before joining? | `Editor/UX/TeamForgeBaselineFingerprint.cs`, `Editor/UX/TeamForgeJoinCode.cs` | `host-orchestrator.mjs`, `bootstrap-invite.mjs`, `host-orchestrator.test.mjs` | | Where are M5 Host checkpoint preview and Guest revision review? | `host-checkpoint-preview.mjs`, `MainWindow.ProjectUpdate.cs` | `project-peer.mjs`, `guest-orchestrator.mjs`, `host-checkpoint-preview.test.mjs`, `guest-refresh.test.mjs` | | Where are Active generation selection, activation and destination ownership enforced? | `managed-project.mjs`, `guest-destination.mjs` | `project-peer.mjs`, `managed-project.test.mjs`, `guest-refresh.test.mjs`, `UnityLaunchPolicy.cs` | | How does Project bootstrap / direct transfer work? | [project-peer/README.md](project-peer/README.md) | Host/Guest orchestrators, direct transfer client/server, content store | | Where is signed Project coordination handled? | [server/README.md](server/README.md) | `server/src/project-coordinator-core.mjs`, `project-peer/src/coordinator-client.mjs` | | How does the Windows Guest Launcher work? | [launcher/README.md](launcher/README.md) | `MainWindow.xaml.cs`, Launcher Core policy classes, Guest orchestrator | | Where are diagnostics / recovery implemented? | [launcher/README.md](launcher/README.md) | `DiagnosticsRecovery.cs`, `DiagnosticSupportBundle.cs`, `MainWindow.Diagnostics.cs`, `TeamForgeRecoveryUx.cs`, `guest-orchestrator.mjs` | | Where is the support-bundle privacy boundary tested? | [launcher/README.md](launcher/README.md) | `launcher/tests/TeamForge.Diagnostics.Tests/` | | Where is Windows path resilience implemented? | [launcher/README.md](launcher/README.md) | `PathResilience.cs`, `ExecutionAliasManager.cs`, `path-resilience-contract.json` | | How do I choose or run a named validation scenario? | [docs/TEST_LAB.md](docs/TEST_LAB.md) | `test-lab.json`, `scripts/test-lab.mjs`, `quality-gates.json` | | How do I validate a fresh source clone? | [docs/SOURCE.md](docs/SOURCE.md) | `scripts/validate-public-source.mjs`, `npm run validate`, current CI | | How do I validate a staged release tree? | [docs/SOURCE.md](docs/SOURCE.md), [builds/README.md](builds/README.md) | `scripts/validate-repository.mjs`, `npm run validate:release` | | How are substantial changes planned/classified? | [docs/ENGINEERING_GUIDE.md](docs/ENGINEERING_GUIDE.md) | `docs/templates/CHANGE_PLAN.md`, `quality-gates.json`, `scripts/classify-change.mjs` | | Where is durable cross-session agent memory? | [docs/AGENT_MEMORY.md](docs/AGENT_MEMORY.md) | Re-verify the referenced canonical source before acting | | How do hourly agents select work and avoid overlapping Issue/PR ownership? | [docs/AGENT_WORK_QUEUE.md](docs/AGENT_WORK_QUEUE.md) | `scripts/agent-workqueue.mjs` (read-only planning and claim check), live GitHub PR/Issue comments | | How are documentation changes governed? | [docs/DOCUMENTATION_GUIDE.md](docs/DOCUMENTATION_GUIDE.md) | `docs/templates/DOCUMENTATION_PLAN.md`, `scripts/validate-documentation.mjs` | | Where should a security review start? | [.github/SECURITY.md](.github/SECURITY.md), [docs/architecture.md](docs/architecture.md) | filesystem/invite/runtime/environment/path trust-boundary code | | Where are tests? | [docs/TEST_LAB.md](docs/TEST_LAB.md), [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md) | Unity `Tests/`, `server/test/`, `project-peer/test/`, `launcher/test/`, `launcher/tests/` | ## Runtime topology ```text Unity Editor package ├─ Realtime Protocol v1 over WebSocket ──> TeamForge Server │ ├─ Session Authority │ └─ Project Coordinator metadata │ └─ Host bridge ──> Project Peer Seed Windows Guest Launcher └─ Guest bridge ──> Project Peer client ── direct HTTP Project payload ──> Host Seed ``` Project payload bytes do not pass through the TeamForge Server. See **[docs/architecture.md](docs/architecture.md)** for the authoritative topology and trust-boundary description. ## Unity Editor package Root: `unity-package/com.eunsung.teamforge/` Primary responsibilities: Editor-facing collaboration UI, connection lifecycle, observed authority state, Presence, Transform/Lock behavior, supported same-Scene Hierarchy collaboration, and Host-side UX/orchestration. Key entry points: - `Editor/UI/TeamForgeWindow.cs` — primary Collaboration window - `Editor/UX/TeamForgeHomeWindow.cs` — guided UX entry surface - `Editor/UX/TeamForgeHostFlow.cs` — Host review/start/stop bridge, remembered Seed-port handoff, and firewall-onboarding ordering - `Editor/UX/TeamForgeWindowsFirewall.cs` — exact Windows Private/LocalSubnet Coordinator/Seed rule reconciliation and explicit removal - `Editor/UX/TeamForgeHostLanDiagnostics.cs` — read-only LAN target/result policy, explicit async checks, cancellation and stale-result isolation - `Editor/UX/TeamForgeHostLanDiagnosticsView.cs` — Home LAN snapshot controls and privacy-safe Doctor report integration - `Editor/Connection/TeamForgeConnectionService.cs` — connection lifecycle, handshake/routing, reconnect/backoff, main-thread dispatch and request-specific Ping/Pong observations - `Editor/Authority/TeamForgeAuthorityView.cs` — client-side observed authority state - `Editor/Presence/TeamForgePresenceService.cs` — connected-user / selection / Scene awareness - `Editor/TransformSync/TeamForgeTransformSyncService.cs` — Transform observation/application and lock/revision interaction - `Editor/HierarchySync/TeamForgeHierarchySyncService.cs` — supported same-Scene structural synchronization and identity checks - `Editor/PrimitiveSync/TeamForgePrimitiveTemplateRuntime.cs` — built-in Cube/Sphere visual creation and exact mesh validation on reconnect - `Editor/ComponentSync/TeamForgeColliderSyncService.cs` — M1 live Collider observation, scoped remote apply, conditional own Undo/Redo, reconnect and project-local recovery inbox - `Editor/ComponentSync/TeamForgeColliderStructureSyncService.cs` — M2 logical Collider lifecycle and same-revision M3 topology apply after Hierarchy reconciliation - `Editor/ComponentSync/TeamForgeColliderProperty.cs` / `TeamForgeColliderPropertyWire.cs` — exact allowlisted property identity/value application and bounded heterogeneous JSON codec - `Editor/ComponentSync/TeamForgeColliderSyncWindow.cs` — explicit Collider join, status and local recovery review - `Editor/UX/TeamForgeBaselineFingerprint.cs` / `TeamForgeJoinCode.cs` — saved Scene path, GUID and hash checks and realtime join compatibility - `Editor/UX/TeamForgeGuestHandoff.cs` / `TeamForgeVerifiedGuestReconnect.cs` — verified Guest handoff and reconnect boundary - `Editor/UX/TeamForgeHostFlow.CheckpointPreview.cs` — read-only signed Project checkpoint preview bridge, not a commit/rotation implementation - `Editor/HierarchySync/TeamForgeHierarchyIdentityRegistry.cs` — logical-to-local object identity and persisted alias cache; current authority is separate - `Editor/TransformSync/TeamForgeSessionRecoveryWindow.cs` / `TeamForgeTransformRecoveryStore.cs` — unconfirmed local Transform intents and explicit review/resubmission - `Editor/HierarchySync/TeamForgeHierarchyRecoveryFile.cs` and Rename/Reparent/Sibling recovery stores — bounded local Hierarchy recovery records - `Editor/UX/TeamForgeRecoveryUx.cs` — Unity-side diagnostics/recovery presentation - `Editor/Testing/TeamForgeTestLab.cs` — same-PC clone allocation/copy/bootstrap and Editor launch orchestration - `Editor/Testing/TeamForgeTestLabPackageSnapshot.cs` — clone-only local TeamForge package snapshot, strict manifest value-span replacement and preserved lock pins - `Tests/Editor/TeamForgeCloneEditorProbeTests.cs` — opt-in CI clone export and separate Editor loaded-package assertions, without session/bootstrap/launch setup - `Tests/Editor/TeamForgeColliderLiveE2ETests.cs` / `TeamForgeColliderStructureE2ETests.cs` — supported live component/primitive workflows and recovery sequences - `Tests/Editor/TeamForgeTransformRecoveryStoreTests.cs`, `TeamForgeHierarchyRecoveryTests.cs`, `TeamForgeHierarchyRenameRecoveryStoreTests.cs`, `TeamForgeHierarchyReparentRecoveryStoreTests.cs`, `TeamForgeHierarchySiblingRecoveryStoreTests.cs` — local recovery records and reconciliation contracts - `Tests/Editor/TeamForgeIdentityAuthorityAuditTests.cs`, `TeamForgeDurableSessionWireTests.cs`, `TeamForgeGuestHandoffRecoveryTests.cs` — identity, durable wire and verified handoff - `Tests/` — Unity Editor regression/contract tests Before changing identity, revision, lock or reconnect semantics, read the corresponding Server authority code and [docs/architecture.md](docs/architecture.md). ## Realtime / coordination server Root: `server/` Primary responsibilities: authenticated HTTP/WebSocket hosting, Session Authority (in-memory by default, opt-in SQLite for supported confirmed Session recovery), and signed Project metadata coordination. The server is **not** the Project payload store or relay. Key files: - `src/index.mjs` — process startup/shutdown and composition - `src/teamforge-server.mjs` — HTTP/WebSocket shell, timers and authority/coordinator effect execution - `src/session-authority.mjs` — Presence, revision, locks, Transform, Hierarchy and tombstone authority - `src/durable-session-runtime.mjs` / `src/durable-session-store.mjs` — opt-in signed Session checkpoint recovery and atomic SQLite state/outcome storage - `src/component-collaboration.mjs` — signed Scene admission, negotiated property operations/snapshots, conditional compensation and receiver reports over the common Session authority - `src/serialized-collider-scene.mjs` — bounded direct Collider YAML value/owner verification reused from WP6; production runtime does not depend on root development scripts - `src/component-property-transaction.mjs` — component ledger and conditional property/structure operations; inspect alongside the realtime adapter - `test/primitive-collaboration.test.mjs` — M2/M3 combined lifecycle and durable integration cases - `test/durable-session-store.test.mjs` — SQLite checkpoint, receipt and recovery contracts - `src/hierarchy-model.mjs` — Hierarchy state validation and operation preparation - `src/project-coordinator-core.mjs` — Project/Owner/Publisher/Baseline/Peer coordination state - `src/project-coordinator.mjs` — wrapper around the coordinator core - `src/protocol.mjs` — server-side protocol constants/helpers - `src/config.mjs` — environment/config parsing and bounds - `test/` — server/authority/protocol tests - `test/realtime-transport-recovery.test.mjs` — owned loopback TCP fault fixture, heartbeat/lock cleanup and authoritative Node peer rejoin/replay; Test Lab scenario `realtime-transport-recovery` - `test/component-collaboration.test.mjs` / `scripts/ci-component-peer.mjs` — real Node WebSocket M1 regressions and the separate one-Unity + Node-peer CI fixture ## Project Peer / direct Project transfer `src/stored-publication.mjs` owns transport-free approved publication selection and signed manifest/descriptor loading. Both `ProjectPeerEngine` and M1 server admission reuse it; a standalone server does not require Peer WebSocket clients. Root: `project-peer/` Primary responsibilities: bootstrap contracts, Host/Guest orchestration, direct HTTP Project transfer, manifest/chunk integrity, staging, activation, trust and Project filesystem safety. Key files: - `src/project-peer.mjs` — publication preparation, approved pointer, Seed lifecycle and signed revision synchronization - `src/managed-project.mjs` — staging/materialization, verification and Active generation pointer; distinct from approved publication metadata - `src/process-bound-lock.mjs` — activation and approved-pointer lock files whose ownership ends with the owning process (named pipe on Windows, abstract socket on Linux); ambiguous legacy locks still stay busy - `src/guest-destination.mjs` — managed-root ownership, destination validation and protection of unmanaged content - `src/swarm-downloader.mjs` / `src/transfer-source.mjs` — verified chunk acquisition, scheduling, retry and source abstraction - `src/host-checkpoint-preview.mjs` / `src/publication-plan.mjs` — read-only checkpoint review and publication approval fingerprints - `src/unity-project-descriptor.mjs` — source Project descriptor validation and updates; distinct from the signed baseline descriptor - `src/process-lifecycle.mjs` — owned Coordinator and Seed process lifecycle - `src/host-orchestrator-cli.mjs` — Unity-facing Host bridge dispatch - `src/host-orchestrator.mjs` — Host orchestration behavior - `src/guest-orchestrator-cli.mjs` — Launcher-facing Guest bridge dispatch - `src/guest-orchestrator.mjs` — Guest receive/activation/recovery behavior - `src/bootstrap-invite.mjs` — signed Collaboration Invite validation - `src/coordinator-client.mjs` — signed metadata interaction with the TeamForge Server - `src/direct-transfer-client.mjs` — Direct HTTP transfer-source adapter and error normalization - `src/direct-transfer-server.mjs` — Direct HTTP descriptor/manifest/inventory/chunk source - `src/content-store.mjs` — content-addressed local Project storage primitives - `src/path-policy.mjs` — content discovery, pinned full-file Owner-key JSON inspection and source identity snapshots - `src/manifest.mjs` — discovery-bound source hashing and manifest construction - `src/filesystem-safety.mjs` — canonical path / redirected-segment safety primitives - `src/unity-version-policy.mjs` — shared source Publisher/preflight Unity-line admission; full version identity remains with existing transfer and launch checks - `src/path-resilience-contract.json` — shared Windows/Unity path-risk contract - `test/` — bootstrap/transfer/trust/recovery/path tests - `test/guest-refresh.test.mjs`, `test/managed-project.test.mjs` — signed update approval, activation and preservation contracts - `test/host-checkpoint-preview.test.mjs`, `test/host-orchestrator.test.mjs`, `test/project-engine.test.mjs`, `test/manifest-source-safety.test.mjs` — preview, publication and source safety - `test/swarm-downloader.test.mjs` — chunk scheduling, retries and transfer integrity Changes to invite validation, path handling, staging, activation, hashing or runtime execution are security-sensitive and should be reviewed as trust-boundary changes. ## Windows Guest Launcher Root: `launcher/` Primary responsibilities: user-facing Guest flow, verified bundled Runtime execution, managed destination/path handling, trust presentation, privacy-bounded support diagnostics, and final Unity handoff. Key files: - `src/TeamForge.Launcher/MainWindow.xaml(.cs)` — WPF Guest UI and orchestration glue - `src/TeamForge.Launcher/MainWindow.UnityLaunch.cs` — context-bound Editor selection, Active/Existing-Active opening, cancellation and completion/cleanup ownership; Core retains verification/path/process policy - `src/TeamForge.Launcher/AccessCodeInput.xaml(.cs)` — masked/revealed input presentation and clear/hide lifecycle; credential/bridge lifetime stays in MainWindow - `src/TeamForge.Launcher.Core/ReceiveProgressPresentation.cs` — bounded receive percentages and explicit transfer/verification feedback; progress cannot authorize activation or launch - `src/TeamForge.Launcher/MainWindow.Diagnostics.cs` — Copy diagnostics / manual support-bundle UI handling - `src/TeamForge.Launcher/MainWindow.ProjectUpdate.cs` / `ProjectUpdateReviewDialog.xaml` — revision-specific Guest review; separate from Publisher trust - `src/TeamForge.Launcher/TrustDialog.xaml` — explicit Publisher/Project trust UI - `src/TeamForge.Launcher.Core/BridgeClient.cs` — child bridge process / bounded NDJSON client - `src/TeamForge.Launcher.Core/RuntimeLayout.cs` — Runtime manifest/layout/hash verification - `src/TeamForge.Launcher.Core/EnvironmentPolicy.cs` — child-process environment policy - `src/TeamForge.Launcher.Core/PathSafety.cs` — containment/reparse/path safety - `src/TeamForge.Launcher.Core/PathResilience.cs` — path budget/capability/strategy routing - `src/TeamForge.Launcher.Core/ExecutionAliasManager.cs` — TeamForge-owned execution alias creation/revalidation - `src/TeamForge.Launcher.Core/DiagnosticsRecovery.cs` — stable recovery actions and bounded diagnostics history - `src/TeamForge.Launcher.Core/DiagnosticSupportBundle.cs` — manual local ZIP construction and redaction/safe-state contract - `src/TeamForge.Launcher.Core/UnityLaunchPolicy.cs` — final Unity executable/project validation and process launch - `runtime-loader.mjs` — bundled Runtime verification and Guest bridge import - `test/`, `tests/` — Node and .NET Launcher tests, including `TeamForge.Diagnostics.Tests` - `tests/TeamForge.Launcher.Ui.Tests/` — Windows STA WPF input, credential cleanup and MainWindow startup/shutdown tests; `ShutdownTests.cs` drives the real BridgeClient with a bounded synthetic child - `tests/TeamForge.Launcher.Ui.Tests/UnityLaunchTests.cs` — gated handoff/context races using real temporary Active/refresh/path policies and synthetic probe/start effects; owned version-probe child cancellation ## Repository / release tooling - `test-lab.json` + `scripts/test-lab.mjs` — named validation-scenario discovery/orchestration; `scripts/test-lab-environment.mjs` owns environment preflight and installed Editor discovery - `scripts/unity-clone-probe.py` — run-owned clone receipts, exact fresh NUnit evidence and bounded cleanup for the baseline Authority CI lane; hermetic host regressions live in `scripts/test_unity_clone_probe.py` - `scripts/prepare-unity-runner.sh` — guarded disposable hosted-runner disk preparation before Unity image extraction - `quality-gates.json` + `scripts/classify-change.mjs` — path-based risk / evidence routing aid - `scripts/validate-documentation.mjs` — documentation ownership/discovery/link contract - `scripts/validate-engineering.mjs` — engineering process / quality-gate contract - `scripts/validate-public-source.mjs` — normal fresh-clone source/document/contract validation - `scripts/validate-repository.mjs` — fully staged release-candidate validation - `scripts/build-launcher.mjs`, `scripts/verify-launcher.mjs`, `scripts/stage-release.mjs` — WP-neutral release entry points - `.github/workflows/` — source CI, Unity automation, dependency/security checks and release publication Do not infer a physical field PASS from source/release-tooling automation. Current release effect belongs in [docs/STATUS.md](docs/STATUS.md). ## Maintainability navigation rule File count is not a quality metric. Keep the map organized around stable subsystem owners, not around line-count-driven extraction. A large cohesive file may be clearer than several tiny wrappers; a large file becomes debt when distinct responsibilities/lifecycles/dependencies can be separated without obscuring the operation. Conversely, if one concept spreads across many small files, group it behind a meaningful component/subdirectory and a small discoverable public surface rather than growing a flat helper maze. Preserve conceptual meaning while navigating and refactoring. Code that looks structurally similar is not automatically one concept: Project identity, revision, lock, Presence, Transform/Hierarchy authority, transfer, staging/activation, recovery, and trust boundaries can share mechanics while remaining intentionally distinct. Prefer a shared abstraction only when responsibility, lifecycle, invariants, and reason to change align. When a similarity is deliberate but the concepts must remain separate, keep the established TeamForge names and note the distinction near the relevant owner entry rather than normalizing everything into a generic helper/model. When an extraction changes where a maintainer should start reading, update the relevant entry above. The CI maintainability review warns about growth/scope/fragmentation signals but intentionally does not fail a PR for architecture style alone. ## Reading rules For an implementation task: 1. use [docs/HOW_IT_WORKS.md](docs/HOW_IT_WORKS.md) first when the end-to-end behavior is unclear; 2. find the smallest relevant module here; 3. read its module README and nearest tests; 4. read [docs/architecture.md](docs/architecture.md) if the change crosses authority, identity, transport, persistence, path or trust boundaries; 5. read historical phase/work-state notes only when the history itself matters. For source setup and validation commands, use **[docs/SOURCE.md](docs/SOURCE.md)** rather than this file. --- # TeamForge current architecture This document describes the **current as-built architecture and trust boundaries** of TeamForge source. It intentionally avoids owning volatile release-readiness, candidate-tag, tool-version, or test-run state: - current capability/readiness → [STATUS.md](STATUS.md) - exact runtime/tool/protocol/release selections → [`../release-contract.json`](../release-contract.json) - packaged artifact identity → [`../builds/README.md`](../builds/README.md) - planned direction → [ROADMAP.md](ROADMAP.md) Historical phase/ADR records remain useful context, but they do not override this document when later source changed the as-built structure. ## Runtime topology ```mermaid flowchart LR subgraph HostPC["Host PC"] UI["Unity TeamForge UI"] --> HF["Host Flow"] HF --> HB["Host orchestrator bridge"] UI --> CS["Connection Service"] PS["Presence Service"] --> CS TS["Transform Service"] --> CS HS["Hierarchy Service"] --> CS TS --> AV["Authority View"] HS --> AV CS --> AV CS --> LS["Connection Strategy"] LS --> WF["WebSocket Transport Factory"] WF --> CW["ClientWebSocket adapter"] HB --> PEH["Project Peer Host/Seed"] end subgraph ServerProcess["TeamForge Server"] SH["Node WebSocket/HTTP host"] --> SA["Session Authority Core"] SH --> PC["Project Coordinator Core"] end subgraph GuestPC["Guest PC"] GL["Windows Guest Launcher"] --> GB["Guest orchestrator bridge"] GB --> PEG["Project Peer Guest"] GL --> UL["Validated Unity launch/handoff"] end CW --> SH HB --> SH GB --> SH PEH <-->|"Project Transfer v1 — Direct HTTP"| PEG PC -. "signed project/baseline/peer metadata only" .-> PEH PC -. "signed project/baseline/peer metadata only" .-> PEG ``` The configured TeamForge Server WebSocket is the implemented realtime authority route. Project payload bytes move directly between Project Peer processes over HTTP and do **not** pass through the TeamForge Server or Project Coordinator. The normal packaged Windows Host/Guest path uses a manifest-pinned bundled Runtime. System Node/npm are source-development requirements rather than normal end-user prerequisites. ## Major process responsibilities | Layer / process | Owns | Must not own | | --- | --- | --- | | Unity UI / Host Flow | User-facing Host controls, baseline review, endpoint input, diagnostics, safe workflow state | Server authority transitions, raw socket implementation, bypass of Project verification | | Collaboration services | Presence sampling; Transform/Hierarchy observation and application; Scene/Undo safety behavior | Server-authoritative Revision/Lock decisions | | Authority View | Observed Session Revision, Lock registry, capabilities, connection identity | Persistent state or authoritative transitions | | Connection Service | Lifecycle, reconnect/backoff, handshake, main-thread dispatch, protocol routing | Hidden second realtime route or server authority | | Connection Strategy | Ordered connection attempt for the configured TeamForge Server endpoint | Raw transport implementation or authority state | | Transport Factory / adapter | Reliable ordered WebSocket text-channel construction/execution | Protocol routing, reconnect policy, Scene behavior | | Server host | HTTP health/upgrade, Bearer auth, WebSocket/JSON I/O, rate/buffer/heartbeat timers, effect execution | Project payload storage/relay or authority rules duplicated outside the cores | | Session Authority Core | Presence membership, lock leases, shared Revision, Transform, Hierarchy, Tombstones, conflict/idempotency and ordered effects | HTTP, WebSocket, JSON parsing or host timers | | Project Coordinator Core | Project/Owner/publisher/baseline/peer coordination metadata and ordered effects | Manifest/File/Chunk bytes, filesystem payload storage or realtime Scene authority | | Host orchestrator / Project Peer Host | Preflight, explicit publish/start lifecycle, baseline/Invite coordination, direct Seed process | Realtime authority or silent baseline replacement | | Transfer Core | Source selection, verified resume, concurrency, pacing, retry/backoff/failover, final verification and progress | Trust bypass or activation policy hidden in transport details | | Transfer Source adapter | Descriptor/Manifest/Inventory/Chunk lookup and transport-specific error normalization | Activation policy, trust replacement or silent alternate transport | | Project Peer storage/backend | Manifest/chunk/hash processing, staging, immutable Active revisions, atomic current-pointer movement | Realtime authority or destructive overwrite of arbitrary user projects | | Windows Guest Launcher | Invite/access-code input, trust UI, verified bundled-Runtime execution, managed destination, final Unity handoff | Project authority, signature/hash bypass or arbitrary shell launch | | Diagnostics / recovery UX | Stable user-facing explanations, redacted bounded diagnostics, state-driven recovery actions | Persistent secret history or bypass of trust/activation/baseline checks | | Path resilience layer | Managed path selection and approved short execution-path preparation | Weakening containment, identity, hash, trust or final handoff validation | ## Dependency-direction invariants - The Server host composes authority/coordinator cores; it should not duplicate their state-transition rules. - Server/Coordinator Project state is metadata-only and memory-resident. The Server does not become a Project payload store. - Unity Transform and Hierarchy services consume observed authority state rather than becoming independent authority stores. - `TeamForgeConnectionService` owns lifecycle/routing around the configured connection path; it does not own a hidden fallback authority route. - Project transfer stays behind the Project Transfer source boundary. The current payload route is direct Project Peer HTTP. - Packaged Host/Guest bridges execute from a manifest-pinned Runtime. Developer CLIs remain development/diagnostic paths, not the normal fresh-Guest UX. - Diagnostics/recovery must preserve trust, activation, identity and Scene-baseline fail-closed behavior. - Path-resilience work may change execution/workspace path handling but must not silently change authority, identity, protocol or trust rules. ## Object identity and authority contract - Saved loaded Scene objects use stable Unity identity (`GlobalObjectId`) as the default saved-object wire/baseline identity. - An authoritative logical `tf:` identity becomes canonical only after the current connection epoch's Hierarchy authority binds it. - Local alias/cache data may help resolve an object but cannot itself grant session authority or replace a saved object's authoritative outgoing identity. - Reconnect or connection replacement clears current-session logical authority; persisted aliases remain hints until the new authoritative snapshot/live state confirms the binding. - When Hierarchy is negotiated, dependent Transform/Lock authority waits for the required authoritative identity/snapshot state. - Identity/baseline mismatches fail closed rather than silently falling back to a name, Hierarchy path, sibling index or guessed object. - Presence, Transform, Lock and Hierarchy should use the same authority-canonical identity model rather than maintaining incompatible fallback schemes. Historical identity/authority matrices under the phase records remain evidence for their recorded implementation state, not a competing current contract. ### WP6 Component identity preparation — not yet synchronized The optional, independent `server/src/component-foundation.mjs` pre-wire validator is a **testable research foundation**, not an implemented wire command or supported Component/Inspector feature. It cannot mutate an authoritative Session or Unity Scene, and is not imported by the realtime dispatch path. The identity-only candidate rules deliberately fail closed: a clean baseline references a **saved Unity Component GlobalObjectId** and an **existing authoritative Scene/GameObject**, not a type name, Component array index, object display name or local Instance ID. Duplicate identities are rejected even if Components share a type or appear under different GameObjects. Candidate acceptance also requires the current Hierarchy revision, an explicit allowed-type set and aggregate safety limits (a hard prototype ceiling of 2,048 identities and 256 KiB of serialized UTF-8 identity fingerprint bytes, regardless of a larger supplied count policy); values, property paths, arrays, references, Prefab overrides and logical session-created Component identities are not accepted. A second inert module, `server/src/component-property-foundation.mjs`, uses **locally prepared, same-Session** identity candidates (not client-provided lookalikes or a snapshot from another Session) and the current authoritative Hierarchy revision to inspect exact, policy-allowlisted `SerializedProperty` paths for only `boolean`, 32-bit integer, bounded finite `float` and bounded `Vector3` values. It rejects unknown shapes, arrays/indexed/nested paths, reference/managed-reference/Prefab/script paths, unknown Component IDs, type/path mismatches, and stale owner/revision before producing a frozen, non-mutating result. The runtime has **no default allowed type or property path**; a caller must opt in explicitly for pre-wire testing. Value bounds and path grammar are prototype conservatism, **not a promised public protocol**. An independent follow-up now requires **exact typed policy descriptors**, with explicit finite numeric `minimum`/`maximum` or a non-negative `Vector3.maximumAbsolute` bound. A type match alone never grants a numeric property unlimited acceptable values (for example, a negative Collider radius candidate is rejected by its explicit prototype range). This is still only pre-wire validation; real Unity per-property semantics and server authority remain future work. A third **pre-wire only** validator, `server/src/component-structure-foundation.mjs`, assesses *proposed* add/remove intent without reserving an identity, mutating a Session/Scene or enabling any network capability. It requires the same-Session prepared identity baseline and exact current revision/owner, an explicit bounded Component-type policy, per-owner multiplicity/minimums and declared dependencies. It rejects removal of the last required instance, automatically implied dependency additions, unknown metadata and protected Transform/RectTransform types. Add intents carry a **non-authoritative pending logical `tf:c:` ID**; remove intents target an existing saved GlobalObjectId. The policy metadata in these isolated tests is **hypothetical** and must be corroborated before production. `TeamForgeGlobalObjectIdProbeTests.cs` now exercises Editor-only dependency insertion with `RequireComponent`, checks `DisallowMultipleComponent` metadata, observes local Undo/Redo for a Collider value, and distinguishes a Prefab Asset from an instantiated Prefab. These are narrow probes, **not** a complete policy extraction, Prefab Stage editing support, server-side lock/replay proof or authority repair contract. An additional automated Editor probe opens an actual Prefab Stage and checks that the existing Phase 2 Transform selection authority **rejects** that staged GameObject as `PrefabStage` before baseline tracking; cleanup always returns the Editor to the main Stage. This is an explicit unsupported-context guard, not a WP6 Prefab sync implementation. An additional Editor-only EditMode probe round-trips a local Collider through `Undo.AddComponent`, Undo/Redo and `Undo.DestroyObjectImmediate` restoration, without treating the Undo stack as a cross-client authority ledger. Future production checks must independently derive allowed Component metadata and handle failure/Undo/Prefab boundary cases. Neither a validated proposal nor a reused pending ID confers lock ownership, ordering, replay/idempotency or authority. The **disconnected** `server/src/component-operation-preflight.mjs` classifies proposed structural and typed property operation IDs using the existing **Session-wide** operation-history namespace shared by Hierarchy and Transform. Different fingerprints with the same ID fail closed, including cross-kind collisions; matching prior records are inspected before current base-Revision refusal. A property fingerprint binds the authenticated actor, Scene/object/Component/type identity, base Revision, exact path, value kind and value. Vector3 axes use canonical ordering; numeric `-0` and `0` have the same JSON value semantics, while distinct finite values and kinds remain distinct. A **type-correct, complete hypothetical applied record** must match all those fields and represent a subsequent server Revision no later than current authority. Cached property values are independently shape-validated before comparison. A matching fingerprint or merely plausible Revision is insufficient. This provisional pre-wire shape **does not send an ACK, reserve an ID, grant locks, register history, mutate authority or enable live Component protocol**. An observed prior record never authorizes another Scene write. The **disconnected** `server/src/component-authority-preflight.mjs` first checks the **existing server Session's current registered connection**, then performs read-only retry classification for either structural or property intents. An unseen intent must pass its same-Session prepared identity baseline and exact structural or typed property policy, then hold an owned unexpired Scene/GameObject lease. Replacement connections cannot inherit the old connection's lease; expiry at the sampled server time is already expired. The preflight never expires, grants or moves locks. Matching committed retries from a currently registered actor are observations before current baseline/policy/lease checks, **without an ACK or a new effect**. Unseen stale revision/Scene/owner/Component mismatches return only a `resnapshot_required` hint, not snapshot bytes or a repair message. `unseen_candidate_with_live_lock` is **not an authorization or commit**: a live command still needs atomic authority rechecks, property snapshots, bounded history semantics, negotiated compatibility and targeted Unity rejection/Undo/reconnect recovery. Protocol v1 has no Component capability. These are **provisional guardrails**, not a settled WP6 protocol. Before networking or Inspector mutation is enabled, Unity Editor probes must confirm saved Component GlobalObjectId stability, domain/reload and repeated-same-type behavior, and the implementation must define authority, locks, revision/replay/idempotency, Undo/rejection, reconnect convergence, allowed property shapes and limits, snapshot bytes and compatibility. Current realtime Protocol v1 remains unchanged. In addition to pure-contract tests, `server/test/server.test.mjs` now exercises a **real WebSocket Protocol v1 compatibility boundary**: unrecognized proposed `supportsComponentSync` / `supportsInspectorSync` Hello flags cannot enable WP6, unimplemented Component structural/property messages receive `unsupported_message`, and a subsequent supported Hierarchy seed still begins at revision 0. This is a deny-by-default runtime regression, **not** WP6 feature negotiation or a live Component handler. See the baseline regression matrix in `server/test/component-foundation.test.mjs`. The same property module also prepares an **aggregate, disconnected property snapshot** from a same-Session identity baseline, current Scene/revision/owner and exact typed policy. Records contain only object/Component/type/path/kind/value, reject duplicate Component/path identities and clone/freeze typed values. Canonical ordering produces a deterministic fingerprint; explicit `maxProperties` policy cannot exceed the prototype **2,048-record and 256 KiB canonical UTF-8** ceilings, including envelope and values. Empty snapshots still require current identity/Scene context. Input values remain **trusted local prototype data**, not an authenticated runtime seed or installed Session authority. `inspectComponentPropertyTarget` accepts only that exact locally prepared same-Session snapshot at the current revision and selects one exact Scene/object/Component/type/path/kind. It rechecks current owner and typed policy/ranges and returns only a frozen single-property candidate. Unknown, foreign, stale or lookalike input cannot fall back to another same-type Component, path or ordinal. This is **not a repair message, ACK, authorization or Unity write**. Actual late-join/reconnect/rejection recovery still requires authentic seeding, negotiated capability, atomic authority and targeted Editor application/Undo; Protocol v1 remains unchanged. `diffPreparedComponentPropertySnapshots` can also compare two distinct, locally prepared property observations from the **same Session, exact identity baseline, Scene, and current revision**. It revalidates current Scene/owner and typed policy before returning deeply frozen `observedChanged`, `observedOnlyBefore`, and `observedOnlyAfter` sets with the two original fingerprints. An observed-only entry means merely missing from one *possibly partial* observation, **not an authoritative delete**. It cannot reconcile different revisions or infer network state and has no runtime, ACK, Scene write, or Unity Undo effect. ## Realtime authority contract The Session Authority Core owns the authoritative in-memory collaboration state for the live session: - Presence membership; - shared Revision/order; - lock/lease state; - retained Transform state; - supported same-Scene Hierarchy state; - bounded Tombstones and replay/idempotency protection. Unity clients observe and apply authority; they do not become authoritative merely because local Editor state differs. Unsupported or ambiguous edits should remain protected/fail-closed until the relevant synchronization surface has an explicit identity, authority, conflict and recovery contract. ## Project bootstrap, transfer and activation contract - A fresh packaged Guest begins in the standalone Windows Launcher before a Unity project is open. - Host Ready produces a signed Collaboration Invite containing separately validated Project-transfer and realtime-session contracts. - The access code is shared separately and is not embedded into the invite. - Project payload bytes move directly between Project Peers; the Coordinator carries signed metadata and coordination state only. - Owner/Publisher identity, signed descriptors/invites, manifest/file/chunk hashes, path policy, staging, immutable Active revisions and final handoff checks fail closed. - Successful activation creates/selects a verified immutable Active revision and moves only the small current pointer after verification. - Existing arbitrary user projects are not silently overwritten as a normal activation strategy. - Publisher/Project trust changes require explicit validation/review rather than silent replacement. ## Runtime and packaging boundary Generated Runtime payloads, packaged executables, Runtime manifests and release ZIPs are **release artifacts**, not canonical source-tree files. The exact selected versions and target frameworks belong to [`../release-contract.json`](../release-contract.json). Source documentation should avoid copying those numbers unless the number itself is essential to the explanation. Source paths that describe packaged layouts such as generated Launcher output describe release candidates, not directories guaranteed to exist in a fresh clone. ## Protocol compatibility boundary The exact current protocol/schema version selections are recorded in [`../release-contract.json`](../release-contract.json). Architecturally: - realtime collaboration uses a reliable ordered WebSocket text channel; - Project payload transfer uses separate direct HTTP descriptor/manifest/inventory/chunk routes; - realtime and Project payload transport remain separate responsibilities; - capability negotiation controls which snapshots/features a client receives; - adding a new synchronization surface must not silently reinterpret an existing protocol contract in an incompatible way. ## State lifetime - Server Session Authority state is currently memory-resident. - Project Coordinator registries are currently memory-resident. - Unity Authority View is transient to the live connection. - Project Peer content/staging/immutable Active revisions provide the implemented durable Project-data path. - Diagnostic history is bounded and current-run oriented. - Persistent server/session operation history, durable authority snapshots and old-session restart recovery are separate future capabilities rather than implicit current behavior. ## Network and security boundary - Direct Project Peer HTTP requires actual peer reachability, such as same PC, reachable LAN or managed VPN. - A two-PC invite must advertise a concrete Guest-reachable Host origin; wildcard/unspecified/loopback addresses are not valid remote Guest destinations. - Non-loopback listeners require authentication according to the current server/Host policy. - The shared access-code model is designed for a trusted team/LAN/VPN environment, not as a public-Internet identity system. - Internet relay/NAT-traversal/discovery capabilities must be treated as separate transport/security work rather than assumed from the word `P2P`. - Runtime/file/path/identity checks are trust boundaries. Convenience features must not generalize a narrow verified exception into acceptance of arbitrary redirected or untrusted content. ## Supported collaboration boundary The current supported collaboration model is narrower than arbitrary Unity project synchronization. General Component/Inspector/Prefab/Asset synchronization, cross-Scene structural collaboration, persistent restart recovery, platform-equivalent launchers and broader Internet transport are tracked through [STATUS.md](STATUS.md) and [ROADMAP.md](ROADMAP.md), not asserted here as current capabilities. ## Architecture decisions Use [architecture-decisions.md](architecture-decisions.md) for important decisions and their historical context. A historical decision can remain valuable even after being replaced. Explicitly superseded decisions must not override current source or this as-built architecture. --- # Changelog This file summarizes **notable product-version changes** for TeamForge. For detailed Unity-package changes and intermediate hotfixes, see **[unity-package/com.eunsung.teamforge/CHANGELOG.md](unity-package/com.eunsung.teamforge/CHANGELOG.md)**. For repository infrastructure, validation milestones, AI/search work, privacy migration, and other engineering history that does not map cleanly to a product version, see **[docs/history/DEVELOPMENT_HISTORY.md](docs/history/DEVELOPMENT_HISTORY.md)**. Current implementation and release readiness are tracked separately in **[docs/STATUS.md](docs/STATUS.md)**. A changelog entry describes what changed; it is not proof that the current packaged candidate passed every field gate. Current source can also be newer than the latest immutable packaged candidate; use STATUS and `builds/README.md` for that distinction. ## Unreleased source additions after immutable r10 (2026-11-18 onward) - **Audited defect fixes (#662, #670, #651, #667, #658, #652, #671, #673, #672, #648, #660, #666; source only, Node host tests):** Host Ready now requires the realtime Scene GUID to match the signed Scene `.meta`; a full durable Session store refuses only the new Session instead of disconnecting unrelated live Sessions; every Guest activation is a monotonic compare-and-swap; a failed Host startup or stop no longer drops ownership of live child processes or reports Idle over them; Editor-bound message budgets cannot exceed the Unity Editor's 1 MiB receive limit; a connection that announced an outdated signed Baseline cannot keep committing realtime edits (Unity Editors do not announce one yet); and a first Hierarchy seed keeps previously confirmed Transform state. Durable mode keeps per-connection request order behind asynchronous admission; locks and empty Scene seeds are admitted only if the resulting snapshot still fits a late joiner; activation and approved-pointer locks are released by the OS when their owner process dies (ambiguous legacy locks still stay busy); an incompatible TeamForge Package is refused before activation; and Host health stops reporting Ready after a required chunk is lost. Unity Editor, Launcher, packaged and physical two-PC checks are NOT RUN. - **Launcher Runtime file verification (#570, source only):** SHA-256 of pinned Runtime files is now computed by streaming rather than buffering entire files; the fail-closed manifest, inventory, path and trust checks remain. New exact packaged startup and Windows physical checks are NOT RUN. - **M3 shared built-in primitives (PR #569, source only):** opt-in Cube/Sphere creation/deletion, built-in Mesh/Renderer, exact Collider identities and atomic Hierarchy/Collider revisions; 3-version Editor/Node CI passed. Physical two-Editor and new package NOT RUN. r10 unchanged; release remains FIELD BLOCKED. - **Unreleased source dependency update:** server and Project Peer now use the same pinned ws 8.23.0; root and workspace lockfiles and the current source Runtime contract share the exact npm registry integrity. The upgrade includes the upstream fix for unbounded automatic Pong buffering from malicious Ping frames. This does **not** change the published r10 ZIP or its source/tag hash, and does not claim a newer packaged or physical two-Editor validation. These changes are on main source, **not** in the published r10 Windows ZIP. No newer exact Windows package or two-physical-Editor field certification exists; release readiness remains **FIELD BLOCKED**. See [STATUS](docs/STATUS.md) for source/CI/field distinctions. - **M1 opt-in Collider properties** (PR #533): signed Scene admission, Server Authority, WebSocket, Box/SphereCollider trigger/center/size/radius, conditional own Undo/Redo and explicit recovery review. One real Unity Editor and Node peer passed versioned CI; simultaneous physical Editor tests remain pending. - **M2 opt-in Collider lifecycle** (PR #559 including late-join fix #565): add/remove exact Box/SphereCollider Components, same-type sibling identities, save/reopen/reconnect and conditional compensation. The merged PR head passed Unity/Node CI; physical two-Editor use and packaged promotion are not yet certified. Structural sync requires explicit server/Editor capability enablement and is off by default. - **Post-r10 source-only Launcher and field hardening** (PRs #543, #546, #548, #564): bound untrusted status text, refuse overwriting existing diagnostics ZIP files, normalize local Host identity in field control frames, and reject unsafe manifest file path syntax before filesystem access. These changes have CI coverage and are not retroactively present in the published r10 package. ## 0.5.1 Collaboration bootstrap, networking, release-contract, recovery, path-resilience, and security stabilization around the 0.5.0 collaboration foundation. Notable changes in the 0.5.1 line include: - guided Host/Guest bootstrap and standalone Windows Guest Launcher work; - bundled/verified Runtime packaging instead of requiring normal Guests to install system Node/npm; - stronger Collaboration Invite, Project/Publisher trust, staging, activation, and final Unity-handoff checks; - diagnostics and recovery UX for common bootstrap/transfer/runtime failures; - prompt cancellation of sibling transfer requests and cooldown waits after a terminal chunk failure, preserving the original error and verified resume data; - isolated Coordinator reconnect attempts, source-specific retry budgets even with duplicate peer labels, and Seed listener cleanup after failed endpoint setup; - cancellation through cached/final verification, file reconstruction and Publisher approval before activation commits, preserving the previous Active revision and verified resume data; - explicit Launcher verification/progress feedback, finite-number-safe indicators and pause/resume handling that tolerates late runtime events and acknowledgements; - exact pinned-descriptor recovery despite unrelated damaged metadata, with stricter Project identity and revision checks; - failed chunk-write cleanup that preserves the original I/O error and shared verified cache entries completed by other transfers; - receive controls scoped to the current operation, duplicate-request prevention, cancellation priority over delayed pause/resume feedback, and cancellation before transfer or automatic Unity opening; - a manual Windows Launcher **Save support bundle** path, producing a bounded/redacted local troubleshooting ZIP rather than automatically uploading broad machine/project data; - Windows path-resilience and managed short execution-path handling; - collaboration race/reconciliation hardening around Transform, Hierarchy, Lock and late-join state; - targeted fixes for saved Guest reconnect, receive/shutdown handling, remembered Seed-port collision fallback with narrow Windows firewall onboarding and selectable rule cleanup on Host stop, Transform/Lock contention recovery, and verified execution-alias handoff; - stronger CI, Unity real-server E2E, transfer-recovery, authority-chaos and release-artifact validation. The published r5 candidate includes the support-bundle integration and received exact two-PC Windows evidence for the original WP5.1 stabilization scenarios recorded in [docs/STATUS.md](docs/STATUS.md). Current `main` has since added further Windows networking and Project identity recovery hardening that is **not byte- or behavior-equivalent to r5** and requires its own package/evidence boundary if selected for distribution. ## 0.5.0 Introduced the Same-Scene Hierarchy collaboration foundation and related authority/conflict handling. Notable scope: - authoritative GameObject create/delete/rename/reparent/sibling-order operations for the supported same-Scene subset; - shared identity/authority integration between Hierarchy, Transform and Lock paths; - reconciliation and protection rules for unsupported/ambiguous structural state; - expanded regression and validation coverage around hierarchy operations and collaboration state. General Component/Inspector/Prefab/Asset synchronization was not introduced as a supported general workflow by this version. ## 0.4.1 Phase 3 stabilization release line. Notable work: - Embedded UPM package transfer coverage; - Project-transfer retry/resume/failover stabilization; - regression fixes discovered during manual end-to-end testing; - safer bootstrap/activation handling and documentation/test updates. ## 0.4.0 Introduced the Project bootstrap / transfer protocol foundation. Notable scope: - signed Collaboration/Project bootstrap metadata; - direct Project Peer transfer foundations; - deterministic Manifest/File/Chunk integrity checks; - staging/activation and Publisher trust foundations; - resume/seed/failover groundwork. ## 0.3.0 Introduced live Transform synchronization, server authority, and basic object locking. Notable scope: - position/rotation/scale synchronization; - server-authoritative revision/lock handling; - object ownership/lease behavior; - conflict and reconnect foundations around shared Transform state. ## 0.2.0 Introduced Presence and Editor-awareness collaboration. Notable scope: - connected-user identity/presence; - selection and Scene awareness; - teammate navigation helpers; - join/leave and presence lifecycle behavior. ## 0.1.0 Initial Unity Editor collaboration connection foundation. Notable scope: - Unity Editor ↔ TeamForge Server connection; - Hello/Ping/Pong and basic protocol envelope; - reconnect and diagnostics foundations; - initial Editor package/server structure. ## Historical engineering detail TeamForge intentionally retains detailed engineering records that are more granular than a normal changelog: - [Development history](docs/history/DEVELOPMENT_HISTORY.md) - [Phase records](docs/phases/) - [Work-state / debugging records](docs/work-state/) - [Architecture decisions](docs/architecture-decisions.md) Those records may describe superseded behavior. For current facts, prefer source/tests and [docs/STATUS.md](docs/STATUS.md). --- # Changelog ## Unreleased source-only M1/M2/M3 collaboration - M3 (PR #569) adds opt-in built-in Cube/Sphere create/delete and exact Hierarchy/Collider identity. Actual three-version Unity Editor+Node CI passed; two physical Windows Editors and a new exact package remain **NOT RUN**. Published r10 is unchanged. ### M1/M2 Collider collaboration - M1 (PR #533) adds explicitly enabled Collider property sharing with signed saved Scene admission, Authority/lock checks, bounded recovery review and conditional own Undo/Redo. - M2 (PR #559, including #565) adds explicitly enabled shared Box/SphereCollider add/remove, exact runtime identity and late Editor admission after retained Hierarchy applies. The source-head Editor+Node CI passed, but two physical Windows Editors and an exact new packaged candidate are still **NOT RUN**. The immutable published r10 ZIP does not include M1 or M2; readiness stays **FIELD BLOCKED**. ## 0.5.1 stabilization lineage — WP4 / WP5 / WP5.1 TeamForge remains on product version `0.5.1` while the Windows Host/Guest candidate has continued through several stabilization work packages. Product version `0.5.1` alone therefore does not identify a byte-identical packaged candidate. The current source-controlled release identity is `0.5.1-wp5.1-path-resilience`; use `release-contract.json` plus the exact packaged artifact SHA-256 for current candidate identity. ### WP5.1 Path Resilience — current 0.5.1 candidate lineage - Added a shared Windows path-resilience contract and conservative high-risk path budget for Unity execution/package-cache headroom. - Added Launcher path-capability probing and verified execution-path routing so a long canonical Active path can use a bounded TeamForge-owned short execution alias when the platform/filesystem supports the required junction semantics. - Kept external symlink/reparse-point rejection separate from TeamForge-owned execution aliases; aliases are identity-bound and revalidated immediately before Unity launch. - Added Unity package-cache environment relocation under the managed short execution root rather than weakening project containment or final handoff checks. - Added automatic path-strategy diagnostics/recovery guidance for exhausted or unsafe path conditions. - Hardened Windows LAN hosting so the Seed remembers its last exact port (default `5091`), falls back to one OS-assigned port when that preferred port is occupied, and reconciles one named exact Seed firewall rule rather than accumulating port exceptions; the Advanced UI now defaults to removing the two named TeamForge LAN rules after a clean Host stop, exposes an on/off preference plus an info explanation, and retains explicit manual removal. - Added static/regression coverage for the shared path contract, `longPathAware` launcher manifest, removal of receive-time blanket path rejection, execution-alias verification, and continued rejection of unrelated reparse points. - Preserved Realtime Protocol v1, Project Transfer Protocol v1, Project Manifest Schema v1, direct HTTP Project Peer payload transport, trust/activation rules, and the existing server-authority model. - Current release state remains **FIELD BLOCKED**; source/static/automated qualification is not a substitute for exact-candidate Unity/two-PC field validation. ### WP5 Diagnostics & Recovery UX - Added stable beginner-facing recovery/error presentations for version mismatch, invalid/damaged invites, access-code failures, unreachable Host/Coordinator, Project/Owner conflicts, baseline updates, Unity discovery/version failures, unsafe destinations, damaged Runtime, transfer failure, and lifecycle/port conflicts. - Added bounded current-run diagnostic history and copyable diagnostic context with access codes, tokens, private keys, Authorization values, and caller-supplied secrets redacted. - Kept recovery actions state-driven and fail-closed: retry/re-enter/paste-new-invite/open-existing-verified-project actions do not silently overwrite trust bindings, bypass Scene baseline validation, or kill unknown processes. - Preserved a previously verified Active project when a newer required revision cannot be downloaded, while allowing verified downloaded data to be reused where supported. - Added Project Peer and Launcher regression coverage for version mismatch, secret-safe diagnostics, preserved previous Active state, damaged-invite refusal, stable Scene/Host codes, bounded diagnostic history, and non-destructive recovery behavior. - WP5 did not change the Realtime/Project Transfer protocol versions, Project Manifest schema, payload route, trust model, or activation contract. ### WP4 / release-contract stabilization — 2026-08-15 - Repaired WP4 Host Ready so it fails closed without a signed `teamforge-bootstrap-invite-v1` Collaboration Invite. - Separated Coordinator listen/bind from the advertised Guest endpoint and rejected wildcard or loopback addresses for two-PC invites. - Moved the TF1-only Session Invite under Advanced and preserved it for already-provisioned matching Projects. - Added a single release contract, security-patched Node floors, current runtime/tool provenance, CWD-independent smoke gates, and short Windows release-root/path-budget validation. - Removed the obsolete Phase 3 Windows validator and generated runtime-only npm manifests without dead development script declarations. - Preserved Realtime Protocol v1, Project Transfer Protocol v1, Manifest Schema v1, direct HTTP payload transfer, and existing authority/security invariants. - WP4 remained FIELD BLOCKED until its exact two-PC Windows checklist; later WP5/WP5.1 work does not retroactively convert candidate-specific historical evidence into a current-candidate PASS. ## UX Pass 2 Hotfix2 - 2026-08-10 - Fixed Quick A/B/C Lab clone startup so B/C carry the exact host saved Scene baseline (path/GUID/SHA-256), verify it in the clone, and open that Scene before realtime connection. - B now waits one additional Editor update after Scene load before auto-connect so Scene/Hierarchy callbacks settle; C opens the same baseline Scene but intentionally remains offline for Late Join. - Clone preparation waits for Unity compile/AssetDatabase update to finish, retries bounded transient startup failures, and fails closed on dirty local Scene state or baseline identity/hash mismatch. - Home now shows `Collaboration partially ready` when realtime is connected but the authoritative Hierarchy snapshot has not been accepted. - Added regression coverage/validator wiring for baseline-aware clone bootstrap and exact Scene opening. Coordinator, Project Peer and protocol v1 remain unchanged. ## UX Pass 2 Hotfix1 - 2026-08-10 - Fixed Unity C# compiler error CS0177 in Scene baseline validation by separating the missing-file branch from `TryHashFile(..., out error)` instead of short-circuiting them with `||`. - Added a repository-validator regression that rejects the short-circuit pattern and requires an actionable missing-baseline error path. - Investigated `(GetStatus) Cannot get non-existing progress id ...`: TeamForge does not call `UnityEditor.Progress.GetStatus`/lifecycle APIs; Unity has tracked the same Progress Window failure mode independently. Keep it as an external Unity Editor diagnostic unless a TeamForge action produces a reproducible package-owned stack trace. - Coordinator, Project Peer, realtime protocol, hierarchy authority, transform/lock behavior, and invite format are unchanged. ## UX Pass 2 - 2026-08-09 - Reduced the normal collaboration surface to `Start Collaboration`, `Join from Clipboard`, `Connect Current`, `Copy Invite`, and `Leave`; transport/identity fields remain available only under manual/advanced settings. - Bound new `TF1.` invites to the exact saved Scene baseline using Scene asset GUID + SHA-256, and reject mismatched Project/Scene state before realtime connection rather than waiting for `GlobalObjectId` snapshot warnings. - Added a local invite-baseline cache under `UserSettings` so a host can copy the same invite again after realtime edits make the Scene dirty without silently changing the session baseline. - Added a one-click Standard A/B/C Test Lab: B auto-connects, C intentionally stays offline for Late Join, clones preserve the saved baseline, Windows uses `robocopy` when available, and clone auto-connect now waits/retries through import/compile/update startup. - Expanded TeamForge Doctor with saved Scene baseline fingerprinting, safe-fix actions, Project Bootstrap/Test Lab status, and friendlier connection diagnostics. - Expanded developer scripts with `dev`, `verify`, `unity-test`, and authenticated LAN startup helpers; Unity EditMode tests can be launched headlessly from the full workspace. - Coordinator and Project Peer source remain byte-for-byte unchanged from UX Pass 1 / Hotfix6; realtime protocol remains v1. ## UX Pass 1 - 2026-08-09 - Added a Quick Start collaboration home screen while preserving the full Advanced diagnostics/bootstrap UI. - Added secret-free `TF1.` join codes for Server/Project/Session handoff. - Added TeamForge Doctor checks for Unity/package/project identity/Scene/settings/auth/path/realtime state. - Added Test Lab to create and launch clean B/C/D Unity Editor copies from one saved baseline. Test Lab now requires a saved Scene baseline and can keep the last clone offline for a real Late Join check. - Added environment-token fallback for launched test Editors without putting credentials into join codes/bootstrap JSON. - Downgraded the expected `hierarchy_object_deleted` stale-edit rejection from generic Error logging to a clear Warning. - Added Windows `Start-TeamForge-Local.cmd` and `scripts/teamforge.ps1` developer helpers in the full workspace candidate. - Realtime protocol remains v1; Coordinator and Project Peer source are unchanged from Hotfix6. ## 0.5.0 - 2026-08-07 - Added Phase 4 Hierarchy Synchronization for GameObject create/delete/rename/reparent/sibling order. - Added additive Protocol v1 hierarchy capability, server-authoritative hierarchy snapshots, tombstones and conflict handling. - Added logical `tf:` identities for session-created objects without Scene metadata Components. - Integrated hierarchy create/reparent/delete with Phase 2 Transform baseline and Basic Lock conflict policy. - Added Phase 2-only authority guard for Phase 4 authoritative Scenes. - Added hierarchy status/diagnostics and EditMode test source. - Preserved Phase 3 Direct P2P payload architecture and closure fixes. - Persistent server restart recovery remains out of scope until Phase 5. ## 0.4.1 - 2026-08-04 - Fix Unity 6000.3.21f1 CS0104 by fully qualifying `UnityEditor.PackageManager.PackageInfo` in EditMode tests. - Distinguish a missing verified baseline from a retained baseline whose direct seeds are offline. - Add Unity/status and repository-validator regressions for both field defects. - Include direct and unlisted Embedded UPM packages in deterministic Project Baselines. - Reject escaping Local Package paths, intermediate symlinks/junctions, missing Package lock metadata, and Owner identity JSON. - Add bounded Direct Transfer retry, Retry-After handling, exponential backoff, jitter, peer failover, pacing, and secret-free diagnostics. - Add Embedded Package Publish-to-Sync regression coverage and Editor package/menu surface tests. ## 0.4.0 - 2026-08-03 - Added additive Realtime Protocol v1 negotiation for `supportsProjectTransfer` / `projectTransferEnabled`. - Added metadata-only Project Coordinator DTOs and capability-gated routing for registry, peer, baseline, and sync-required events. - Added fail-closed Project UUID, baseline, SHA-256, Ed25519 SPKI shape/key-ID, version, endpoint, inventory, timestamp, and relative-path validation. - Added an atomic in-memory Project registry that rejects invalid snapshots, revision rollback, same-revision forks, and mismatched selectable seeds. - Added a secret-free `ProjectSettings/TeamForgeProject.json` identity descriptor, created only after explicit seed-source approval and never automatically overwritten. - Added signed sidecar invite import shape validation, Owner fingerprint review, managed-staging guidance, and secret-free project-peer launch-settings export. - Invite application now requires a fully stopped connection, cancels pending Assembly Reload resume, clears the previous Bearer Token, and never connects automatically. - Added Project Bootstrap UI and read-only diagnostics without Project payload transfer, key generation, automatic scanning, publish, download, or activation inside Unity. - Added Unity EditMode test sources for DTO round trips, atomic registry behavior, UUID/hash/version/path validation, invitation interoperability, and payload-field exclusion. - Preserved Phase 0 Ping/Pong, Phase 1 Presence, and Phase 2 Transform/lock behavior under Realtime Protocol v1. ## 0.3.0 - 2026-08-02 - Added capability-negotiated Transform Sync for saved Scene GameObjects. - Added server-authoritative revisions, idempotent operation IDs, and in-memory late-join snapshots. - Added GameObject-wide lease locks with renewal, conflict denial, disconnect cleanup, and timeout release. - Added throttled local Transform capture and remote apply suppression for position, rotation, and scale. - Added selected-lock controls, status, revision diagnostics, server tests, and Unity EditMode test sources. - Added clean Scene/Object/parent baselines preserved across reconnect and Assembly Reload; blocked new objects, multi-selection, Prefab Stage, and hierarchy drift. - Added dirty-snapshot conflict protection, target-specific stale Undo cleanup, Prefab instance override recording, and graceful final-send disconnect draining. - Bounded retained session state, snapshots, locks, outbound buffers, Hello time, and WebSocket heartbeat lifetime. - Preserved Phase 0 Ping/Pong and Phase 1 Presence client behavior through Protocol v1 capability negotiation. ## 0.2.0 - 2026-08-02 - Added project/session-scoped Presence snapshots and join/update/leave events. - Added stable per-project editor identity, user color, selection, active Scene, heartbeat, and Scene View camera sharing. - Added remote selection wireframe/name overlays and teammate navigation actions. - Added server-side identity validation, session isolation, and stale-connection supersession for Assembly Reload recovery. - Added Presence server tests and Unity EditMode test sources while preserving Phase 0 Hello/Ping/Pong behavior. ## 0.1.0 - 2026-08-02 - Added Unity 6.3 LTS Editor-only UPM package. - Added UI Toolkit collaboration and diagnostics window. - Added configurable ClientWebSocket transport with Hello and Ping/Pong protocol v1. - Added RTT measurement, manual disconnect, bounded exponential reconnect delay, and Assembly Reload resume intent. - Added local UserSettings persistence and optional Bearer Token header. - Added EditMode tests for URI construction, protocol serialization, and identity validation. ### 0.5.0 Hotfix3 field stabilization - 2026-08-08 - Re-arm Transform selection tracking after an authoritative Hierarchy create admits the currently selected logical object into the baseline. - Preserve an in-flight local Transform delta against the server-approved create Transform so it is sent after lock acquisition instead of being silently adopted. - Add an EditMode regression for create-to-Transform continuity and repository validation for the integration wiring. ### 0.5.0 Hotfix4 test-harness stabilization - 2026-08-08 - Make the new create-to-Transform EditMode regression deterministic by explicitly invoking selection tracking after assigning the test GameObject instead of relying on synchronous `Selection.selectionChanged` timing. - No TeamForge runtime, protocol, server, Project Peer, dependency, or persistent identity behavior changed from Hotfix3. ### 0.5.0 Hotfix5 Transform/Hierarchy coherence - 2026-08-08 - Keep authoritative Hierarchy Transform fields current when accepted Transform updates arrive on the server. - Prevent remote rename/reorder acknowledgement from overwriting a peer's live Transform with stale Hierarchy coordinates. - Add server/Unity regressions for rename and late-join Transform coherence. ### 0.5.0 Hotfix6 offline tombstone reconciliation - 2026-08-08 - Apply authoritative tombstone deletes before the reconnect dirty-Scene safety gate so an offline-edited object that was deleted by another peer cannot remain alive locally. - Allow reconnect to continue when the remaining dirty Scene's live Hierarchy and Transform still exactly match authority, preserving unrelated component-only dirty state. - Keep fail-closed protection when any remaining live object has unsaved rename/reparent/reorder/Transform divergence or an unknown local object. - Add EditMode regressions for tombstone dominance and dirty-live-state safety. --- # TeamForge Roadmap **English** | [한국어](ROADMAP.ko.md) | [Current status](STATUS.md) > **Build together. Stay in sync.** > > *Zero-config first, never zero-control.* This roadmap describes **direction, not promised dates or guaranteed features**. It deliberately avoids duplicating live blocker, PR, CI-run, and field-validation details. For what is implemented, validated, blocked, or currently packaged, use **[STATUS.md](STATUS.md)**. ## Product north star and open solution space **Enduring purpose:** help people collaborate in the Unity Editor with less project-copy friction, while preserving trust, project integrity, understandable authority and recoverable work. This is a direction of travel, **not a fixed feature list, prescribed architecture or limit on what an agent can invent**. Agents and contributors may challenge earlier Phase boundaries, rethink algorithms or protocols, propose entirely new collaboration capabilities, compare competing architectures, replace unnecessary complexity, and pursue opportunities not mentioned in this roadmap **when the active task authorizes broader exploration**. Existing phases, languages, networking choices, UI patterns and candidate lists are working hypotheses, not a ceiling on creativity or technical capability. An unexpected proposal deserves fair, evidence-based evaluation; novelty alone is neither a reason to adopt nor a reason to reject it. Judge proposals by the user problem they address and the evidence they can produce. Use reversible experiments and focused tests when practical, including comparison against a simpler or no-change alternative. Preserve current security, authorization, identity, integrity and honest validation boundaries. A proposal that fundamentally changes the product's purpose should be surfaced for an explicit user decision rather than silently treated as ordinary implementation. This paragraph **does not change** the existing optional/opt-in wider-scan policy or authorize releases, costly services or destructive actions. ## Guiding priorities TeamForge is being developed in this order: 1. **Reliability before breadth** — existing collaboration paths should recover predictably before more Unity state is synchronized. 2. **Explicit authority and identity** — peers should not silently invent ownership, object identity, or conflict outcomes. 3. **Safe failure and recovery** — disagreement should produce a visible, recoverable state rather than silent project damage. 4. **Simple common path, inspectable advanced path** — normal Host/Guest collaboration should become easier without hiding important networking, trust, or recovery boundaries. 5. **Distribution follows validation** — installer polish does not substitute for exact-artifact field evidence. ## Balanced outcomes across environments — engineering principle (2026-10-14) **Design intent, not a newly implemented feature or change in release priority:** TeamForge should work usefully and predictably across supported environments by considering **performance/latency, reliability/recovery, security and project integrity, network/OS compatibility, ease of use and expert control, and CPU/RAM/network/hosting cost together**. No single protocol (WebSocket, H2/H3, QUIC, P2P, relay) or speed metric is the objective. **Balanced does not mean all concerns have equal priority at every instant**: authorization, identity, data integrity, explicit consent and project-preservation are hard requirements that cannot be traded for speed. | Decision step | TeamForge-specific rule and example | | --- | --- | | **Identify actual capability** | Determine the supported Host/Guest platform, firewall/LAN/VPN/NAT, reachable Project Seed, authenticated Coordinator and Client/Server protocol negotiation. A discovered address, NAT mapping or advertised feature is not proof of trust or end-to-end reachability. | | **Keep a known-good simple path** | Preserve current authoritative WebSocket realtime collaboration and separately verified Direct HTTP Project transfer unless an alternative demonstrates a real advantage. Protocol additions must remain capability-gated and backward-compatible; a stable connection is not changed for novelty. | | **Optimize all affected dimensions** | Evaluate edit propagation p95/p99, Host/Guest join time, verified Project transfer time and bytes, resource cost, error rate, compatibility and user effort. More bandwidth, compression or parallel channels are not wins if they increase misapplied edits, security exposure, memory use or packaging failures. | | **Gracefully degrade without inventing state** | If remote connectivity fails, local Unity editing may continue **under Unity's existing local behavior**, but do not imply TeamForge can automatically synchronize offline edits. Preserve verified Active Project revisions, present connection/conflict status, reject stale ownership and recover via authenticated revision/snapshot reconciliation **where implemented**. | | **Fail safe, recover with evidence** | A transport ACK is not proof that an edit was accepted; a received chunk is not an activated project. Compare reconnect and Host/Seed loss on exact tested artifacts, including duplicate/stale operations, checksum/identity mismatch, NAT/UDP restrictions, user cancellation and multiple peers. Keep a manual/known-safe route where feasible. | | **Make the outcome understandable** | Normal Host/Guest onboarding should be simple; advanced networking and recovery controls should expose effective state, reason, limits and safe fallback only where supported. Avoid permanent feature clutter and unverified automation. | **Decision gate for a proposed protocol or feature:** Does it solve a reproduced user-visible problem? Which platform, network, peer and threat-model capabilities does it assume? Is there a simpler change to the existing WebSocket/HTTP, authoritative snapshot or manifest pathway? Can it maintain authorization, revision, lock, GUID, hash and atomic activation boundaries? Can it be backed out cleanly? Evaluate at least one healthy and one constrained/recovery scenario with the **same** task and trust assumptions, preserving negative results. This balances **all** important product qualities without weakening the [guiding priorities](#guiding-priorities) above. The roadmap stays a future-looking owner; as-built behavior remains in [architecture.md](architecture.md), actual capability/field readiness in [STATUS.md](STATUS.md), and exact selected package/protocol identities in `release-contract.json`. It does not reopen completed phases or promote experimental NAT traversal, WebSocket H2/H3, WP6 Component sync, full offline collaboration or persistent Session recovery into currently supported features. ## Now — finish the current packaging/evidence boundary and begin narrow Component collaboration ### Validate the selected packaged candidate and its remaining field gates The current published candidate, its exact artifact identity and remaining release gates are tracked in [STATUS.md](STATUS.md). A source checkout may contain changes newer than those packaged bytes; evidence belongs to the exact artifact and scenario that was tested. Before promoting a selected artifact as a generally installable alpha candidate, validate its remaining field gates and preserve earlier exact two-PC evidence within its original boundary. Do not mechanically repeat closed historical scenarios as if they had never been tested, or treat source CI as physical evidence for a newer package. Current validation direction includes: - fresh Windows LAN firewall onboarding with narrow, inspectable rule scope and cleanup behavior; - preferred Seed-port unavailable/collision fallback and advertised endpoint reachability; - Windows Project identity recovery after abnormal process loss while preserving fail-closed conflict handling; - Host stop/start and fresh Guest direct Project transfer on the exact packaged artifact; - a fresh extraction Host → Guest → realtime collaboration smoke path so newer packaging/integration changes are covered by their own evidence; - continued external/user testing beyond the project creator before broad reliability claims. The detailed current evidence and exact remaining release gate belong in [STATUS.md](STATUS.md), not in this roadmap. ### Approved feature milestones: continuous Collider editing to Project collaboration The first outcome is **two Unity Editors continuously editing saved, non-Prefab BoxCollider / SphereCollider properties and converging after conflict, Undo and reconnect**. Target Windows LAN and small teams of 2–8; actual supported peer counts must follow Unity evidence. Reuse the existing WP6 stack and keep Server Authority + WebSocket separate from direct Project Peer transfer. Signed saved Scene bytes establish initial provenance; approved runtime edits use the server ledger while the Scene is dirty. | Milestone | User outcome | Required progression | | --- | --- | --- | | M1 · Collider collaboration | Repeated bidirectional trigger, center, size/radius edits; visible pending/refused/applied status; conditional own Undo/Redo; local recovery review | Verified admission → property commit/broadcast → Unity observation/apply → conflict, late join and reconnect | | M2 · Component lifecycle | Add/remove Box/SphereCollider, multiple Components of one type, correct identification after save/reload | Logical IDs and tombstones → lifecycle operations → Unity Undo/recovery | | M3 · Real primitives | Create Cube/Sphere with built-in Mesh, Renderer and Collider on peers | **Source merged (#569)**; Editor+Node CI passed. Physical two-Editor / exact package NOT RUN | | M4 · Work recovery | Restore confirmed work after Host/Coordinator shutdown and preserve unconfirmed edits for review | Transactional SQLite snapshot + operation/result journal → new-epoch restart → Unity recovery inbox | | M5 · Project checkpoint/refresh | Compare Host-approved Project revisions and activate verified required data while preserving existing Active and local work | Immutable checkpoint/diff → chunk reuse/staging/atomic activation → dirty Project/reopen handling | | M6 · Multiple Scenes | Per-Scene join/leave/late join, followed by bounded cross-Scene object moves | M2/M5 identity and lifecycle; explicit identity migration for changed saved GlobalObjectIds | | M7 · Useful Inspector/Asset scope | Allowlisted Light/Camera values, approved Asset references, bounded Material edits and Asset move/rename | Explicit type adapters and GUID/reference checks after M1/M5 | | M8 · Prefab/custom Components | Bounded Prefab instance overrides, Prefab Asset publish/refresh and simple serialized MonoBehaviour fields with matching scripts | M5/M7; separate override, Prefab Asset and script/domain reload behavior | Prefer M1 → M2/M3 → M4/M5 → M6–M8. M5 can reuse transfer foundations early. Implementation, automated validation, Unity integration, and package/field validation are four distinct milestone states; current evidence belongs in [STATUS](STATUS.md). Missing field evidence does not justify repeating helper-only tests instead of advancing the next independently implementable user feature. M4 durable mode must record successfully before acknowledging, keep a versioned schema and old DB on migration, reject disk-full/corrupt writes, issue a new epoch at restart, and never restore old sockets, locks or Presence. M5 must retain the prior verified Active revision on failure. M8 initially excludes arbitrary managed references, complex arrays and custom serialization. ### Parallel usability and Internet collaboration - **U1:** finish the existing Host→Guest flow using current fixes and actual remaining address/firewall/retry/authentication evidence. - **U2:** one-paste invitations with expiring/revocable Project+Session-scoped joining authority and separate personal reconnect authority; retain the older code path for compatibility. - **N:** self-hosted/VPN/direct endpoint guidance and diagnosis first, then an authenticated optional relay adapter after U2. Managed service billing is outside the approved default scope. The WP6 authority/protocol/Unity Component surface has one integration writer; parallel agents use independent Launcher/Windows/field surfaces and recheck current PR files and semantics before writing and pushing. Queue markers, branch names and Actions concurrency alone are not exclusive ownership. ## Later — easier onboarding and flexible networking The long-term common path should feel closer to: **Start Collaboration → invite someone → they get what they need → Join Collaboration** Directions include: - simpler Start / Join Collaboration UX; - better automatic setup and diagnostics; - friendly LAN / direct-address workflows; - validated install / update / uninstall experience; - practical Internet collaboration outside one LAN; - stronger peer identity and authorization; - advanced manual/self-hosted networking controls. ### Connectivity research Possible research directions include: - relay / coordinator-assisted connectivity when direct P2P is unavailable; - WebRTC / ICE / STUN / TURN where they provide clear value; - peer discovery that does not weaken explicit trust; - transport fallback that remains observable rather than silently changing the security model. These are research directions, not current capabilities. Current networking boundaries are documented in [STATUS.md](STATUS.md) and [architecture.md](architecture.md). ## Later — reliability, history, and recovery Build on the implemented verified-transfer resume, connection-attempt isolation, Seed startup cleanup and cancellation through verification to the activation commit boundary, exact approved-publication recovery, shared-cache preservation and receive-lifetime controls. These foundations improve recovery within the current Host/Guest workflow; durable Session history and offline reconciliation remain separate future capabilities. Long-term recovery work may include: - better Host disconnect / crash recovery; - durable server/session restart behavior; - persistent authoritative snapshots or equivalent recoverable state; - operation / recovery journal; - replay or rollback mechanisms where practical; - stronger stale/corrupted/mismatched Project detection; - long-running soak/stress testing; - larger multi-user conflict/load testing. Recovery is a first-class feature, not something to add only after synchronization fails. ## Later — security and trust hardening Security work remains continuous rather than a one-time milestone: - stronger peer identity and authorization; - systematic untrusted network-input validation and fuzzing; - continued path-traversal / arbitrary-file-write hardening; - archive / Project extraction and activation review; - unsafe deserialization and command/code-execution review; - secret/token/credential isolation review; - resource-exhaustion / denial-of-service resistance; - malicious or modified Unity project/package handling; - stronger Unity-aware C# static analysis; - independent security review as the project matures. Automated scanning and green tests are evidence, not a professional security audit. ## Research — advanced collaboration models These ideas remain exploratory until their value and Unity fit are demonstrated: - collaboration-aware shared Undo / Redo; - temporary offline editing followed by safe reconciliation; - operation-based synchronization or CRDT-like approaches where appropriate; - advanced conflict merging; - Host / Publisher / Seed migration without disrupting a session; - larger-team scalability; - richer collaboration history and change inspection. Some may not fit Unity's data model or may cost more complexity than the value they provide. ## Research refinement — strengthen existing ideas before widening scope (2026-10-14) **Idea candidates only; no new feature, protocol, implementation, release promise or change to current priorities.** These refine the WP6, project-transfer, connectivity, safety, and automation directions above. Implementation/evidence status remains exclusively in [STATUS.md](STATUS.md). | Existing direction | Potential strengthening | Disproof / safety gate before considering implementation | | --- | --- | --- | | Component/Inspector collaboration | Treat the first supported property edit as a **scoped, revision-checked operation** with stable GameObject/Component/property identity, operation-ID replay protection, owner lease verification, and targeted reject/repair. Model Unity Undo/Redo and domain reload as separate failure paths, not implicit global Undo. | Two Editors make conflicting edits, one crashes/reconnects, and a duplicate arrives late: neither an unrelated local edit nor a Prefab override may be silently reverted or accepted without authority. Begin with one allowlisted property shape, not general serialization. | | Durable session/recovery | Compare a minimal **session generation/epoch fence + authoritative snapshot + bounded operation journal** with today's in-memory authority. Separate recovering previous accepted state from reissuing a command. | Kill/restart coordinator between validate, broadcast, acknowledgement and persist boundaries. Prove stale owners/operations from the prior epoch cannot mutate a new session; never infer success from a missing acknowledgement. Do not promise crash survival before this is evidenced. | | P2P bootstrap/transfer | Examine **verified incremental project manifests** and immutable chunk reuse to reduce repeat bootstrap work, while preserving Unity `.meta`/GUID identity, project-root containment, signatures, hash verification and atomic activation. | Alter or remove a `.meta`, rename an Asset, poison a cached chunk, or interrupt activation. Guest must either reconstruct exactly the intended project version or refuse with actionable recovery; speed is secondary to integrity. | | Internet connectivity alternatives | First map direct LAN/WAN connection failure classes and observable fallbacks. Evaluate ICE/STUN/TURN, alternate address families, or a separately authorized relay **only if** a measured reachability gap warrants them; keep peer authentication independent of connectivity discovery. | Test symmetric NAT, blocked UDP, address changes and unavailable relay with explicit cost limits. An advertised candidate or a successful STUN response is never proof of peer identity or successful P2P data transfer. | | Automation and diagnosis | Prefer an explainable **suggest → verify → act (only if safe) → confirm/undo** flow for Host/Guest setup, path/firewall checks and recoverable conflicts. Keep security-sensitive firewall/credential/trust changes inspectable and user-authorized. | Simulate misleading readiness, expired invite, stale endpoint and ambiguous Project root. Automation must not open broad firewall access, reuse a rejected identity or overwrite user changes to make a green status indicator. | | Offline edits, CRDT/OT and history | Explore **operation-specific reconciliation** before wholesale CRDT adoption: commutative leaf properties might merge; deletion, reparenting, asset GUID replacement and Prefab conflicts usually need explicit authority or human resolution. | Replay an offline branch with reordered, duplicate and conflicting operations; preserve deterministic conflict reports and a recoverable original snapshot. Reject merge designs that cannot preserve Unity object references. | **Balance rule:** Harden already-supported Host/Guest and Scene paths first, then evaluate one narrow new capability against simpler recovery or existing Git/version control. Assess correctness, clarity, failure recovery, resource cost and reproducibility together. An interesting protocol or automation candidate is not a scheduling mandate. ## Research discovery — additional protocol and synchronization options (2026-10-14) **Research inventory, not a feature plan, implemented capability, endorsed dependency or change to the current WP6/field-validation priority.** Unlike the existing broad ICE/STUN/TURN, CRDT and incremental-transfer categories, these are concrete candidate protocols/algorithms to compare **only after an appropriate failure mode is observed**. Current as-built claims remain in [STATUS.md](STATUS.md). | Newly examined candidate | Unique value beyond existing roadmap label | Cost, safety boundary and smallest useful comparison | Revisit | | --- | --- | --- | --- | | **libp2p Circuit Relay v2 + DCUtR** ([protocol spec](https://github.com/libp2p/specs/blob/master/relay/DCUtR.md), [JS implementation](https://libp2p.github.io/js-libp2p/modules/_libp2p_dcutr.html)) | A concrete *relay-first, synchronize hole punching, upgrade to direct* path; a distinct alternative to planning a full WebRTC/ICE stack merely to solve NAT reachability. | The relayed bootstrap already needs a trusted/reachable relay; hole punching fails on some NATs; relay cost and new runtime/dependency complexity may dominate a small-team project. Compare existing direct-address flow vs a disposable DCUtR/relay fixture vs ICE-based alternative under home/symmetric NAT and blocked UDP. **Do not reuse unauthenticated discovered peer addresses as identity.** | **B** connectivity gap | | **WebRTC DataChannel / SCTP with partial reliability** ([RFC 8831](https://www.rfc-editor.org/rfc/rfc8831.html)) | Compare separate reliable ordered channels for authoritative edits against **unordered/expiry-limited updates** for ephemeral presence/selection/camera awareness. This makes transport delivery semantics explicit without treating every Unity change as durable. | WebRTC stack and SCTP/DTLS/ICE integration increase packaging/support cost; unreliable delivery is forbidden for authority, locks, project data and any edit requiring reconciliation. Run a disposable latency/loss/large-message comparison against existing WebSocket; preserve trusted user/operation identity across channels. | **B/C** only for measured head-of-line cost | | **FastCDC content-defined chunks + VCDIFF/rsync** ([USENIX FastCDC](https://www.usenix.org/conference/atc16/technical-sessions/presentation/xia), [RFC 3284](https://www.rfc-editor.org/rfc/rfc3284), [rsync design](https://rsync.samba.org/tech_report/)) | Existing 'incremental project transfer' gains concrete alternatives that might reuse files after a byte insertion or near-identical Asset revision, rather than only exactly matching fixed-size chunks. | `.meta`/GUID mismatch can silently break projects; preserve signed project-version identity, trusted base hash, bounded delta decode, final byte/hash checks and atomic activation. Compare full copy vs fixed chunks vs CDC/delta on realistic Unity assets and compressed media; never patch active project files in place. | **B** transfer bottleneck | | **Rateless IBLT / compact set reconciliation** ([SIGCOMM 2024](https://dspace.mit.edu/entities/publication/a6315819-c34a-4a2c-8218-e811d665dff3)) | Exchange *which* authenticated asset/chunk IDs differ before paying for a large manifest; possible complement to future offline/multi-seed project bootstrap. | Inventory sketches do **not** authenticate file bytes or project membership. Require signed manifests, bounded decoding, peer authorization and simple hashed-list fallback. Compare full list, Merkle tree and IBLT with small vs large differences, malformed/skewed inputs and constrained RAM. | **C** only at scale | | **SPAKE2+ password-authenticated key exchange** ([RFC 9383](https://www.rfc-editor.org/rfc/rfc9383.html)) | An alternative **short human join-code *pairing* design** distinct from carrying a reusable server bearer token; consider as a component of one-paste Guest onboarding, not a silent replacement for existing signed invites. | A short code still requires online guessing limits, attempt/rate controls, expiry, peer/server identity binding and explicit membership authorization. Check whether the augmented PAKE registration model even fits a single-use invite; compare with existing high-entropy signed capability tokens first. Do not invent custom cryptography or weaken TLS. | **B/C** UX security research | | **Messaging Layer Security (MLS)** ([RFC 9420](https://www.rfc-editor.org/rfc/rfc9420.html)) | A formal candidate if TeamForge later needs **end-to-end encrypted multi-editor group membership and changing key epochs** when coordinator/relays are not trusted with project-edit content. | MLS does not replace server authoritative revisions, lock ownership, project signatures, or trusted identity enrollment. Ratchet/state recovery and offline rejoin are complex. Compare simple authenticated peer sessions and signed invites for today's small groups first; evaluate MLS only against a concrete confidentiality/membership threat model. | **C** future trust model | | **Merkle anti-entropy / causal reconciliation hints** (existing data-structure family; not a wire standard) | Let a reconnecting editor prove which authoritative snapshot/revision or immutable content subtree it lacks, rather than blindly replaying all history. Version vectors/causal metadata could help **diagnose** divergent offline edits without auto-merging Unity hierarchy. | A tree hash detects disagreement, not an authorized winner. Keep server authority, epoch fences, identity, GUIDs and reject/repair rules; compare existing full resync with bounded tree-diff plus snapshotted operation journal. Fail closed on conflicting ownership or stale epochs. | **B/C** reconnect evidence | **Cross-project candidate:** BetterNet's verified content-inventory and TeamForge's immutable transfer manifest could both independently benchmark FastCDC/VCDIFF/IBLT, **without** merging services, user content, auth/trust roots or protocols. A matching algorithm is not evidence that shared caching is safe. **Ranking is research priority, not implementation priority:** B = revisit if a measured current limitation makes a low-risk disposable comparison worthwhile; C = long-horizon/costly or trust-sensitive. Existing exact-package field gates and narrow WP6 authority/recovery remain first. Keep negative results and cite a verified specification/version before any future coding decision. ## Research: missed alternatives in earlier TeamForge phases (2026-10-14) **Ideas only.** This is a retrospective options matrix for Phase 1 presence, Phase 2 editing/locks, Phase 3 project bootstrap/P2P and current WP5/WP6 recovery. It does **not** retrofit old releases, change wire version, require libraries, reopen closed bugs or claim field validation. Existing direct transfer, WebSocket authority, signed manifests, locks and Unity ownership rules remain the actual supported baseline ([STATUS.md](STATUS.md)). | Historical phase / unresolved opportunity | Concrete protocol or technique to compare | Why it might help, and an explicit reason **not** to adopt | | --- | --- | --- | | **Phase 1: Host/Guest endpoint entry** | [mDNS, RFC 6762](https://www.rfc-editor.org/rfc/rfc6762.html) + [DNS-SD, RFC 6763](https://www.rfc-editor.org/rfc/rfc6763.html) optional LAN discovery | A trusted Host could be *found* on the same local link without typing its address; test manual endpoint vs mDNS on Windows private/public networks, guest Wi-Fi, VLAN and VPN. **Discovery never proves Host identity, access-code validity or consent**; show fingerprint/invite check, manual fallback and no sensitive TXT records. This is not Internet discovery. | | **Phase 3: explicit Direct Seed ports and NAT** | [Port Control Protocol (PCP), RFC 6887](https://www.rfc-editor.org/rfc/rfc6887.html), compare manual port forwarding and future ICE/DCUtR | Router-assisted **temporary** mapping is a separate option before paying for permanent TURN/relay. PCP support is not universal, and does not solve every CGNAT or distribute an authenticated peer address. Never open an inbound port without user approval, scope, expiry/renewal, cleanup and a positive remote reachability check; retain direct/manual/relay alternatives. | | **Phase 3: one signed Project baseline shared to multiple Guests** | [NACK-Oriented Reliable Multicast (NORM), RFC 5740](https://www.rfc-editor.org/rfc/rfc5740.html) versus existing authenticated unicast/chunk reuse | Where LAN multicast is actually supported, group FEC/NACK repair could avoid sending an immutable baseline separately to many approved Guests. However Wi-Fi multicast can be slow/lossy/blocked and NORM adds considerable complexity. Compare 1/2/4/8 receivers for total Host bytes, join latency, per-Guest hash correctness, missed repair and battery; this is **not** an automatic substitute for guest authorization or signed manifests. | | **Phase 2: small authority messages versus bulk bootstrap** | [HTTP/2/3 Extensible Priorities, RFC 9218](https://www.rfc-editor.org/rfc/rfc9218.html) and bounded application queues | If future HTTP/2/3 transport or download requests share a cooperating endpoint, use urgency/incremental hints for control vs bulk; compare with separate existing WebSocket/HTTP channels and local queue caps. **HTTP Priority does not prioritize individual WebSocket frames**, and server support is optional; no justification to replace WebSockets without measured head-of-line contention. | | **Phase 3: tail stalls in TCP project transfer** | [RACK-TLP TCP loss detection, RFC 8985](https://www.rfc-editor.org/rfc/rfc8985.html) | Before adding a new P2P transport, check whether OS TCP already uses efficient time-based tail-loss recovery; record final-chunk latency, retransmits and connection churn. Not an application wire protocol and not a request to replace Windows/Linux kernel controls. Prefer baseline instrumentation and a controlled OS/fixture comparison if supported. | | **WP5: future changing direct/relay network path** | [QUIC native path validation/migration, RFC 9000 §9](https://www.rfc-editor.org/rfc/rfc9000.html#section-9) and [TAPS transport API, RFC 9622](https://www.rfc-editor.org/rfc/rfc9622.html) | Only if a **future cooperative transport** is considered: compare preserving a connection on address change with inexpensive authenticated reconnect + snapshot/resume; TAPS Require/Prohibit semantics may help keep security hard constraints explicit. They are **not currently implemented** by the WebSocket or Direct HTTP data path; packet routing and identity must be independently authorized. | | **WP5/6: diagnosing obscure failures** | [qlog draft (July 2026)](https://datatracker.ietf.org/doc/draft-ietf-quic-qlog-main-schema/) for a hypothetical future QUIC stack + task-local structured decision trace today | A shared causal timeline (Host/Guest/Seed generation, request ID, revision, lock, authority rejection, reconnect) is often more useful than changing protocol. qlog applies **only if** QUIC/H3 is actually used; not a reason to fabricate QUIC traces or log private scene contents, access codes or bearer tokens. Validate redaction and bounded retention. | | **WP6: edit replay and latency optimization** | [HTTP early data / replay threat, RFC 8470](https://www.rfc-editor.org/rfc/rfc8470.html) and **bounded operation idempotency + model-checked state machine** (TLA+/PlusCal as tools, not wire protocols) | A duplicate/replayed edit can outlive the socket even if a new transport promises low handshake latency. Test stale epoch + lock expiry + retry + targeted Undo + duplicate property edits against server authority. Never send mutating Component/Hierarchy operations in replayable 0-RTT by default; a faster handshake is no substitute for authorization, commit and deterministic repair. | ### Cross-phase options and stop conditions - **First compare what exists:** Windows TCP tuning/visibility and existing WebSocket/Direct HTTP, signed manifests, Unity-aware target recovery, existing Session authority and known field gates. - **Then the inexpensive optional improvements:** LAN discovery and human-confirmed onboarding, service-specific queue/priorities, replayable authority traces and small-scale group-transfer baselines. - **Only then expensive protocol candidates:** PCP with explicit consent, NORM multicast, QUIC migration, ICE/DCUtR/WebRTC or different authority replication. Each needs a real gap, safer fallback, measured improvement and integration/packaging budget. - **Security/compatibility rule:** endpoint discovery ≠ authentication; NAT mapping ≠ external reachability; transport ACK ≠ committed Unity edit; a delta or multicast copy ≠ trusted Project activation. - **No scope promotion:** existing WP6 pre-wire Component validation is not live Inspector sync; existing r8 release remains physically unverified under its own exact-package test gate. Research ranking does not modify that state. ## Research: additional transport and offline-metadata alternatives (2026-10-14) **Idea-only candidate comparison; no feature/code/wire-version/dependency change or readiness claim.** Prior research covers ICE/DCUtR, QUIC migration, NORM, FastCDC/VCDIFF/IBLT, MLS and PAKE; this pass examines **compatible WebSocket bootstraps, cooperative immutable-block fetching, compact typed control payloads, optional broker expiry and HTTP compression**. Current Scene edit authority/identity and signed project activation take precedence over protocol performance ([STATUS.md](STATUS.md)). | New alternative / primary reference | Where it might fit | Cost, security and falsification condition | | --- | --- | --- | | **WebSockets over HTTP/2 (RFC 8441) / HTTP/3 (RFC 9220)** — [H2](https://www.rfc-editor.org/rfc/rfc8441.html), [H3](https://www.rfc-editor.org/rfc/rfc9220.html) | WP5 Internet ingress/proxy compatibility while retaining a **WebSocket** application protocol. If a particular reverse proxy/client supports extended CONNECT it may allow realtime edit traffic to coexist with ordinary HTTP requests on an H2/H3 connection. | Not a universal WebSocket upgrade and not automatic WebTransport support. Confirm client, proxy, Node runtime and TLS/auth behavior; compare existing RFC 6455 H1 WebSocket vs H2 vs H3 under proxy failure/reconnect and edit-order/load conditions. Keep H1 fallback; no wire-protocol migration without demonstrable benefit. | | **IPFS Bitswap 1.2 Have/DontHave/wantlist** — [spec](https://specs.ipfs.tech/bitswap-protocol/) | Phase 3 future **authorized multi-Seed** distribution of immutable signed Project chunks; compare a standard block-request strategy against current direct per-Guest verified transfer and the earlier Merkle/IBLT *inventory* ideas. | Sharing a block is not authorization to reveal private project data. No public DHT, public CIDs or unauthenticated wantlists. Measure 2–4 trusted Guests for missed chunk fetch, redundant bytes, head-of-line, corrupt blocks and Seed departure. Final manifest, .meta/GUID and activation checks always govern. | | **Zstandard dictionary compression + HTTP Compression Dictionary Transport** — [RFC 8878](https://www.rfc-editor.org/rfc/rfc8878.html), [RFC 9842](https://www.rfc-editor.org/rfc/rfc9842.html), [RFC 9659](https://www.rfc-editor.org/rfc/rfc9659.html) | Phase 3/5 repeated nonsecret project-manifest/status HTTP responses or **future owned** supported serialized metadata. HTTPS dictionary negotiation can reuse unchanged text across versions, without equating this to content-defined file chunks. | RFC 9842 client compatibility varies; HTTP zstd window ≤8 MiB per RFC 9659. Use exact dictionary identity, bounded decode/CPU and final uncompressed content hash; do not compress secret+attacker-controlled content together. Compare plain/gzip/zstd/dictionary against full signed manifest fetch; compressed Unity assets may gain nothing. | | **CBOR (RFC 8949) typed compact representation** — [RFC](https://www.rfc-editor.org/rfc/rfc8949.html) | WP6 **research alternative** for a tightly allowlisted *future* operation payload, not immediate serialization of arbitrary Unity objects. Compare against the existing JSON envelope for many small predictable property edits. | Typed encoding/unknown-fields/canonical encodings must be versioned and fuzz-tested; it cannot itself authorize the edit or prevent corrupt references. Benchmark compressed JSON vs CBOR and schema-evolution failures first; keep existing v1 wire compatibility and readable diagnostics. | | **MQTT 5 session expiry / message expiry** — [OASIS standard](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html) | **Optional out-of-band async notifications** (missed collaborator activity, invite expiration, deferred non-authoritative events) in a future disconnected-control design, not a replacement for current Scene authority WebSocket. | Requires trusted broker/service, ACLs and resource quotas. QoS delivery is not exactly-once Unity mutation, offline retained events can be stale and revive wrong sessions. Compare current bounded pending-notice/snapshot model versus broker TTL and reconnect on a disposable test cluster before any product decision. | **Phase-first filter:** if the actual bottleneck is authentication, stale revision, Project GUID integrity, Host availability or field-blocked packaged recovery, protocol substitutions above do not address it. Start with a measured current failure; demand a smaller fixed-baseline alternative and a rollback before promoting any candidate. No network/server/Unity implementation is authorized by this note. ## Product and engineering principles ### Complement version control Git, Unity Version Control, and other VCS tools remain important for history, review, backup, and recovery. TeamForge aims to improve live collaboration, not replace them. ### Safety before magic A convenient automatic action should not silently overwrite or fabricate Project state when TeamForge cannot prove the action is safe. ### Fail visibly and recoverably When state disagrees, prefer a clear diagnostic and recovery path over silently forcing one side to win. ### Distribution follows validation A polished installer is not useful if the exact packaged workflow remains unvalidated. ### AI assistance is allowed; unverified output is not the goal TeamForge is heavily AI-assisted. Changes are judged by correctness, safety, testing, maintainability, and usefulness rather than whether AI was used. ## How feedback changes this roadmap This roadmap is intentionally flexible. If testing shows onboarding is a bigger blocker than deeper Scene synchronization, onboarding can move earlier. If a synchronization feature creates unacceptable data-integrity risk, it can be narrowed, redesigned, or delayed. For live implementation and readiness state, do not infer from this roadmap: use **[STATUS.md](STATUS.md)** and the relevant GitHub Issues. --- # TeamForge source guide The experimental TeamForge source is public for testing, review, security feedback, and contribution. > [!IMPORTANT] > Start with **[STATUS.md](STATUS.md)** before treating any source snapshot as a supported release. Source availability and green CI do not by themselves mean the current packaged workflow is ready for general use. This page is the repository's **source checkout, build, and validation guide**. For question-to-file navigation and code ownership, use **[CODEMAP.md](../CODEMAP.md)**. For the end-to-end conceptual flow, use **[HOW_IT_WORKS.md](HOW_IT_WORKS.md)**. For coding-agent instructions, use **[`../AGENTS.md`](../AGENTS.md)**. ## Source tree - `unity-package/com.eunsung.teamforge/` — Unity Editor package source and Editor tests - `server/` — realtime/session authority and Project Coordinator source/tests - `project-peer/` — Project bootstrap, direct transfer, trust, staging and activation source/tests - `launcher/` — Windows Guest Launcher source/tests; generated `win-x64/` release output is not committed in a normal source checkout - `scripts/` — source validation, Test Lab, release validation, packaging and development helpers - `unity-project/` — minimal Unity project support files used by the source tree - `docs/` — current documentation plus historical engineering records Generated runtime payloads, packaged executables, release ZIPs/manifests, local credentials, private keys, and machine-specific state are intentionally not canonical source files. ## Fresh-clone quick start A normal public source checkout and a staged release candidate are **different validation targets**. For the normal source-development path: ```powershell npm run install:all npm run validate npm test ``` - `npm run validate` runs the public-source validator. It checks current source/document/release-contract consistency without requiring generated packaged Runtime/Launcher artifacts. - `npm test` runs the repository's normal source regression suites plus workflow/documentation/engineering/Test-Lab contracts. - `npm run validate:release` is for a **fully staged release-candidate tree** and is expected to require generated Runtime/Launcher/release evidence that a fresh clone intentionally does not contain. If you are unsure which validation bundle matches a change, use the Test Lab as a discovery/orchestration layer: ```powershell npm run testlab -- list npm run testlab -- plan all-local npm run testlab -- plan unity npm run testlab -- run source npm run testlab -- run launcher npm run testlab -- run all-local ``` Test Lab calls the owning tests/validators rather than reimplementing their assertions. Environment-dependent Unity, exact-release, and physical-field lanes remain external/manual evidence and are not converted into PASS merely because they appear in a plan. See **[TEST_LAB.md](TEST_LAB.md)**. On Windows, the source-oriented verification path is also available through: ```powershell powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\teamforge.ps1 verify ``` A fully staged release tree may use `teamforge.ps1 verify-release` instead. ## Launcher source checks Launcher checks span both Node and .NET surfaces: ```powershell node --test --test-reporter=spec launcher/test/runtime-loader.test.mjs dotnet run --project launcher/tests/TeamForge.Launcher.Core.Tests/TeamForge.Launcher.Core.Tests.csproj -c Release dotnet run --project launcher/tests/TeamForge.Diagnostics.Tests/TeamForge.Diagnostics.Tests.csproj -c Release dotnet restore launcher/src/TeamForge.Launcher/TeamForge.Launcher.csproj -r win-x64 dotnet build launcher/src/TeamForge.Launcher/TeamForge.Launcher.csproj -c Release -r win-x64 --self-contained true --no-restore ``` The diagnostics contract specifically checks the privacy/safety boundary of the manually saved Launcher support bundle. Passing that test does not imply arbitrary child-process/Test-Lab logs are privacy-redacted. The exact supported runtime/tool selections belong to [`../release-contract.json`](../release-contract.json), not to copied version numbers in this guide. ## Unity tests `.github/workflows/unity-tests.yml` provides the public GitHub Actions path for Unity EditMode and real-server E2E scenarios using the release-contract test line. Local Unity execution is also available through the repository scripts when the matching Editor is installed. Treat every test result according to the scenario and revision it actually executed. Local/CI Unity tests do not automatically prove a packaged two-PC Windows field path. ## Module entry points Read the module README that matches the part you are changing: - **[Unity package README](../unity-package/com.eunsung.teamforge/README.md)** — Editor-facing collaboration behavior and Unity constraints - **[Server README](../server/README.md)** — realtime authority, authentication assumptions and Project metadata scope - **[Project Peer README](../project-peer/README.md)** — direct Project Transfer, Host/Guest orchestration, trust and activation - **[Launcher README](../launcher/README.md)** — Windows Launcher source-vs-package layout, Runtime integrity, support-bundle diagnostics, path resilience, trust UX and Unity handoff - **[CODEMAP.md](../CODEMAP.md)** — file-level routing from a question to the smallest relevant source/tests ## Before changing architecture or trust boundaries Read **[architecture.md](architecture.md)** before changing any of the following: - authority or state ownership; - object/project identity; - transport or protocol routing; - persistence/recovery semantics; - Project transfer/trust/activation; - filesystem/path containment; - Runtime integrity or final Unity handoff. Read **[architecture-decisions.md](architecture-decisions.md)** when you need the reason a current or historical design choice exists. Decisions explicitly marked superseded must not override the current architecture/source. For security-sensitive changes, also read **[SECURITY.md](../.github/SECURITY.md)** and inspect the exact trust-boundary code plus its tests before making exploitability or safety claims. ## Source-of-truth order When documentation disagrees, use this order: 1. current source and tests for implemented behavior; 2. **[STATUS.md](STATUS.md)** for current capability/release-readiness claims; 3. [`../release-contract.json`](../release-contract.json) for exact runtime/tool/protocol/release selections; 4. current module READMEs and **[architecture.md](architecture.md)** for supported runtime/architecture boundaries; 5. GitHub Issues for detailed live bug discussion; 6. [`../builds/README.md`](../builds/README.md) and exact GitHub Release hashes for packaged artifact identity; 7. **[ROADMAP.md](ROADMAP.md)** only for planned direction; 8. phase/work-state/audit/evidence notes only for their recorded historical snapshots. ## Pull-request validation expectations For a normal source contribution: - run the smallest relevant tests while iterating; - use `npm run classify:change -- ` when the validation surface is unclear; - use `npm run testlab -- plan ` to understand named test/evidence lanes; - run `npm run validate` for repository/document contract changes; - run `npm test` when the change affects normal source behavior; - run the relevant Launcher/.NET or Unity tests when those surfaces are touched; - describe meaningful manual testing in the pull request when behavior cannot be fully automated; - do not treat one happy-path result as proof of unrelated field or security guarantees. See **[CONTRIBUTING.md](../.github/CONTRIBUTING.md)** for contribution policy, **[ENGINEERING_GUIDE.md](ENGINEERING_GUIDE.md)** for change planning/risk/evidence, and **[CODEMAP.md](../CODEMAP.md)** for the exact files/tests to inspect. ## Historical records `docs/phases/`, `docs/work-state/`, dated patch/test notes, and audits are retained because they preserve useful engineering history. They may describe superseded behavior. Do not load historical notes first for an ordinary code task. Start with the smallest current module, its tests, the code map, and the current architecture/status documents; use historical records only when the history itself is relevant. --- # TeamForge engineering change process This guide defines how TeamForge changes should be planned, implemented, validated, documented, and reviewed. The goal is not to add ceremony. The goal is to avoid a common failure mode in AI-assisted and fast-moving development: implementation begins before the important invariants, failure modes, and required evidence have been identified. For substantial changes, **plan first, then implement**. ## The change lifecycle Use this sequence for changes that affect behavior, architecture, security, release tooling, persistence, networking, Unity state, project transfer, or other non-trivial surfaces: 1. **Define the problem** — describe the observed behavior, desired outcome, or missing capability. 2. **Classify the change** — identify affected subsystems and risk level. 3. **Identify invariants** — list behavior that must remain true after the change. 4. **List failure modes** — consider how the change can fail, race, partially complete, or leave stale state. 5. **Choose required evidence** — decide what automated, Unity, chaos, release, and physical tests are needed before implementation begins. 6. **Implement the smallest coherent change** — avoid unrelated cleanup unless required for correctness. 7. **Validate** — run the planned evidence and record what actually passed, failed, or was not run. 8. **Update canonical documentation** — follow `docs/DOCUMENTATION_GUIDE.md`; do not duplicate volatile state across documents. 9. **Review release impact** — decide whether the change affects source only, compatibility, protocols, packaged bytes, field gates, or release identity. 10. **Merge only the claims supported by evidence** — a green unit test does not prove a physical two-PC workflow, and source CI does not prove an exact packaged ZIP. Use [`docs/templates/CHANGE_PLAN.md`](templates/CHANGE_PLAN.md) for a reusable planning skeleton. ## When a written change plan is expected A written plan is strongly recommended when any of the following is true: - the change modifies realtime authority, locks, revisions, replay, conflict handling, reconciliation, or reconnect behavior; - the change writes, moves, extracts, activates, trusts, or launches project files; - authentication, signatures, hashes, identities, secrets, invite handling, or path safety are involved; - the change modifies protocol/message shape or compatibility behavior; - multiple processes or runtimes must agree on the change; - the change modifies the Windows Launcher, packaged Runtime, release manifests, release workflow, or artifact verification; - the change fixes a race, lifecycle bug, shutdown bug, data-integrity problem, or physical-field failure; - a new Unity synchronization surface is introduced; - rollback or recovery behavior matters; - the implementation is large enough that a reviewer cannot easily infer intent from the diff. A typo fix, link correction, isolated comment improvement, or obvious test-only cleanup usually does not need a separate plan. ## Risk levels ### Low Examples: - documentation-only changes that do not alter release claims; - test-message wording; - isolated developer tooling with no release/runtime effect; - non-behavioral refactors with strong existing coverage. Expected evidence is usually focused validation plus documentation/workflow validation where relevant. ### Medium Examples: - normal Server or Project Peer behavior changes; - diagnostics and UX changes; - non-authority Unity Editor behavior; - build tooling changes that do not alter packaged trust or identity; - dependency/runtime updates within an already supported compatibility line. Expected evidence normally includes focused tests and the subsystem's standard CI lane. ### High Examples: - authority, locking, revision, replay, or conflict semantics; - persistent/staged/Active Project state; - path containment or filesystem mutation; - authentication, trust, signature, hash, or identity checks; - project transfer integrity and activation; - reconnect/recovery correctness; - release packaging and exact artifact identity; - arbitrary or untrusted network/project input; - a new synchronized Unity data model. High-risk changes should explicitly list invariants, negative cases, rollback/recovery behavior, and the strongest practical automated evidence. Physical field evidence remains separate when the real environment is part of the failure surface. ## Core invariants to consider Not every change touches every invariant. A change plan should name the relevant ones instead of copying this list mechanically. ### Authority and ordering - The Server remains authoritative for supported realtime collaborative state. - A stale or replayed operation must not silently become a newer authoritative mutation. - Lock/ownership state must not produce two simultaneous authoritative owners for the same protected operation. - Reconnect and late join must converge toward current authoritative state without inventing local authority. ### Identity - Saved Unity objects and session-created objects must not be silently confused. - Project, Session, Baseline, Owner, Publisher, manifest, and Active revision identities remain explicit where required. - A convenience path/alias must not become a second unverified project identity. ### Filesystem and activation - Untrusted paths cannot escape their allowed managed roots. - Failed or interrupted transfer must not destroy a previously verified Active revision. - Activation occurs only after the required integrity/trust checks succeed. - Temporary/staging state must not be mistaken for verified Active state. ### Security and secrets - Fail-closed checks must not be weakened only to make a workflow succeed. - Credentials, access codes, tokens, private keys, and private machine-local data must not enter public logs, invites, artifacts, or diagnostics. - Untrusted network/project input must be bounded and validated before use. ### Release identity - Source identity, product version, release ID, candidate tag, and byte-level artifact identity are distinct concepts. - A rebuilt/repacked ZIP is a new byte-level artifact even if the product version does not change. - Generated runtime/launcher files are not canonical public source merely because they exist in a packaged candidate. ## Test selection Do not optimize for the largest number of tests. Choose tests that can falsify the risky claim. ### Documentation / repository policy Use when documentation, workflows, repository policy, source layout, or canonical information ownership changes. Typical checks: - `npm run validate:docs` - `npm run validate:engineering` - `npm run validate:workflows` - `npm run validate` ### Server Use for session, authority, authentication, WebSocket, presence, revision, or coordinator behavior. Typical evidence: - focused unit/integration tests; - Server test suite; - malformed/replay/stale input tests when relevant; - authority/recovery chaos for authority-sensitive changes. ### Project Peer / project transfer Use for transfer, resume, manifests, chunks, trust, activation, staging, path safety, or Host/Guest orchestration. Typical evidence: - Project Peer tests; - negative path/identity/hash cases; - transfer interruption/resume E2E; - previous-Active preservation checks; - packaged/runtime validation when release behavior changes. ### Unity Editor collaboration Use for Presence, Transform, Lock, Hierarchy, Component, Inspector, selection, reconnect, Unity lifecycle, or Scene behavior. Typical evidence: - focused EditMode tests; - real TeamForge Server E2E where authority/protocol behavior matters; - late-join/reconnect checks where state convergence matters; - A/B or A/B/C contention/convergence scenarios; - physical two-PC validation only when the environment/network/OS/Unity interaction is part of the claim. ### Launcher / release Use for packaged Runtime, .NET Launcher, handoff, update, path resilience, release manifests, ZIP construction, or artifact verification. Typical evidence: - Launcher Core tests; - runtime-loader tests; - fresh staged-tree validation; - exact ZIP/hash verification; - Windows path/environment tests; - artifact provenance/attestation where available. ## Evidence classes are not interchangeable Keep these distinctions explicit: - **unit/integration tests** prove the exercised implementation logic; - **Unity automation** proves the exercised Editor/runtime path under that automation environment; - **chaos/property testing** explores ordering/state combinations but does not reproduce every physical environment; - **same-machine multi-project testing** strengthens peer/state evidence but shares one OS/hardware/network stack; - **physical field testing** proves the exact physical scenario that was run; - **release validation** proves the exact packaged artifact that was validated; - **static/security analysis** finds classes of defects but is not an independent security audit. Never upgrade one evidence class into another in release claims. ## Change-plan rules A useful plan should answer: - What exactly is wrong or missing? - What is in scope? - What is deliberately out of scope? - Which processes/modules own the affected state? - Which invariants must remain true? - What can fail halfway through? - What can race or arrive out of order? - What happens after disconnect/restart/retry? - What is the rollback/recovery behavior? - Which tests would prove the proposed fix is wrong if it is wrong? - Which claims cannot be automated and need field evidence? - Does this change alter compatibility, protocol, artifact identity, or release state? - Which canonical documents need updates? Do not turn the plan into a prediction that everything will work. The plan describes hypotheses, constraints, and required evidence. ## Pull-request expectations The PR should be understandable as the result of the plan rather than as a raw implementation dump. For substantial changes, the PR should make clear: - problem and intended outcome; - risk classification; - important invariants/failure modes; - implementation summary; - actual tests/evidence; - tests not run or evidence still missing; - security/data-integrity/recovery implications; - documentation impact; - release/field-gate impact. The repository PR template is intentionally aligned with these fields. ## Maintainability and decomposition Optimize for **clear ownership and change locality**, not for either minimum file count or minimum line count. A maintainer should be able to predict where a behavior lives without opening a monolith or traversing a maze of tiny forwarding files. Use these rules when adding or extracting production code: - split by a stable responsibility, lifecycle, dependency direction, trust boundary, protocol boundary, platform boundary, or independently testable policy — not merely because a file crossed a line-count target; - keeping tightly coupled code together is acceptable when extraction would hide control flow or create indirection without a real owner; - C# one-type-per-file is normal, especially around Unity and Launcher code, but avoid clusters of tiny `Helper`/`Util`/forwarder files that must all be opened to understand one operation; - if several small files represent one concept, either keep them under a meaningful component/subdirectory with a clear public surface or fold trivial wrappers back into the cohesive owner; - when a new responsibility moves to another file/module, update `CODEMAP.md` when that change materially affects navigation; - prefer existing subsystem boundaries — Unity Editor UI/connection/authority/sync, Server authority/coordinator, Project Peer transfer/filesystem/trust, Launcher UI/Core/recovery — over generic cross-cutting buckets such as `Helpers` or `Utils`; - prefer semantic/domain boundaries over superficial code similarity. Similar DTO shapes, state machines, retry loops, or helper logic do not by themselves justify merging concepts that carry different authority, lifecycle, invariants, or reasons to change; - before creating a shared abstraction, ask whether the participating code is actually the same concept in TeamForge product language. If not, preserve the distinction and tolerate small duplication rather than erasing meaning; - use established TeamForge terms consistently across code, tests, protocol/schema names, diagnostics, and docs. When two similar concepts are intentionally separate, record the distinction in CODEMAP.md or the owning architecture guide so future maintainers and coding agents do not simplify the boundary away; - do not expand an open PR indefinitely because adjacent cleanup is visible. Finish the stated objective and required correctness/security prerequisites, then move independent improvements to follow-up work. The automated maintainability reviewer is intentionally **warning-only**. Current review triggers are approximately **800 lines** for a cohesion check, **1,200 lines** for a strong extraction review when an already-large file grows, a broad production diff around **15 files or 1,000 added lines**, and a same-directory burst of **5+ new production code files under 100 lines**. These numbers are signals, not limits or targets. Generated/build output, tests, Unity artifacts, and XAML layout files are excluded from the fragmentation signal. Run the policy tests with: ```powershell npm run test:maintainability ``` For a branch/PR diff, run: ```powershell npm run review:maintainability -- --base --head ``` A warning requires a short architecture/scope check, not an automatic refactor. Explain a deliberate large-file choice when keeping the code together is clearer. ## Challenge the problem frame For high-impact, expensive, or hard-to-reverse design work, treat the current candidate list as incomplete by default rather than as a closed menu. Before committing to a large abstraction, ask whether the problem statement, key assumptions, or architectural boundaries are themselves causing unnecessary complexity. When it could materially change the decision, look for simpler or stronger approaches in adjacent domains, current platform capabilities, standards, and relevant external systems. A newly discovered option is not automatically better and should not bypass scope, security, licensing, or evidence requirements; record it as an alternative, test the assumptions that distinguish it, and revise the plan only when evidence justifies the change. This review is proportional to reversal cost. Routine, local, safely reversible work does not require open-ended research. ## Bounded completion blindspot review Passing the primary acceptance test is not, by itself, proof that the surrounding engineering change is complete. After a substantial implementation, incident fix, architecture change, release-flow change, or newly exposed capability works, do one **bounded second-look** for consequences the primary objective may have hidden. Scale it to the change; this is not a requirement to inspect every category or to keep polishing indefinitely. Check only plausibly affected surfaces: - **correctness and invariants** — inconsistent state, stale ownership, or hidden coupling; - **security and trust** — authority, authentication, untrusted input, path handling, secrets, or exposure; - **failure and recovery** — interruption, reconnect, crash, partial write, stale state, retry, or rollback; - **user/developer experience** — discoverability, misuse resistance, recovery clarity, and avoidable friction; - **observability** — whether a future failure would leave enough evidence to distinguish causes; - **maintainability and testability** — duplicated policy, fragile sequencing, or repeated manual steps that should become tooling; - **compatibility and performance** — whether a local improvement moved cost or assumptions onto another supported path; - **solution-space quality** — whether a current platform capability, standard, upstream mechanism, or simpler adjacent approach would materially reduce custom complexity. External research is not mandatory for every change. Check current upstream documentation, standards, issue trackers, or ecosystem evidence when the decision depends on a fast-moving API/protocol/tool, the custom approach is unusually complex, or a known platform mechanism could materially change the design. Classify adjacent findings instead of expanding scope automatically: - **fix now** when the issue affects correctness/safety, is a small coherent part of the same change, or is likely to recur immediately; - **record/propose** when useful but not justified in the current scope; - **reject/defer deliberately** when the expected value does not justify complexity or churn. A successful primary test should end the main investigation, not situational awareness. ## Optional multi-perspective surroundings scan (user opt-in) The bounded completion blindspot review above is **part of verifying substantial changes**, not an optional substitute for required correctness, security, recovery, or evidence checks. A **wider exploratory look** beyond the agreed task is different: it consumes extra context, tokens and time, so leave it to the user's choice. At a natural milestone or **after completing and reporting the primary objective**, consider whether a limited adjacent review would plausibly reveal a useful missed requirement, simpler design, or unexpected risk. If so, **offer it briefly before doing the extra work**: name the likely area, propose a small scope or deeper option, and note the additional cost/effort qualitatively. Do not interrupt a focused fix, delay its result, ask on every response, or manufacture an opportunity to explore. If the user has explicitly opted in within the **current interaction context** (the same ongoing conversation or agent execution), work within that scope without asking again, even across subsequent tasks there. Consent must be verifiable in that context; **independent conversations or separately launched agent executions do not inherit it automatically**, irrespective of provider or agent framework. Respect declines, revocation, and requests to stay focused. When authorized, sample **relevant perspectives**, not an exhaustive checklist: - **new or nontechnical user** — first-run discoverability, naming, defaults, friction, repeated input, error recovery; - **experienced user / accessibility needs** — configurability, control, keyboard access, clarity of consequences; - **developer / maintainer** — responsibility boundaries, complexity, code health, integration and future maintenance; - **tester / support / operator** — falsifiable edge cases, logs, diagnostics, setup, deployment and recovery; - **security / privacy reviewer** — trust, unintended access, secret lifecycle and misuse resistance; - **adjacent solution space** — simpler platform features, alternative approaches, assumptions or unknown unknowns. Look across the **neighboring workflow**, not only the changed function: what leads into it, what happens afterward, and what a first-time user experiences without developer knowledge. Scale the scan to likely value and the approved budget; stop when new findings are repetitive or weak. Distinguish observed defects from hypotheses. Return a few actionable findings as **fix within approved scope / propose for approval or follow-up / deliberately defer**. An optional scan never silently expands the implementation, creates a speculative Issue flood, or weakens required validation. ## Unexpected results, mistakes, and recovery Wrong assumptions and implementation mistakes are possible in real engineering work. The useful standard is how quickly and clearly the work returns to a trustworthy state. When evidence contradicts the plan, a regression appears, or the wrong thing was changed: 1. **make the state explicit** — do not hide the problem behind a generic completion claim; 2. **stop compounding it** — avoid stacking speculative fixes on unexplained state; 3. **inspect and preserve useful evidence** — keep the smallest diff/log/reproduction needed to understand what happened; 4. **separate the cause** — distinguish wrong assumption, implementation defect, stale test/policy, environment/tool failure, or unrelated pre-existing issue; 5. **contain and recover** — repair or revert the smallest affected surface while preserving unrelated work; 6. **re-verify from fresh evidence** — the corrective edit itself is not proof; 7. **make recurrence harder** — when durable, encode the lesson in a safer default, owner model, validator, generator, regression test, or automation. Do not respond to one mistake by making all future work excessively cautious or bureaucratic. Prefer small, reversible, observable changes and proportionate validation. ## Goal-driven agent iteration When an agent is asked to continue development without a specific implementation task, use a **bounded, outcome-first loop** rather than treating commits, PR count, or task volume as progress. This is work-selection guidance, not permission to run unattended, auto-merge, change credentials, or publish releases. 1. **Refresh reality.** Check the live base branch, working changes, open PRs/Issues, CI, and the canonical [current status](STATUS.md) and [roadmap](ROADMAP.md). Resume an owned in-progress fix before creating competing work. Historical checkpoints and private idea lists are candidate input, never live evidence. 2. **Locate the bottleneck.** Prefer a reproducible failure, blocked user workflow, missing falsifiable test, or concrete release-readiness gap. Compare candidate tasks by expected user benefit, severity, evidence, effort, risk, and reversibility. Do not manufacture refactors or features to keep the loop running. 3. **State the outcome before editing.** Record the user-visible or engineering outcome, baseline observation, smallest change, acceptance/negative test, affected invariants, and evidence class. Existing [change-plan rules](#change-plan-rules) still apply to high-risk work. 4. **Run one coherent change.** Implement, run focused and risk-appropriate checks, and compare the observed result against the baseline and acceptance criteria. A green CI wrapper cannot turn a skipped Unity test into a pass, source checks into packaged proof, or same-machine tests into two-PC evidence. 5. **Re-evaluate.** Record what improved, what regressed or remains untested, the relevant commit/PR/test evidence, and the next blocking condition in the existing canonical owner or task checkpoint. Then select another independent safe task, or stop with an explicit reason if remaining work needs a user decision, physical test, release approval, or new evidence. For TeamForge, **reliable Host → Guest → verified Project → Unity collaborative edit and recovery** is a more meaningful outcome than a larger synchronized feature list. Fixing an existing field blocker or proving its recovery path normally precedes broadening Component/Inspector support. Do not automatically relax locks, path identity, trust, fail-closed behavior, or release gates to satisfy a target. ## AI-assisted implementation AI assistance is welcome, but the engineering process should make it harder for plausible generated code to become an unexamined design decision. Before accepting a substantial AI-generated implementation: 1. check that it solves the stated problem rather than a nearby problem; 2. compare it with the invariants and out-of-scope list; 3. inspect any new trust, path, network, serialization, authority, or lifecycle assumptions; 4. require tests that can fail for the important wrong behavior; 5. verify that the implementation did not silently broaden scope; 6. record unresolved uncertainty instead of converting it into confident documentation. Regenerating code repeatedly is not a substitute for investigating the failure. ## Quality-gate classification `quality-gates.json` and `scripts/classify-change.mjs` provide a lightweight machine-readable mapping from changed paths to risk areas and recommended validation lanes. Run: ```powershell node scripts/classify-change.mjs path/to/changed-file another/path ``` or pipe a newline-separated changed-file list: ```powershell git diff --name-only main...HEAD | node scripts/classify-change.mjs --stdin ``` The classifier is a routing aid, not proof that the selected tests passed. A reviewer may require stronger evidence when the semantic change is riskier than its file path suggests. ## Release-tool migration rule Active release workflows should use WP-neutral entry points such as: - `scripts/build-launcher.mjs` - `scripts/verify-launcher.mjs` - `scripts/stage-release.mjs` Legacy `*-wp4-*` implementation files remain temporarily as compatibility implementations while the release internals are generalized. New release automation should not add more work-package-specific entry-point names. ## Final review question Before merge, ask one final question: > If this change is wrong, what is the most damaging believable way it could fail, and did we run evidence capable of detecting that failure? If the answer is unknown, the change is not necessarily blocked — but the uncertainty should be explicit. --- # TeamForge documentation maintenance guide This guide defines **how TeamForge documentation should be changed**. It exists so documentation is not rewritten ad hoc every time a feature, bug, release, architecture decision, or test result changes. Use [docs/README.md](README.md) to find the current document that owns a fact. Use this guide to decide **what to update, what not to duplicate, and how to verify the result**. ## Core rule: one changing fact, one canonical owner A changing fact should have one primary source of truth. Other documents may summarize it briefly when the reader needs context, but they should link to the canonical owner instead of becoming a second independently maintained copy. | Kind of information | Canonical owner | | --- | --- | | Project orientation / shortest product explanation | root `README.md` | | End-to-end conceptual behavior: Host, Guest, transfer, realtime edit, reconnect, recovery | `docs/HOW_IT_WORKS.md` / paired Korean guide | | Current capability, blocker and release-readiness state | `docs/STATUS.md` | | Exact product, runtime, tool, protocol and candidate selections | `release-contract.json` | | Packaged artifact classification and byte identity | `builds/README.md` + GitHub Release filename/SHA-256 | | Future direction and priority | `docs/ROADMAP.md` | | Current as-built topology, ownership and trust boundaries | `docs/architecture.md` | | Why an architecture decision was made | `docs/architecture-decisions.md` / future ADR records | | Source checkout, build and validation workflow | `docs/SOURCE.md` | | Question-to-code navigation | `CODEMAP.md` | | Named test-scenario discovery/orchestration and evidence semantics | `docs/TEST_LAB.md` + `test-lab.json` | | User-facing deployment/update/rollback procedure | `docs/deployment.md` | | Platform/runtime compatibility scope | `docs/compatibility.md` | | Live bug discussion and issue state | GitHub Issues | | Product-facing version changes | `CHANGELOG.md` and the package changelog where applicable | | Detailed engineering history | `docs/history/`, `docs/phases/`, `docs/work-state/`, dated evidence notes | | Security support/reporting policy | `.github/SECURITY.md` | | Contribution process | `.github/CONTRIBUTING.md` | If the same changing value must appear in more than one current document, prefer generating it mechanically or keeping the secondary wording deliberately broad. ## Before writing: make a documentation plan For any non-trivial documentation change, answer these questions before editing prose. The plan can be written in a PR description, issue, working note, or kept as a short internal checklist during a focused edit. Use [`docs/templates/DOCUMENTATION_PLAN.md`](templates/DOCUMENTATION_PLAN.md) when a written plan is useful. 1. **Change** — What actually changed in code, behavior, policy, evidence, release state or project direction? 2. **Audience** — Who needs to know: user, tester, contributor, reviewer, maintainer, security researcher, coding agent? 3. **Question** — What question should the document answer for that reader? 4. **Document type** — Overview, conceptual explanation, status, roadmap, how-to, reference, decision, test guide, or historical evidence? 5. **Canonical owner** — Which one file/system owns the changing fact? 6. **Evidence** — What source, test, issue, PR, release, artifact hash or field result supports the claim? 7. **Minimum change surface** — Which files must change, which only need a link check, and which should not change? 8. **Volatility** — Is this a value likely to change again soon? If yes, avoid copying it into several files. 9. **Historical handling** — Does an old record need correction, or should it remain unchanged as an accurate snapshot of its time? 10. **Validation** — What automated and manual checks will show that the documentation still agrees with the repository? 11. **Propagation class** — Is this a new/renamed current canonical document that must be discoverable from human/agent navigation surfaces, or is it intentionally maintainer-only/historical? Do not start by asking “which files mention this?” Start by asking **“which document owns this fact?”** ## Canonical-document propagation A document can be perfectly written and still be effectively missing if the repository's navigation/discovery surfaces never learn that it exists. Adding, removing, renaming, translating, or materially changing the role of a **current canonical document** therefore requires a propagation review. Use three broad classes: ### A — user/current canonical Examples: README, STATUS, HOW_IT_WORKS, ROADMAP, architecture, deployment. Normally review: - root README navigation and paired-language entry points where relevant; - `docs/README.md`; - `llms.txt`; - GitHub Pages clean-text mirrors / `project.json` documentation routes; - curated full context and important live smoke endpoints; - sitemap/search-facing routes when the document is intended for direct public discovery; - paired English/Korean material when one exists. ### B — contributor/maintainer canonical Examples: SOURCE, CODEMAP, ENGINEERING_GUIDE, DOCUMENTATION_GUIDE, TEST_LAB. Normally review: - `docs/README.md` and/or CODEMAP routing; - AGENTS / CONTRIBUTING when the workflow affects contributors or coding agents; - `llms.txt`; - Pages clean-text mirrors and `project.json` when the resource is part of the curated agent/developer surface; - scripts/validators that are supposed to enforce the workflow. These documents do not all need homepage prominence or a dedicated HTML/search route. Deliberately choosing **not** to expose a maintainer document on a surface is acceptable when the decision is explicit. ### C — historical/evidence Examples: dated field evidence, phase records, work-state notes, audit snapshots. Normally keep them out of current navigation and curated full context unless there is a specific reason to promote them. The repository manifest/history indexes are usually sufficient discovery. ### Propagation rule Do **not** mechanically add every document to every index. Instead, for a newly promoted current document, explicitly decide which surfaces should expose it and record that choice in the documentation plan/PR. A new canonical A/B document must not become an accidental orphan. When a document's role changes, also remove stale labels. For example, if SOURCE owns checkout/build/validation and CODEMAP owns code navigation, no current discovery surface should continue calling SOURCE the “LLM/code-reading guide.” ## Choose the document by reader task TeamForge documentation roughly follows task-oriented documentation types. ### Overview / orientation Examples: root `README.md`, `docs/README.md`. Use for: - what TeamForge is; - why it may be useful; - the shortest useful current summary; - navigation to deeper material. Do not turn an overview into a release audit, test log, protocol reference or bug tracker. ### Conceptual explanation / How It Works `docs/HOW_IT_WORKS.md` answers **what happens end to end** when a person hosts, joins, transfers a Project, performs a supported realtime edit, reconnects, or recovers from a failure. Use it to bridge the gap between the product README and low-level architecture/source references. Prefer: - user action → internal flow; - a small number of stable concepts such as authority, identity, revision, lock/lease, staging and activation; - diagrams and sequences that remain useful across file refactors; - links into architecture/CODEMAP for deeper details. Do not turn HOW_IT_WORKS into: - a second STATUS database; - a protocol/wire specification; - an exhaustive source-file map; - a dump of current release IDs, exact dependency versions, CI run numbers or work-package history. If a refactor moves files but the conceptual flow is unchanged, CODEMAP may need an update while HOW_IT_WORKS may not. ### How-to Examples: `docs/SOURCE.md`, `docs/deployment.md`. Use for a reader trying to **do a specific task**. Prefer this shape: 1. goal; 2. prerequisites; 3. steps; 4. expected result; 5. failure/recovery path; 6. related reference. Do not bury the task under long project history or architecture explanation. ### Reference Examples: `CODEMAP.md`, `docs/compatibility.md`, much of `docs/architecture.md`. Use for facts readers look up repeatedly. Keep terminology precise and structure predictable. Reference material should describe what is true, not narrate a development story. ### Explanation / decision record Examples: architecture decision records. Use for why a design choice exists, what alternatives were considered, and what consequences follow. Preserve superseded decisions as history instead of rewriting them to look as if the current choice was always obvious. Use [`docs/templates/ADR.md`](templates/ADR.md) for new standalone decisions when the current architecture-decision index becomes too large for another inline entry. ### Current status `docs/STATUS.md` answers: - what exists now; - what evidence exists now; - what is still blocked or unsupported; - what must happen before a stronger readiness claim is made. Status is not a roadmap and not a chronological engineering diary. Link to issues and dated evidence rather than copying their full timelines. **Continuous main changes versus dated evidence:** An older STATUS review date must not be interpreted as a current source, Unity or physical-device verification. Run `npm run status:live` (read-only Git comparison) to see changed runtime/release paths since STATUS was last edited; the Engineering Quality Gate also records this in its job summary. Inspect source, tests and PRs for actual behavior. Update STATUS when a substantive capability, release state or verified evidence changes, not on every source commit. Never auto-mark physical two-PC results as PASS. Exact packaged-candidate identity checks remain a separate gate. ### Roadmap `docs/ROADMAP.md` answers: - what is being prioritized now; - what direction comes next; - what is later or research-only. Keep individual bug state, exact CI run numbers, test counts and short-lived PR implementation details in STATUS/issues/evidence rather than turning the roadmap into a second current-state database. ### Test scenario / evidence guide `docs/TEST_LAB.md` explains how named validation scenarios are discovered and run, while `test-lab.json` owns the machine-readable scenario definitions. Use this layer to answer: - which ordinary local checks can be grouped under a stable scenario name; - which environment-dependent lanes are external/manual; - what PASS, FAIL and INCOMPLETE mean; - how failure evidence/log retention behaves. Do not copy domain assertions out of Server/Project Peer/Launcher/Unity tests into Test Lab. Test Lab should orchestrate the owning tests. Do not make retries hide flakiness, and do not convert an unexecuted Unity/release/field lane into PASS for convenience. ### Historical evidence Dated reports, phase notes, work-state notes and engineering-history documents preserve what happened at a specific time. Historical records should normally **not be rewritten just because current behavior changed**. Add a supersession note or link when necessary, but preserve the original evidence unless the record itself was factually wrong at the time it was written. ## Change routing matrix Use this as the default decision table. | Change | Update first | Also review | Normally do not duplicate into | | --- | --- | --- | --- | | Feature becomes implemented/supported | `STATUS.md` | module README, README summary, HOW_IT_WORKS if end-to-end behavior changed, CHANGELOG | ROADMAP implementation diary | | End-to-end user/internal flow changes materially | `HOW_IT_WORKS.md` | architecture, CODEMAP, module docs, paired Korean guide | STATUS unless readiness changed | | Feature is proposed or reprioritized | `ROADMAP.md` | Issue/Discussion | STATUS/HOW_IT_WORKS as if implemented | | Bug is discovered | GitHub Issue | STATUS if release-significant | ROADMAP detailed bug log | | Bug fix is merged | GitHub Issue + `STATUS.md` if current readiness changes | CHANGELOG, module docs, HOW_IT_WORKS only if conceptual behavior changed | architecture if structure did not change | | Architecture/authority/trust boundary changes | `architecture.md` | ADR, HOW_IT_WORKS, CODEMAP, SECURITY if relevant | STATUS with full design rationale | | Durable design decision is made | ADR / architecture decisions | architecture summary | ROADMAP as decision history | | Runtime/tool/protocol version changes | `release-contract.json` | compatibility, STATUS if readiness affected | every module README / HOW_IT_WORKS | | New packaged artifact is published | `builds/README.md` + Release/hash | STATUS, deployment | architecture / HOW_IT_WORKS | | Installation/deployment procedure changes | `deployment.md` | README quick path, STATUS if blocked | CODEMAP | | Source build/test workflow changes | `SOURCE.md` | CONTRIBUTING, AGENTS, TEST_LAB if scenario command changed | ROADMAP | | Named validation scenario changes | `test-lab.json` + `TEST_LAB.md` when semantics change | quality gates, scripts README, CI if applicable | underlying test assertions | | File/module responsibility moves | `CODEMAP.md` | architecture, SOURCE | HOW_IT_WORKS if conceptual flow is unchanged | | New/renamed current canonical document | the new/renamed canonical document | docs map, relevant README language pair, llms/Pages/project metadata according to propagation class, validators | unrelated historical indexes | | Product-facing version changes | `CHANGELOG.md` | package changelog, STATUS | DEVELOPMENT_HISTORY duplicate prose | | Repository/tooling milestone | `docs/history/DEVELOPMENT_HISTORY.md` when worth preserving | CHANGELOG only if product-facing | STATUS unless readiness changes | | Security policy/support changes | `.github/SECURITY.md` | README/CONTRIBUTING links | unrelated module READMEs | | One test/field run produces evidence | dated evidence/Issue/PR | STATUS if it changes current claim | ROADMAP/HOW_IT_WORKS detailed run log | ## Writing rules ### Separate fact, evidence and inference Write claims so the reader can tell the difference between: - **implemented** — source contains the behavior; - **automated evidence** — a specific test/workflow exercised it; - **field evidence** — a real environment exercised it; - **supported/recommended** — the project is willing to make a current usability claim; - **planned/research** — not implemented fact. A green test is evidence for what it executed, not proof of unrelated field behavior or security. ### Prefer durable wording Avoid copying values that already have a canonical machine-readable owner. Prefer: > Use `release-contract.json` for the exact bundled runtime version. Over: > The bundled runtime is Node X.Y.Z. unless the exact number is the subject of that document or the number is intentionally recorded as historical evidence. ### Preserve useful technical terms Keep established names such as Unity Editor, Prefab, WebRTC, SHA-256, CI, `SerializedProperty` and protocol identifiers when they are the clearest terms. Avoid unnecessary mixed-language process jargon when ordinary Korean/English prose is clearer. ### Avoid defensive repetition One clear warning is usually stronger than repeating the same disclaimer in every section. Link to STATUS/SECURITY for the complete boundary. ### Avoid invented certainty Do not write: - “verified” without evidence; - “safe” when only some checks passed; - “supported” because code exists; - “current/latest” for upstream versions without a dated or canonical source; - “fixed” when only a patch exists and required validation is still pending. ## Minimal-change principle Documentation changes should modify the **smallest current set of files that must change**. Examples: - A Node patch version changes with no architecture effect → update `release-contract.json`; review compatibility; do not edit every README or HOW_IT_WORKS. - A field blocker closes → update the Issue and STATUS; do not append the test transcript to ROADMAP or HOW_IT_WORKS. - A new historical test is recorded but current readiness does not change → preserve the evidence record; STATUS may not need an edit. - A file is renamed without responsibility change → update CODEMAP/links; architecture and HOW_IT_WORKS may not need an edit. - A Test Lab command points to a renamed existing test → update `test-lab.json`; do not copy that test's assertion logic into the runner. More changed documentation files does not automatically mean better documentation. ## English and Korean documents Where TeamForge maintains paired English/Korean current documents, keep their **meaning and section-level structure** aligned. Literal sentence-for-sentence translation is not required, but one language must not claim a feature is ready while the other says it is blocked. `HOW_IT_WORKS.md` and `HOW_IT_WORKS.ko.md` are a paired conceptual explanation. A material end-to-end behavior change should be reconciled in both languages rather than leaving two different system stories. When only one language is updated first, treat the pair as incomplete until the material current-state difference is reconciled. ## Review checklist Before merging a documentation-affecting change: - [ ] The changed fact has one clear canonical owner. - [ ] Claims are supported by current source/evidence. - [ ] Planned work is not written as implemented fact. - [ ] Historical evidence was preserved rather than silently rewritten. - [ ] Volatile values were not copied unnecessarily. - [ ] README, HOW_IT_WORKS, architecture and CODEMAP remain distinct layers: orientation → conceptual flow → structural reference → source navigation. - [ ] STATUS and ROADMAP remain different kinds of documents. - [ ] SOURCE and CODEMAP remain different kinds of documents. - [ ] TEST_LAB orchestrates owning tests rather than accumulating domain assertions. - [ ] Module READMEs describe module responsibility rather than duplicating release state. - [ ] English/Korean current claims do not materially contradict each other. - [ ] Links point to the owning source of truth. - [ ] If a current canonical document was added/removed/renamed/reclassified, its propagation class was decided and required README/docs-map/llms/Pages/project-metadata surfaces were reviewed. - [ ] No discovery surface still uses a superseded document-role label. - [ ] `npm run validate:docs` passes. - [ ] `npm run testlab:validate` passes when Test Lab docs/config changed. - [ ] `npm run validate` passes when source/document contract files changed. ## Templates - [Documentation plan](templates/DOCUMENTATION_PLAN.md) - [ADR](templates/ADR.md) - [How-to guide](templates/HOW_TO.md) - [Status capability entry](templates/STATUS_CHANGE.md) Templates are starting structures, not forms that must be filled mechanically. Remove irrelevant sections rather than publishing empty boilerplate. ## Updating this guide Change this guide when the **documentation system itself** changes: canonical ownership moves, a new document type becomes important, a validator rule changes, or a repeated maintenance failure reveals a missing rule. Do not add a rule for every isolated typo. The guide should remain small enough that a contributor or coding agent can actually use it before editing documentation. --- # TeamForge Test Lab Test Lab is a **thin scenario runner over TeamForge's existing validators and tests**. It does not replace the Server, Project Peer, Launcher, Unity, chaos, release, or physical field test implementations. Its purpose is to answer a practical question: > I changed something — what named validation scenario can I run, and which parts still require another environment or manual evidence? The canonical scenario definitions live in [`../test-lab.json`](../test-lab.json). The runner lives in [`../scripts/test-lab.mjs`](../scripts/test-lab.mjs). ## Design rules Test Lab follows a few deliberate rules: - Existing tests remain the source of actual assertions; Test Lab orchestrates them rather than rewriting them. - Scenarios have stable names such as `source`, `core`, `launcher`, and `all-local`. - No automatic retry hides a flaky failure. - Successful command logs are discarded by default; failed-step logs are retained as bounded evidence. - `--keep-logs` can retain successful command logs during focused debugging. - Command steps have a 60-minute safety deadline by default; a scenario can set `timeoutMs` (positive integer up to 3,600,000) for a shorter deadline. A timed-out step fails, retains its bounded log and prevents subsequent steps from running. The runner attempts process-tree termination (POSIX process group / Windows parent-process snapshot with taskkill fallback, each Windows cleanup helper bounded to 2.5 seconds) and closes lingering output streams after a short cleanup grace; this is not a guarantee against detached descendants. Set shorter deadlines only for commands with known expected durations. - If a running command is interrupted, the runner records `interruptedSignal`, reports that step as `failed` and leaves later steps `not-run`. On POSIX SIGINT/SIGTERM/SIGHUP, it attempts to terminate its owned process group before producing the summary; on Windows SIGINT/SIGTERM, it attempts a bounded process-tree cleanup, but cannot guarantee removal of detached processes or an externally terminated runner. - External or manual lanes are never converted into a fake PASS. - Unity, exact Release, and physical field evidence keep their real environment boundaries. - A scenario result applies only to the exact commands/evidence that ran. ## Commands List scenarios: ```powershell npm run testlab -- list ``` See what a scenario would require without running it: ```powershell npm run testlab -- plan all-local npm run testlab -- plan unity npm run testlab -- plan field ``` Run a local scenario: ```powershell npm run testlab -- run source npm run testlab -- run core npm run testlab -- run launcher npm run testlab -- run all-local ``` Keep logs even for successful command steps: ```powershell npm run testlab -- run launcher --keep-logs ``` Validate the Test Lab configuration itself: ```powershell npm run testlab:validate ``` Run the Test Lab runner and environment regression tests with `npm run test:testlab`. The same suite is included in `npm test`, the `source` scenario and CI; configuration validation alone does not execute it. Check the environment before starting a scenario: ```powershell npm run testlab -- doctor core npm run testlab -- doctor unity --json npm run testlab -- doctor unity --unity-root "D:/Unity/Hub/Editor" npm run testlab -- doctor unity --editor "/opt/Unity/Hub/Editor/6000.3.21f1/Editor/Unity" ``` `doctor` checks the running Node version against `release-contract.json`, command availability, declared scenario prerequisites, pinned `ws` installation for core tests, and the required .NET SDK major where applicable. Requirements are inherited from included scenarios. It discovers Editor candidates in standard Unity Hub locations or supplied `--unity-root` directories. `--editor` overrides `UNITY_EDITOR`; an invalid or different explicit selection cannot fall back to another baseline candidate. Custom Hub locations require `--unity-root` or an explicit Editor path. This is **environment preflight**, not test evidence. `READY` (exit 0) describes the checked prerequisites only. `BLOCKED` or `INCOMPLETE` exits 2; invalid commands/configuration exit 1. Unity folder names remain unverified version hints, and Unity license/compilation/EditMode tests remain **NOT RUN** even when an executable is discovered. External/manual and physical field lanes stay incomplete. Field preflight finds local Git/SSH but leaves `TEAMFORGE_FIELD_*` configuration (including `TEAMFORGE_FIELD_UNITY_EDITOR`), trusted remote access and physical topology to the owning field runner. Discovery never launches Editors, creates Projects, starts servers or retries tests. It neither installs missing tools nor validates field credentials, dependency integrity, exact Release artifacts or physical PCs. Other discovered Unity versions do not expand the supported version range. `--json` returns a structured report with `testsExecuted: false`, individual prerequisite statuses and the remaining external lanes. Doctor writes no test-result artifacts. Reports include local executable paths; review them before sharing. ## In-Unity two-PC Test Lab (no SSH / Node developer setup) The **same TeamForge pre-release Unity package** now contains a two-PC connection smoke panel under **Window → TeamForge → Test Lab**, alongside the original same-PC A/B/C clone lab. It is **not a separate downloadable Test Lab edition**. The single-PC clone lab creates fresh `TF-B-`, `TF-C-` (and optional `TF-D-`) folders on every run. Earlier labs, their edits, and existing `TF-B/C/D` folders are preserved. Clone destinations must be direct directory paths without symbolic links or reparse points. Launcher source aliases remain usable; their physical source directory is checked to reject destinations inside that Project. A failed copy keeps partial folders accessible through **Show Last Lab Folder** and does not launch clone Editors; remove unwanted labs manually after closing their Editors. These local path checks do not protect against another process changing filesystem links during a copy. For a source checkout that references TeamForge outside the Project through a local `file:` dependency, the clone lab checks the loaded package identity and copies a hash-verified snapshot into each clone's `Packages/com.eunsung.teamforge`. If the loaded TeamForge package is already embedded there while the manifest retains an old external reference, it instead verifies the project-copied package's complete effective inventory and hashes without replacing or repairing its files. It changes only that clone manifest's dependency value to `file:com.eunsung.teamforge`; other manifest bytes and the entire existing lock remain unchanged. Unity UPM owns subsequent local-package resolution and lock updates. Other external local packages require manual embedding **and a project-local manifest reference** first; nested local-package dependencies remain unsupported and produce an actionable refusal. Source package files, earlier clones and source manifest/lock are preserved; `.git` directories and worktree pointer files are omitted from new copies. Snapshot checks use bounded reads and reject static links and special files. Source/standalone fixture checks do not establish that a new Editor has resolved or opened the clone. 1. Open the **same saved Host Project/Scene** (or a verified host copy/sync) with the same TeamForge package on both Unity Editors; back up important work first. The Guest must preserve Project UUID and Scene baseline rather than editing IDs to bypass them. 2. PC A: click **Host: Start**, follow existing authenticated LAN, Windows Firewall, and explicit Publish Review prompts, and wait for Host Ready. Click **Copy TF1**, share that with PC B, then **Copy access code** and share it separately in a trusted channel. The session invite intentionally **does not include a password**. 3. PC B: paste the TF1 code and separate access code into the Test Lab Guest fields; click **Guest: Join & check**. A Project or Scene mismatch stops the join; use the existing TeamForge Home/Project Bootstrap verified copy/sync rather than bypassing validation. 4. PC A: click **Run checks** as well. Both Editors report a live check result. Each check sends its own Ping after connecting and waits for that request's Pong on the same connection; an earlier RTT measurement or another Ping's response cannot satisfy it. A check waits at most 90 seconds for connection, negotiated Presence/Transform/Hierarchy capabilities, this fresh server response, authoritative Hierarchy snapshot, and another TeamForge Presence member. A changed connection fails the attempt; start the check again after reconnecting. This smoke flow uses the packaged TeamForge Coordinator/Seed and existing Join Code/Host Flow mechanisms. A **smoke PASS** reports only the named observations. It does not prove the peers are physically distinct (two local Editors can also match Presence), mutate or compare Transform/Lock state, perform Launcher install/Project Transfer, inject faults, or close the exact release two-PC field gate. The separate CLI `field-two-pc-automated` suite remains a **developer diagnostic**, not a required install for this Editor smoke flow. No Test Lab secrets are persisted in the Guest password field by this window; connection credentials are passed to the existing transient Guest settings path. Share the access code separately, and review any logs before sending them to others. ## WP6 read-only Component recovery preview (source-only experiment) A separate developer panel at **Window → TeamForge → Test Lab: WP6 Recovery Preview** provides an optional, metadata-only client for the still-experimental Component recovery request. It is **off by default**, ephemeral (not saved to Project/User settings), and cannot be activated on an existing connection: disconnect, explicitly select the opt-in, then reconnect to a source Server created with `enableComponentRecoveryPreview: true`. The public Host/Launcher does not enable this server flag. If the Hello response confirms negotiation, the panel can send a `component_recovery_preview_request` for the **saved active Scene GUID**. Before that *real* Editor WebSocket request is enqueued, its Test Lab source gate requires a **clean loaded active Scene**, a bounded regular `.unity` file (<=16 MiB), nonredirected parent directories and .meta, exact on-disk .meta GUID, and matching Unity Editor SerializedProperties against **all supported BoxCollider/SphereCollider documents** in the saved Scene. A partial, stale, dirty, redirected, Prefab-derived or tampered Scene is refused locally: no request ID, pending request or network data is created. This check is local, and the server is not sent any Collider values or file hash through the existing six-field request. It shows the request/refusal/metadata result; it **does not parse or apply remote Component property values, perform Undo, render missing Mesh data, seed authoritative Scene state, or synchronize Inspector changes**. No server-owned live Component seed exists, so ordinary requests will fail closed as `component_transaction_unseeded` after the Scene Hierarchy baseline is present. An unseeded Scene is separately refused. Matching revision/SHA-256 metadata is cached for the current connection only and cannot be used as Unity authority. The cache is only reused when the actual local saved Scene AND metadata SHA-256 still match the previously verified local files, not when the GUID alone matches. The request now also requires an active Project Transfer registry snapshot with the **same Project UUID, Baseline revision, Manifest/ Descriptor hash and supported protocol versions** as the local TeamForge Project descriptor. The local metadata pin retains the current connection ID, Project/Session ID, Owner/Publisher identity and Baseline signature string while the request is in flight. A correlated reply is cached **only after** the loaded Editor's complete saved Collider witness, both saved file hashes and that exact Project pin are rechecked. If the Scene becomes dirty, the saved bytes change, the Project Baseline rotates, the connection is replaced or the descriptor changes during the request, the reply is discarded as `STALE` without disconnecting healthy Presence/Transform collaboration, touching Unity objects or updating the Server preview cache. No automatic retries occur. These tests compare the *registered Project metadata*, NOT the cryptographic validity of a Server/Publisher signature at the Unity Editor or the inclusion of this Scene in the signed Manifest. The server now independently enforces a CURRENT Owner/Publisher Ed25519-signed Project Baseline and the exact registered Project Coordinator + realtime Session connection for this optional request. A raw WebSocket client cannot simply spoof the Editor's project membership: unpublished/tampered Baselines or unregistered Project members are refused without ending the healthy realtime session. A valid signed Baseline does not by itself prove a particular Scene file belongs to the signed Manifest through this route. The additional **Run installed Project Peer locally and compare (read only)** button removes manual JSON copying. It uses the existing pinned TeamForge runtime resolver to run the fixed Project Peer Active Scene verification CLI in a bounded, non-shell child process, without auth/Owner secret environment variables. The returned report is compared directly to a fresh loaded saved Collider witness and current Project/Session metadata, without upload. Positive LOCAL RUNTIME SOURCE MATCH is a point-in-time local diagnostic, NOT signed Server provenance or remote Inspector application. Older runtime packages lacking this CLI or missing signed Active storage are refused safely, not silently replaced or downloaded. For a manual, independent local-source comparison run the Project Peer wp6-scene-source read-only CLI against a previously approved Active Project. Paste the JSON report into the WP6 Test Lab's Project Peer Active Scene field and click Compare. The Editor compares the current connected Project metadata, clean saved Scene path, exact .unity/.meta hashes, and loaded Collider observations, then rechecks Scene and Project state before displaying LOCAL REFERENCE MATCH. A modified report resets the displayed result. This pasted JSON is NOT authenticated as Project Peer output; matching only means local metadata consistency, NEVER a Server source proof or Inspector ACK. No WebSocket request is sent and no report is persisted. An additional **Server-side protocol foundation** for future authenticated Project Peer source evidence is available to explicitly opted-in WP6 WebSocket clients: issue one ephemeral `component_source_challenge_request` against an exact saved Scene GUID and then echo that nonce once as `component_source_challenge_echo`. The signed Project/Publisher Baseline, exact Editor connection, Session and Scene are pinned for 15 seconds. Replay, expiration, different connection or Baseline rotation refuses the echo without changing normal Presence/Transform state. **The Test Lab now exposes a manual Request + echo one-time Server Scene challenge (read only) button. It verifies the current connected signed Project metadata and loaded saved Collider witness before the request, after the nonce and after the Server echo result. If changed, it refuses locally. A valid response only proves a same-socket nonce round-trip, NOT an authenticated Project Peer source or Inspector apply. Expired, correlated replies are ignored without hurting normal Presence/Transform. Unsolicited malformed replies retain protocol safety handling. There is still NO authenticated Project Peer file proof to the Server. ** Echoing proves only nonce freshness on the same authenticated socket, NOT signed Scene inclusion, loaded Collider values, Undo or Inspector application. The source gate still does **not** authenticate the Editor's observations to the server or create a post-apply ACK. This source-only development tool and its Unity protocol/EditMode tests do **not** count as a passed packaged Windows two-PC field test. The existing full field test still needs a separate exact release candidate after trusted Component seeding and reconciliation are implemented. ## Scenario map | Scenario | Purpose | Important prerequisite / boundary | | --- | --- | --- | | `source` | Test Lab regressions + repository workflow/docs/engineering/public-source contracts | No Unity or packaged release required | | `core` | Server + Project Peer automated tests | Locked npm dependencies installed | | `launcher` | Runtime loader + Launcher Core + diagnostics privacy contract | .NET 10 SDK for C# tests | | `launcher-ui` | Native WPF input and MainWindow credential-cleanup tests | Windows x64 + .NET 10 SDK; source UI evidence, separate from exact ZIP/physical testing | | `all-local` | `source` + `core` + `launcher` | Prepared source checkout; still not Unity/field evidence | | `realtime-transport-recovery` | Abrupt socket loss and TCP blackhole followed by authoritative Node peer rejoin | Own loopback Server/proxy/peers; no NIC/firewall changes; not Unity automatic reconnect or physical Wi-Fi evidence | | `authority-chaos` | Multi-seed authority/recovery stress | CI workflow owns server lifecycle/evidence today | | `unity` | Unity EditMode + real-server E2E | Supported Unity/CI license environment | | `release` | Staged candidate validation + exact published artifact lane | Fully staged candidate and Windows/exact-artifact environment as applicable | | `field-two-pc-selftest` | Field runner source regression | Automated configuration, fixture and IPC safety (not physical field evidence) | | `field-two-pc` | Two real Windows PCs: authenticated Project Peer LAN transfer | Host controls Guest over trusted SSH; physical source-level payload, SHA-256 and resume; not Unity/packaged release | | `field-realtime-selftest` | Cross-platform harness source regressions | No physical PC or Unity execution required | | `field-realtime-two-pc` | Unity Editor Host on PC A versus Node Peer on PC B | Real LAN authority/Transform/Lock/Hierarchy contention using existing E2E tests; **not** two Unity Editors or packaged Launcher | | `field-two-pc-automated` | Combined physical LAN batch | Runs the two narrower source-level physical lanes sequentially; full packaged two-Unity-Editor `field` gate remains separate | | `field` | Physical multi-PC Windows validation | Full packaged Host/Guest + Unity field lane still requires exact evidence | For two-PC source-level LAN automation (including the Unity Editor vs physical Node Peer extension), setup prerequisites and strict PASS semantics, see [FIELD_TWO_PC_AUTOMATION.md](FIELD_TWO_PC_AUTOMATION.md). The existing `field` manual gate remains deliberately distinct from this narrower automated lane. For a remotely managed or headless Guest, first exercise scoped transport failure without cutting its management connection: ```powershell npm run install:all npm run testlab -- doctor realtime-transport-recovery npm run testlab -- run realtime-transport-recovery --keep-logs ``` The server-owned `realtime-transport-recovery.test.mjs` fixture creates an authenticated disposable Server and TCP forwarder on OS-assigned loopback ports. It drops or blackholes only its own Guest connection while an unaffected observer keeps the Session alive. It verifies connection-loss lock cleanup before rejoin, fresh authoritative state, replay of an applied but unacknowledged operation without an extra revision, conflicting replay refusal and continued supported mutations. The fixture owns bounded waits and closes its sockets/listeners; no existing Server, NIC, firewall or remote-access setting is changed. Normal Server tests also run these cases. Test Lab retains the ordinary structured command result and optional bounded logs. PASS is automated **Node transport fault evidence**, not Unity automatic retry, disconnected UI, actual Wi-Fi interruption, physical two-PC recovery or packaged Release evidence; those parts of [#457](https://github.com/Eun-si123/teamforge-unity-collab/issues/457) remain separate. The [Unity CI workflow](../.github/workflows/unity-tests.yml) runs the same Realtime Authority and Lock Contention E2E flows against the recorded `6000.3.21f1` baseline, the `6000.3.28f1` LTS patch and the `6000.6.8f1` Update release under TeamForge's experimental compatibility policy. Refresh the two additional selections in place to keep three versions and six matrix cells. Each matrix job uses an isolated checkout; each flow runs one Editor at a time, keeping the workflow's existing maximum of two concurrent Editors. Baseline check/artifact names are preserved, and each additional Editor has separate names and evidence. A failing matrix cell does not automatically retry or cancel its sibling. A configured matrix is not execution evidence: inspect each exact-commit result and actual Editor version. The [compatibility policy](compatibility.md#unity-compatibility) keeps 6000.6 source admission experimental; this does not change the recorded release Editor, supported minimum, packaged candidate or physical field readiness. Only baseline Authority CI is configured to export one fresh Test Lab clone and open it in a **second, sequential Editor** after the original Editor finishes and the E2E shutdown step runs. The owning `TeamForgeCloneEditorProbeTests` fixture uses the existing copier and verified package snapshot, without a clone bootstrap, session setup or launch command. Host checks bind source/package/manifest/initial lock hashes and fresh NUnit XML to a unique run/attempt receipt. The pinned baseline Editor may initialize its three observed Linux SDK dependencies at version 1.1.0; a canonical manifest fingerprint still requires every original field to remain unchanged. The exporter checks source bytes before/after copying, and subsequent stages require that exact initialized source manifest. The separate Editor must execute exactly its intended probe and report an actual embedded `PackageInfo` rooted inside that clone. UPM may update its own TeamForge lock record; unrelated lock entries and source files must remain unchanged. This lane proves only the exact clone import/compile/UPM path that ran, not concurrent Editors, physical PCs or a packaged Release. Missing or skipped selected tests, zero-test runs and wrong-test evidence never count as PASS; intentional ignores elsewhere in the source suite do not replace either required test. A license/import failure does not establish that the probe ran. There is no automatic retry or guarantee that a failed license return releases a seat. The host boundary regressions run before any Editor in that cell. On Linux with Bash and Python 3, run them separately with `python3 -m unittest discover -s scripts -p test_unity_clone_probe.py`; they use synthetic XML and temporary files, not Unity. CI retains logs, XML and bounded receipts under nonce-specific evidence paths, uploads them, then removes only that run's owned clone using a path-checked privileged cleanup command because container output can be root-owned. It does not upload the complete clone or remove earlier labs. Static path checks do not guarantee protection against another process changing filesystem links during execution. Both Unity flows prepare disk space before pulling the Editor image. `scripts/prepare-unity-runner.sh` runs only on disposable GitHub-hosted Linux runners, removes a fixed allowlist of unused host SDKs (.NET, Android, Haskell, Swift, PowerShell, CodeQL and Azure CLI), and checks for at least 30 GiB free on Docker storage. Node, system Python, the workspace, Docker data and the rest of the toolcache are preserved. It refuses local or self-hosted execution. Docker capacity is printed before and after cleanup, including when insufficient capacity blocks the job before Editor execution; this threshold is a prerequisite check, not a guarantee of successful image extraction. Host tests mock every cleanup command and never remove installed SDKs. ## Result and evidence behavior Each `run` creates a directory under: ```text test-results/test-lab/--/ ``` The suffix is allocated atomically so simultaneous runs (including runs started within the same second) retain separate evidence. Each run writes its own `summary.json`. A command step that fails retains a bounded log for investigation. A command step that passes removes its log unless `--keep-logs` was requested. This keeps the common success path lightweight while preserving failure evidence. Individual step logs are capped so a runaway process does not silently create an unbounded diagnostic artifact. **Test Lab logs are not privacy-redacted support bundles.** They contain whatever stdout/stderr the underlying developer command emitted, are kept only as local ignored test output by default, and must be reviewed before sharing. Do not run tests with real credentials in their output or assume the runner can sanitize arbitrary child-process text. The Launcher **Save support bundle** feature has a separate default-redaction contract and should not be confused with Test Lab logs. The scenario status is one of: - `passed` — every required Test Lab command step completed successfully and no external/manual step remained; - `failed` — at least one command step failed; - `incomplete` — the local commands may have succeeded, but an external/manual evidence lane is still required. `incomplete` deliberately uses a non-zero exit status. This prevents a script from treating “Unity/field evidence was not run” as success. ## Suggested one-batch physical validation for the next exact Windows candidate This is a **preparation/order guide**, not current release readiness or a claim that the listed feature exists in the last published ZIP. The canonical blockers and release identity belong to [STATUS.md](STATUS.md); each GitHub Issue owns its detailed repro. It is reasonable to defer all hands-on work until one **new, immutable, exact-validated candidate** is selected. Do not treat r8 physical observations or green source CI as results for that future artifact. **Before touching either PC:** record the exact candidate tag/commit, ZIP filename and SHA-256, Unity Editor version, Launcher/Runtime identity, Windows versions and test network topology in a *private/local* field log. Use disposable backed-up Projects and a clean Launcher extraction. Keep real access codes, invitation contents, private machine paths, addresses and unredacted diagnostics out of public issues. Verify the packaged Unity source/Launcher are from that **same candidate**; a mixed-source experiment needs a separate evidence label. Run the ordinary `source`, `core`, `launcher`, `unity` and exact `release` gates where supported **before** the physical batch, not as replacements for it. | Order | Hands-on scenario | Required observation / failure proof | | --- | --- | --- | | 1. Host onboarding | First-run authentication generation, existing-code preservation, mask/reveal/copy/rotation while stopped; correct Host-vs-Guest field; auto route vs manually selected adapter; incomplete IPv4 refusal | Host must not silently change a working secret or infer a missing IP. Record the *error code and stage*, never the secret | | 2. Host network/security | Authenticated LAN with Private/LocalSubnet firewall rule inspection, expected Coordinator listener and actual Seed port; verify a Public profile is not silently opened | Record allowed/refused connection **from the intended Guest**, not just a Host self-test. Never weaken firewall/auth merely to obtain PASS | | 3. Fresh Guest bootstrap | Same-version signed Invite preview, Publisher/Project trust confirmation, empty managed root, direct chunk receive/hash/activation, short/long-path handling, Unity launch and realtime join | Verify the published Baseline, verified Active revision and Editor collaboration; a Host Ready label alone is insufficient | | 4. Retry and recovery | Interrupted transfer and resumable download, same-invite credential retry, changed-invite code clearing, Host Stop/Start, Seed port collision/fallback, process-loss Project identity fence, Existing-Active verified relaunch | Confirm the previous verified Active survives failures and only TeamForge-owned resources are cleaned up | | 5. Realtime collaboration | Two Editors present, selection/camera, Transform and locks under contention, same-Scene supported Hierarchy actions, late join, reconnect and foreign-lock notification | Compare observed authority/revision, ownership, saved Scene state and recovery; do not assume Component/Inspector/Prefab sync exists | | 6. Negative boundary & cleanup | Malformed address, mismatched project/invite, absent Seed after apparent Ready, Guest unreachable due to routing/profile, second stop/start and final firewall cleanup | Capture sanitized stable failure codes and whether retries truly recover without bypassing identity/trust/hash checks | **Current live-created Cube limitation (#303):** when a peer receives an entirely new logical GameObject, only its Hierarchy identity, name and Transform are reconstructed. Even a new object named “Cube” has no MeshFilter, MeshRenderer, BoxCollider, material or Prefab backing on the peer. The Editor emits one session-scoped diagnostic on the first such remote creation (rather than warning for every object). Check the peer Inspector before calling visible primitive synchronization a PASS. To compare shaded objects now, add them to the **saved shared Project baseline before Host publish**. This warning does **not** mean primitive/component synchronization has been implemented. For **each row and each retry**, mark `PASS`, `FAIL`, `BLOCKED`, or `NOT RUN`; attach exact candidate identity, steps, expected/actual result, timestamps and sanitized diagnostics/screenshots. A blocked earlier stage leaves dependent later stages **NOT RUN**, not PASS. If a fix requires rebuilding, assign the next distinct artifact identity and rerun the affected end-to-end steps, preserving prior failed evidence. Do not test future WP6 Component synchronization, no-code trusted LAN or one-paste scoped invites as existing features before their own explicit release gates are implemented. At the end, update [STATUS.md](STATUS.md) with verified capability/readiness changes only, and link detailed evidence from the relevant Issue or dated field record. This document provides **execution order**, not a second current-status table. ## Why Unity and field tests are not hidden behind one local command A convenient command must not erase an important environment boundary. For example, `unity` points to the repository's real Unity workflow instead of printing PASS on a machine that never opened Unity. Likewise, `field` describes the required physical evidence but cannot satisfy it. This is consistent with TeamForge's broader evidence model: **automation proves what it actually executed, not a stronger real-world claim.** ## Relationship to `quality-gates.json` [`../quality-gates.json`](../quality-gates.json) answers **which validation lanes a changed path should trigger or review**. Test Lab answers **how a contributor can discover and run named validation scenarios**. The classifier is advisory about semantic risk, and Test Lab is an executor/planner. Neither may claim an external Unity, exact Release, security, or physical field lane passed without real evidence from that lane. ## Adding or changing a scenario Treat Test Lab changes as test-infrastructure changes: 1. Start with [ENGINEERING_GUIDE.md](ENGINEERING_GUIDE.md) and a Change Plan for a non-trivial change. 2. Prefer referencing an existing test command/workflow instead of copying its assertions into Test Lab. 3. Give the scenario or step a stable, purpose-oriented name rather than a work-package-specific name. 4. Mark environment-dependent work as `external` or `manual` when the runner cannot execute it faithfully. 5. Do not add automatic retries just to make a flaky scenario green. 6. Run `npm run testlab:validate` and the relevant underlying tests. 7. Keep failure artifacts bounded, avoid real secrets in test output, and review retained logs before sharing. If Test Lab starts accumulating domain-specific assertion logic, move that logic back into the owning module's test suite and leave Test Lab as orchestration. ## Explicit Windows Host LAN configuration check In the current source, open **Window > TeamForge > Collaboration > Health > Check LAN configuration** on the Host PC. The action reads local Windows profile and named firewall-rule fields without elevation or changing rules. Ordinary Doctor/UI refresh does not launch this check. - Before Host starts, the selected canonical IPv4 and Coordinator port can be inspected; the Seed port remains unbound/unverified. DNS/IPv6, ambiguous/nonlocal addresses and malformed or mismatched listeners remain unverified rather than being guessed. - While Host is Ready, the check retains its exported startup configuration and reported bound Seed port, including a fallback port. Later settings edits are shown as pending; they do not substitute a preferred port for the running Seed. - The profile must resolve from the exact preferred IPv4 on one connected interface. Rule observations cover one named enabled inbound Allow rule with Private profile, TCP local port, LocalSubnet remote scope and blocked edge traversal; extra/broad values and duplicate matches are rejected. Other Windows policy or application/service filters may still affect connectivity. - Results show the last attempt time. Recheck after interface, profile or firewall changes; this is a local snapshot, **not proof that a Guest can connect or that a timeout was caused by a firewall**. Stop, target/settings changes, window close and UI rebuild invalidate/cancel obsolete checks. Cancelled/unknown checks are not reported as PASS. - **Copy Report** includes only bounded observations, ports, codes and timestamp from the current snapshot. The LAN report omits addresses, adapter/SSID names, authentication data and raw PowerShell output. Developer checks include `TeamForgeHostLanDiagnosticsTests`, the Home view/report tests and `node --test project-peer/test/host-lan-diagnostics.test.mjs`. The latter executes actual generated scripts under mocked Windows cmdlets in the Windows CI lane; default non-Windows runs skip it. Mocked scripts, isolated C# tests and Unity automation remain separate from real Windows policy and the [physical field matrix](#suggested-one-batch-physical-validation-for-the-next-exact-windows-candidate). This source feature does not change the immutable r9 package or current release readiness. --- # TeamForge AI/code-comment readability audit Date: 2026-08-18 This note records a focused readability review prompted by external AI-agent feedback. It is not a release-readiness or security-audit claim. ## What was sampled The review sampled representative code from each major runtime area, including: - Unity connection, Presence, Transform, Hierarchy and Authority View code; - Server host and Session Authority code; - Project Peer orchestration and filesystem-safety code; - Launcher runtime verification code. ## Result The sampled implementation is **comment-light**. Names, tests, module READMEs, `CODEMAP.md`, and architecture documents carry much of the explanation, while many source files contain few or no comments around otherwise non-obvious lifecycle, authority, trust, filesystem, and fail-closed behavior. That is not automatically a defect: a target comment percentage would encourage stale or redundant prose. However, TeamForge has several areas where an LLM or new human reviewer benefits from an explicit statement of **why a boundary exists**, not only what the code does. ## Policy adopted by this pass Comments should be added selectively at high-information boundaries: 1. **File/module role** — what this file owns and what it deliberately does not own. 2. **Authority/state ownership** — which layer is authoritative and which layer only observes or executes effects. 3. **Trust/security invariants** — why path, hash, identity, capability, or activation checks fail closed. 4. **Lifecycle/concurrency rules** — why epochs, serialized bridges, main-thread dispatch, or shutdown ordering exist. 5. **Compatibility traps** — behavior that looks simplifiable but is required to preserve protocol/release compatibility. Comments should **not** narrate obvious syntax, duplicate nearby README text line by line, claim validation that tests do not provide, or be added solely to raise a numeric density score. ## Initial targeted additions This pass adds or strengthens comments in small, high-leverage files that sit on module/trust boundaries: - `unity-package/com.eunsung.teamforge/Editor/Authority/TeamForgeAuthorityView.cs` - `server/src/index.mjs` - `project-peer/src/host-orchestrator-cli.mjs` - `project-peer/src/filesystem-safety.mjs` - `launcher/runtime-loader.mjs` Larger state-machine files such as the connection, Transform, Hierarchy, Session Authority, and Launcher verification implementations should receive comments only when a future change touches a non-obvious invariant. Their current reading path is documented in `CODEMAP.md` and `docs/SOURCE.md` so an agent can reach the relevant tests and architecture before editing them. ## How to review comment quality For a source change, ask: - Would a competent reviewer understand the invariant without reconstructing several modules? - Does the comment explain a constraint or reason that the code cannot express clearly by naming alone? - Is the statement backed by current source/tests or architecture documentation? - Would the comment still be true after a small implementation refactor? If the answer is no, prefer clearer names, smaller functions, tests, or canonical documentation instead of more comments. --- # TeamForge AI/search discovery strategy Date: 2026-08-30 This document records why TeamForge exposes current project facts through several retrieval paths while keeping the repository as the canonical source. ## Problem being solved Different clients see different parts of a public project: - a repository-aware coding agent may read files directly; - a search-grounded assistant may only see indexed HTML; - a direct-fetch tool may prefer plain text, Markdown, or JSON; - a crawler may discover a page through a sitemap but not understand GitHub's rendered `blob` UI; - any of those clients may be looking at a stale index while `main` has already changed. TeamForge also has multiple identities that must not be collapsed into one vague “latest version”: - product version; - release/work-package identity; - exact source commit; - latest published candidate; - exact packaged filename + SHA-256. Current source can be newer than the latest published package. At present, the latest published package is r5, while current `main` contains later Windows networking/firewall and Project identity recovery behavior that is not part of the immutable r5 bytes. Search/discovery surfaces must preserve that source-versus-package distinction instead of making newer source evidence look like r5 package evidence. The goal is therefore: > make the same canonical facts reachable through human, search, agent, and machine-readable paths without creating several independently maintained truths. ## Canonical layers The discovery system follows the repository documentation architecture instead of inventing a separate AI-only hierarchy. | Question | Canonical source | | --- | --- | | What is TeamForge? | `README.md` / `README.ko.md` | | What works now / what is blocked? | `docs/STATUS.md` | | How does it work end to end? | `docs/HOW_IT_WORKS.md` / `.ko.md` | | What exact runtime/protocol/release selections apply? | `release-contract.json` | | What exact packaged bytes exist? | `builds/README.md` + GitHub Release filename/SHA-256 | | How is the system structured? | `docs/architecture.md` | | Where is the code? | `CODEMAP.md` | | How do I check out/build/validate source? | `docs/SOURCE.md` | | How should a substantial change be planned? | `docs/ENGINEERING_GUIDE.md` | | How should documentation be maintained? | `docs/DOCUMENTATION_GUIDE.md` | | Which named validation scenario should I run? | `docs/TEST_LAB.md` + `test-lab.json` | | What is planned? | `docs/ROADMAP.md` | `llms.txt`, Pages, `project.json`, sitemaps, update feeds, IndexNow, and the repository manifest are **routing/discovery/freshness surfaces** for these canonical sources. They must not silently redefine their roles. ## Retrieval layers ### 1. Ordinary crawlable HTML The generated GitHub Pages site provides ordinary HTML for high-value current material: - `/status/` - `/how-it-works/` - `/architecture/` - `/source/` - `/test-lab/` - `/engineering/` - `/documentation/` - `/changelog/` - `/security/` These pages are generated from repository Markdown mirrors rather than hand-maintained separately. `/source/` is specifically the **source checkout/build/validation workflow**, not a substitute for `CODEMAP.md`. The homepage also exposes current lifecycle/release/source identity in visible text and links users toward the current documentation layers. ### 2. Clean plain-text and Markdown mirrors Common documents are copied to stable plain-text endpoints such as: - `status.txt` - `how-it-works.txt` - `how-it-works.ko.txt` - `codemap.txt` - `source.txt` - `test-lab.txt` - `engineering-guide.txt` - `documentation-guide.txt` - `architecture-overview.txt` For pages that have a generated HTML route, the Pages build also emits a clean Markdown page variant using the route-local `index.md` form, for example: - `/index.md` - `/status/index.md` - `/how-it-works/index.md` - `/architecture/index.md` - `/ko/index.md` - `/ko/status/index.md` - `/ko/how-it-works/index.md` The plain-text endpoint, HTML page, and Markdown page variant come from the same canonical source. The Markdown variants are generated outputs, not a second hand-maintained documentation tree. ### 3. Structured metadata `project.json` exposes generated snapshot metadata and routes. It includes: - product/release identity copied from `release-contract.json`; - lifecycle/status summary derived from `STATUS.md`; - exact Pages source commit; - module roles; - current documentation and localized-documentation routes. Adding new documentation-route fields is additive and does not by itself require changing the current `project.json` schema version. `release-contract.json` remains the source-controlled release/runtime/protocol contract. `project.json` is not allowed to become a second hand-maintained release contract. ### 4. Curated AI context `llms.txt` is the small task-routing/evidence index. `llms-full.txt` contains a curated set of current documentation. It deliberately includes HOW_IT_WORKS, architecture, SOURCE, engineering/documentation guides, Test Lab, status, security, and module guides while excluding most raw historical work-state material. It is not a full repository dump. ### 5. Exhaustive repository inventory `repository-manifest.json` is generated from `git ls-files` for the exact Pages source commit. It gives every tracked path its blob identity, size/category metadata, and source-commit-pinned GitHub URL. This prevents “not part of the curated AI mirror” from being mistaken for “not in the repository.” The manifest is a discovery fallback, not a higher-precedence source of truth. ## llms.txt v2 compatibility layer TeamForge adopted the llms.txt v2 proposal in PR #123 as an **additive interoperability layer**, not as a replacement for the existing discovery system and not as a search-ranking mechanism. The compatibility policy is: - keep the root/project-path `llms.txt` readable by older clients using the long-standing H1, blockquote summary, H2 section, and Markdown-link-list shape; - keep existing `.txt` mirrors and `llms-full.txt` available for older or simpler direct-fetch clients; - keep `llms.txt` itself small and route agents to the smallest relevant document instead of inlining the whole repository; - expose page-level Markdown variants as generated `index.md` files; - advertise the `llms.txt` that describes a generated HTML page with `rel="describedby"`; - advertise that page's Markdown representation with `rel="alternate" type="text/markdown"`; - keep `sitemap.md` discoverable as `rel="related"` rather than incorrectly presenting it as the Markdown representation of the homepage; - treat the v2 `Optional` heading as a normal secondary-information convention, not as a special machine-execution switch; - use the project-path `llms.txt` as the descriptor for the GitHub Pages project subtree. A v1-style reader can therefore continue to read the same structural core, while a v2-aware reader can discover both the descriptor and the page-specific Markdown representation without guessing URL patterns. GitHub Pages does not currently give this build per-resource control over HTTP `Link:` response headers, so TeamForge expresses v2 discovery through standard HTML `` relations. If the hosting layer changes later, equivalent HTTP `Link:` headers can be considered without removing the HTML relations. The implementation lives in `scripts/llms_v2.py`. It generates the Markdown page variants, inserts the discovery relations, validates the strict H1/summary/H2-link-list shape, checks internal `llms.txt` targets, and supports a `--check` mode so the generated site can be verified without mutation. This v2 layer is deliberately not treated as proof of AI/search ranking support. The ordinary crawlable HTML, canonical text, sitemaps, structured metadata, internal links, and repository sources remain independently useful even if a client ignores `llms.txt` entirely. ## Task-based routing examples ### Someone asks “how does TeamForge actually work?” 1. README for orientation. 2. HOW_IT_WORKS for Host → Guest → Project transfer → realtime edit → reconnect/recovery. 3. architecture for exact structural boundaries. 4. CODEMAP for concrete files/tests. ### Someone asks “where is this implemented?” 1. CODEMAP. 2. relevant module README. 3. source + nearest tests. 4. SOURCE only when checkout/build/validation commands are needed. ### A coding agent proposes a substantial change 1. ENGINEERING_GUIDE + CHANGE_PLAN. 2. target module/source/tests. 3. architecture/decisions when crossing authority/trust/persistence/path boundaries. 4. `quality-gates.json` / classifier for routing aid. 5. Test Lab for named validation-lane planning. ### A coding agent changes documentation 1. DOCUMENTATION_GUIDE. 2. determine the canonical owner first. 3. determine propagation class when adding/removing/renaming/reclassifying a current document. 4. review README language pair, docs map, `llms.txt`, Pages/project metadata/sitemap, feeds/IndexNow when the document is current-facing, AGENTS/CONTRIBUTING, and validators as appropriate. This propagation step was added after the post-merge integration audit found that new canonical documents existed in the repository but several discovery surfaces still described the older documentation architecture. ## Build-time generation The Pages workflow runs on pull requests and `main` pushes because the generated repository manifest and source commit represent the whole repository snapshot. The build performs these broad steps: 1. copy canonical documents to clean text mirrors; 2. copy `release-contract.json` byte-for-byte; 3. build `llms-full.txt` from the curated current-document set; 4. generate `project.json` from release contract, STATUS, package metadata, and source commit; 5. generate the complete repository manifest; 6. render selected canonical documents to crawlable HTML; 7. enrich the homepage with visible current facts and structured metadata; 8. generate semantic and XML sitemaps; 9. generate RSS/Atom from a deliberately small set of current-facing canonical sources; 10. generate route-local `index.md` variants and inject `rel="describedby"` / Markdown `rel="alternate"` discovery into generated HTML; 11. apply and immediately re-check the llms.txt v2 compatibility contract; 12. verify generated routes, source identities, documentation propagation, update-feed source coverage, IndexNow freshness routing, and links; 13. on `main`, deploy and smoke-test important live endpoints. ## Validation rules The discovery system is intentionally tested instead of relying on a checklist that maintainers remember manually. `scripts/validate-documentation.mjs` checks repository-side propagation, including: - paired README routing to HOW_IT_WORKS; - current `llms.txt` routes; - Pages mirror declarations for current canonical guides; - current Test Lab wording; - SOURCE/CODEMAP responsibility separation; - current source/package divergence while it remains relevant. `scripts/llms_v2.py` checks the v2 compatibility layer, including: - exactly one initial H1 and a blockquote summary near the top of `llms.txt`; - H2 file-list sections without nested H3+ headings; - Markdown-link-only entries inside H2 resource sections; - existence of all internal TeamForge Pages links referenced by `llms.txt`; - exact content parity between route-local `index.md` variants and their generated source mirrors; - `rel="describedby"` discovery on generated HTML; - `rel="alternate" type="text/markdown"` only where a real page Markdown variant exists; - prevention of the older ambiguous `sitemap.md`-as-page-alternate behavior. `scripts/verify-agent-site.py` checks the built site, including: - required HTML/text/JSON outputs; - current documentation routes in `project.json`; - sitemap coverage and source-aware `lastmod` consistency; - internal generated links; - current release-contract identity; - exhaustive repository-manifest coverage. `scripts/verify-update-feeds.py` checks the freshness layer, including: - RSS/Atom parity with the selected canonical Git-history source set; - inclusion of the paired README, STATUS, and HOW_IT_WORKS current-facing documents; - source-aware IndexNow routing for changed indexable HTML pages, including homepage, STATUS, and HOW_IT_WORKS, with non-HTML payloads excluded. This means a newly promoted current-facing canonical guide should not silently become an orphan in retrieval **or** freshness routing again. ## Sitemap and freshness `sitemap.xml` includes important current HTML and machine-readable resources. Stable document routes derive `lastmod` from the newest commit affecting their canonical source. Snapshot-wide generated resources use the current source commit date. `sitemap.md` provides a semantic task-oriented map for humans and agents. It is related discovery content, not the Markdown representation of the homepage. RSS/Atom intentionally does **not** list every documentation edit. Its source set stays small and current-facing so historical-note maintenance does not look like a new product state. The paired HOW_IT_WORKS guides are included because they are now a canonical user-facing explanation of current end-to-end behavior. After a successful `main` Pages deployment, live smoke tests check important HTML/text/JSON endpoints and verify the deployed `project.json.sourceCommit` against the Actions commit. ## Search change notification TeamForge uses IndexNow as a best-effort search freshness notification after successful `main` Pages deployment. It intentionally remains separate from the deploy workflow so notification failure does not invalidate an otherwise correct site. After each successful `main` Pages push, the IndexNow workflow compares source changes against the previous successful Pages push and selects only the affected **indexable HTML routes** using the sitemap builder's canonical source-to-route mapping. Shared HTML assets and renderers trigger a conservative notification of all indexable pages; unrelated Unity/runtime edits and preview-only locales trigger none. If no previous successful deployment is available, it bootstraps all indexable HTML routes. XML/TXT sitemaps, JSON metadata and RSS/Atom feeds are deliberately **not** submitted as IndexNow page URLs; they remain available for normal discovery. This is source-aware change selection rather than byte-for-byte rendered-HTML comparison. The workflow logs the exact selected URLs and makes no IndexNow API call when the selection is empty. IndexNow is not evidence that a search engine crawled, indexed, ranked, or immediately refreshed a page. ### Public search-engine diagnostics and incident reports TeamForge publishes reproducible observations when third-party search-console reporting does not match the site's publicly verifiable responses. These are **site-owner observations, not confirmed Google or Microsoft outages**. As of 2026-10-12, the open investigations are: - [Google Search Console sitemap “Couldn't fetch” / `isPending: true` after 37+ days](https://github.com/Eun-si123/teamforge-unity-collab/issues/255) — XML/TXT control submissions, API pending state, successful public fetches, and a separately functioning Bing sitemap report. - [Bing Webmaster Tools IndexNow “Get Started” instead of submission insights](https://github.com/Eun-si123/teamforge-unity-collab/issues/256) — accepted IndexNow HTTP 200 notifications contrasted with the signed-in dashboard behavior. The **GitHub Issues are the canonical live incident/evidence logs**, including dates, verified checks, related community cases, unknowns, and eventual resolution. Update them when new evidence appears rather than copying changing status into this document. These external diagnostics do not describe TeamForge Unity runtime availability. ## What this does not guarantee No `llms.txt`, Markdown mirror, `rel="describedby"`, `rel="alternate"`, sitemap, JSON-LD block, IndexNow submission, manifest, or CI job can force a third-party assistant or search engine to retrieve fresh content. Search indexes can lag. Clients can ignore optional conventions. HTML, Markdown, plain-text, and JSON fetch capabilities vary. Likewise: - green discovery CI does not prove runtime correctness; - source CI does not prove an older packaged ZIP contains later source behavior; - consistent release metadata does not close physical field gates; - exact packaged evidence still requires the exact artifact identity. The system only reduces avoidable ambiguity by making current facts reachable through several independently useful paths that all lead back to canonical repository sources. ## References used for this design - llmstxt.org v2 proposal — H1/summary/H2 file-list structure, project/subpath scoping, clean Markdown variants, `rel="alternate"`, and `rel="describedby"` discovery. - Cloudflare documentation style guidance — `llms.txt` / `llms-full.txt` patterns. - Vercel guidance on agent-readable documentation — discovery, clean retrieval, metadata, and verification as separate concerns. - Google Search Central guidance — normal crawl/index fundamentals, visible textual content, internal links, and structured-data consistency remain important for AI/search features. - IndexNow protocol documentation — change notification, key verification, and response semantics. - GitHub Pages / Actions documentation — build, artifact, deploy, and live-site workflow separation. ## Adoption record The llms.txt v2 compatibility layer was merged through [PR #123](https://github.com/Eun-si123/teamforge-unity-collab/pull/123). The PR preserved v1-style readability while adding route-local Markdown variants, explicit HTML discovery relations, and Pages-time validation. The change passed the repository's normal PR checks before merge. --- # Architecture Decision Index 이 문서는 TeamForge의 **현재 결정과 역사적 설계 결정을 함께 보존하는 인덱스**다. 상세 Phase 0/1 결정은 각각 [phase-0](decisions/phase-0.md), [phase-1](decisions/phase-1.md)에 있다. 과거 결정은 당시 구현과 판단 근거를 보존하기 위해 삭제하지 않는다. 다만 이후 구현에서 교체된 결정은 반드시 `교체됨` 또는 `부분 교체`로 표시한다. **현재 구현을 판단할 때의 우선순위는 현재 source/tests → [STATUS.md](STATUS.md) → [`../release-contract.json`](../release-contract.json) → [architecture.md](architecture.md) → 이 결정 기록의 아직 교체되지 않은 부분**이다. Phase/work-state 문서는 해당 시점의 역사적 증거이며 현재 문서를 덮어쓰지 않는다. ## 현재 supersession 요약 — 0.5.1 WP5.1 | 결정 | 현재 상태 | 현재 계약 | | --- | --- | --- | | D-005 Node.js 20+ 서버 | **부분 교체** | 현재 bundled Node는 `24.19.0`, source/developer 지원 범위는 `>=22.23.2 <23 || >=24.18.1 <25`; `ws@8.21.3` | | D-301 Project 없는 Client의 Node CLI bootstrap | **교체됨** | 정상 Fresh Guest 경로는 Windows Guest Launcher + bundled verified Runtime + Project Peer Guest bridge. System Node/npm은 일반 Guest 요구사항이 아님 | | D-308 Node.js 20 기반 Direct HTTP MVP | **전송 구조 유지 / Runtime 전제 교체** | Direct HTTP payload 경계는 유지하지만 현재 Runtime/Node 선택은 `release-contract.json`이 권위 있음 | | Phase 4.5 Closure ADR의 “현재 구현 권위” 표현 | **부분 교체** | Phase 4.5 ADR은 현재 구조의 역사적 foundation. 현재 as-built topology는 `architecture.md`가 권위 있음 | ## 기존 결정 | ID | 결정 | 상태 | | --- | --- | --- | | D-001 | Editor 전용 UPM 패키지 | 유지 | | D-002 | C# 기반 UI Toolkit EditorWindow | 유지 | | D-003 | ClientWebSocket Transport 하나 우선 | 유지 | | D-004 | 명시적 DTO + JSON | 유지, 복잡도 증가 시 재검토 | | D-005 | Node.js + ws 서버 | **부분 교체 — 현재 Runtime/지원 버전은 release contract 기준** | | D-006 | 저장 Object는 GlobalObjectId, Instance ID 금지 | 유지 | | D-007 | 개인 설정은 UserSettings | 유지 | | D-008 | Assembly Reload는 Socket이 아니라 연결 의도 복원 | 유지 | | D-101 | Presence는 Protocol v1 기능 협상으로 추가 | 유지 | | D-102 | 안정 사용자 ID + 저장 Object ID | 유지 | | D-103 | Presence Sampling/Heartbeat | 유지 | | D-104 | Handles 기반 원격 선택 표시 | 실기 확인 | | D-105 | Presence 메모리 Registry + 동일 ID 새 연결 우선 | 유지 | ### D-005 현재 상태 보충 초기 결정의 핵심인 **Node.js + `ws` 기반 TeamForge Server** 구조는 유지된다. 다만 “Node.js 20+”라는 당시 Runtime 전제는 더 이상 현재 계약이 아니다. 0.5.1 WP5.1의 source-controlled `release-contract.json`은 bundled Node `24.19.0`, source/developer Node `>=22.23.2 <23 || >=24.18.1 <25`, `ws@8.21.3`을 선택한다. 앞으로도 정확한 Runtime version/floor는 이 ADR의 오래된 숫자가 아니라 Release Contract를 따라야 한다. ## Phase 2 결정 ### D-201 Protocol v1의 가산적 확장 **결정:** supportsTransformSync/transformSyncEnabled로 Phase 2 기능을 협상하고 Protocol Version은 1을 유지한다. **이유:** 기존 Envelope, Hello/Ping/Presence 의미를 바꾸지 않으며 Phase 0/1 연결에는 Transform/Lock 메시지를 보내지 않는다. **단점:** 같은 Protocol Version 안에 세 가지 기능 수준이 있으므로 Ack Capability 확인이 필수다. **교체 조건:** 필수 Envelope/순서/직렬화 규칙이 호환 불가능하게 바뀔 때 Protocol Version을 올린다. ### D-202 서버 권한 Revision과 중복 제거 **결정:** 승인된 `transform_update`마다 Session 전역 `serverRevision`을 1 증가시키고 Operation ID와 전체 의미 Payload Fingerprint를 최근 4,096개까지 기억한다. 동일 Payload 재전송만 멱등이며 현재 요청 ID로 응답한다. **이유:** WebSocket 도착 순서만 믿지 않고 명시적인 전체 순서와 재전송 멱등성을 제공한다. **단점:** 영속 Operation History는 현재도 구현되어 있지 않으며 Server/Session authority는 memory-only다. ### D-203 GameObject 전체 Lease 잠금 **결정:** 저장 Scene GameObject 전체를 잠금 단위로 사용한다. 서버 기본 Lease는 15초다. Client는 설정값뿐 아니라 Grant의 Server Timestamp/Expiry를 사용해 남은 Lease 절반보다 늦지 않게 갱신하고, 로컬 계산 Deadline이 지나면 전송을 안전 중지한다. **이유:** 세 명 규모 MVP에서 Property Lock보다 예측 가능하며 Client 종료 시 영구 잠금이 남지 않는다. **단점:** 단순 선택 시 잠금을 요청하므로 탐색과 편집의 구분이 거칠다. TeamForge의 원격 Frame 동작은 자동 잠금을 한 번 억제한다. ### D-204 Transform 범위 제한 **결정:** Phase 2는 `localPosition`, `localRotation`, `localScale`만 동기화한다. 연결 시 깨끗하게 저장된 Scene의 Object를 공유 Baseline으로 캡처하고 그 집합에 있던 단일 선택만 허용한다. **제외:** 생성/삭제/이름/활성/부모/형제 순서, 다중 선택 편집, Component 일반화, Prefab Stage, 미저장/비Baseline Object, Operation 영속화. Scene 안 Prefab Instance의 Transform Override만 기록한다. **이유:** Phase 경계를 지키고 Transform 수직 흐름과 충돌 정책을 독립 검증한다. **현재 상태:** 생성/삭제/이름/부모/형제 순서 중 지원되는 same-Scene Hierarchy subset은 이후 Phase 4에서 별도 권한형 흐름으로 추가되었다. 일반 Component/Inspector/Prefab/Asset 동기화는 여전히 이 결정에 포함되지 않는다. ### D-205 원격 적용과 Undo **결정:** 원격 Transform은 새 로컬 Undo 항목으로 넣지 않는다. 적용 전 해당 GameObject/Transform의 기존 Undo 기록만 `Undo.ClearUndo`로 제거해 과거 로컬 값이 서버 확정값을 되살리지 못하게 한다. 값이 실제로 다를 때만 직접 적용을 `TeamForgeRemoteApplyScope`로 감싸고 Prefab Instance Override를 기록한 뒤 `EditorSceneManager.MarkSceneDirty`를 호출한다. 동일 값이면 Undo만 정리하고 Dirty를 만들지 않는다. **이유:** 원격 사용자의 작업이 로컬 사용자의 일반 Undo 순서를 오염시키지 않으면서 저장 누락을 방지한다. **단점:** 원격 변경을 받은 대상 Object의 과거 로컬 Undo History는 사라진다. 공유 History/Revision 되돌리기는 별도 미래 기능이 필요하다. ### D-206 Phase 2 Snapshot 한계 **결정:** 서버는 활성 Session의 최신 Transform/Lock을 메모리 Snapshot으로 새 Phase 2 Client에 보낸다. Clean Baseline Scene에는 Server Snapshot을 적용한다. 연결 시 이미 Dirty인 Scene의 다른 값, 비Baseline Object, Prefab Stage는 덮어쓰지 않고 Object 단위 해결 대기 상태로 유지한다. **이유:** 늦은 참가자의 기본 상태 정렬과 Revision 시작점을 제공한다. **단점:** 모든 사용자가 나가거나 서버가 재시작하면 상태가 사라진다. Dirty Conflict는 자동 Merge하지 않는다. 영속 authority recovery와 누락 Operation 조회는 현재도 구현되어 있지 않다. ### D-207 지원하지 않는 편집의 안전 차단 **결정:** 다중 선택, Prefab Stage, Baseline 뒤 생성 Object, Parent/Scene Identity 변경은 Phase 2 Transform 경로에서 전송하지 않는다. 추적 중 Parent/Scene 변경이면 오래된 Target으로 Final Transform을 보내지 않고 Lock만 해제하며 해당 Object를 차단한다. **이유:** Local Transform은 Parent에 상대적이므로 Hierarchy가 다른 Peer에 같은 숫자를 적용하면 조용한 Scene Divergence가 생긴다. **현재 상태:** Phase 4가 지원되는 same-Scene Hierarchy create/delete/rename/reparent/order를 별도 authoritative operation으로 추가했지만, Phase 2 Transform 경로가 임의 구조 변경을 추측하거나 일반 Prefab/Cross-Scene 구조를 지원하도록 넓어진 것은 아니다. ### D-208 유한한 메모리와 연결 생존 **결정:** 기본 Session 최신 Transform 512개, Connection Lock 8개, Session Lock 256개, Snapshot 900 KiB, Socket 발신 Buffer 1 MiB를 상한으로 둔다. Hello 10초 Timeout과 15초 Ping/45초 Pong Timeout으로 유휴/반단절 연결을 정리한다. **이유:** Phase 2의 단일 Snapshot과 메모리 Map 구조가 Client 1 MiB 수신 한도, Server Memory, 연결 Slot을 무제한 소비하지 않게 한다. **단점:** 큰 Scene 전체 Transform 상태는 한 Session에서 처리할 수 없다. Snapshot Chunking/Paging과 영속 Store가 필요해지면 상한 계약을 별도 결정으로 교체한다. ## Phase 3 결정 ### D-301 Project 없는 Client는 Standalone Sidecar로 Bootstrap — **교체됨** **역사적 결정:** 기존 Unity Project가 없는 Client는 Editor Package가 아니라 Node.js `project-peer` CLI로 관리 Project를 먼저 구성한다. 기존 Project가 있는 Editor는 Package UI에서 동일 Metadata를 확인하고 Sidecar 실행 정보를 내보낸다. **당시 이유:** Unity Editor Package는 열려 있는 Unity Project가 있어야 실행되므로 “Project가 없는 Client가 Project를 받는다”는 시작 조건을 Package 하나로 해결할 수 없었다. **당시 단점:** Client에도 system Node.js가 필요하고 Editor 안에서 완전히 끝나는 UX가 아니었다. **교체 조건:** 검증된 Native Launcher나 Unity Hub Extension을 만들면 같은 Transfer/Manifest 계약 위에서 Sidecar를 교체한다. **현재 상태 — 교체 조건 충족:** 0.5.1의 정상 Fresh Guest 경로는 **Windows Guest Launcher → bundled hash-verified Runtime → Project Peer Guest bridge → verified Active → Unity handoff**다. 일반 Guest는 system Node/npm을 설치하거나 `project-peer` CLI를 직접 실행할 필요가 없다. CLI는 source development와 advanced diagnostics를 위한 경로로 남아 있다. Project Transfer/Manifest/Trust 계약은 이 교체 과정에서도 유지된다. ### D-302 Realtime과 Project Payload 전송 분리 **결정:** 기존 WebSocket Protocol v1에는 Capability와 Peer/Hash/Seed Metadata만 가산하고, Manifest/Chunk/File Byte는 별도 Project Transfer v1 Direct HTTP로 전송한다. **이유:** Presence/Transform/Lock 지연과 대용량 File Backpressure를 분리하고 Server가 Payload Relay가 되는 것을 막는다. **단점:** 두 Transport의 연결 상태와 오류를 따로 진단해야 한다. Direct Endpoint가 모두 막히면 자동 Server Relay가 없다. ### D-303 SHA-256 Content-addressed Chunk와 결정적 Manifest **결정:** 기본 1 MiB Chunk, SHA-256 File/Chunk/Manifest Hash, Path 정렬 Canonical JSON을 사용한다. 받은 Chunk는 저장 전에 Hash를 확인하고 같은 Hash는 재사용한다. **이유:** 중단 재개, Seed 교체, 중복 제거, 여러 Seed 병렬 수신을 하나의 검증 단위로 해결한다. **단점:** 최초 Seed Manifest 생성은 Project 전체를 읽고 Hash해야 하며 큰 Binary가 조금 바뀌면 해당 Chunk를 다시 보낸다. 향후 Rolling Chunking은 Schema Version 변경으로 검토한다. ### D-304 불변 Active Revision과 원자적 Pointer **결정:** 수신 Project는 `staging/`에서 완전 검증하고 `active/-`라는 새 경로로만 활성화한다. 기존 Active/기존 임의 Project를 덮어쓰지 않고 `metadata/current.json` Pointer만 원자적으로 교체한다. **이유:** 부분 적용과 Import/Compile 중 교체로 인한 Project 손상을 피하고 즉시 Rollback 가능한 복사본을 남긴다. **단점:** 여러 Revision이 Disk 공간을 사용한다. 자동 삭제는 하지 않으며 정리 UX는 후속 안정화 범위다. ### D-305 Ed25519 Owner/Publisher Descriptor **결정:** Owner/Publisher SPKI 공개키, SHA-256 Key ID, Owner Publisher 승인 서명, Publisher Baseline 서명을 검증한다. Owner Preferred Seed 주장은 Connection/Endpoint/Token/Baseline에 묶은 별도 Proof가 필요하다. **이유:** Owner, Publisher, Seed, Lock Owner, Server Operator를 같은 역할로 오인하지 않고 오래된 Owner의 자동 Downgrade와 단순 문자열 권한 위조를 막는다. **단점:** Server 영속 Anchor가 없을 때 최초 Project UUID/Owner Key는 TOFU다. 신뢰되지 않은 공개망에는 별도 초대/관리자 Pinning이 필요하다. ### D-306 명시적 Baseline Publish **결정:** File Watch나 Owner 접속만으로 Baseline을 바꾸지 않는다. 현재 Revision의 다음 값, 전체 Manifest 검증, Owner/Publisher 서명, 명시적 Publish 작업이 모두 있어야 한다. **이유:** Unity 자동 생성 파일, 오래된 Owner, 작업 중 Dirty File이 최신 기준을 조용히 덮는 것을 막는다. **단점:** 변경 공유 전에 사용자가 Manifest 생성과 Publish를 수행해야 한다. ### D-307 Server RAM Metadata와 재광고 복구 **결정:** Server는 Project ID/UUID, Baseline Summary, Peer/Endpoint/Token/보유 수량/서명 Metadata만 RAM에 유지한다. Manifest 본문, Path 목록, Chunk Byte, Archive와 Project Payload는 저장하거나 Relay하지 않는다. 재시작 뒤 Peer가 재광고한다. **이유:** 미니 PC 저장장치 장애가 Client Project 복사본에 영향을 주지 않고 Server Disk 사용을 최소화한다. **단점:** 아무 최신 Peer도 온라인이 아니면 신규 Client는 `Baseline Unavailable`로 기다려야 한다. Server Metadata/authority의 영속 History는 현재도 없다. ### D-308 Direct HTTP MVP와 교체 경계 — **전송 구조 유지 / Runtime 전제 교체** **결정:** 첫 전송 구현은 Token과 Project/Manifest Header를 검증하는 Client-to-Client HTTP다. 전송 경계는 Descriptor/Manifest/Inventory/Chunk 요청으로 제한한다. **당시 이유:** 당시 선택한 Node.js Runtime의 표준 HTTP로 LAN/같은 PC/직접 연결 VPN에서 실제 자동 통합 테스트가 가능했다. **현재 상태:** Direct HTTP payload route와 Descriptor/Manifest/Inventory/Chunk 경계는 그대로 유지된다. 다만 당시 문서의 “Node.js 20” Runtime 숫자는 현재 계약이 아니다. 정확한 bundled/source Node selection은 `release-contract.json`을 따른다. **단점:** NAT Traversal과 Transport TLS가 없으며 Endpoint가 직접 연결되지 않으면 실패한다. 향후 HTTPS/QUIC/WebRTC/승인형 Relay로 교체할 수 있다. ### D-309 Path와 Trust의 Fail-closed 정책 **결정:** 절대/상위 경로, Control Character, Case 충돌, Root 밖 Local Package, Symbolic Link/Junction을 거부한다. Script/Package를 포함한 Baseline은 Publisher Fingerprint를 표시하고 명시적 신뢰 승인 전 활성화하지 않는다. **이유:** 프로젝트 동기화가 임의 File Read/Write 또는 자동 Code 실행 경로가 되는 것을 막는다. **단점:** Symlink를 의도적으로 쓰는 Project와 Root 밖 Local Package는 동기화할 수 없다. **WP5.1 보충:** TeamForge가 스스로 생성하고 identity-bound로 검증하는 Windows 실행 alias/junction은 외부 Project 경로의 임의 reparse point를 허용하는 것과 다른 계약이다. 외부 reparse-point fail-closed 정책은 유지되고, TeamForge-owned execution alias는 별도 검증·재검증 경계 안에서만 허용된다. ### D-310 내부 Metadata와 일반 사용자 UX 분리 **결정:** Project UUID, Key/Public Key, Revision/Manifest Hash, Seed Rank는 자동 생성·검증하며 일반 입력란으로 노출하지 않는다. 일반 참가자는 초대 정보, 다운로드 승인, Publisher Fingerprint 신뢰만 다룬다. 최초 Publish는 Owner Key를 자동 생성하고 Private Key는 Payload/Manifest/로그에서 제외한다. **이유:** 암호·분산시스템 내부 식별자를 수동 복사하게 하면 오입력과 Key 유출, 잘못된 Baseline 선택 위험이 커진다. **단점:** 문제 진단 때 내부 값을 확인할 고급 읽기 전용 화면과 Key 백업/복구 절차가 별도로 필요하다. ### D-311 Unity와 Sidecar의 Secret-free Identity Bridge **결정:** 열린 Source Project와 검증 완료 Replica는 `ProjectSettings/TeamForgeProject.json`에 Project UUID, Baseline Revision, Manifest/Descriptor Hash와 호환 Version만 기록한다. Sidecar/Project Peer backend는 이 파일로 UUID를 자동 고정하며 파일 자체는 Manifest에서 제외한다. Unity가 내보내는 Launch Settings도 상대 경로와 환경 변수 이름만 포함하고 Token/Private Key/절대 경로를 포함하지 않는다. **이유:** Unity가 Project Payload를 직접 다루지 않으면서도 Project Peer backend와 같은 Project Identity를 사용하고, Project가 없는 Client가 활성화된 복사본을 열자마자 올바른 Baseline을 인식해야 한다. **현재 용어 보충:** 정상 Fresh Guest에서는 이 backend를 사용자가 system Node CLI “sidecar”로 직접 실행하는 것이 아니라 Windows Launcher가 verified bundled Runtime을 통해 구동한다. Secret-free identity bridge 자체는 유지된다. **단점:** 해당 로컬 Descriptor는 전송된 Project 내용의 일부가 아니라 검증 뒤 생성되는 관리 Metadata다. 따라서 서명 Descriptor가 신뢰의 근거이며 로컬 파일만으로 Owner 권한을 증명하지 않는다. ### D-312 Owner Key와 접속 Token Lifecycle 분리 **결정:** Owner Key는 첫 Publish에서만 자동 생성하고 기존 서명/Invite/Active 증거가 있는데 Key가 없으면 새 Key를 만들지 않는다. 백업은 배타적 별도 명령으로 제공한다. Rotation/Ownership Transfer는 기존 Owner가 승인하는 전환 Protocol 전까지 fail-closed다. Server Bearer Token은 별도 접속 자격이므로 운영자가 교체해도 Project UUID/Baseline/Chunk/Client 복사본은 바꾸지 않는다. **이유:** Key 분실이나 Server RAM 초기화가 과거 Project를 다른 Owner로 조용히 재등록하거나 Project Data를 불필요하게 다시 전송하는 계기가 되면 안 된다. **단점:** Owner Key 백업이 없으면 기존 Owner Identity로 새 Baseline을 게시할 수 없다. 현재 안전한 우회는 새 Project Identity로 명시적으로 Migration하고 참가자가 다시 신뢰하는 것이다. ### D-313 Draft, Server 승인 Baseline, Unity Descriptor 분리 **결정:** Manifest와 Chunk 생성 결과는 Draft로 저장하되 Server가 `project_baseline_changed`로 정확한 Descriptor를 승인하기 전에는 `metadata/published.json`에 올리거나 Seed로 광고하지 않는다. 승인 Pointer는 단조 Revision/Hash를 원자적으로 기록한다. Server 승인 뒤 원본 Unity Project의 secret-free Descriptor 기록만 실패한 경우에는 새 Revision을 만들지 않고, Coordinator 현재값과 로컬 서명 Metadata가 정확히 일치할 때만 `repair-source-descriptor`로 복구한다. **이유:** 사용자가 Publish 확인을 취소했거나 Server가 거부한 Draft가 재시작 뒤 우연히 Seed가 되는 것을 막고, Server 승인과 로컬 파일 기록 사이의 드문 장애가 중복 Revision Publish로 이어지지 않게 한다. **단점:** 승인된 Manifest/Descriptor Metadata와 Source Descriptor를 별도로 관리해야 한다. Server 승인 뒤 Process가 중단되면 사용자가 명시적 복구 명령을 실행해야 하며 자동으로 Source Project를 덮어쓰지 않는다. **교체 조건:** 영속 Coordinator Transaction과 Client Acknowledgement Log가 도입되면 승인 Pointer와 복구 절차를 해당 Transaction 상태 기계로 통합한다. ### D-314 Embedded Package 독립 탐색과 이중 Coverage 검사 **결정:** Publish 수집기는 `Packages` 바로 아래에서 `package.json`을 가진 Embedded Package를 dependency 선언과 무관하게 열거하고, Project Root 내부의 안전한 `file:` Package도 포함한다. 수집 결과와 별개로 Manifest 생성 직전에 direct Embedded Package의 `package.json`이 실제 Manifest File 목록에 있는지 다시 검사한다. `Packages/manifest.json`과 `Packages/packages-lock.json`은 regular file/유효 JSON으로 필수다. **이유:** v0.4.0은 수집 Root에서 direct Embedded Package를 빠뜨렸지만 이후 검증이 발견된 File만 검사해 `Sync Complete`가 가능했다. 독립 Coverage 검사는 같은 종류의 수집 회귀를 Publish 전에 차단한다. **보안 경계:** 절대/UNC/Drive-relative/Traversal `file:` 참조, Root 밖 realpath, 중간 Symlink/Junction, Case 충돌, Owner Identity JSON을 거부한다. 일반 텍스트에 임의 이름으로 숨긴 모든 Secret을 자동 식별하는 DLP Scanner는 아니므로 Token은 Project Root에 저장하지 않는다. **단점:** Root 밖 Local UPM과 Symlink 기반 개발 Layout은 계속 지원하지 않는다. Package Lock이 없는 오래된/비표준 Project는 Publish 전에 Unity Package Metadata를 정상 생성해야 한다. ### D-315 Direct Transfer 일시 오류 재시도와 Peer별 Pacing **결정:** Direct Client가 408/425/429/500/502/503/504, Timeout, Reset과 제한된 Network 오류를 일시 오류로 분류한다. Server는 429/503에 `Retry-After`와 정밀 millisecond Hint를 제공한다. Swarm은 기본 병렬도 4, Peer별 요청 시작 간격 10 ms, 초기 포함 최대 4회 시도, 100 ms 지수 Backoff(최대 5초)+20% Jitter를 사용한다. 다른 Seed가 있으면 냉각 중인 Peer 대신 전환하고, 검증 Chunk/Staging/Active 불변조건은 유지한다. **이유:** v0.4.0은 120 req/s fixed window에 descriptor/manifest/inventory도 포함하면서 142개 소형 Chunk를 병렬 요청했고, 첫 429 뒤 같은 Window에서 즉시 한 번 더 요청해 실패할 수 있었다. 실제 코드 재현은 117개 검증 뒤 같은 실패를 만들었다. **판정 제한:** 사용자 현장의 116/142 사건에는 HTTP 상태 로그가 없으므로 429를 확정 원인으로 기록하지 않는다. Rate Limit은 강한 재현 가설이며 Reset/Timeout/일시 5xx도 같은 정책으로 처리한다. `--concurrency 1` 재실기 성공은 남은 26 Chunk만 받은 Resume 효과와 분리해 해석한다. **단점:** 작은 Chunk가 매우 많으면 Peer별 pacing으로 전송 시작이 약간 느려진다. Direct HTTP 자체는 신뢰된 LAN/VPN 대상이며 NAT Traversal/TLS는 별도 Transport 교체 범위다. ## Phase 4 decisions — v0.5.0 ### D-401 Protocol v1 additive Hierarchy capability **Decision:** keep Realtime Protocol `1` and negotiate `supportsHierarchySync` / `hierarchySyncEnabled` additively. Hierarchy Sync requires Presence + Transform. **Reason:** the common envelope and existing Presence/Transform/Project semantics remain compatible. Phase 4 can be isolated by capability without forcing Phase 0–3 clients to parse hierarchy messages. **Compatibility boundary:** once a Scene is authoritative under Phase 4, a Phase 2-only client cannot acquire Transform/Lock authority in that Scene. ### D-402 Saved GlobalObjectId + session logical identity **Decision:** saved baseline objects keep Unity `GlobalObjectId`; new session-created objects use `tf:<32 lowercase hex>`. Logical-to-Global bindings are local generated state under `Library/TeamForge` and no TeamForge Scene Component is added. **Rejected:** name/path identity, Instance ID, injecting UUID Components into all Scenes. **Reason:** names/paths/sibling positions are mutable and Instance IDs are not cross-editor stable. A local identity map preserves Scene content cleanliness for the MVP. **Known limitation:** a fresh republished Project baseline cannot safely infer logical IDs from an older live hierarchy session. Initial snapshot application therefore fails closed on identity mismatch. Durable/migratable identity is a later explicit design, not hidden future work. ### D-403 Hierarchy shares the Session revision stream **Decision:** Hierarchy and Transform share one `serverRevision`; hierarchy operations require exact `baseRevision == serverRevision` and retain recent semantic operation fingerprints for idempotence. **Reason:** create/delete/reparent can invalidate Transform targets and parent structure. One authoritative revision stream gives deterministic ordering without introducing a second merge clock. **Trade-off:** simultaneous independent hierarchy edits can conflict more often than a per-object revision model. Phase 4 prefers explicit conflict over silent structural divergence. ### D-404 Server-authoritative bounded hierarchy + tombstones **Decision:** retain authoritative Scene IDs, hierarchy object records and bounded tombstones in server memory only. Deleting a subtree tombstones every deleted identity and prevents resurrection in the same Session. **Reason:** late join and deterministic delete require an authoritative structure, while persistence/recovery remains separate future work. **Limits:** default 2,048 hierarchy objects, 4,096 tombstones, 1 MiB hierarchy snapshot, depth 256, name length 128. ### D-405 Unity ObjectChangeEvents observation and remote apply policy **Decision:** observe hierarchy changes with `ObjectChangeEvents.changesPublished` for create/delete/reparent/children-order plus a bounded `hierarchyChanged` rename fallback. Remote authoritative apply does not intentionally create normal user Undo entries and clears stale target Undo before mutation. **Reason:** Unity's object change stream provides precise structural events without a full hierarchy scan every Editor update. Remote history must not let local Undo resurrect stale pre-authoritative structure. ### D-406 Hierarchy edits respect affected parent/subtree locks **Decision:** hierarchy operations fail closed not only on a target lock but also on affected current/destination parent locks; subtree delete additionally checks every deleted object's lock. **Reason:** create/reorder/reparent/delete mutate parent child-list structure even when the target itself is unlocked. Other-user locks remain authoritative conflict guards while exact revision is the primary ordering rule. ### D-407 Delete clears stale Presence selection references **Decision:** after authoritative delete, clear Presence selections that reference deleted identities and broadcast the cleaned Presence state. **Reason:** deleted objects must not remain advertised as active selections to late/remote viewers. ### D-408 Empty authoritative Scenes are explicit **Decision:** `hierarchy_snapshot` includes additive `sceneIds` separately from the object array. **Reason:** an authoritative Scene can contain zero GameObjects. Inferring Scene authority only from object records would lose the distinction between “authoritative empty Scene” and “never seeded Scene”. ### D-409 Project baseline / live hierarchy mismatch fails closed **Decision:** the first authoritative Unity snapshot refuses to overwrite even a clean local Scene when it contains objects whose identities cannot be matched to the authoritative Global/logical identity set. **Reason:** guessing logical identity after a new Project baseline is republished can duplicate or bind the wrong GameObject. The safe workflow is to keep Project baseline and live hierarchy Session aligned or restart/reseed hierarchy after baseline publication. **Replacement condition:** a future explicit identity migration/persistent recovery design provides signed durable mapping semantics. ## Phase 4.5 Closure decision index — historical architecture foundation The accepted as-built Phase 4.5 decisions are consolidated in [decisions/phase-4.5.md](decisions/phase-4.5.md). They remain important historical evidence for the authority/identity extraction and preserve Protocol v1 plus the Server WebSocket / Project Peer Direct HTTP topology. They are **not a competing current source of truth for later 0.5.1 packaging, Launcher, diagnostics/recovery, or WP5.1 path-resilience behavior**. Where Phase 4.5 material and later current material differ, [architecture.md](architecture.md), [STATUS.md](STATUS.md), `release-contract.json`, current module READMEs, source, and tests take precedence. Historical Phase 4.5 PASS/Closure statements remain scoped to their exact recorded candidate. --- # TeamForge Security Policy TeamForge is experimental software. It is not yet appropriate for use as the only copy of an important Unity project. For current capability and release-readiness state, see **[STATUS.md](../docs/STATUS.md)**. For exact runtime/protocol/release selections, see [`release-contract.json`](../release-contract.json). For packaged artifact identity, see [`builds/README.md`](../builds/README.md). ## Supported versions / security-fix scope TeamForge is still in an early pre-alpha stage, so security support follows the **current source and explicitly current packaged candidate lineage**, not every historical build. | Surface | Security-fix expectation | | --- | --- | | Current `main` source | Best-effort fixes and review while the project is actively developed | | Current explicitly identified pre-alpha candidate | Best-effort investigation; check [STATUS.md](../docs/STATUS.md) before assuming a fix is packaged | | Superseded / historical TeamForge builds | Not supported as current secure distributions; upgrade/retest against current source/candidate | | Third-party forks | Maintained and trusted according to their own authors/operators; TeamForge cannot guarantee them | Because source and packaged candidates can differ during stabilization, do not assume that a source fix is present in an older ZIP. Use the exact artifact filename and SHA-256 when reporting a packaged vulnerability. ## Open source is not the same as safe Source availability makes independent inspection possible, but it does **not** mean that every build, fork, modification, or source snapshot is safe. A third-party fork can change the code. A malicious or careless fork could introduce vulnerabilities, data loss, credential theft, unwanted network behavior, or other harmful changes even when its source is available. When possible: - obtain TeamForge from the official project repository or another source you trust; - review important changes before running unfamiliar forks; - compare source, release notes, commit history and hashes when practical; - keep backups and prefer disposable projects for experimental versions; - never assume a fork is official merely because it uses TeamForge code or a similar name. The AGPLv3 and TeamForge attribution/origin notices help make modified source and project origin inspectable. They are **not** a malware scanner, security audit, signature system, or guarantee of trustworthy behavior. ## Automated scanning is not an audit Repository security automation such as dependency, secret and code scanning is useful for catching classes of mistakes, but a clean automated result does **not** prove that TeamForge is vulnerability-free. Static-analysis coverage varies by language and build environment. Unity/C# behavior, networking state machines, filesystem/path handling, packaging, and trust/activation logic still require targeted review and testing. ## High-impact areas Security reports are especially useful for issues involving: - remote or arbitrary code/command execution; - arbitrary file read/write; - path traversal or unsafe reparse/symlink handling; - malicious archive / Project extraction; - authentication or authorization bypass; - P2P trust-boundary failures; - forged/replayed session or Project metadata; - integrity-check bypasses; - secret/token/password/credential exposure; - unsafe handling of untrusted Unity packages or project files; - silent Project corruption or destructive overwrite; - denial-of-service / resource exhaustion. ## Reporting a vulnerability **Prefer GitHub Private Vulnerability Reporting for sensitive TeamForge findings when it is available on the repository.** Use the repository's **Security → Report a vulnerability** flow rather than publishing working exploit details first. When safe to share, include enough identity information to reproduce the affected code/build precisely: - source testing: Git commit or branch/ref; - packaged testing: product version, release ID, exact artifact filename and SHA-256 when available; - Unity Editor and operating-system/environment details that materially affect the issue; - a minimal reproduction or logs with secrets/private data removed. Product version alone does not prove that two packaged builds contain identical bytes. Please do **not** publish credentials, private data, live invite/access secrets, or detailed weaponization for a serious vulnerability before there has been a reasonable chance to investigate and fix it. For ordinary non-sensitive bugs, use a normal GitHub Issue. If Private Vulnerability Reporting is unavailable, a minimal public Issue may state that a potentially sensitive security problem was found **without** exploit code, secrets, private data, or detailed weaponization. Arrange a safer channel before sharing sensitive details. ## Safe research expectations Only test TeamForge against systems, accounts, projects, networks and peers that you own or have explicit permission to test. Do not use security testing as a reason to access another person's data, credentials, computer, project or network without authorization. ## Current maturity TeamForge has **not** completed a professional independent security audit. Treat early builds as potentially unsafe, keep backups, prefer disposable projects, and check [STATUS.md](../docs/STATUS.md) before assuming a current source fix has been packaged or field-validated. --- # Contributing to TeamForge Thanks for being interested in helping TeamForge. TeamForge is still experimental, and help is useful even if you do not consider yourself an expert programmer. ## Ways to help ### Testers You can help by trying TeamForge in disposable Unity projects and reporting what breaks. Useful testing areas include: - connecting two or more Unity Editor instances - repeated connect / disconnect / reconnect cycles - transform synchronization in both directions - object locking and ownership behavior - conflicting edits - host disconnects or crashes - project bootstrap / transfer - interrupted transfer and resume - corrupted or mismatched project state - confusing installation or recovery UX Please do **not** use irreplaceable projects for experimental testing. ### Unity / C# reviewers Useful review areas include: - Unity Editor API usage - lifecycle and domain reload behavior - serialization and Scene handling - concurrency / race conditions - state recovery - error handling - performance and unnecessary Editor work ### Networking reviewers Useful review areas include: - WebSocket protocol behavior - authentication and session handling - disconnect / retry logic - P2P transfer behavior - integrity verification - trust boundaries between peers - denial-of-service or resource exhaustion risks ### Security reviewers Security review is especially welcome around: - path traversal - arbitrary file read/write risks - unsafe archive or project extraction - authentication bypasses - remote-code-execution risks - untrusted peer input - secret or credential leakage - malicious project or package contents - data corruption and silent overwrite scenarios For potentially exploitable vulnerabilities, please read [SECURITY.md](SECURITY.md) before posting details publicly. ### Documentation / UX / translations You can also help by: - following setup instructions as a new user and reporting confusing steps - improving explanations - suggesting simpler workflows - improving Korean or English documentation - adding useful translations For non-trivial documentation changes, start with [docs/DOCUMENTATION_GUIDE.md](../docs/DOCUMENTATION_GUIDE.md) instead of editing every related file. It defines which document owns each kind of changing fact and how to plan the smallest safe update. ## Good bug and test reports A useful report usually includes: 1. What you were trying to do. 2. The steps you took. 3. What you expected to happen. 4. What actually happened. 5. Relevant logs, screenshots, diagnostics, or a minimal reproduction when safe to share. 6. The Unity Editor version and operating-system/environment details that materially affect the result. 7. The TeamForge identity that was actually tested. For a source checkout, record the Git commit when practical. For a packaged candidate, record the **product version, release ID, exact artifact filename, and SHA-256** when available. Product version alone is not enough to prove that two testers used the same packaged bytes. The current source-controlled candidate identity is defined by [`../release-contract.json`](../release-contract.json), while [`../builds/README.md`](../builds/README.md) explains packaged-artifact identity. Please remove private IP addresses, access tokens, passwords, invite secrets, API keys, and other credentials before posting logs publicly. ## Pull requests Pull requests should: - explain the problem being solved - keep the change focused when practical - include or update tests when the behavior can reasonably be automated - describe important manual testing that was performed - avoid unrelated generated files or build output - avoid committing credentials or private information - clearly identify behavior changes that could affect compatibility, networking, data integrity, or security For a normal public source checkout, use `npm run validate` (or `scripts/teamforge.ps1 verify` on Windows) for the source/document contract. `npm run validate:release` / `verify-release` is for a **fully staged release-candidate tree** containing generated Runtime/Launcher/release evidence; it is intentionally not a fresh-clone completeness test. See [docs/SOURCE.md](../docs/SOURCE.md) for the current validation split. Passing a source validator or automated test suite is evidence for those checks only. It does not by itself close Unity/two-PC manual field gates or prove that an arbitrary packaged ZIP is the exact candidate artifact. ### Documentation changes Documentation should be planned as part of the change rather than generated after the fact. For a non-trivial documentation update: 1. Read [docs/DOCUMENTATION_GUIDE.md](../docs/DOCUMENTATION_GUIDE.md). 2. Identify the reader, question, document type and canonical owner of the changing fact. 3. Identify the evidence supporting the new claim. 4. Update the smallest required set of current documents; prefer links over duplicating volatile values. 5. Preserve dated historical evidence rather than rewriting old records to match current behavior. 6. Keep current state, roadmap, architecture, source workflow and code navigation in their separate document roles. 7. Run `npm run validate:docs`. 8. Run `npm run validate` as well when source/document-contract files changed. The optional [documentation plan template](../docs/templates/DOCUMENTATION_PLAN.md) is useful for larger changes and AI-assisted documentation work. ### Comments and source readability TeamForge does **not** require a target comment percentage. A high comment count can make code harder to maintain when prose merely repeats syntax or drifts away from tested behavior. Add comments when they preserve information that is difficult to express through names and structure alone, especially: - authority or state-ownership boundaries - trust/security invariants and fail-closed reasons - lifecycle, connection-epoch, concurrency, or shutdown rules - protocol/serialization compatibility constraints - path, hash, identity, activation, or environment checks that may look unnecessarily strict without context Prefer a short durable comment near the relevant boundary plus an automated test. Avoid narrating obvious control flow, duplicating large README sections inside source files, or adding comments only to satisfy a density metric. For AI/coding-agent readability, keep [CODEMAP.md](../CODEMAP.md) and [docs/SOURCE.md](../docs/SOURCE.md) accurate when a major responsibility moves between files. The current focused comment/readability review is recorded in [docs/AI_COMMENT_AUDIT.md](../docs/AI_COMMENT_AUDIT.md). ## AI-assisted contributions are welcome **Using AI does not make a contribution less welcome in TeamForge.** AI tools may be used for code, tests, documentation, translations, debugging, review, research, refactoring, or other parts of development. TeamForge itself has been developed with substantial AI assistance, so contributors are not expected to hide or apologize for using similar tools. Contributions are judged by their **correctness, safety, maintainability, testing, and usefulness** rather than by whether every line was typed manually. However, AI assistance does not remove contributor responsibility. If you submit AI-assisted work, please: - review the output before submitting it - understand the important behavior and assumptions as far as reasonably possible - test the change instead of submitting it only because it compiles - describe meaningful testing in the pull request - never paste credentials, private user data, private repository contents, or other secrets into an AI service without authorization - make sure you have the right to contribute any code, text, assets, or other material included in the submission - do not present unverified AI claims as confirmed technical facts - expect extra scrutiny for authentication, networking, file-writing, project-transfer, deserialization, update, or other security-sensitive code For substantial AI-generated changes, mentioning that AI was used in the pull request is encouraged for transparency, especially when it helps reviewers understand how the change was produced or verified. **AI disclosure by itself is not a reason to reject a contribution.** Automated or agent-generated pull requests are also welcome when a human contributor is willing to own the submission, respond to review, and help verify the result. Generated code should never be accepted solely because it looks plausible or passes a single happy-path test. ### Low-effort AI-generated submissions are not welcome AI use is welcome; **unreviewed, low-effort AI output is not**. TeamForge does not want contributions that are effectively a raw model response pasted into the repository with little or no human review, testing, understanding, or adaptation. This applies to code, tests, documentation, translations, issues, pull requests, security reports, and other project content. Examples that may be rejected include: - large generated changes with no clear problem statement or explanation - code the submitter has not meaningfully reviewed and cannot reasonably explain - speculative fixes submitted without reproducing or understanding the underlying problem - generated tests that do not actually verify the behavior they claim to test - documentation containing invented APIs, features, results, benchmarks, or other unverified claims - bulk refactors, rewrites, formatting changes, or generated files unrelated to the stated goal - automatically generated issues or pull requests posted in volume without useful human triage - security-sensitive changes presented without meaningful validation - submissions where review feedback is answered only by repeatedly regenerating content without investigating the actual problem This is **not a requirement to write everything by hand**, and it is not intended to exclude beginners. A small AI-assisted contribution that has been carefully checked and tested is far more valuable than a huge hand-written or AI-generated change that nobody has verified. What matters is that someone has put real effort into defining the problem, checking the result, testing important behavior, responding thoughtfully to review, and taking responsibility for the contribution. ## Licensing of contributions By intentionally submitting a contribution for inclusion in TeamForge, you agree that your contribution may be distributed as part of TeamForge under the **GNU Affero General Public License version 3 (AGPLv3)** together with the reasonable attribution/origin terms described in [NOTICE](../NOTICE), to the extent those terms lawfully apply. You retain credit for your own contribution. TeamForge does not ask contributors to pretend that somebody else wrote their work. If you do not have the right to submit code or other material under these terms, please do not submit it. ## Project origin and attribution Forks are welcome. Renaming a fork is allowed. Commercial use is not prohibited by TeamForge's chosen open-source license. However, please preserve accurate project history. Do not remove the original TeamForge origin information and then present pre-existing TeamForge work as if a later fork author independently created it. See [AUTHORS.md](../AUTHORS.md), [NOTICE](../NOTICE), and [LICENSE](../LICENSE) for details. ## Be constructive Technical criticism, negative test results, and disagreement are welcome. Focus criticism on the software, design, evidence, and reproducible behavior rather than attacking contributors or users. --- # TeamForge Community & Support TeamForge is still an early project, so the community structure is intentionally kept simple. ## Where should I post? ### 🐛 Bugs and reproducible problems Use **GitHub Issues** and choose the bug-report form. A useful report includes what you were trying to do, reproduction steps, expected behavior, actual behavior, relevant logs or screenshots with secrets removed, and the exact TeamForge/Unity environment that was tested. When a problem occurs in the Windows Guest Launcher, **Save support bundle…** can create a local, bounded ZIP with default redaction. The bundle is not uploaded automatically and deliberately excludes raw local paths, raw endpoint addresses, access credentials, private keys, environment-variable dumps, Collaboration Invite contents, Project files, arbitrary process dumps, and unbounded logs. Review its `manifest.json` before sharing if your environment has additional privacy requirements. The ordinary **Copy diagnostics** action remains available for a smaller text summary. For a source checkout, include the Git commit when practical. For a packaged candidate, include the **product version, release ID, exact artifact filename, and SHA-256** when available. Product version alone does not prove that two reports used the same packaged bytes. See [`../release-contract.json`](../release-contract.json) for the source-controlled candidate contract and [`../builds/README.md`](../builds/README.md) for packaged-artifact identity rules. ### 🧪 Test results Use the **Testing report** issue form for results from trying TeamForge — successful tests are useful too. Please include the Unity Editor version, operating system/environment, what you tried, what actually happened, and the TeamForge identity described above. Use disposable or backed-up projects during experimental testing. A PASS applies to the exact source snapshot or packaged artifact that was actually exercised. Do not silently carry a result from an older candidate forward just because both builds use the same product version. For source-development validation, [Test Lab](../docs/TEST_LAB.md) provides named scenarios and makes external/manual evidence boundaries explicit. A Test Lab `INCOMPLETE` result is not a failure, but it is also not a PASS for the missing Unity/release/field lane. ### 💡 Ideas, questions, and project direction Use **[GitHub Discussions](https://github.com/Eun-si123/teamforge-unity-collab/discussions)** for open-ended community conversation. Discussions are a better fit than Issues for questions, brainstorming, workflow ideas, feature conversations, polls, and general project feedback that is not yet a specific reproducible bug or implementation task. If you have a concrete feature proposal, the **Feature request** issue form is also available. ### 🤝 Contributing See [CONTRIBUTING.md](CONTRIBUTING.md). Testing, bug reproduction, Unity/C# review, networking review, security review, documentation, UX feedback, translations, and code contributions are welcome. **AI-assisted contributions are welcome.** Contributors may use AI tools as part of development, review, testing, debugging, documentation, or other work. The contributor remains responsible for reviewing and testing what they submit. Please also follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) when participating in TeamForge community spaces. ### 🔐 Security vulnerabilities Read [SECURITY.md](SECURITY.md) before publishing potentially exploitable details. Please do not post credentials, access tokens, private invite data, private user data, or working exploit details in a public issue when doing so could put users at risk. ## Discord There is **no official TeamForge Discord server yet**. A Discord server may be created later if there are enough active testers and contributors for real-time chat to be useful. GitHub should remain the durable source of truth for code changes, bug reports, decisions, security guidance, and project history even if a Discord community is added later. If an official Discord is created, its link will be added to this repository. Do not assume an independently created server is official unless it is linked from the TeamForge repository. ## Community expectations Questions, mistakes, negative test results, disagreement, and criticism of the software are welcome. Please keep discussion focused on the project and treat other contributors respectfully. Technical disagreement is useful; personal attacks are not. See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for the project-wide community standards. --- # Unity TeamForge package This Unity Editor package provides TeamForge's Editor-facing realtime collaboration, Host flow, diagnostics/recovery UX and supported same-Scene collaboration behavior. This module README describes **package behavior and boundaries**, not current release readiness. Use [`../../docs/STATUS.md`](../../docs/STATUS.md) for live readiness and [`../../release-contract.json`](../../release-contract.json) for exact Unity/protocol/runtime selections. ## Host workflow Open **Window > TeamForge > Collaboration**, choose **Host**, save/review the Scene, and complete **Publish & Start**. Host Ready succeeds only after the backend returns a signed Collaboration Invite that contains separately validated Project-transfer and realtime-session contracts. The ordinary signed Collaboration Invite does not contain the access code, private key or local absolute Project path. By default the code is shared separately. **Optional source-only UI:** after Host Ready, “Copy invite + code (sensitive)” requires explicit confirmation and copies a *separate plaintext clipboard envelope* that contains the signed invite plus a **reusable** Server access code. The Guest Launcher offers “Paste invite + code…” with its own warning. This is not single-use, encrypted, or expiring; do not publicly distribute or save it. Ordinary invite exports remain code-free. See [How TeamForge works](../../docs/HOW_IT_WORKS.md). The advanced realtime-only Session Invite is for an already-provisioned matching Project and is not a fresh-Guest bootstrap value. ## LAN endpoint policy For two PCs: - **Host address (Guests connect here)** is the concrete Host LAN/VPN origin reachable from each Guest; it is not the Guest machine's IP; - **Coordinator listen address** is a separate local bind; - non-loopback listening requires authentication according to current policy; - wildcard/unspecified/loopback addresses are not valid advertised remote Guest destinations. Explicit same-PC mode may use loopback. **Current source Host onboarding:** If no code is configured for a LAN listener, Start Collaboration offers to generate a unique 256-bit code **after explicit confirmation**; previously configured codes are preserved. Manual connection settings provide masked reveal, explicit clipboard copy and confirmed regeneration while Host is stopped. Host network-address selection lists active IPv4 adapters (including VPN adapters) alongside optional default-route discovery. A selected address is merely a **local candidate**, not proof of remote Guest reachability. Trusted-LAN no-code mode and *scoped/expiring* one-paste capability invites are **not implemented**; the optional plaintext share above is deliberately distinct. **Source-only Host diagnostics** show the bounded stage of a failed Host commit in current technical details when reported by the Host bridge. The original error code and underlying message remain visible. The stage distinguishes where startup stopped, not why the network failed. Existing r8 packages and Windows two-PC validation are unchanged. See STATUS and exact release artifacts before attributing these controls to any packaged build. TeamForge does not currently provide automatic Internet peer discovery, NAT traversal or relay. Current connectivity boundaries belong to [architecture.md](../../docs/architecture.md) and [STATUS.md](../../docs/STATUS.md). ## Guest / Project transfer boundary Fresh packaged Guests use the standalone Windows Guest Launcher. Generated packaged Launcher/Runtime output is intentionally not committed as normal source. The packaged Launcher/Host path uses a manifest-pinned verified Runtime. Normal Guests do not need to install system Node/npm or operate the Project Peer CLI manually. Project payload bytes move directly between Project Peer processes. The TeamForge Server carries realtime authority and signed Project coordination metadata rather than Manifest/File/Chunk payload bytes. Owner/Publisher identity, signed invites/descriptors, hashes, staging, immutable activation and final Unity handoff are fail-closed trust boundaries. ## Opt-in live Scene View camera follow (source-only, unverified in a packaged release) In **Window > TeamForge > Advanced > Team Members**, choose **Follow Camera** next to a teammate. The local Scene View mirrors that teammate's currently advertised camera pivot, rotation, zoom and orthographic mode while following. The feature is explicitly local and read-only; it neither controls the other Editor nor changes Scene objects, transforms, locks, project files or Server authority. The ordinary **Go to Camera** one-shot action remains available. Follow accepts only valid Presence data from the current authenticated connection, the same saved Scene GUID and the same specific teammate connection. It stops on disconnection, peer reconnect/leave, missing camera, Scene/Editor mode change, stale Presence or local Scene View interaction. **Esc**, clicking/dragging/scrolling in Scene View, and the visible **Stop** control all disengage it. While following, TeamForge does **not** re-advertise the copied camera as the local user's own camera, to prevent mutual-follow feedback loops. The server protocol and trust contract are unchanged. This source feature still requires Unity Editor integration testing and is not implicitly included in the currently published candidate ZIP. ## Hierarchy / identity boundary Supported same-Scene GameObject create/delete/rename/reparent/sibling-order operations are authoritative collaboration operations. Saved Scene objects use stable Unity identity; session-created objects use TeamForge logical identity after authoritative binding. Name, hierarchy path or sibling index must not silently become authority fallbacks when identity is ambiguous. General Component/Inspector/Prefab/Asset synchronization and cross-Scene structural collaboration are separate future surfaces and must not be inferred from supported Hierarchy behavior. ### WP6 exact saved Component lookup (source-only prerequisite) The Editor-only `TeamForgeWp6ComponentIdentity` helper can capture and round-trip-resolve an exact **saved Scene** `BoxCollider` or `SphereCollider` using its canonical Unity `GlobalObjectId`, owning GameObject identity, Scene GUID and exact built-in Component type. Two Colliders of the same type on one GameObject remain distinct regardless of Inspector ordering or extra Components. Deleted, unloaded, unsaved, forged-owner, forged-type and Prefab-backed identities are rejected instead of falling back to type/index. The opt-in local read-only Inspector probe now checks this exact resolution before reporting any property observation. **This is not authorization or Component synchronization.** The resolver does not prove Project trust, an authoritative Hierarchy baseline, Session revision, lock ownership, a signed source snapshot or write permission. No Component/Inspector values are applied, no Undo or Scene writes occur, and there is no new server packet or public runtime capability. Actual live WP6 write operations require separate end-to-end authority, reconciliation and physical two-Editor validation before rollout. ### WP6 bounded local saved-Scene Collider inventory (source-only) Built on the exact-ID helper above (PR #506), `TeamForgeWp6SceneInventory` observes **every supported BoxCollider/SphereCollider** in one saved, loaded Scene, including duplicate same-type Components and inactive children. The complete allowlisted set is returned in canonical Component-ID order, with exact owner/Scene IDs, typed local `SerializedProperty` observations and an explicit local dirty-Scene marker. Unsupported Component types are not inventoried. Unsupported Prefab Colliders, invalid properties, duplicate IDs, an altered Scene or resource ceilings cause the **entire** capture to fail, not a partial "synchronized" snapshot. Hard caps: 4,096 traversed GameObjects and 512 allowed Colliders per capture. This opt-in developer-facing in-memory helper is **not** automatically run, persisted, broadcast, compared with server authority, accepted as a trusted Project baseline or applied to any Scene. It does not add live Inspector synchronization; authenticated, revision-checked baseline seeding and safe reconciliation remain next WP6 milestones. ### WP6 loaded Scene and signed source-byte consistency (Editor-only) `TeamForgeWp6LoadedSceneSource.TryCapture` is a narrow, **read-only** bridge for the complete saved-Scene Collider inventory above. Given an expected Scene asset path/GUID, Scene SHA-256 and .meta SHA-256 from a separately verified Project source, it requires that the **currently active** loaded Scene is saved, clean and exact-ID-matched. It checks the regular Scene/.meta file byte budgets (128 MiB/64 KiB), rejects redirected directories under Assets through the Scene parent, hashes the saved Scene and .meta before collecting every **allowlisted** BoxCollider/SphereCollider, and hashes both again afterward. A dirty or changed Scene, different active Scene, wrong GUID, changed file bytes, missing metadata, or a malformed/uninspectable allowlisted Collider refuses the **entire** result. Other Collider types (including MeshCollider) are **excluded from the inventory**, not rejected merely for existing; a successful capture does not prove their absence or synchronization. It never opens/reloads another Scene, saves files, applies Inspector values, creates Undo records, calls a Server or signs an approval. The input hash is an **expectation**, not internally authenticated Owner/Publisher evidence: the caller must first establish the signed published Scene/.meta source via the separate Project Peer check in PR #511 and bind it to the correct active Project. Matching file hashes/clean Scene is a *consistency observation*, not proof that every in-memory serialized Component value was decoded from those bytes or safe to synchronize. A future independent Unity Scene content/value attestation, Publisher-approved observation, Server revision/lock and rejection/Undo contract remain required. The helper is source-only and is **not automatically enabled**. ### WP6 serialized Scene ↔ loaded Collider value witness (source-only) After exact identity, bounded Scene inventory and the active saved-file fingerprint gate, `TeamForgeWp6SerializedSceneWitness` adds an opt-in **read-only serialized-value check**. It loads at most **16 MiB** of a clean saved Unity **text YAML** Scene (UTF-8) whose GUID and both file hashes already passed `TeamForgeWp6LoadedSceneSource`, then compares all exact supported `BoxCollider`/`SphereCollider` YAML documents against the observed Unity `SerializedProperty` values. The matcher uses the Unity document class IDs **65/135**, canonical local `fileID` for every Component and owning GameObject, plus the owner's actual `m_Component` references. It verifies trigger/center/size or radius with exact finite float equality (no approximate Vector3 comparison). Scene files containing unknown or ambiguous serialized Collider structures, duplicate/missing references, PrefabInstance documents, unsupported direct Prefab bindings, or noncanonical YAML are **refused**, never treated as empty or partially synchronized. File hashes, clean active Scene and values are re-observed again after parsing; a changed observation causes the entire witness to fail. This intentionally supports only **small text-serialized Scenes with simple direct saved Colliders** and does not attempt a broad YAML deserializer, binary Scene parsing or Prefab override reconstruction. A successful match means these **specific allowlisted values** correspond to the expected current saved file under the stated checks. It does **not** prove every Unity Component/property matches, provide authority for remote edits, establish that the expected hashes came from the signed Publisher, or eliminate an adversarial concurrent file/reimport race. Actual Project/Publisher provenance and Server membership, revision, lock, Undo, replay and reconnect rules remain separate prerequisites before enabling WP6 writes. No network, Editor window or live default behavior is changed. ### WP6 direct local Project Peer source check (no pasted JSON needed) The same opt-in WP6 Recovery Preview Test Lab now includes **Run installed Project Peer locally and compare (read only)**. In a valid connected Project/Session with a clean saved active Scene and previously activated signed Project Peer storage, the button uses the existing TeamForgeRuntimeDiscovery resolver for a verified pinned Node/runtime backend. It executes the fixed Project Peer CLI operation wp6-scene-source with registered Project UUID, current saved Scene path/GUID, and the local TeamForgeProjects managed store. It does NOT accept arbitrary executable names, use a shell, start a new server, or forward authentication tokens or Owner signing material. The subprocess runs asynchronously, with a 15-second timeout, bounded output and no persistence of the JSON reference. Its result is immediately fed into the existing Editor saved Scene/Collider ↔ registered Project metadata comparison and never sent to the server. This is a LOCAL RUNTIME SOURCE MATCH at comparison time, NOT a remote cryptographically authenticated Session proof or remote Inspector/Undo/ACK. The earlier manual JSON comparison is retained for offline diagnosis. Older packaged runtimes without this Project Peer CLI fail closed rather than fetching or launching a different tool. A developer workspace fallback is available only when already explicitly configured for TeamForge runtime resolution. ### WP6 Project Peer Active source ↔ Unity Editor local comparison (Test Lab) The existing **WP6 Recovery Preview** Editor Test Lab now has a separate manual, read-only *local source comparison* section. An operator can run the real Project Peer \`wp6-scene-source\` CLI on the same machine's existing signed Active Project and paste its redacted JSON summary into the in-memory Editor panel. Clicking **Compare local source to current Editor Scene** first checks the currently connected Project Coordinator/Session metadata, then reuses the exact saved Scene YAML ↔ loaded Collider witness from #513/#521 and checks the full Scene path/GUID, .unity and .meta SHA-256, Project UUID/ID, Manifest/Descriptor hashes and Owner/Publisher IDs against that reference. It rechecks the Project pin and saved/loaded Scene once more before displaying the result, rejecting a changed Scene or Baseline. No Scene, Editor Undo or WebSocket request is issued by the comparison. **Important:** pasted JSON is user-controlled and NOT signed to the connected Session, even if generated by a local Project Peer that itself verified an approved Active Manifest. The only successful status is **LOCAL REFERENCE MATCH — origin NOT authenticated**. No user-reported value becomes a trusted source signature, a Server ledger/lock, an authorized remote Inspector write or a post-apply ACK. Failure is local-only and does not disconnect Presence/Transform. The report text stays in this EditorWindow memory only and is cleared on closing the window. Read [WP6 local comparison decision](../../docs/work-state/WP6_EDITOR_ACTIVE_SOURCE_COMPARISON_2026-11-09.md). ### WP6 real read-only recovery request: local saved Collider-source gate The existing **opt-in Test Lab** at `Window/TeamForge/Test Lab: WP6 Recovery Preview` now runs `TeamForgeWp6PreviewSourceGate.TryCaptureForReadOnlyPreview` before it constructs or queues the actual metadata-only `component_recovery_preview_request`. This is a real Editor connection-path check, not a production Component write. It requires the exact clean loaded active Scene GUID, bounded nonredirected .unity/.meta files with the correct on-disk metadata GUID (not just AssetDatabase's cached GUID), and a complete exact BoxCollider/SphereCollider Editor SerializedProperty ↔ saved Unity YAML witness. Wrong Scene, dirty Editor, changed on-disk YAML, changed/duplicate metadata GUID, unsupported Prefab or large Scene data fails **before a request is sent**. The wire contract and explicit two-sided feature opt-in are unchanged. No local Collider data or saved Scene hashes are transmitted; only the preexisting Scene GUID/revision/digest request is sent. The server cannot independently verify the Editor file or apply state through this local check, and its recovery response is never applied as Inspector/Undo data. A follow-up receive-side guard also snapshots the current published Project Coordinator Baseline's UUID, revision, manifest/descriptor hashes, Owner/Publisher key identities and Server connection/Session ID together with the local source check. The cached read-only revision and server digest may be reused only while both file hashes AND this Project pin still match. On receipt, the Editor **re-runs the whole local SerializedProperty ↔ saved Scene witness and current Project pin check**. A late but correlated reply for an edited Scene or replaced Project is displayed as `STALE`, discarded without cache updates or a false `UNCHANGED` result, and does not disconnect Presence/Transform peers. A published, matching Project baseline and Project Transfer capability are now required for this additional Test Lab diagnostic. This compares authenticated-channel *registry metadata* in the Editor, not the Ed25519 validity of the Publisher signature or a verified Scene-file inclusion proof. This experiment is separate from #519/#520's offline signed-Project/server-seeding prototypes. A real authenticated live Editor-origin evidence and remote apply protocol remains unimplemented. ### WP6 bounded Undo-capable Inspector **local test** (source-only) `TeamForgeWp6LocalInspectorApply` exercises the previously missing **Unity write + Undo + reject/replay** boundary for one exact `BoxCollider` or `SphereCollider` field. Its `TryBeginForLocalTest` requires the signed-source *expectation* to be locally consistent with a clean, saved, direct-Collider text Scene and its actual serialized YAML values (the read-only gates above). `TryApplyForLocalTest` then revalidates the entire observed Scene, the exact Component/owner `GlobalObjectId`, the narrow `SerializedProperty` path/type/range and consecutive local base/server revisions. Only after every check does it write one supported property through Unity `SerializedObject`, with one named Undo group, and reread the precise resulting delta. If the write does not yield the expected result it attempts to revert its own Undo group. A successful preview is **single-use**; identical replays are acknowledged only while the actual complete Collider after-image still matches. Undo or subsequent edits invalidate that acknowledgement and require recapture. **Never use this as an authenticated Server command.** Test code can freely construct the proposed applied record and expected source/revision; this preview DOES NOT validate signed Session authorization, verified Project identity, remote lock ownership, Server replay/idempotency, member identity or a trusted Publisher handoff. It is an opt-in internal EditMode-test entrypoint, not wired into Server WebSocket dispatch, Editor collaboration menus, normal project operation or the public release. It does not save the Scene, broadcast anything, or silently rebase conflicts. One local edit dirties the Scene, so a new verified baseline is required before beginning another local-preview operation. This local test is separate from the M1 Collider collaboration path in `Editor/ComponentSync`. See [current status](../../docs/STATUS.md) for capability and validation evidence, and [source operation](../../server/README.md#m1-collider-collaboration-explicit-source-operation) for the actual collaboration window and Coordinator setup. ### WP6 read-only Scene inventory comparison (source-only) Following the bounded complete Collider inventory, the experimental `TeamForgeWp6SceneComparison` compares **two observed snapshots of the same saved Scene GUID**. It reports exact supported Component IDs as added, removed or property-changed, with only the allowlisted changed property **paths** (not the values). Results are sorted by canonical Component ID and do not depend on Hierarchy traversal or Inspector ordering. Both snapshots are rechecked for duplicate IDs, owner/Scene/type consistency, three correctly typed and bounded Collider properties, and dirty-state consistency; any invalid input or conflicting owner/type aborts the entire comparison. Property vectors use exact component-wise comparisons, not Unity's approximate Vector3 equality. A difference is **not** a proposal to synchronize, delete or overwrite a Component. Dirty snapshots remain explicitly flagged as unverified local observations. No socket messages, Server revisions, Undo, Inspector writes, Scene changes or Project mutations are triggered. Before a real WP6 property write can be enabled, the Server must independently validate signed Project provenance, owning Hierarchy identity, authenticated session/lock/revision and replay/rejection semantics. ### Experimental WP6 Inspector read-only probe (source only) `Editor/ComponentProbe/TeamForgeWp6InspectorProbe.cs` is an isolated, **not runtime-connected** testable Unity Editor helper. For a loaded saved Scene with verified GlobalObjectIds, it can locally observe exact serialized values for `BoxCollider` (`m_IsTrigger`, `m_Center`, `m_Size`) or `SphereCollider` (`m_IsTrigger`, `m_Center`, `m_Radius`). Readings use explicit types and small bounds (vectors per axis and radii/sizes within 100 Unity units); a missing, unsupported or out-of-range field causes the **entire** observation to fail. Values and Scene dirtiness are captured as an in-memory preview; no network, Undo, Editor mutation, Session revision, lock, approved baseline, or write permission is implied. Prefab source/components and session-created logical IDs are not supported by this prototype. Unity EditMode tests exercise only the offline probe. The immutable packaged r8 does not include this source change and the field gate remains open. Rejected rename/reparent/sibling-order changes restore only the exact live authoritative target; recovery preserves other objects, Component data, selection and unrelated Undo. Reparent recovery uses the latest observed server Transform. It does not traverse the global Undo stack. When safe target recovery is unavailable, including rejected deletion, unverified creation, missing identity/parent or an unsupported Prefab context, Hierarchy processing pauses and readiness is reported as partial. Review and preserve local changes, use manual Undo where appropriate, then disconnect/reconnect to obtain a fresh authoritative snapshot. Recovery does not fabricate saved objects or discard local Component data to get past a conflict. ## Diagnostics and recovery Diagnostics/recovery UX should explain failures and offer state-driven recovery actions without bypassing: - invitation/signature validation; - stored Project/Owner/Publisher trust; - Project staging/activation verification; - Scene/baseline checks; - authority/identity rules. A recovery button is not permission to force unknown local state over authoritative state. ## Windows path-resilience boundary The packaged Windows flow can use a TeamForge-owned short execution path when the platform/filesystem policy can prove the expected canonical Active Project identity. Path shortening is an execution detail. It must not weaken managed-destination containment, Runtime integrity, Project trust, immutable Active verification or final Unity handoff checks. Arbitrary external reparse/symlink/junction paths are not implicitly trusted because a narrow TeamForge-owned execution alias is supported. ## Settings / secrets Project-local user settings live under `UserSettings` according to the package implementation. Credentials/access secrets are not intended to be embedded into Collaboration Invites or Project descriptors. Remove secrets/private paths from logs before sharing diagnostics publicly. ## Validation Package behavior is covered by Unity EditMode and real-server E2E paths in the repository, but each result applies only to the exact scenario and source revision exercised. Do not infer physical two-PC Windows field closure from EditMode/CI results. Current validation and release effects are tracked in [`../../docs/STATUS.md`](../../docs/STATUS.md). --- # TeamForge Server The TeamForge Server is the authoritative realtime/session coordinator and signed Project-metadata coordinator. This module README describes **server responsibilities and source operation**, not current release readiness. Use [STATUS.md](../docs/STATUS.md) for live readiness and [`release-contract.json`](../release-contract.json) for exact runtime/protocol selections. ## Responsibilities The server owns: - HTTP health and WebSocket hosting; - authentication for configured listeners; - in-memory Presence/session membership; - shared Revision ordering; - Transform and supported Hierarchy authority; - lock/lease ownership; - bounded replay/idempotency/tombstone state; - signed Project/Owner/Publisher/Baseline/Peer metadata coordination. The server does **not** own: - Project Manifest/File/Chunk payload storage; - Project payload relay; - Unity filesystem activation; - automatic Internet discovery/NAT traversal/relay. Project payload bytes move directly between Project Peer processes. The optional M1 admission path reads an operator-selected existing Project Peer store to verify signed Scene bytes; it does not serve or relay those bytes. ## Developer commands ```powershell npm.cmd --prefix server ci --ignore-scripts --workspaces=false npm.cmd --prefix server test npm.cmd --prefix server run smoke npm.cmd --prefix server start ``` Use [`../release-contract.json`](../release-contract.json) for the exact supported developer Node range, bundled Runtime selection and production dependency versions rather than copying them into this README. ## Listen and authentication Direct source execution reads: - `TEAMFORGE_HOST` — bind host, default `127.0.0.1`; - `TEAMFORGE_PORT` — listen port, default `5080`; - `TEAMFORGE_AUTH_TOKEN` — shared Bearer access code; - `TEAMFORGE_HEALTH_PATH` — default `/health`; - `TEAMFORGE_WS_PATH` — default `/ws`. The packaged Host flow keeps the local bind address separate from the concrete Guest-reachable advertised address. Wildcard addresses are bind values, not remote Guest destinations. A non-loopback listener requires authentication according to current policy. The shared access-code model is intended for a trusted team/LAN/VPN environment, not an untrusted public-Internet identity system. ## Authority / state boundary - Session authority and Project Coordinator registries are memory-resident during operation. Opt-in M4 recovery stores committed Session state and its signed Project publication record in SQLite. - The Session Authority core owns collaboration transitions; the socket host should execute effects rather than duplicate authority rules. - The Project Coordinator carries signed metadata and coordination state, not Project payload bytes. ## Networking boundary Current Project Peer payload transfer requires direct peer reachability. The Server does not imply or provide WebRTC, ICE/STUN/TURN, relay, discovery, NAT traversal or automatic transport fallback. See [architecture.md](../docs/architecture.md) for the complete topology and authority/trust boundaries. ## M1 Collider collaboration: explicit source operation Use the same source revision on the Coordinator and both Editors. Publish and approve the saved non-Prefab Scene through the existing signed Project Peer flow first. The Coordinator must have local read access to **that Publisher's managed Project store**. Its filesystem path is operator configuration, never a client-supplied wire field. For a source Coordinator on Windows PowerShell: ```powershell $env:TEAMFORGE_COMPONENT_PROPERTY_SYNC = "1" $env:TEAMFORGE_COMPONENT_PROJECT_ROOT = "C:\TeamForgeProjects" npm.cmd --prefix server start ``` Choose the actual existing managed store, and retain the usual listen/auth configuration for LAN operation. The feature defaults off; an enabled feature with a missing/nonabsolute store fails at startup. These options also reach the existing authenticated lifecycle child; no new server deployment is performed by the source change. In each source Unity Editor: 1. Open **Window → TeamForge → Collider Collaboration**, enable **Enable when connecting** while disconnected, then connect to the same signed Project and Session using the existing TeamForge connection flow. 2. Open the saved Scene containing direct BoxCollider/SphereCollider Components and choose **Join active Scene / reconnect**. The first admission requires a clean saved Scene matching the actual signed stored `.unity`/`.meta` bytes. 3. Select the owning GameObject and acquire its normal TeamForge lock. Edit Is Trigger, Center and Size/Radius repeatedly in the Inspector. Subsequent edits do not require saving. Finite Center values are bounded to ±100; Size/Radius are bounded to 0–100. 4. Use **Undo my shared edit / Redo my shared edit** for conditional own compensation. A newer edit to the same property prevents compensation. 5. After a rejection or reconnect, review the recovery inbox's local/shared values, select/acquire the target and explicitly resubmit or export/discard. The bounded project `Library` recovery file preserves unconfirmed values across domain reload/reopen; it is not durable server/session storage. `supportsComponentPropertySync` negotiates this path independently of future structure sync. Messages are `component_scene_join`, `component_property_set`, `component_snapshot_request`, `component_apply_report` and the corresponding snapshot/applied/rejected/report-ack responses. They carry exact IDs, request and operation IDs, shared revision, epoch and source pin; properties retain native JSON boolean/number/vector values. The portable SHA-256 snapshot digest binds source, epoch, revision and typed rows with binary32 numeric encoding; it checks response consistency, not a new Publisher signature or disk-save attestation. The server still checks authenticated membership and current GameObject lease on writes and uses the common operation history for retries. Current M1 is one Scene per Session, at most 128 retained in-memory Sessions, 512 Colliders and 1536 properties, with bounded common replay history. Peers must negotiate and join the Scene before editing it. Add/remove and deletion of an admitted Collider owner or ancestor are refused until M2. Saved runtime values may differ from the original signed Scene when rejoining an existing ledger with the same exact Component identities. A restarted server cannot recover those commits until M4. Current Unity/package/field evidence is in [STATUS](../docs/STATUS.md); Node peer tests are not two-Unity proof. While a Project retains an M1 ledger, publishing a different baseline is refused with `component_checkpoint_required` and existing shared edits remain available. An explicit Project checkpoint/refresh transition belongs to M5. ## M2 shared Collider add and remove Set `TEAMFORGE_COMPONENT_STRUCTURE_SYNC=1` alongside the property setting and managed store above. In each Editor, enable **Enable shared add/remove** in **Collider Collaboration** before connecting. Editors need the structure capability and must join the Scene before acquiring edit authority. A clean signed Scene can initially contain zero Colliders. When joining an existing structure Session for the first time, open the clean signed Scene before connecting. The Editor records its saved source before the Hierarchy snapshot applies and verifies that the saved files still match when you join Collider collaboration. Select and lock a GameObject, then choose **Add shared BoxCollider** or **Add shared SphereCollider**. The server commits the structure change and each joined Editor applies it. Use the shared Component list to remove the intended Collider. Each addition gets its own identity, including multiple Colliders of the same type on one GameObject. Save the Scene to retain the local objects across reopen. TeamForge stores the mapping to their local saved IDs in the project's Library. Use **Undo my shared edit / Redo my shared edit** for conditional own changes. If a newer edit prevents compensation or acceptance is unconfirmed, review the status and recovery inbox after synchronizing again. To delete an owning GameObject through Hierarchy collaboration, remove its shared Colliders first. Unity can refuse an exact removal when a local Component requires that Collider. The Editor reports the conflict and preserves local state for reconciliation. ## M3 shared Cube and Sphere Set `TEAMFORGE_PRIMITIVE_TEMPLATE_SYNC=1` alongside both Collider settings and the managed signed Project store. In each participating Editor, enable **Enable shared Cube and Sphere** in **Collider Collaboration** before connecting. This path uses the Built-in Render Pipeline and a saved Scene outside Prefab Mode. Editors that participate in Hierarchy or Transform collaboration must negotiate the shared primitive capability on this server. Join Collider collaboration in the active Scene and choose **GameObject → TeamForge → Create Shared Cube** or **Create Shared Sphere**. When the Coordinator accepts the operation, each Editor applies the built-in Mesh and Renderer and the exact shared BoxCollider or SphereCollider. Use the usual GameObject lock to move the object or edit its Collider. A late join or reconnect reads the same shape and current Collider catalog. Save the Scene to retain the local objects across reopen. Lock a shared primitive and use **GameObject → TeamForge → Delete Selected Shared Primitive** to remove its GameObject and shared Colliders in one revision. A subtree with shared Colliders on ordinary GameObjects still requires those Colliders to be removed first. The catalog also supports removing an individual Collider without deleting the visual object. Shared primitive templates use Unity's built-in references. Current verification and package status are in [STATUS](../docs/STATUS.md). ## M4 Coordinator restart recovery Set `TEAMFORGE_DURABLE_SESSION_DB` to an absolute path on the Coordinator's local disk and set `TEAMFORGE_COMPONENT_PROJECT_ROOT` to the approved managed Project store. Use one running Coordinator per database. Enable the desired Collider and primitive capabilities before the first Session and keep them enabled when reopening their saved state. Approve the signed Project from the normal Host flow, then join its Session with compatible Editors. Reconnect after approval if the Editor opened before the managed publication was ready. Shared writes store their current state and operation result in one SQLite transaction before the Coordinator reports acceptance. The configured database and Project store are needed to reopen the same Session after stopping or restarting the Coordinator. Every restart assigns a fresh authority epoch. Editors join again and acquire fresh GameObject locks. The shared Hierarchy, Transforms, Collider values and logical identities resume from the last committed checkpoint. Save the Scene in Unity to persist its local native state. Use Collider Collaboration to review unconfirmed values before resubmitting them. A storage failure closes editing connections and preserves the previous recoverable checkpoint. The Coordinator reports incompatible or corrupted state before listening. Open **Window → TeamForge → Session Recovery** to review a preserved local Transform alongside the confirmed pose for its exact GameObject. Restore the shared pose for that target, acquire its current TeamForge lock, and resubmit the reviewed local pose. A changed shared revision requires another review. The Project Library retains the intent until its desired pose is confirmed or you explicitly discard it. The **Hierarchy names** section in **Session Recovery** can also preserve an unconfirmed rename of an existing shared GameObject. Compare the local name with the current shared name, restore the shared name on that object, then acquire its current lock and resubmit the reviewed name. This workflow needs support negotiated by both the Coordinator and Editor in a durable Session. The archive is local to the exact signed Project and durable Session lineage. The same window can preserve a pending move of an existing shared GameObject to a different parent in the same saved Scene. Review the saved destination, sibling position and local pose alongside the current shared placement. Restore the shared placement on the exact object, acquire its current lock and resubmit the reviewed move once both sides negotiate reparent recovery. A missing or replaced parent, a competing lock or a changed shared revision requires further review. Save the Scene to keep the resulting native placement on disk. When the Coordinator and Editor negotiate sibling order recovery, **Session Recovery** can retain a single unconfirmed move among the roots of a saved Scene or the children of one shared parent. Compare the saved and shared order, restore shared order if needed, acquire the moved object's current lock and explicitly resubmit. The operation preserves local poses. If the shared group changed since capture, the saved order remains available for manual review. ## Disconnected WP6 Component identity experiment `src/component-foundation.mjs` validates canonical saved Scene Component GlobalObjectIds before the separate structural/property candidate validators. It requires identifier type `2`, a non-null Scene GUID, a nonzero local file ID and canonical decimal local/prefab IDs within Unity's unsigned 64-bit range. It preserves full file-ID precision as strings; null/asset IDs, leading zero aliases and overflowing values are refused rather than normalized. `src/component-operation-preflight.mjs` separately classifies structural and typed property retries in the Session-wide operation-ID namespace. Property identity includes the exact path, kind and value; Vector3 axis order is canonical and JSON numeric zero semantics are preserved. A matching fingerprint also needs a complete, consistent hypothetical applied record; no ACK is returned. `src/component-authority-preflight.mjs` checks current registered membership, the prepared baseline and exact policy, and an owned unexpired Scene/GameObject lease for new candidates. A replacement connection needs its own authoritative lease. These read-only checks reserve nothing and cannot commit an edit. `src/component-property-foundation.mjs` can also prepare a same-Session frozen typed property snapshot and inspect one exact target. Snapshots reject duplicate Component/path records and apply explicit count policy plus prototype ceilings of 2,048 records and 256 KiB canonical UTF-8 bytes. Target lookup revalidates the current revision, owner and typed policy; it never substitutes another property or returns a repair message. Values remain local prototype test data, not a live authoritative seed. See `test/component-property-snapshot.test.mjs` for byte/count, identity, immutable-value and target-isolation evidence. The same module can compare two genuine snapshots prepared for the identical Session, revision and Component baseline, reporting immutable changed and observed-only records. This comparison rechecks current owner and typed policy; absence in one partial observation is not deletion, and comparison is not a cross-revision repair, network ACK or Unity operation. The same disconnected module additionally supports a **three-way observation** of one locally prepared baseline plus independent local and remote observations from the exact same Session, revision and Component baseline. It reuses the pairwise owner/policy/identity checks, reports immutable `observedLocalOnly`, `observedRemoteOnly`, `observedConvergent`, `observedDivergent` and `observedIncomplete` records, and counts unchanged properties. **Missing** properties are incomplete evidence, not deletion. Even 'convergent' is an observation, not permission to commit, ACK, merge, repair or perform an Inspector write; future runtime authority and Unity reconciliation remain separate work. A separate **local-only** stateful experiment in `src/component-property-transaction.mjs` now models a bounded *atomic* property commit after a genuine same-Session prepared property seed. It requires an authenticated, currently registered writer holding a live Scene/object lock; known exact Component/property identity and typed policy; a current shared revision; and a new Session-wide operation ID. Only its own previously committed result can be replayed. It advances the shared Session revision and stores an operation history entry, while rejecting stale or externally advanced seeds, collisions and full history without evicting unrelated operations. Explicit retirement drops only the local simulator ledger; it retains committed Session revision/history and requires a fresh verified seed. A property cannot be introduced without a verified seed; values are cloned and snapshot size is bounded. Automated regression tests are in `test/component-property-transaction.test.mjs`. ### WP6 complete saved-Scene Collider observation gate (local-only) `src/component-collider-completeness.mjs` adds a strict gate ahead of the existing **local simulation**, not a general-purpose source of truth: `inspectCompleteSavedColliderObservation` checks that a genuine same-Session, same-revision prepared Component identity baseline has **one exact, complete set** of three typed `SerializedProperty` observations for **every** supported saved `BoxCollider`/`SphereCollider`. It rejects unknown Component types, non-Scene or Prefab-backed IDs, missing Scene/owner membership, missing/extra/incorrect property paths, broad-but-insufficient prototype policies, negative sizes/radii, nonfinite/out-of-range values, duplicate or absent observations, 512+1 supported Components and cross-Session or stale clones. The result contains bounded counts and existing canonical fingerprints, not any claim that a network peer supplied verified project bytes. A separate `seedCompleteSavedColliderTransactionForLocalTest` only enters the previously isolated simulator **after** that check passes; the older generic simulator API is unchanged for other experiments. This is a **completeness** predicate, not Publisher-signature attestation, saved Unity Scene file provenance, Editor authorization, wire dispatch or live Inspector mutation. In particular, passing it does not prove the prepared observations reflect a real Project. No new packets, locks, revisions or Unity edits are enabled. See `test/component-collider-completeness.test.mjs` for both negative and local commit-simulation evidence. ### WP6 Ed25519 Publisher approval of a complete local observation (source only) `src/component-publisher-observation-approval.mjs` extends the **strict** complete local Collider gate above with a narrowly scoped Publisher **approval signature**. For a server-owned active Editor connection present in both the Project Coordinator and realtime Session Authority registries, it re-verifies the currently registered signed Project Baseline Descriptor and Owner-authorized Publisher key. The signature is domain-separated and binds Project ID/UUID, Session ID, exact current connection ID, published Baseline revision and manifest/descriptor hashes, Scene GUID, realtime revision and SHA-256 of the already-prepared exact Component identity and property fingerprints. Ed25519 signatures must be canonical base64. Cross-Editor replays, cloned/malformed approvals, stale Baselines, altered observation values or Publisher keys fail closed. No property values or signing keys are included in the approved result. The result explicitly says `publisher_approved_local_observation_scene_bytes_unverified`. **Crucially, a signature is approval by a Publisher key holder, not proof that observed values match the signed Project manifest's actual Unity Scene bytes.** The Project Coordinator's manifestHash authenticates the published manifest, but does not itself bind an independently signed Collider fingerprint to a file's parsed Scene contents. This source-only helper neither sends nor receives a new protocol message, installs a trusted property transaction, writes a Component, persists credentials, starts Undo or grants authority. It has no automatic Unity editor signature producer. Tests use ephemeral generated test-only keys and registered in-memory Coordinator/Session fixtures; see `test/component-publisher-observation-approval.test.mjs`. ### WP6 Publisher-bound local Collider ledger lifecycle (source-only) `src/component-publisher-ledger-lifecycle.mjs` is a **strictly disconnected** experimental integration of the existing Publisher-signed **complete** Collider observation with the existing Session-authoritative **local** property transaction. It does not add a new server packet or claim real Unity Editor Scene-byte provenance. `beginPublisherApprovedColliderLedgerForLocalTest` accepts only the genuine prepared same-Session identity/property snapshot, currently registered real Project Coordinator and realtime Session Authority connection, current Owner-authorized Publisher Ed25519 approval and bounded allowlisted property policy. After full verification, it seeds the existing local transaction *once* and returns an opaque WeakMap-backed handle. Cloned handles and invalid signatures cannot create or use a ledger. `commitPublisherApprovedColliderLedgerForLocalTest` rechecks the **current exact Project and realtime membership**, the signed Baseline revision/hash/Owner/Publisher pin, and current seeded Session ledger **for every operation**. A rotated/revoked Publisher/Baseline, changed connection or unrelated Session revision is detected on the next inspection/commit or approved begin; that operation retires the stale local ledger and requires a fresh signed observation. A still-valid ledger cannot be silently replaced. Each seed has an opaque transaction identity so a retired Publisher handle cannot operate on, or delete, an independently re-seeded ledger. The existing transaction retains ownership of the shared revision, per-object lock/expiry, typed target, operation history and matching replay. It returns the actual server-created applied record; a client cannot supply an `applied` receipt or force a new revision through this helper. Successful results explicitly expose `sceneBytesAttested: false`. An existing historical committed revision cannot be undone simply by deleting this *local* ledger: retirement removes its preview/seed state but leaves the Session history unchanged. `inspectPublisherApprovedColliderNextDeliveryForLocalTest` is the next **receiver-side delivery-order contract** in the same disconnected simulator. It accepts a current registered Project+Hierarchy-capable recipient connection object and a *caller-supplied known revision cursor*. The original Publisher/Project ledger is revalidated for every read. The function emits **at most one** exact server-authored `component_property_applied` record for `knownRevision + 1`, using the original in-memory ledger's committed-record identity and current Session operation history. It never synthesizes a missing intermediate revision, rewrites the shared operation history, trusts a client-sent `applied` record or sends a WebSocket message. A missing/overwritten revision or an invalid cursor requests `resnapshot_required` rather than pretending the client is synchronized. Output is bounded to 8 KiB, tied to the recipient's active connection ID and pinned Project/Session/Baseline, and explicitly marks `sceneBytesAttested: false`. **Important:** a recipient saying it knows revision N is not evidence that its Unity Scene applied revisions through N. Neither the `publisher_bound_local_next_applied_unverified` result nor the `publisher_bound_local_delivery_current_unverified` status is a signed delivery receipt, a trusted ACK, or a command that may be applied to a live Unity Scene. Actual Editor source attestation, authenticated opt-in transport, post-apply verification, Undo, reconnect and recovery remain separate WP6 gates. `inspectPublisherApprovedColliderReceiverObservationForLocalTest` adds a bounded **full-state reconciliation classifier** in that disconnected simulation. The recipient must be the same exact registered Project/Session member as for ordered delivery, and the observation must be a private-registry-prepared, same-Session, same-revision **complete** saved-Scene Collider snapshot. It compares every exact Component/owner/property identity and typed value against the current server-created ledger (not just a peer-supplied digest or cursor). A missing or extra property, stale revision, changed project baseline or forged snapshot fails closed; changed values produce a mismatch count and `manual_reconcile_required`, **not** automatic overwrite. Exact equality reports `publisher_bound_local_receiver_observation_matches_unverified` with a deterministic server-ledger fingerprint and explicit `editorApplyVerified: false` / `sceneBytesAttested: false`. This remains an offline *simulation*. A malicious remote client could claim to have observed matching values, and a trusted same-process test can construct those prepared snapshots. A matching comparison never increments a receiver's cursor, records an ACK, proves Unity Undo/reimport state, or enables a network Inspector write. Real post-apply success requires a separately authenticated Editor/source evidence channel and reconnect repair logic. Do not wire this helper into WebSocket or Unity Inspector apply. Publisher approval by itself does **not** prove a Collider snapshot matches signed `.unity` Scene content; it does not bind the Project Peer source witness to this Session, or authenticate actual Editor delivery/Undo, lease epochs or reconnect. The implemented handle is **not a production security token**; it exists only inside disposable in-memory integration tests. See the publisher-observation test suite's lifecycle cases. ### WP6 signed Scene source ↔ Publisher observation *monorepo test bridge* The monorepo test-only helper `../scripts/wp6-source-approval-bridge.mjs` connects the two independently verified experiments for the first time. It does not accept a claimed Scene-file hash: it derives a current Server-owned Project/Owner pin, checks a current registered Publisher's signed complete Collider observation, then calls the **real Project Peer** signed Scene/.meta byte verifier against stored content-addressed chunks and rechecks Publisher/Session/Baseline authority after the asynchronous file reads. Success is explicitly `signed_scene_bytes_and_publisher_observation_same_baseline_values_unverified`. That result proves both pieces refer to the same signed Baseline and Scene GUID **not that their Collider property values correspond**: the latter still requires an authenticated Unity serialized-value witness. The helper is not imported by production Server runtime and does not create a WebSocket route or grant write permissions. See `test/wp6-project-source-approval-bridge.test.mjs` and `../docs/work-state/WP6_CROSS_SOURCE_APPROVAL_BRIDGE_2026-11-09.md`. This integration branch depends on both #511 (Project Peer) and #517 (Publisher-approved Server reconciliation). The follow-on offline-only Scene-value bridge `../scripts/wp6-signed-collider-value-bridge.mjs` goes beyond common file identity: it reads the *actual signed and verified stored* `.unity` bytes (max 16 MiB) and uses a narrow strict Unity text Collider parser to compare the whole allowlisted serialized Scene with the exact Publisher-approved complete property snapshot. Missing/changed/unsupported values or owners fail closed; signed negative local fileIDs are matched to unsigned `GlobalObjectId.targetObjectId` values. A positive result means **stored signed Scene values match signed Publisher observation**, but it deliberately reports `editorApplyVerified: false` and `networkWriteAuthorized: false`. No Editor-origin source/value attestation or real-time protocol is implemented. See `docs/work-state/WP6_SIGNED_COLLIDER_VALUES_2026-11-09.md`. The next test-only gate, `../scripts/wp6-source-gated-local-ledger.mjs`, combines the real signed stored Scene Collider-value check with the Publisher-bound local Session transaction. Unlike the older Publisher-only simulator, this **new entrypoint refuses to seed** the local component ledger unless the fully reconstructed signed Scene contains precisely the approved Box/SphereCollider values. A frozen WeakMap-backed handle exposes read, bounded commit, one-revision recipient delivery, full receiver comparison and explicit retirement; it never exposes the underlying internal ledger. All existing per-object lock, revision and replay checks stay in the Server's original transaction implementation. This remains a **separate offline test entrypoint**, not an update to the live Server protocol or a security claim about Editor-applied state. The flag `storedSceneValuesCheckedAtAdmission` describes only the initial stored file, not a continuously synchronized Unity Editor. Any actual remote Editor operation needs a separately authenticated current Scene/Undo/post-apply protocol. See `docs/work-state/WP6_SOURCE_GATED_LEDGER_ADMISSION_2026-11-09.md`. The `SessionAuthority` now also has explicit `*ForLocalTest` methods to exercise this transaction against an **actual registered Session** with Hierarchy seeding, a live Transform lock and the shared Session revision. The adapter checks active session membership and Hierarchy capability before committing; a normal Transform update invalidates an older Component view until an explicit retirement/reseed. These methods do not appear in `dispatch()` or the WebSocket routing table and emit no Component packets to connected peers. `test/component-session-adapter.test.mjs` tests the integration and negative compatibility/absence of an exposed operation. The separate `src/component-property-recovery-preview.mjs` provides a **read-only, local Session recovery preview** for a valid registered editor with Hierarchy capability. Its validated `SessionAuthority` entrypoint is `inspectComponentRecoveryPreview`. It is used by the **explicitly negotiated** read-only WebSocket preview handler, but has no generic mutation/seed dispatch command; default and legacy sockets never gain that read capability. A caller provides a canonical Scene, request ID, last observed revision and optional 64-character SHA-256 fingerprint. The preview returns a deterministic fingerprint and immutable known property observations; it omits repeated data only when both the revision **and** fingerprint match. Responses are bounded by a configurable UTF-8 byte ceiling (maximum 256 KiB). Unknown/replaced connections, non-Hierarchy peers, wrong Scenes, malformed requests and externally advanced Session revisions fail closed. These values come from a local experimental fixture seed and are **not a network-backed, authoritative late-join snapshot**, nor proof that a Unity client may apply them. Regression coverage includes matching retries, content mismatch, late read after a local commit, cross-user membership, revoked connections, hostile request shapes, size limits and unrelated Transform activity. ### Opt-in read-only Component recovery preview transport (source only) The WebSocket Server now exposes a narrow **read-only** request path solely for an explicitly enabled developer server and a Hierarchy-capable client that explicitly requests it. Production/default creation leaves it off. A source caller must pass `createTeamForgeServer({ enableComponentRecoveryPreview: true })`; there is **no environment variable, packaged default or automatic activation**. The client must also send `supportsComponentRecoveryPreview: true` in `hello` along with Presence, Transform and Hierarchy support. The Server returns `componentRecoveryPreviewEnabled: true/false` only for such an opt-in request; legacy Hello replies and existing `supportsComponentSync` / `supportsInspectorSync` spoofing semantics remain unchanged. After an accepted, negotiated Hello, a client may send exactly: `{ "type":"component_recovery_preview_request","protocolVersion":1, "requestId":"...","sceneId":"...","knownRevision":0, "knownFingerprint":"" }`. Server membership, field validation and a 64 KiB per-response limit are enforced before any reply. This real WebSocket route also checks the CURRENT Project Coordinator registration, exact connection and realtime Session, Project Transfer capability and cryptographically verifies the Owner/Publisher-signed Project Baseline and any Publisher delegation. Absent or tampered Project membership or Baseline is refused without dropping the healthy realtime connection. See src/component-recovery-project-gate.mjs and docs/work-state/WP6_SERVER_READONLY_PROJECT_PROVENANCE_GATE_2026-11-09.md. The signed Baseline does not attest any particular .unity file or prove a remote Editor applied a value. The read-only result uses type `component_recovery_preview` with status `local_preview_resnapshot` or `local_preview_unchanged`; denial is a normal correlated `error` message. The request is `unsupported_message` unless both sides opted in. **No Component/property seed exists in deployed socket sessions**: after the Project registration and signed Baseline checks, an opted-in request with no authoritative Hierarchy Scene seed returns `component_recovery_scene_unseeded`; after a legitimate Hierarchy seed, a request returns `component_transaction_unseeded`. Neither case may fabricate Inspector data or modify Unity state. No client can upload a trusted seed over the socket and no Component write or Unity/Undo operation is accepted. See `test/component-recovery-wire.test.mjs` for real WebSocket negative compatibility and explicit-opt-in coverage. ### One-time Project/Scene source freshness challenge (opt-in, *unverified*) For future WP6 Project Peer↔Editor provenance work, the **same already explicitly negotiated read-only Test Lab capability** permits a new bounded one-time **nonce freshness probe**. This is a real Server WebSocket path, not a production source-attestation or write route: - Editor sends exactly `{"type":"component_source_challenge_request","protocolVersion":1,"requestId":"...","sceneId":"0123456789abcdef0123456789abcdef"}` after both server and client opted in and registered a current Hierarchy+Project Transfer member with a cryptographically valid current Owner/Publisher signed Project Baseline. - Server emits `component_source_challenge` with a fresh 256-bit cryptographic nonce, the canonical Scene GUID, signed Project UUID/Revision/Manifest and Descriptor digest and an expiration timestamp. It stores one outstanding challenge per **exact current connection object** (15 second maximum) with the current Project/Session/Connection, realtime Session revision, Publisher/Owner key, delegation and Baseline signature pin. Duplicate outstanding requests are refused. - The requester may send exactly `{"type":"component_source_challenge_echo","protocolVersion":1,"requestId":"...","sceneId":"...","nonce":"64-lowercase-hex"}`. A same-connection, still-unexpired, same-Scene and same-signed-Baseline reply is consumed once, resulting in `component_source_challenge_echo_result` with status `same_connection_challenge_echo_unverified`. The Server burns a challenge before validating the presented nonce or current epoch: wrong nonce, expiry, replay, forged connection, Scene change or Owner/Publisher rotation cannot reuse that nonce. - This handshake is **a same-socket freshness echo only**. Neither a nonce nor its echo proves that a signed Scene file was loaded, that a trusted Project Peer generated evidence, or that Inspector values match. Every response states `sceneBytesAttested:false`, `editorApplyVerified:false` and `networkWriteAuthorized:false`. The Server **does not accept** Scene bytes, Collider observations, a client assertion of source evidence, a Component mutation, a post-apply ACK or Scene write through these message types. An explicitly opted-in Unity Test Lab client now also supports this nonce issue-and-echo handshake, with complete local saved Scene and Project rechecks before each response. This is still NOT verified Project Peer source attestation to the Server. All requests and negative tests live in `server/src/component-source-challenge.mjs`, `server/test/component-source-challenge.test.mjs` and real `server/test/component-recovery-wire.test.mjs`. Default feature remains OFF, and no environment variable silently turns it on. See `docs/work-state/WP6_LIVE_PROJECT_SCENE_CHALLENGE_2026-11-10.md`. The local-only adapters and read-only preview above remain separate from the M1 production admission path. Their fixture handles, format-valid IDs and nonce echoes cannot authorize M1 writes. Only the independently verified signed Scene admission and negotiated runtime ledger described above can do that. The identity check is format validation, not proof that an ID resolves to the claimed Component, owner or trusted project. A prefab-instance ID does not enable Prefab editing. Existing pre-wire classifiers cannot enable any Component write; the optional read-only recovery request does not mutate Unity or the Session. See [the feature roadmap](../docs/ROADMAP.md#approved-feature-milestones-continuous-collider-editing-to-project-collaboration) for the remaining authority, identity and reconciliation prerequisites, and [Unity's GlobalObjectId reference](https://docs.unity3d.com/6000.3/Documentation/ScriptReference/GlobalObjectId.html) for the native identity format. --- # TeamForge Project Peer Project Peer implements direct Project bootstrap/transfer and Host/Guest orchestration around TeamForge's Project trust, integrity, staging and activation model. This module README describes **Project Peer responsibilities and source operation**, not current release readiness. Use [STATUS.md](../docs/STATUS.md) for live readiness and [`release-contract.json`](../release-contract.json) for exact runtime/protocol/dependency selections. ## Core boundary Project payload bytes move directly between Project Peer processes over HTTP. They do **not** pass through the TeamForge Server/Coordinator. Project Peer owns: - signed bootstrap/Collaboration Invite validation; - Host and Guest orchestration bridges; - deterministic Project manifests and content hashes; - descriptor/manifest/inventory/chunk transfer; - retry/resume/source selection/failover behavior; - filesystem/path safety checks; - staging and verified immutable Active revisions; - explicit Project/Owner/Publisher trust checks; - final verified handoff information for the Launcher/Unity flow. It does not own realtime Scene authority or silently replace Project trust/identity because a transfer succeeds. ## Developer commands ```powershell npm.cmd --prefix project-peer ci --ignore-scripts --workspaces=false npm.cmd --prefix project-peer run check npm.cmd --prefix project-peer test npm.cmd --prefix project-peer run smoke node project-peer/src/cli.mjs --help ``` These commands are for source development and advanced diagnostics. Normal packaged Guests use the Windows Launcher and verified bundled Runtime instead of manually running the CLI. Exact supported Node/npm/dependency selections belong to [`../release-contract.json`](../release-contract.json). ## WP6: inspect signed Active Scene bytes (read-only, experimental) After Project Peer completes a signed Active revision, this local-only diagnostic compares one saved Unity Scene and its metadata with actual signed Manifest file entries and byte hashes: ~~~powershell node project-peer/src/cli.mjs wp6-scene-source --managed-root "C:\TeamForgeProjects" --project-uuid "project-uuid" --scene-path "Assets/Scenes/Main.unity" --scene-guid "0123456789abcdef0123456789abcdef" ~~~ Only a bounded (<=16 MiB) Unity text Scene and a <=64 KiB metadata file with a single matching GUID are supported. The verifier reads the *actual* Active files through pinned read-only handles and rechecks source hashes and the Active signed Baseline after I/O. Missing, changed, symlinked, oversized and invalid sources are refused. This CLI does not connect to the realtime Server, generate a client identity or signing key, edit Scenes, or authorize Inspector writes. The JSON summary contains only project/Scene hashes and Owner/Publisher key IDs. It is **not itself a signed remote attestation**. This proves local signed Active-file membership, NOT that the current Unity Editor loaded the files or that a real Server Session/Editor apply succeeded. See [WP6 Active Scene source notes](../docs/work-state/WP6_ACTIVE_PROJECT_PEER_SOURCE_2026-11-09.md). ## Host contract The Unity Host bridge uses `src/host-orchestrator-cli.mjs` over bounded NDJSON. Before a normal Host flow becomes ready, it should require the relevant verified Project/Scene baseline, realtime session, Project/Publisher identity/trust and signed Collaboration Invite contracts. The local listen/bind address is distinct from the concrete Guest-reachable advertised address. Wildcard/unspecified/loopback addresses must not be silently advertised as remote two-PC Guest destinations. The direct Seed exposes Project payload through the Project Transfer path. Internet discovery/NAT traversal/relay must not be inferred from the word `P2P`. Approved/current Baseline loading reads the exact descriptor hash selected by its pointer. Unrelated partial/damaged descriptor files cannot block that read; missing or damaged selected metadata still fails closed without substituting a different file. Draft reads also verify the Project/UUID/Manifest and matching revision. Hash selectors are validated before constructing metadata paths. In a running Unity Host session, open TeamForge Home and choose **Review saved changes** to compare the saved Project files with the exact approved revision that the Host serves. The review lists additions, changes, and deletions. The preview worker hashes the saved files and rechecks the approved revision before returning. Unsaved Editor changes appear after you save and run the review again. Publication still requires a fresh review and confirmation. **Source-only Host commit diagnostics:** a failed `commitHost` response additionally provides an optional fixed `failure.stage` identifier such as `start_coordinator`, `read_coordinator_baseline`, `restore_approved_baseline`, `start_or_publish_seed`, or `verify_seed_registration`. It describes the last Host operation boundary reached, **not** the underlying network or firewall root cause; the original stable `rawCode`, failure kind and recovery action stay unchanged. The stage is not an endpoint, credential or captured exception. Existing released r8 Host bytes do not include this source update. ### WP6 signed Scene asset-source verification (source-only) `src/wp6-signed-scene-source.mjs` provides a **disconnected, read-only** Project Peer helper for the next Component collaboration phase. Given a separately trusted, server-owned **current Project Baseline pin**, a Publisher-signed Project Descriptor, its canonical matching Manifest and content-addressed ChunkStore, it re-verifies the Owner/Publisher signature and reconstructs the exact signed `Assets/**/*.unity` and paired `.unity.meta` bytes. Every stored chunk is read through the existing opened-inode, size-checked, SHA-256-verified `ChunkStore`; the Scene streaming SHA-256 and bounded metadata-file SHA-256 must exactly match the signed Manifest file entries. Unity's **unique canonical Scene GUID** must also match the GUID encoded in the verified `.meta` bytes. The helper refuses missing/damaged metadata, a stale or forged published Baseline/Owner pin, changed Manifest contents, invalid paths, GUID collisions or mismatches, missing/corrupt chunks and resource overruns. It limits Scene hashing to 128 MiB and 2,048 chunks, metadata to 64 KiB, and does not load the whole Scene file into memory. It reads approved *stored bytes* rather than a mutable working-project Scene. Tests are in `test/wp6-signed-scene-source.test.mjs`. The positive result **`signed_manifest_scene_bytes_verified_unparsed`** means those exact Scene/metadata bytes are bound to the selected signed Manifest, **not** that the current Unity Editor has parsed those bytes, that an in-memory Component snapshot matches their serialized properties, or that any property write is authorized. It does not activate a Project, change a Scene, install a Component seed, introduce networking, produce Publisher signatures or expose the source working file. Before live WP6 sync, the Editor must independently bind its loaded/clean Scene to those bytes and exact GUID, establish value correspondence, then combine this evidence with the server-side Publisher approval, Session authority, revision/lock, Undo and recovery contracts. Neither trust chain can replace the other. ## Guest contract The packaged Windows Launcher starts the Guest bridge from a verified Runtime. The Guest flow validates the bootstrap envelope, signed transfer contract, Project/Owner/Publisher trust, transfer integrity, Active revision and final Unity handoff before the received Project is treated as launchable. Recovery must not bypass: - invitation/signature validation; - Project/Owner/Publisher trust; - manifest/file/chunk hashes; - filesystem/path policy; - staging and immutable activation; - final Unity handoff validation. ## Coordinator lifecycle Overlapping `CoordinatorClient.connect()` calls share one handshake. A reconnect requires a fresh Project registry snapshot; a previous connection's identity, snapshot and outstanding requests are cleared on close. Late messages or close callbacks from a retired transport cannot alter its successor. Closing during the handshake settles it immediately rather than waiting for the deadline; failed handshakes release their transport and preserve the original error code. The long-running Seed still reconnects and re-advertises after Coordinator loss. Invalid advertised Host configuration releases a bound Host or partial Guest Seed before returning the error, so retrying does not leave an orphan listener. ## Direct transfer Important source areas: - `src/direct-transfer-server.mjs` — descriptor/manifest/inventory/chunk source; - `src/direct-transfer-client.mjs` — direct HTTP source adapter, retries and normalized transport errors; - transfer/downloader code — concurrency, pacing, resume, retry and source/failover logic; - `src/content-store.mjs` — content-addressed storage primitives; - `src/filesystem-safety.mjs` — path/filesystem safety primitives. Transport success is not the same as activation success. Received content must pass the complete verification/trust/activation policy before becoming the current Active Project. When every eligible Seed is exhausted for a chunk, the download cancels sibling HTTP requests and pacing/cooldown waits, settles all workers, and reports the original terminal failure. Caller pause/cancel still reaches the same worker group. A recoverable Seed failure continues through the bounded retry/failover path; already verified stored chunks remain available for resume. Retry budgets and exhaustion belong to each source instance, even if two sources share a display label. Duplicate labels cannot hide a healthy fallback or turn exhausted discovery into an internal error. Inventory-health replica counts and speculative Endgame requests still treat a repeated label conservatively. A failed source request never deletes the shared cache entry for that hash: another operation may have verified and stored it while the request was in flight. Failed chunk write/sync/close paths retire only their own temporary file, retain the first I/O error, and leave other verified content available. Pause/cancel is checked during cached-chunk and final verification as well as network transfer. `ManagedProjectStore.activate({ signal, ... })` also checks it while reconstructing files, after Publisher approval and immediately before the verified directory move. Cancellation before that boundary preserves the prior Active pointer, failure staging and verified chunks for retry. Once the final directory move begins, activation finishes its pointer commit and cleanup; cancellation is not a rollback of a committed Active revision. A user pause is not reported as an unavailable network source. ## Session-local transfer measurements `SwarmDownloader.download()` returns per-peer `chunkAttempts`, `verifiedBytes`, `successfulRequestMilliseconds` and `requestServiceBytesPerSecond` in `peers`; advanced CLI `sync` includes these as `peerMetrics`. Counts reset for each download. Only chunks accepted after SHA-256 verification and storage contribute bytes and successful request time. Locally resumed chunks contribute neither. The monotonic request timer excludes pacing, cooldown, hashing and disk writes. The rate divides verified bytes by summed successful request service time, including any overlapping requests separately. It is a comparison signal, **not aggregate link throughput**. Failed requests count as attempts but do not contribute to that rate; zero measured service time reports zero. By default, scheduling and concurrency remain unchanged. For a **manual experimental comparison**, the advanced `sync` CLI accepts `--peer-selection verified-throughput` (default: `balanced`). The opt-in scheduler uses only current-download, hash-verified per-peer chunk service rates to prefer demonstrably faster healthy sources **when retry, cooldown and in-flight pressure are equal**, and periodically retains the legacy selection order to avoid locking out an eligible source. Every source starts unmeasured; corrupt/missing chunks earn no throughput credit. Unsupported modes fail closed. This does **not** adapt worker concurrency, modify trust or activation, promise aggregate bandwidth, or change the default Windows Launcher/Unity handoff. Use matched real-world benchmarks before considering this a speed improvement or a default behavior. An additional **opt-in Chunk scheduling order** is available to the advanced `sync` CLI as `--chunk-order rarest-first` (default: `manifest`). After already-verified local Chunk resume is accounted for, the experimental scheduler attempts Chunks with fewer **distinct eligible known advertisers** first, and preserves original Manifest order for ties. A Chunk absent from all known inventories but potentially available from an eligible *unknown* inventory is **not** falsely counted as zero-replica; existing source/Hash validation, retry and abort rules remain unchanged. Known advertiser counts are an untrusted scheduling hint, **not verified durability or a recovered proof of content**. This mode can be combined with `--peer-selection verified-throughput`. Neither option changes the normal Windows Launcher/Unity path or promises a measured speedup. For a separate **experimental concurrency-admission** comparison, the advanced CLI accepts `--concurrency-mode adaptive` (default: `fixed`). Adaptive begins with **one** active Chunk job and raises the limit by one after `2 × current_limit` verified Chunk completions, up to the `--concurrency` ceiling (1..64). Any failed Chunk attempt halves the current new-job admission limit (rounded up) and resets the success count. Existing in-flight attempts are not cancelled or force-retried on adjustment; the original per-Seed retry/cooldown/Hash/activation checks still decide whether bytes are safe. Each download starts fresh, with no learned profile saved across sessions, and the default Windows/Unity Launcher remains unchanged. For an optional, bounded **Endgame Mode**, advanced `sync` accepts `--endgame-mode hedged` (default: `off`). On at most the **final two pending unique Chunks**, if the selected source has not returned a verified Chunk after 180 ms, it may issue one speculative request to a second *distinct eligible* Seed. Both replies must match the signed Manifest Chunk length and SHA-256; only the **first verified** response is stored and announced once, and the other request is cancelled and settled. A fast primary request, only one eligible source, or repeated identical Seed IDs do **not** trigger duplication. Locally verified resume chunks are never re-requested. All existing pacing, cooldown, retry, cancellation, trust and activation checks still apply. The read-only `endgame` summary reports `mode`, `speculativeRequests`, and `speculativeWins` without reporting secrets or URLs. Extra requests can waste data or CPU; the prototype does **not** promise a faster connection, generalized torrent endgame or reliable physical speedup. The packaged r8 Windows and Unity Launcher behavior remain unchanged. The read-only `concurrencyControl` result/CLI JSON exposes `mode`, `ceiling`, `startingLimit`, `finalLimit`, `peakLimit` and `reductions`. Limits measure simultaneous *Chunk jobs*, not raw network sockets or assured bandwidth, and the controller does **not** currently infer optimal network throughput, latency, battery usage or congestion. Use matched throughput, completion, failure and resume measurements before claiming any physical performance benefit. The same `download()` result now includes `peerInventoryHealth`, also printed in the CLI's sync JSON output. This **advertised-inventory coverage** counts manifest-validated unique Chunks covered by known Seed inventory listings, single/multiple distinct advertiser labels, and inventory sources whose listing could not be read. A duplicate peer label cannot inflate the multi-advertiser count. `unadvertisedByKnownPeersChunks` means only that no *known inventory* advertised the Chunk: unknown inventory sources might still serve it, and even an advertised Chunk can fail real retrieval/hash verification. Byte-weighted counterparts (`totalUniqueBytes`, `advertisedBytes`, `unadvertisedByKnownPeersBytes`, `singleAdvertiserBytes`, `multipleAdvertiserBytes`, `advertisedByteCoveragePercent`) reveal whether missing/weakly advertised Chunks represent a disproportionate share of the actual Manifest bytes. They use **unique Manifest Chunk sizes**, not on-wire traffic or proven stored replicas. This is not a proven Swarm durability percentage, scheduling input, transfer success promise, protocol change, or trust substitute. ## Repeatable loopback transfer benchmark Run `npm --prefix project-peer run benchmark:transfer -- --size-mib 8 --iterations 3` for bounded JSON evidence, or add `--smoke` for a small integrity check. Add `--peer-selection verified-throughput`, `--chunk-order rarest-first`, `--concurrency-mode adaptive`, `--endgame-mode hedged` or combinations to run the **same bounded scenarios** with experimental scheduling. The JSON configuration records each mode and per-run concurrency/endgame telemetry. Compare separate balanced/opt-in runs under equivalent load rather than treating a synthetic loopback median as a physical speed claim. The fixture uses generated content, signed metadata, real loopback HTTP transfers, and the production downloader/store. It rotates four cases: one Seed, two Seeds, two Seeds with the first quarter of unique chunks preloaded, and two Seeds with chunk unavailability injected at the first client's request boundary. The surviving client still uses real HTTP; this injection is not a physical outage. All cases use concurrency four and the same aggregate offered server byte cap (8 MiB/s, divided across Seeds). Source loss removes that Seed's capacity. Resume reports actual reused bytes, which need not be exactly a quarter of file bytes. Elapsed download time includes inventory, resume validation, network work and verified storage; fixture creation, metadata discovery, resume preload and the final read-back audit are excluded. Each case audits every stored chunk's hash. Defaults are 8 MiB and three iterations; limits are 32 MiB, five iterations and 30 seconds per case after server setup. Destinations and loopback listeners are removed after use. Output contains no endpoint, transfer token or absolute path. There is no timing pass threshold: loopback medians help compare controlled experiments, and cannot establish LAN/VPN performance or justify scheduler changes. ## Windows path-resilience boundary `src/path-resilience-contract.json` is the shared source-side path-risk contract used by Project Peer/Launcher policy. A TeamForge-owned short execution alias may be accepted only through the separate identity/path validation contract. Supporting that narrow verified case does **not** make arbitrary external symlinks/junctions/reparse points valid Project roots. Canonical verified Active Project identity remains distinct from the execution alias used to keep a Unity-visible path within a supported budget. Publish Manifest construction retains each discovered file's exact device/inode, size, permission and nanosecond timestamp snapshot. The Owner-key JSON scan and hashing open a pinned handle, reject a changed identity, and read at most the discovered byte count. JSON scanning still examines the full file in chunks of at most 64 KiB. It recognizes literal and Unicode-escaped Owner member names; whitespace compaction in the decoded inspection window retains key-to-colon matches across read boundaries without changing source bytes or manifest hashes. POSIX nonblocking open lets these readers reject a FIFO swapped in after discovery without waiting for a writer. These reader I/O failures use path-free diagnostics; ChunkStore and cancellation failures retain their cause. This detects source changes rather than providing an atomic cross-process filesystem snapshot. The separate package metadata parsers retain their existing discovery checks. Discovery identity metadata is not part of the signed manifest. `test/manifest-source-safety.test.mjs` covers native file/parent replacements, bounded growth, FIFO swaps and error preservation. The Windows Node 22/24 lane runs it with the existing manifest/path tests; POSIX FIFO cases explicitly skip on Windows. These source tests do not establish Unity Editor or physical-PC transfer behavior. ## Advanced CLI ```powershell node project-peer/src/preflight-cli.mjs inspect --workspace-root node project-peer/src/cli.mjs publish --launch-settings --confirm-publish node project-peer/src/cli.mjs seed --launch-settings node project-peer/src/cli.mjs sync --invite ``` Publishing remains an explicit action. Secrets/private keys/access codes should not be embedded into public Collaboration Invite/launch-setting data or logs. ## Runtime-only package boundary Generated bundled Runtime content is a release artifact and is intentionally absent from a normal public source checkout. Use the public-source validator for a normal checkout. The stronger release validator expects a fully staged candidate tree with generated Runtime/Launcher/release evidence. See [SOURCE.md](../docs/SOURCE.md) for validation workflow, [architecture.md](../docs/architecture.md) for the complete topology/trust boundaries, and [CODEMAP.md](../CODEMAP.md) for file-level navigation. --- # TeamForge Guest Launcher This directory contains the source and tests for the standalone Windows Guest Launcher. This module README describes **Launcher behavior and trust boundaries**, not current release readiness. Use [STATUS.md](../docs/STATUS.md) for live readiness and [`release-contract.json`](../release-contract.json) for exact framework/runtime/candidate selections. ## Source versus packaged output A fresh source checkout contains the Launcher project, Runtime loader and tests. Generated packaged output such as `launcher/win-x64/` is intentionally **not committed to the public source checkout** and is not canonical source. A packaged Launcher contains a self-contained app plus a manifest-pinned Runtime. The normal packaged path does not fall back to system Node/npm, arbitrary PATH executables, project-local runtimes or a source workspace. ## Trusted packaged layout A packaged candidate is closed over app-owned paths similar to: ```text win-x64/ TeamForge.Launcher.exe runtime-loader.mjs Runtime/ runtime-manifest.json platforms/win-x64/node.exe backend/... ``` The release packaging flow must finalize Runtime content and generated pins/manifests before the Launcher is treated as a valid packaged artifact. A development checkout may contain placeholder/generated values that are intentionally insufficient for release-runtime startup. An arbitrary local `dotnet publish` directory is not automatically an official TeamForge candidate. ## Build and focused tests ```powershell dotnet restore launcher/src/TeamForge.Launcher/TeamForge.Launcher.csproj -r win-x64 dotnet run --project launcher/tests/TeamForge.Launcher.Core.Tests/TeamForge.Launcher.Core.Tests.csproj -c Release dotnet run --project launcher/tests/TeamForge.Diagnostics.Tests/TeamForge.Diagnostics.Tests.csproj -c Release dotnet run --project launcher/tests/TeamForge.Launcher.Ui.Tests/TeamForge.Launcher.Ui.Tests.csproj -c Release dotnet publish launcher/src/TeamForge.Launcher/TeamForge.Launcher.csproj -c Release -r win-x64 --self-contained true --no-restore -o launcher/win-x64 ``` Core/Runtime validation is available through `npm run testlab -- plan launcher` and `npm run testlab -- run launcher`. The separate `launcher-ui` scenario requires Windows x64 and the .NET SDK; it executes actual STA WPF controls and credential cleanup handlers, plus real BridgeClient lifecycle/request regressions with a public synthetic child. CI runs it in the existing Windows Launcher job. Native UI automation does not establish an exact packaged or physical Host/Guest result. The exact target framework, SDK/runtime selections and bundled Runtime versions belong to [`../release-contract.json`](../release-contract.json). A complete packaged candidate additionally requires the repository Runtime/pin/manifest generation and staged-release validation steps described in [SOURCE.md](../docs/SOURCE.md) and the release tooling. ## Startup behavior on slow Windows PCs Normal interactive launch permits one Guest Launcher window per Windows logon session. Repeated clicks notify the existing first instance, including while its first window is loading; they do not start another receive operation or transmit invite/access-code data. After the owner closes, a subsequent launch can start normally. The `--self-test-runtime` automation mode stays separate from interactive ownership. A small startup window appears after the .NET/WPF process initializes but before the full Launcher window is prepared. The startup and bundled-runtime health phases use indeterminate progress, not a fabricated percent. Windows process creation and .NET startup **before WPF can draw** are not measured by the UI; this does not claim an instant response on slow hardware. Closing the startup window cancels startup and allows a later launch. Once the full Launcher appears, its normal shutdown cleanup applies. ## Runtime integrity boundary The Launcher verifies the packaged Runtime layout before starting the Guest bridge. Trust-relevant responsibilities include: - manifest/layout/hash verification for app-owned Runtime files; - an explicit allowlisted bridge entry point; - child-process environment scrubbing/policy; - absolute verified executable selection; - bounded NDJSON communication with the Guest bridge; - no shell-based arbitrary launch path. Environment convenience must not become a fallback that bypasses the packaged Runtime contract. Bridge request values cannot replace the NDJSON envelope's reserved `id` or `type`. That local validation runs before pending-request registration, so a rejected payload is neither sent nor retained and other in-flight requests remain intact. ## Guest trust and handoff boundary The Launcher drives the fresh-Guest flow but does not become Project authority. Before Unity starts, the flow must preserve: - signed Collaboration Invite/bootstrap validation; - Project/Owner/Publisher trust review; - verified receive/staging/activation; - exact Active Project identity; - Unity-version/project handoff checks; - fail-closed handling of mismatched or tampered state. Invite/access-code values should use bounded IPC rather than being exposed as process command-line arguments or persistent raw logs. The access-code input is masked by default and provides explicit **Show/Hide** and **Clear** actions. Hiding retires the cleartext view while preserving the masked input selected for same-invite retries. Switching windows, collapsing advanced details or starting receive hides the code automatically. Clear, invite replacement, retention opt-out and Launcher close forget it. Session retention remains an explicit checkbox; there is no permanent credential storage or automatic clipboard copy. `AccessCodeInput.xaml(.cs)` owns presentation; MainWindow owns invite-scoped lifetime, transient bridge/Unity copies and redaction. Unity selection/open work is owned by `MainWindow.UnityLaunch.cs`. Each operation captures its project context and rechecks it after asynchronous validation, probe, handoff and path stages. Invite/destination replacement cancels old work; late success or error cannot restore or clear a newer context. Only one Unity selection or open operation runs per window. Existing-Active opening stays separate from the Active realtime handoff and never receives its access code or session handoff. When Receive finds a newer Host-approved Project revision, **Review Project update** shows the current and proposed revisions, file change counts, and a short list of changed paths from the signed manifests. Choose **Receive revision** to fetch the missing verified chunks and activate the new revision. Choose **Keep current revision** to leave the current revision active. The earlier Project folder and its local edits stay available after an update. Reopen the new revision using the Launcher when it is ready. Receive feedback distinguishes transferred bytes from file verification and Project preparation. Verification remains visibly busy after all bytes arrive; progress alone never enables Unity launch. Non-finite/malformed percentages use an indeterminate indicator, and queued progress cannot overwrite a confirmed pause. Diagnostics retain the current verification/paused phase. `ReceiveProgressPresentation.cs` owns this pure presentation policy; MainWindow applies it to the WPF controls. Core tests exercise numeric/phase edge cases; Windows UI tests exercise the actual indicator, status and pause/resume handlers. Pause/resume acknowledgements apply the requested state, so a runtime event that arrived first cannot be toggled back by a late acknowledgement. Only one pause/resume request and one cancellation request may be pending per receive lifetime. Cancellation remains available while pause is pending and takes priority over late pause events/ACKs. When receiving ends or starts again, old control results, errors and already-queued events cannot change the new UI. Transport failure or close retires controls without an unhandled UI callback. Cancel during invite/previous-Active inspection stops before the receive starts. If activation already committed while cancellation was requested, the completed Project is still validated and offered for manual opening; Unity does not open automatically. Closing during final validation cannot publish a new ready state. Closing cancels this operation and waits for its cleanup before final window close. Unused refreshed handoffs are retired through the existing targeted Core policy; successful starts retain the handoff for Unity's one-shot consumption. Editor-probe cancellation terminates/reaps its owned child; the ordinary 45-second probe timeout is unchanged. Private stage seams use the existing production verification/path/ process policies; gated native tests do not establish actual Unity launch or physical/package evidence. ## Path-resilience boundary The Windows flow uses a bounded managed path strategy rather than promising arbitrary path depth. A TeamForge-owned short execution alias may be used only when policy can prove that it resolves to the expected canonical Active Project and remains valid immediately before launch. Path shortening must not: - escape the managed destination; - weaken Runtime/hash verification; - change Project trust; - accept arbitrary external reparse/symlink/junction roots; - turn an unverified received directory into a valid Unity handoff. Canonical Active Project identity and Unity-visible execution path are related but distinct concepts. ## Diagnostics / recovery boundary Launcher diagnostics and recovery actions are bounded, secret-redacted and based on known state. Two manual diagnostics surfaces are available: - **Copy diagnostics** — a compact, bounded current-run text summary for quick inspection/paste. - **Save support bundle** — creates a local ZIP containing a manifest, safe structured state summary, short human-readable summary, and bounded redacted current-run history. The default support bundle is deliberately **not a dump of the machine**. It does not automatically include raw local paths, raw endpoint addresses, environment-variable dumps, Collaboration Invite contents, Project files, private keys, access credentials, arbitrary process dumps, or unbounded logs. Endpoint troubleshooting retains only coarse classification such as loopback/private/public/DNS plus a useful port where available. Support bundles are created locally and are **not uploaded automatically**. The manifest records the default privacy boundary so a user can review what the bundle represents before sharing it. A recovery or diagnostics action must not bypass invite signatures, Project trust, activation, Runtime integrity, path validation or final handoff checks merely to make the workflow continue. Interrupted receive/shutdown should converge into a handled recoverable state where possible; physical field evidence for current source/candidates is tracked in [STATUS.md](../docs/STATUS.md), not this module README. MainWindow's first close retires access-code copies and disables workflow input. Repeated close requests wait for the same BridgeClient cleanup to finish; only then is final Close dispatched. The existing bridge policy cancels pending requests with `runtime_shutdown`, allows two seconds for graceful child exit, and terminates a nonresponsive process tree. Queued bridge UI events and cancellation failures cannot reopen the closing workflow. Late runtime verification cannot start a child after close, and shutdown-cancelled startup health cannot mark the UI ready. The private initialization seam keeps production's pinned verifier and verified BridgeClient.Start; native tests inject only a public synthetic child. ## Distribution boundary Code signing, current packaged-platform availability, exact candidate hashes and release-readiness state are distribution facts owned by [STATUS.md](../docs/STATUS.md), [compatibility.md](../docs/compatibility.md), [`release-contract.json`](../release-contract.json), and [`../builds/README.md`](../builds/README.md). Do not duplicate those changing values here unless they are essential to a source-level explanation. See [How TeamForge works](../docs/HOW_IT_WORKS.md) for the end-to-end flow, [architecture.md](../docs/architecture.md) for complete topology/trust boundaries, [TEST_LAB.md](../docs/TEST_LAB.md) for named validation scenarios, and [CODEMAP.md](../CODEMAP.md) for file-level navigation.