pi-crew 0.5.2 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/CHANGELOG.md +183 -0
  2. package/README.md +17 -1
  3. package/docs/architecture.md +2 -0
  4. package/docs/bugs/cross-session-notification-leakage.md +82 -0
  5. package/docs/coding-agent-optimization.md +268 -0
  6. package/docs/deep-review-report.md +384 -0
  7. package/docs/distillation/cybersecurity-patterns.md +294 -0
  8. package/docs/migration-v0.4-v0.5.md +208 -0
  9. package/docs/optimization-plan.md +642 -0
  10. package/docs/pi-crew-v0.5.5-audit-fix-plan.md +133 -0
  11. package/docs/pi-mono-opportunities.md +969 -0
  12. package/docs/pi-mono-review.md +291 -0
  13. package/docs/skills/REFERENCE.md +144 -0
  14. package/package.json +12 -9
  15. package/skills/artifact-analysis-loop/SKILL.md +302 -0
  16. package/skills/async-worker-recovery/SKILL.md +19 -1
  17. package/skills/child-pi-spawning/SKILL.md +19 -6
  18. package/skills/context-artifact-hygiene/SKILL.md +19 -2
  19. package/skills/delegation-patterns/SKILL.md +68 -3
  20. package/skills/detection-pipeline-design/SKILL.md +285 -0
  21. package/skills/event-log-tracing/SKILL.md +20 -6
  22. package/skills/git-master/SKILL.md +20 -6
  23. package/skills/hunting-investigation-loop/SKILL.md +401 -0
  24. package/skills/incident-playbook-construction/SKILL.md +383 -0
  25. package/skills/live-agent-lifecycle/SKILL.md +20 -6
  26. package/skills/mailbox-interactive/SKILL.md +19 -6
  27. package/skills/model-routing-context/SKILL.md +19 -1
  28. package/skills/multi-perspective-review/SKILL.md +19 -4
  29. package/skills/observability-reliability/SKILL.md +19 -2
  30. package/skills/orchestration/SKILL.md +20 -2
  31. package/skills/ownership-session-security/SKILL.md +20 -2
  32. package/skills/pi-extension-lifecycle/SKILL.md +20 -2
  33. package/skills/post-mortem/SKILL.md +7 -2
  34. package/skills/read-only-explorer/SKILL.md +20 -6
  35. package/skills/requirements-to-task-packet/SKILL.md +23 -3
  36. package/skills/resource-discovery-config/SKILL.md +20 -2
  37. package/skills/runtime-state-reader/SKILL.md +20 -2
  38. package/skills/safe-bash/SKILL.md +21 -6
  39. package/skills/scrutinize/SKILL.md +20 -2
  40. package/skills/secure-agent-orchestration-review/SKILL.md +29 -2
  41. package/skills/security-review/SKILL.md +560 -0
  42. package/skills/state-mutation-locking/SKILL.md +22 -2
  43. package/skills/systematic-debugging/SKILL.md +8 -6
  44. package/skills/threat-hypothesis-framework/SKILL.md +175 -0
  45. package/skills/ui-render-performance/SKILL.md +20 -2
  46. package/skills/verification-before-done/SKILL.md +17 -2
  47. package/skills/widget-rendering/SKILL.md +21 -6
  48. package/skills/workspace-isolation/SKILL.md +20 -6
  49. package/skills/worktree-isolation/SKILL.md +20 -6
  50. package/src/agents/agent-config.ts +40 -1
  51. package/src/benchmark/benchmark-runner.ts +45 -0
  52. package/src/benchmark/feedback-loop.ts +5 -0
  53. package/src/config/config.ts +32 -5
  54. package/src/config/role-tools.ts +82 -0
  55. package/src/config/suggestions.ts +8 -0
  56. package/src/config/types.ts +4 -0
  57. package/src/extension/async-notifier.ts +10 -1
  58. package/src/extension/crew-cleanup.ts +114 -0
  59. package/src/extension/cross-extension-rpc.ts +1 -1
  60. package/src/extension/notification-router.ts +18 -0
  61. package/src/extension/register.ts +27 -19
  62. package/src/extension/registration/subagent-tools.ts +1 -1
  63. package/src/extension/team-tool/anchor.ts +201 -0
  64. package/src/extension/team-tool/api.ts +2 -1
  65. package/src/extension/team-tool/auto-summarize.ts +154 -0
  66. package/src/extension/team-tool/run.ts +42 -7
  67. package/src/extension/team-tool.ts +44 -2
  68. package/src/hooks/registry.ts +1 -3
  69. package/src/observability/event-bus.ts +69 -0
  70. package/src/observability/event-to-metric.ts +0 -2
  71. package/src/runtime/anchor-manager.ts +473 -0
  72. package/src/runtime/async-runner.ts +8 -4
  73. package/src/runtime/auto-summarize.ts +350 -0
  74. package/src/runtime/background-runner.ts +10 -3
  75. package/src/runtime/budget-tracker.ts +354 -0
  76. package/src/runtime/chain-runner.ts +507 -0
  77. package/src/runtime/child-pi.ts +123 -35
  78. package/src/runtime/crash-recovery.ts +5 -4
  79. package/src/runtime/crew-agent-runtime.ts +1 -0
  80. package/src/runtime/custom-tools/irc-tool.ts +13 -0
  81. package/src/runtime/custom-tools/submit-result-tool.ts +3 -2
  82. package/src/runtime/delivery-coordinator.ts +10 -3
  83. package/src/runtime/dynamic-script-runner.ts +482 -0
  84. package/src/runtime/foreground-control.ts +87 -17
  85. package/src/runtime/handoff-manager.ts +589 -0
  86. package/src/runtime/hidden-handoff.ts +424 -0
  87. package/src/runtime/live-agent-manager.ts +20 -4
  88. package/src/runtime/live-session-runtime.ts +39 -4
  89. package/src/runtime/manifest-cache.ts +2 -1
  90. package/src/runtime/model-resolver.ts +16 -4
  91. package/src/runtime/phase-tracker.ts +373 -0
  92. package/src/runtime/pi-args.ts +11 -1
  93. package/src/runtime/pi-json-output.ts +31 -0
  94. package/src/runtime/pipeline-runner.ts +514 -0
  95. package/src/runtime/progress-tracker.ts +124 -0
  96. package/src/runtime/retry-runner.ts +354 -0
  97. package/src/runtime/sandbox.ts +252 -0
  98. package/src/runtime/scheduler.ts +7 -2
  99. package/src/runtime/skill-effectiveness.ts +473 -0
  100. package/src/runtime/skill-instructions.ts +37 -3
  101. package/src/runtime/subagent-manager.ts +1 -1
  102. package/src/runtime/task-graph.ts +11 -1
  103. package/src/runtime/task-runner.ts +92 -18
  104. package/src/runtime/team-runner.ts +13 -12
  105. package/src/runtime/tool-progress.ts +10 -3
  106. package/src/runtime/verification-gates.ts +367 -0
  107. package/src/schema/team-tool-schema.ts +37 -0
  108. package/src/skills/discover-skills.ts +5 -0
  109. package/src/state/active-run-registry.ts +9 -2
  110. package/src/state/contracts.ts +9 -0
  111. package/src/state/crew-init.ts +3 -3
  112. package/src/state/decision-ledger.ts +98 -55
  113. package/src/state/event-log-rotation.ts +2 -2
  114. package/src/state/event-log.ts +144 -10
  115. package/src/state/hook-instinct-bridge.ts +5 -5
  116. package/src/state/mailbox.ts +10 -0
  117. package/src/state/run-cache.ts +18 -8
  118. package/src/state/state-store.ts +3 -1
  119. package/src/state/types.ts +4 -0
  120. package/src/tools/safe-bash-extension.ts +1 -0
  121. package/src/tools/safe-bash.ts +152 -20
  122. package/src/types/new-api-types.ts +34 -0
  123. package/src/ui/agent-management-overlay.ts +5 -1
  124. package/src/ui/crew-widget.ts +29 -15
  125. package/src/ui/overlays/mailbox-detail-overlay.ts +13 -2
  126. package/src/ui/powerbar-publisher.ts +101 -7
  127. package/src/ui/tool-render.ts +15 -15
  128. package/src/ui/transcript-cache.ts +13 -0
  129. package/src/utils/bm25-search.ts +16 -8
  130. package/src/utils/env-filter.ts +8 -5
  131. package/src/utils/redaction.ts +169 -15
  132. package/src/utils/session-utils.ts +52 -0
  133. package/src/utils/sse-parser.ts +10 -1
  134. package/src/worktree/cleanup.ts +6 -1
  135. package/src/worktree/worktree-manager.ts +32 -13
  136. package/workflows/chain.workflow.md +252 -0
  137. package/workflows/pipeline.workflow.md +27 -0
