Repository navigation
Split GpgIdGeneration::accept and RealPass::finished - #2427
Conversation
Part of #2157. Behaviour-preserving extractions, comments moved verbatim: - GpgIdGeneration::accept (CCN 23 to 4) keeps the header and folder checks; acceptAgainstRecord() (14) checks the list against the record. The same-generation refusal moves to conflictingList(), next to staleList(). Transaction gains accepted(), noteOnce() and pinOnFirstSight(), which replaces the pinHere lambda. - RealPass::finished (CCN 23 to 11): the pass init/mv/cp branch moves to finishRecipientRun() (13). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Anne Jan Brouwer <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
nogeenhenk
left a comment
There was a problem hiding this comment.
Reviewed at 2c15d9b. GpgIdGeneration::accept is the rollback and store-pin check, so I compared it branch by branch with the old function:
accepted()is the oldgeneration == last && t.digest(k) == bytes, the optional digest included (no digest is not accepted).noteOnce()is the oldknown(k) || remember(k, 0, ...)for generation 0.pinOnFirstSight()readsstore(storeKey)where the lambda used thepinnedread at the top. That is the same value: the pins live inentries->stores, and the only write before it in each branch,remember(), writesentries->lists. In the last branch the pin still comes beforeremember(), as the comment requires.- The order is unchanged: wrong store, stale, generation 0, same generation (conflict, then accept), new generation.
conflictingList()has the old message and verdict. RealPass::finishRecipientRun()is the oldpass init/mv/cpbranch as it was, holds and releases in the same order.
Nothing to add.
Generated by Claude Code
Summary
Part of #2157, batch 6. Only the structure changes: the extracted code is moved as it was, comments included.
GpgIdGeneration::acceptacceptAgainstRecord()(14),conflictingList()(2)RealPass::finishedfinishRecipientRun()(13)accept()keeps the header and folder checks. ThenacceptAgainstRecord()checks the list against what this device accepted before (store ID, generation, digest).conflictingList(), next tostaleList(), which already holds the older-generation refusal.Transactiongets three small methods:accepted(), which was thegeneration == last && t.digest(k) == bytesargument toofThisStore();noteOnce(), the generation-0 note;pinOnFirstSight(), which replaces thepinHerelambda. It readsstore(key)instead of the capturedpinned, which is the same value: nothing pins between the two reads.RealPass::finished()hands thepass init/mv/cpbranch tofinishRecipientRun().Test plan
qmake6 -r CONFIG+=rnp && make -j12 && make checkin a scratchHOME/GNUPGHOME: 37 suites, 2,079 passed, 0 faileddoxygen Doxyfile: no warningslizard -C 14shows no new warnings in these two files🤖 Generated with Claude Code
Summary by CodeRabbit
pass init, move, and copy operations now handle re-encryption and post-commit failures more consistently. Automatic pushes are held when an operation fails and deferred pushes are handled after completion.