fix: Restore green EditMode suite for schema and startup-hook guards#1962
Conversation
First-party schema properties must not carry DescriptionAttribute; tool descriptions already live in the skill file and CLI default-tools JSON. Co-authored-by: Cursor <cursoragent@cursor.com>
Editor startup hooks must be owned only by the composition-root bootstrap. MarkDomainLoaded runs once per domain load through FirstPartyToolsEditorStartup so SecondsSinceLoad still reports domain birth rather than first access. Co-authored-by: Cursor <cursoragent@cursor.com>
📝 WalkthroughWalkthroughThe PR wires pause-point domain initialization into first-party editor startup, replaces automatic timestamp initialization with an explicit guarded method, grants editor assembly access to internals, and removes description attributes from set-game-view-size schema properties. ChangesPause-point startup initialization
Set-game-view-size schema metadata
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant FirstPartyToolsEditorStartup
participant PausePointEditorStartup
participant PausePointDomainReloadTracker
FirstPartyToolsEditorStartup->>PausePointEditorStartup: Initialize()
PausePointEditorStartup->>PausePointDomainReloadTracker: MarkDomainLoaded()
PausePointDomainReloadTracker-->>PausePointEditorStartup: Store UTC load timestamp
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Packages/src/Editor/FirstPartyTools/FirstPartyToolsEditorStartup.cs`:
- Line 14: Move PausePointEditorStartup.Initialize() to the first statement in
Initialize(), before DomainReloadDisableScopeRecovery,
ExternalSceneChangeTracker, and ControlPlayModeEditorStartup, so the domain
timestamp is recorded at startup.
In
`@Packages/src/Editor/FirstPartyTools/PausePoint/PausePointDomainReloadTracker.cs`:
- Around line 16-20: Update MarkDomainLoaded() to retain the existing
_loadedAtUtc value when it is already set, while preserving the current
Debug.Assert invariant check. Only assign DateTime.UtcNow during the first
domain-load initialization so SecondsSinceLoad() continues using the original
timestamp.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f1c7af98-ba2d-4412-b966-1289ce77a646
⛔ Files ignored due to path filters (1)
Packages/src/Editor/FirstPartyTools/PausePoint/PausePointEditorStartup.cs.metais excluded by none and included by none
📒 Files selected for processing (5)
Packages/src/Editor/FirstPartyTools/FirstPartyToolsEditorStartup.csPackages/src/Editor/FirstPartyTools/PausePoint/AssemblyInfo.csPackages/src/Editor/FirstPartyTools/PausePoint/PausePointDomainReloadTracker.csPackages/src/Editor/FirstPartyTools/PausePoint/PausePointEditorStartup.csPackages/src/Editor/FirstPartyTools/SetGameViewSize/SetGameViewSizeSchema.cs
💤 Files with no reviewable changes (1)
- Packages/src/Editor/FirstPartyTools/SetGameViewSize/SetGameViewSizeSchema.cs
Declined both Minor suggestions as out of scope / conflicting with intentional fail-fast contract. See inline replies.
Summary
FailedCount: 0again.User Impact
[InitializeOnLoad]ownership outside the composition-root bootstrap.Changes
DescriptionAttributeusage fromSetGameViewSizeSchema(descriptions already live in the skill file and CLI tool JSON).PausePointEditorStartup.MarkDomainLoaded.CliSetupApplicationServiceTestspinned dispatcher tag expectations) was already fixed upstream by feat: Show live progress feedback while installing the CLI #1959 (pin-derived expected values), so it is intentionally out of this PR.Verification
dist/darwin-arm64/uloop compile --project-path <PROJECT_ROOT>→Success: true, errors 0, warnings 0CliSetupApplicationServiceTests→FailedCount: 0(4/4)FirstPartyToolSchemaMetadataTests→FailedCount: 0(2/2)OnionAssemblyDependencyTests→FailedCount: 0(83/83)TestCount: 2356,PassedCount: 2349,FailedCount: 0,SkippedCount: 7