@@ -1,8 +1,14 @@
1
1
  ---
2
2
  name: pi-extension-lifecycle
3
- description: Pi extension lifecycle and registration patterns. Use when adding or reviewing extension tools, commands, resources, providers, event handlers, session hooks, or context-sensitive Pi API usage.
4
- ---
3
+ description: Pi extension lifecycle and registration patterns.
4
+ triggers:
5
+ - "add extension"
6
+ - "register tools"
7
+ - "session hooks"
8
+ - "context API"
9
+ - "extension lifecycle"
5
10
 
11
+ ---
6
12
  # pi-extension-lifecycle
7
13
 
8
14
  Use this skill when working on Pi extension registration or lifecycle behavior.
@@ -23,6 +29,18 @@ Use this skill when working on Pi extension registration or lifecycle behavior.
23
29
  - Clean up intervals, event subscriptions, child processes, and watchers on session switch/shutdown.
24
30
  - Wrap optional Pi API hooks in compatibility checks/try-catch when supporting older Pi versions.
25
31
 
32
+ ## Enforcement — Pi Extension Lifecycle Gate
33
+
34
+ **Before registering tools or handling session lifecycle, verify:**
35
+
36
+ - [ ] ExtensionContext/ExtensionCommandContext fresh after session replacement
37
+ - [ ] No stale context references retained after session switch/fork/reload
38
+ - [ ] Cleanup registered for intervals, subscriptions, child processes, watchers
39
+ - [ ] Tool/command names unique (no duplicate registrations)
40
+ - [ ] No blocking filesystem/network work in extension render callbacks
41
+
42
+ If ANY answer is NO → Stop. Fix lifecycle issues before proceeding.
43
+
26
44
  ## Anti-patterns
