Repository navigation
perf(review): reuse Windows identity within owner creation - #2216
aiorellana502 wants to merge 1 commit into
Conversation
Thread freshly acquired user/administrator SID identity through checkedCandidateOwnerParent and createCandidateOwner's rollback within one synchronous owner creation, instead of re-probing it for the marker's private-file validation. Preparation, cleanup, and sweep keep reacquiring identity independently; no identity is cached across operations. Verification: 8/8 focused owner/identity tests pass, typecheck clean, independent gentle-ai-verify PASS on S1-S5 (file:line evidence for single acquisition, no process-wide cache, unchanged public signatures, fail-closed identity errors, rollback re-proving the marker's owner before removal). Closes Gentleman-Programming#2074
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Closes #2074
PR Type
Summary
createCandidateOwneracquired the Windows user/local-administrator SID identity twice within one synchronous creation (parent-boundary check, then the new owner marker's private-file check).prepareCandidateOwnerParent), cleanup, and sweep operations are unchanged and still acquire identity independently — nothing is cached across separate operations.Changes Table
lib/review-candidate-view-owner.tscheckedCandidateOwnerParent(new) replaces the body ofassertCandidateOwnerParent, returning the already-acquired identity;createCandidateOwnerthreads it through marker validation and rollback.privateWindowsDacl/privateWindowsCandidateOwnerBoundaryaccept an optional identity param instead of always re-fetching.tests/review-owner-identity.test.tswhoami.exe/icacls.exe/powershell.exeviachildProcess.execFileSync, covering single-acquisition reuse, fail-closed identity errors, and rollback re-proving a replaced marker's owner before deciding whether to remove it.odd/tasks/issue-2074-windows-identity-reuse.mdTest Plan
node --test tests/review-owner-identity.test.ts: 8/8 passpnpm run typecheck: 0 diagnosticsContributor Checklist
status:approvedon perf(review): Windows owner creation repeats SID identity probes #2074)Co-Authored-BytrailersSummary by CodeRabbit