Investigate split-root state containment warning - #81
Merged
kentwelcome merged 2 commits intoAug 21, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR strengthens split-root state safety by making state topology failures and sync eligibility explicit, ensuring users can inspect invalid or escaped state checkouts without triggering unintended git pull --ff-only operations. It also updates user-facing diagnostics and tests to reflect the new typed topology/sync decision model.
Changes:
- Introduces typed split-root topology problems and a typed state-sync eligibility decision, then routes sync behavior through that explicit gate.
- Blocks sync for unverified/escaped/detached/wrong-branch/missing/duplicate-root cases while preserving readable snapshots and improving diagnostics.
- Expands/updates core + UI tests to cover real Git topology edge cases and enforce exact sync-call counts.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents split-root containment verification and the “never pull the same checkout twice” sync guarantee. |
| docs/development-policy.md | Updates architecture guidance to reflect typed eligibility and distinct-root state sync sequencing. |
| crates/spacetop/src/ui/tests/task_list.rs | Updates footer diagnostic string expectations and adds coverage for the “outside definition” guidance. |
| crates/spacetop/src/lib.rs | Refactors sync flow to reload after definition sync, compute eligibility, and gate state pulls accordingly; adds topology sync tests. |
| crates/spacetop/src/app/overview.rs | Replaces the prior probe-failure diagnostic with typed unverified problems and richer, stable UI messages. |
| crates/spacetop-core/tests/state_checkout_fixtures.rs | Adds stronger topology assertions (canonical roots, branch, readability) for external symlinked state checkouts. |
| crates/spacetop-core/src/state_checkout.rs | Implements typed topology probing and the explicit state_sync_eligibility decision function. |
| crates/spacetop-core/src/domain/mod.rs | Adds StateTopologyProblem, StateSyncEligibility, and StateSyncProblem to the core domain model. |
| AGENTS.md | Updates repo contract documentation to reflect typed-unverified state and distinct-root eligibility ownership in core. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
kentwelcome
deleted the
spacedock-ensign-investigate-split-root-state-containment-warning
branch
August 21, 2026 13:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make split-root sync decisions explicit so users can inspect invalid state safely without accidental pulls.
What changed
Evidence
cargo test --no-fail-fast: 596/596 app and core tests passed; integration and documentation suites passed.make lint: 1/1 passed; formatting and diff checks passed.077