27
45
 
28
46
  - Do not use stale context objects after session switch.
@@ -1,8 +1,13 @@
1
1
  ---
2
2
  name: post-mortem
3
- description: "Write engineering RCA record after bug is fixed. Use when asking: write post-mortem, RCA, root cause analysis, document this fix, close out this bug. Triggers: post-mortem, postmortem, root cause, RCA, document this fix, write up the cause, close out bug."
3
+ description: "Write engineering RCA record after bug is fixed."
4
+ triggers:
5
+ - "post-mortem"
6
+ - "root cause"
7
+ - "RCA"
8
+ - "document this fix"
9
+ - "close out bug"
4
10
  ---
5
-
6
11
  # post-mortem
7
12
 
8
13
  The canonical engineering record of a bug fix. Written after debugging lands a real fix.
@@ -1,8 +1,14 @@
1
1
  ---
2
2
  name: read-only-explorer
3
- description: Read-only exploration and audit workflow. Use for explorer, analyst, reviewer, and source-audit roles that must inspect code without modifying files.
4
- ---
3
+ description: "Read-only exploration and audit workflow."
4
+ triggers:
5
+ - "explore code"
6
+ - "audit source"
7
+ - "review code"
8
+ - "analyze codebase"
9
+ - "source audit"
5
10
 
11
+ ---
6
12
  # read-only-explorer
7
13
 
8
14
  Use this skill for explorer, analyst, reviewer, and source-audit roles. These roles must inspect code without modifying it.
@@ -209,6 +215,18 @@ For each step, identify:
209
215
 
210
216
  Always label uncertainty clearly. Use "may", "might", "could" for inference; "is", "shows", "contains" for evidence.
211
217
 
218
+ ## Enforcement — Read-Only Explorer Gate
219
+
220
+ **Before reporting findings, verify:**
221
+
222
+ - [ ] No files edited, written, or deleted (read-only contract maintained)
223
+ - [ ] Findings include: path, line, evidence, severity, impact, recommendation
224
+ - [ ] Exact files inspected recorded with paths and line numbers
225
+ - [ ] Direct evidence distinguished from inference (cite vs guess)
226
+ - [ ] If implementation needed, recommend (do not modify code)
227
+
228
+ If ANY answer is NO → Stop. Adhere to read-only contract.
229
+
212
230
  ## Anti-patterns
