Skip to content

refactor(pithead): reuse onion_missing() at its four inline call sites - #920

Merged
VijitSingh97 merged 1 commit into
develop-v2from
chore/simplify-core
Aug 13, 2026
Merged

refactor(pithead): reuse onion_missing() at its four inline call sites#920
VijitSingh97 merged 1 commit into
develop-v2from
chore/simplify-core

Conversation

@VijitSingh97

Copy link
Copy Markdown
Collaborator

Simplification-audit finding, applied: onion_missing() already existed and was already used at four sites, while the identical compound condition ([ -z ... ] || [ ... == placeholder ]) was hand-written inline at four others. All four now call the helper. Byte-for-byte the same decisions; the stack suite pins them (2171/0). Verifier pass: clean.

🤖 Generated with Claude Code

The onion-missing check (empty or still the shipped "placeholder") was
already a named helper and already called in two places, but hand-written
inline in four others: stack_upgrade's post-upgrade onion capture, doctor's
onion-address report, provision_onion_client_auth's pubkey check, and
apply's post-recreate onion capture. Swap each for onion_missing() so the
placeholder-check logic can't drift from the canonical definition. No
behavior change — same boolean expression, now shared.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VijitSingh97
VijitSingh97 merged commit 3b349f6 into develop-v2 Aug 13, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant