Repository navigation
SDK context-safe recovery, atomic mutations, and portable coverage - #990
Conversation
Unify exact and optional filesystem absence semantics across CLI and SDK readers, ratchet raw ENOENT catches to zero, and expose the reviewed classifiers. Add grammar-aware recovery command resolution, atomic linked-artifact conflict refusal, packed SDK exports, cross-platform nightly fixes, and complete coverage verdict reporting. Tracks pm-lph0y6, pm-c6urop, pm-6xlyss, pm-j668gl, and pm-h9gsix.
|
@greptileai review |
|
@coderabbitai full review |
Reviewer's GuideThis PR hardens SDK and CLI behavior around filesystem absence and recovery semantics, adds an explicit conflict-check primitive for linked artifact mutations, refactors test runner child process handling with explicit combined coverage verdicts, and updates docs, contracts, and tests to reflect the new guarantees and public APIs. Sequence diagram for linked artifact mutation conflict checkingsequenceDiagram
actor User
participant CLI_files_command as CLI_pm_files
participant SDK_runFiles as sdk_runFiles
participant AssertConflict as assertLinkedArtifactMutationIsUnambiguous
participant ItemStore
User->>CLI_files_command: pm files --add pathA --remove pathA
CLI_files_command->>SDK_runFiles: runFiles(options)
SDK_runFiles->>AssertConflict: assertLinkedArtifactMutationIsUnambiguous(adds, removes, migrations)
alt [no conflicting normalized paths]
AssertConflict-->>SDK_runFiles: return
SDK_runFiles->>ItemStore: applyLinkedArtifactMutation(adds, removes, migrations)
ItemStore-->>SDK_runFiles: ok
SDK_runFiles-->>CLI_files_command: FilesResult
CLI_files_command-->>User: mutation applied
else [same path added and removed]
AssertConflict-->>SDK_runFiles: throw PmCliError linked_artifact_mutation_conflict
SDK_runFiles-->>CLI_files_command: error
CLI_files_command-->>User: refusal, suggest separate add/remove commands
end
Sequence diagram for context-safe recovery command name resolutionsequenceDiagram
participant RecoveryPayload as PmCliErrorRecoveryPayload
participant ErrorGuidance as inferCommandNameFromRecovery
participant ResolveName as resolveRecoveryCommandName
participant BootstrapParser as parseBootstrapCommandName
RecoveryPayload-->>ErrorGuidance: normalized_args
ErrorGuidance->>ResolveName: resolveRecoveryCommandName(normalized_args)
ResolveName->>BootstrapParser: parseBootstrapCommandName(invocationArgv)
alt [global options before or after command]
BootstrapParser-->>ResolveName: commandName (e.g. files)
ResolveName-->>ErrorGuidance: commandName
ErrorGuidance-->>ErrorGuidance: renderPmCommand(commandName, flags)
else [no subcommand found]
BootstrapParser-->>ResolveName: undefined
ResolveName-->>ErrorGuidance: undefined
end
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (60)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR centralizes filesystem absence handling, adds atomic linked-artifact conflict validation, fixes recovery command parsing around global options, and separates test and coverage results. It also updates CI reporting, portability tests, SDK contracts, documentation, and project records. ChangesFilesystem absence handling
Linked-artifact mutation validation
Recovery command resolution
Test and coverage portability
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Triaged the two warnings. The repository-native docstring gates report 100% source/export/member coverage, and the broader changes are explicitly governed by PM items pm-c6urop, pm-6xlyss, and pm-h9gsix linked in the PR body alongside pm-lph0y6 and pm-j668gl. CodeRabbit generated no actionable inline findings; its full-review attempt was rate limited. |
|
Acknowledged as a provider limitation: this review request was rate limited and produced no substantive review. It is not being counted as approval; exact-head CI and the other available review surfaces are assessed independently. |
|
Acknowledged: the exact-head benchmark report confirms all 11 tracked benchmarks are unchanged. |
|
Acknowledged: Codecov confirms every modified coverable line is tested and all tests passed; the repository-wide local coverage gate also reports 100/100/100/100. |
|
Sourcery review limitation acknowledged: the provider hit its weekly diff-character limit and returned no findings. This is recorded as unavailable review coverage, not approval; the generated guide and all exact-head executable gates were reviewed separately. |
Record exact-head hosted evidence, resolutions, and released ownership for the five SDK/CLI items. Regenerate the managed changelog with the latest pm-changelog package and preserve working main-branch tracker links.
|
@greptileai review |
|
@coderabbitai full review |
|
|
Final-head request acknowledged: CodeRabbit remained rate limited and produced no new actionable review. This is retained as an external reviewer limitation, not approval; every executable check on 60e1ffc passed. |
|
Final-head follow-up for CodeRabbit's edited summary (60e1ffc): zero inline findings were generated. The two heuristic warnings remain rejected with repository-native evidence: all source/export/member docstring gates passed at 100%, and the broad scope is governed by the five PM records linked in the PR body. The final exact-head static gate passed. |
|
Final-head follow-up for CodSpeed's edited report (60e1ffc): acknowledged; all 11 tracked benchmarks remain unchanged and the final benchmark check passed. |
|
Final-head follow-up for Codecov's edited report (60e1ffc): acknowledged; all modified coverable lines remain covered, all four shards and the aggregate coverage gate passed, and local repository-wide coverage is exact 100/100/100/100. |
|
Final review-provider disposition at 60e1ffc: Sourcery's check reached success but its only review body is the already-acknowledged weekly rate-limit notice; CodeRabbit is rate limited; Greptile emitted no comment, review, thread, or check surface after two explicit requests. These unavailable providers are not counted as approvals. The fresh inventory has zero review threads and all available executable checks are green. |
Summary
PM lineage
Verification
Closes #984
Closes #989
Summary by Sourcery
Enforce context-safe recovery and atomic linked-artifact mutations across the SDK and CLI, while tightening filesystem absence contracts and improving coverage gating behavior.
New Features:
Enhancements:
Tests:
Summary by cubic
Makes SDK and CLI mutations safer and error guidance accurate: grammar-aware command recovery, atomic linked-artifact mutations, unified file-absence handling, and portable, exact coverage reporting.
New Features
linked_artifact_mutation_conflict. SDK export:assertLinkedArtifactMutationIsUnambiguous. (pm-c6urop, closes Nightly Validation failed: windows-latest / Node 24 #989)Bug Fixes
isFileAbsentErrorandisFileMissingError; removed 45 ENOENT-only catches and added a zero-tolerance gate. (pm-6xlyss)Written for commit 60e1ffc. Summary will update on new commits.