213
231
 
214
232
  - **Editing during exploration**: If you need to add logging or print statements, use a separate test script instead of modifying source files.
@@ -218,8 +236,6 @@ Always label uncertainty clearly. Use "may", "might", "could" for inference; "is
218
236
  - **Not recording files inspected**: Without exact paths, findings can't be verified.
219
237
  - **Inference as fact**: If unsure, mark it as inference.
220
238
 
221
- ---
222
-
223
239
  ## Source patterns
224
240
 
225
241
  - `src/runtime/task-runner.ts` — task execution pipeline
@@ -229,8 +245,6 @@ Always label uncertainty clearly. Use "may", "might", "could" for inference; "is
229
245
  - `src/extension/team-tool/` — API and tool handling
230
246
  - `src/ui/` — widget and TUI rendering
231
247
 
232
- ---
233
-
234
248
  ## Verification
235
249
 
236
250
  ```bash
@@ -1,8 +1,14 @@
1
1
  ---
2
2
  name: requirements-to-task-packet
3
- description: Use when a goal, issue, roadmap item, review finding, or user request must become actionable worker tasks.
4
- ---
3
+ description: "Use when a goal, issue, roadmap item, review finding, or user request must become actionable worker tasks."
4
+ triggers:
5
+ - "convert requirements"
6
+ - "create task packet"
7
+ - "decompose goal"
8
+ - "write task"
9
+ - "spec to implementation"
5
10
 
11
+ ---
6
12
  # requirements-to-task-packet
7
13
 
8
14
  Core principle: workers need explicit task packets, not inherited ambiguity. Ask only when ambiguity changes architecture, safety, public behavior, or data loss risk; otherwise record assumptions.
@@ -55,9 +61,23 @@ Use observable checks:
55
61
  - compatibility requirements such as Windows paths or Pi CLI flags;
56
62
  - rollback notes.
57
63
 
64
+ ## Enforcement — Requirements to Task Packet Gate
65
+
66
+ **Before dispatching workers, verify task packet has:**
67
+
68
+ - [ ] Objective clearly stated (goal in one sentence)
69
+ - [ ] Scope and paths defined (what is/isn't in scope)
70
+ - [ ] Allowed vs forbidden edits specified
71
+ - [ ] Inputs/dependencies and expected output artifacts listed
72
+ - [ ] Acceptance criteria are observable (command output, state transition, test)
73
+ - [ ] Verification commands provided
74
+ - [ ] Escalation conditions defined
75
+
76
+ If ANY answer is NO → Stop. Complete task packet before dispatching.
77
+
58
78
  ## Anti-patterns
59
79
 
60
- - Broad fix everything prompts.
80
+ - Broad "fix everything" prompts.
61
81
  - Buried assumptions.
62
82
  - Expanding scope because context remains.
63
83
  - Treating tests as proof when the requirement was never asserted.
@@ -1,8 +1,14 @@
1
1
  ---
2
2
  name: resource-discovery-config
3
- description: pi-crew resource and configuration discovery workflow. Use when changing agents, teams, workflows, skills, resource hooks, config precedence, or project/user overrides.
4
- ---
3
+ description: "pi-crew resource and configuration discovery workflow."
4
+ triggers:
5
+ - "discover agents"
6
+ - "find teams"
7
+ - "config override"
8
+ - "resource discovery"
9
+ - "skill loading"
5
10
 
11
+ ---
6
12
  # resource-discovery-config
7
13
 
8
14
  Use this skill for pi-crew resource/config work.
@@ -23,6 +29,18 @@ Use this skill for pi-crew resource/config work.
23
29
  - Validate config with schema and provide actionable errors.
24
30
  - When adding new config fields, update defaults, schema, docs, tests, and examples together.
25
31
 
32
+ ## Enforcement — Resource Discovery Config Gate
33
+
34
+ **Before adding config or changing resource discovery, verify:**
35
+
36
+ - [ ] Discovery precedence respected (project > user > builtin)
37
+ - [ ] Config schema validated with actionable errors on invalid input
38
+ - [ ] Dangerous user-only settings blocked in lower-trust contexts
39
+ - [ ] Resource paths resolved correctly (package-root not src/skills after build)
40
+ - [ ] New config fields have defaults, schema, docs, tests, and examples
41
+
42
+ If ANY answer is NO → Stop. Fix config/discovery issues before proceeding.
43
+
26
44
  ## Anti-patterns
27
45
 
28
46
  - Resolving package skills to `src/skills` instead of package-root `skills` after publishing.
@@ -1,8 +1,13 @@
1
1
  ---
2
2
  name: runtime-state-reader
3
- description: Safe read-only navigation of pi-crew run state. Use for inspecting manifests, tasks, events, agents, artifacts, health, and diagnostics without modifying state.
3
+ description: Safe read-only navigation of pi-crew run state.
4
+ triggers:
5
+ - "inspect manifest"
6
+ - "read tasks"
7
+ - "trace events"
8
+ - "examine state"
9
+ - "diagnostics"
4
10
  ---
5
-
6
11
  # runtime-state-reader
7
12
 
8
13
  Use this skill when debugging or auditing a pi-crew run.
@@ -32,6 +37,19 @@ Use this skill when debugging or auditing a pi-crew run.
32
37
  5. Inspect artifacts/diagnostics only through contained paths.
33
38
  6. Report root cause and smallest safe remediation.
34
39
 
40
+ ## Enforcement — Runtime State Reader Gate
41
+
42
+ **Before inspecting or reporting on run state, verify:**
43
+
44
+ - [ ] Using exported state APIs (not direct file parsing where helpers exist)
45
+ - [ ] State treated as append-mostly (no mutations during review/debugging)
46
+ - [ ] runId validated before use (no untrusted path concatenation)
47
+ - [ ] Corrupt JSONL handled gracefully (skip malformed lines)
48
+ - [ ] Terminal vs active statuses distinguished (critical for conclusions)
49
+ - [ ] Exact paths inspected reported with direct evidence vs inference labeled
50
+
51
+ If ANY answer is NO → Stop. Verify state access method before proceeding.
52
+
35
53
  ## Verification
36
54
 
37
55
  For code changes to state readers:
@@ -1,8 +1,14 @@
1
1
  ---
2
2
  name: safe-bash
3
- description: "Safe shell-command workflow. Use when executing shell commands, prefer read-only, avoid destructive actions. Triggers: run this command, execute bash, safe bash, avoid rm, destructive command, shell injection."
4
- ---
3
+ description: "Safe shell-command workflow."
4
+ triggers:
5
+ - "run this command"
6
+ - "execute bash"
7
+ - "safe bash"
8
+ - "destructive command"
9
+ - "shell injection"
5
10
 
11
+ ---
6
12
  # safe-bash
7
13
 
8
14
  Use this skill whenever a task may execute shell commands. This skill covers cross-platform shell safety, destructive action confirmation, and Windows-specific patterns.
@@ -268,6 +274,19 @@ else
268
274
  fi
269
275
  ```
