chore(backlog): complete inbox performance chores#94
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR refactors git divergence targeting into a ChangesGit Divergence Refactoring
Atomic Hook File Writes
Persisted State Helpers, Store Migration, and Runtime Migration
MetadataService Batching, Caching, and Config Reload
Repository Guidance
Sequence Diagram(s)sequenceDiagram
rect rgba(100, 149, 237, 0.5)
Note over Run: Config reload loop with dynamic enable/disable
end
participant Run as MetadataService.Run
participant loadRunConfig
participant ConfigPort
participant waitMetadataReconcile
participant Reconcile
participant metadataLiveSessionPaths
participant SessionPaths as tmuxcli.SessionPaths
participant SessionPath as tmuxcli.SessionPath
participant gitCache as git RepoInfo/WatchTargets (memoised)
loop Each Run iteration
Run->>loadRunConfig: ctx, fallback snapshot
loadRunConfig->>ConfigPort: LoadConfig (if Config present)
ConfigPort-->>loadRunConfig: snapshot or error
loadRunConfig-->>Run: current snapshot
alt metadata subline enabled
Run->>Reconcile: ctx, sessions
Reconcile->>metadataLiveSessionPaths: sessions
metadataLiveSessionPaths->>SessionPaths: batch lookup
SessionPaths-->>metadataLiveSessionPaths: partial map
metadataLiveSessionPaths->>SessionPath: per-session fill missing
SessionPath-->>metadataLiveSessionPaths: path
metadataLiveSessionPaths-->>Reconcile: full session→path map
Reconcile->>gitCache: RepoInfo per normalised key (deduplicated)
gitCache-->>Reconcile: repo result
Reconcile->>gitCache: WatchTargets per normalised worktree key (deduplicated)
gitCache-->>Reconcile: targets result
else metadata subline disabled
Run->>waitMetadataReconcile: ctx
waitMetadataReconcile-->>Run: ReconcileRequests or timer
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@internal/app/runtime_migrate_test.go`:
- Around line 94-181: Add a new test function to cover the regression case where
the current state file in StateDir/tmux.json exists but is malformed and no
candidate state exists for migration. This test should set up a scope with a
valid metadata file, write invalid JSON content to StateDir/tmux.json
(simulating corruption), call ensureRuntimeStateMigratedAndLoad, and assert that
loaded returns false and an error is returned rather than defaulting to an
initialized state. The test should verify that the function properly defers to
canonical error handling instead of returning a reusable state when the current
state is corrupted.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 31344ce4-ba9e-455a-a3eb-3d65682d79e5
📒 Files selected for processing (26)
AGENTS.mdinternal/adapters/gitcli/git.gointernal/adapters/gitcli/git_test.gointernal/adapters/gitgo/git.gointernal/adapters/gitgo/git_test.gointernal/adapters/storefs/store.gointernal/adapters/storefs/store_test.gointernal/adapters/tmuxcli/client.gointernal/adapters/tmuxcli/client_test.gointernal/app/hooks.gointernal/app/hooks_atomic.gointernal/app/hooks_json.gointernal/app/hooks_special.gointernal/app/hooks_test.gointernal/app/metadata_service.gointernal/app/metadata_service_run_config_test.gointernal/app/metadata_service_test.gointernal/app/restore.gointernal/app/restore_test.gointernal/app/runtime_migrate.gointernal/app/runtime_migrate_test.gointernal/app/session_order.gointernal/core/persisted/state.gointernal/core/runtime/heat_capture_prune_test.gointernal/core/runtime/persistence.gointernal/core/runtime/persistence_test.go
💤 Files with no reviewable changes (1)
- internal/core/runtime/persistence_test.go
Summary
Verification
go test ./...make ciSummary by CodeRabbit
Release Notes
New Features
Performance Improvements
Bug Fixes
Refactor / Maintenance