270
276
 
277
+ ## Enforcement — Safe Bash Gate
278
+
279
+ **Before executing shell commands, verify:**
280
+
281
+ - [ ] Command classified as read-only or mutating (report which)
282
+ - [ ] Mutating/destructive commands have explicit confirmation before execution
283
+ - [ ] Paths use platform-safe construction (path.join, not hardcoded forward slashes)
284
+ - [ ] Timeout set for long-running commands (prevent blocking)
285
+ - [ ] Exit codes checked and errors handled appropriately
286
+ - [ ] Secrets not passed in command-line args (use environment variables)
287
+
288
+ If ANY answer is NO → Stop. Classify and protect before executing.
289
+
271
290
  ## Anti-patterns
272
291
 
273
292
  - **`rm -rf` without path validation**: Always double-check the path before rm -rf
@@ -277,8 +296,6 @@ fi
277
296
  - **Not handling Windows spaces**: Test on Windows before assuming paths work
278
297
  - **Background process zombie**: Always handle process exit or store the pid for cleanup
279
298
 
280
- ---
281
-
282
299
  ## Source patterns
283
300
 
284
301
  - `src/utils/resolve-shell.ts` — cross-platform shell detection
@@ -286,8 +303,6 @@ fi
286
303
  - `src/worktree/worktree-manager.ts` — git commands via execFileSync
287
304
  - `src/config/defaults.ts` — platform detection
288
305
 
289
- ---
290
-
291
306
  ## Verification
292
307
 
293
308
  ```bash
@@ -1,8 +1,14 @@
1
1
  ---
2
2
  name: scrutinize
3
- description: "Outsider-perspective review questioning intent before tracing code. Use when asking: should this even exist?, is there a simpler way?, get a second opinion, before deep code review. Triggers: scrutinize this, question this, is there a better way?, simplify this, overkill?, too complex."
4
- ---
3
+ description: "Outsider-perspective review questioning intent before tracing code."
4
+ triggers:
5
+ - "scrutinize this"
6
+ - "question this"
7
+ - "is there a better way"
8
+ - "simplify this"
9
+ - "too complex"
5
10
 
11
+ ---
6
12
  # Scrutinize
7
13
 
8
14
  Stand outside the change and ask whether it should exist at all, then verify it actually does what it claims end-to-end.
@@ -58,6 +64,18 @@ Severity:
58
64
 
59
65
  Close with verdict: **ship / fix-then-ship / rework / reject** — with single biggest reason.
60
66
 
67
+ ## Enforcement — Scrutinize Gate
68
+
69
+ **Before reporting scrutiny findings, verify:**
70
+
71
+ - [ ] Simpler-alternative pass completed (delete, use existing, smaller change, different layer)
72
+ - [ ] Intent stated in one sentence in your own words
73
+ - [ ] Code traced end-to-end (not just diff lines)
74
+ - [ ] Verdict given: ship / fix-then-ship / rework / reject
75
+ - [ ] Every claim cited with specific path/file/line evidence
76
+
77
+ If ANY answer is NO → Stop. Complete scrutiny requirements before reporting.
78
+
61
79
  ## Rules
62
80
 
63
81
  - **No rubber-stamps.** "LGTM" is not an output. If nothing found, say what you traced.
@@ -1,8 +1,15 @@
1
1
  ---
2
2
  name: secure-agent-orchestration-review
3
- description: Use when reviewing delegation, skill loading, tool access, worker prompts, artifacts, runtime config, state, ownership, or subprocess execution.
4
- ---
3
+ description: "Use when reviewing delegation, skill loading, tool access, worker prompts, artifacts, runtime config, state, ownership, or subprocess execution."
4
+ triggers:
5
+ - "review delegation"
6
+ - "check skill security"
7
+ - "audit prompts"
8
+ - "security review"
9
+ - "orchestration audit"
10
+
5
11
 
12
+ ---
6
13
  # secure-agent-orchestration-review
7
14
 
8
15
  Core principle: every delegated worker crosses trust boundaries. Safe orchestration requires contained paths, explicit ownership, scoped tools, non-invasive defaults, and prompt-injection resistance.
@@ -40,6 +47,26 @@ Review:
40
47
  - Skills should be loaded by safe name and source-labeled without absolute path disclosure.
41
48
  - Worker prompts should state instruction precedence and treat artifacts as data.
42
49
 
50
+ ## Enforcement — Secure Agent Orchestration Review Gate
51
+
52
+ **Before reporting security findings, verify:**
53
+
54
+ - [ ] All trust boundaries examined (parent↔child, user↔task packet, project↔package skills, etc.)
55
+ - [ ] Must-check findings covered: unsafe defaults, path containment, prompt injection, secrets, destructive commands, ownership races, supply chain
56
+ - [ ] Finding format complete: severity, path/symbol, scenario, fix, verification
57
+ - [ ] Must-fix security issues separated from hardening suggestions
58
+ - [ ] Verification commands provided for each finding
59
+
60
+ If ANY answer is NO → Stop. Complete security review before reporting.
61
+
43
62
  ## Finding Format
44
63
 
45
64
  Include severity, path/symbol, scenario, fix, and verification. Separate must-fix security issues from hardening suggestions.
65
+
66
+ ## Anti-Patterns
67
+
68
+ - **Don't** skip checking for unsafe defaults in configuration
69
+ - **Don't** trust agent output without verifying path containment
70
+ - **Don't** skip prompt injection checks when processing user input
71
+ - **Don't** skip secrets detection in environment and config files
72
+ - **Don't** skip checking for ownership race conditions in concurrent operations