Skip to content

fix: review-debt quartet — derived pricing pairs (#57), lazy cache dir (#54), unique download temp (#55), #51 changelog backfill (#53) - #64

Merged
Amperstrand merged 1 commit into
mainfrom
fix/review-debt-53-57
Nov 20, 2026
Merged

Amperstrand merged 1 commit into
mainfrom
fix/review-debt-53-57

Conversation

@Amperstrand

Copy link
Copy Markdown
Owner

Closes #57, closes #54, closes #55, closes #53.

#57 (r3696609579, P2): dev-zone-probe.py's PRICING_ID = 241 was a free-floating constant with --package-id freely settable — --package-id 81 submitted package 80's tier, an invalid pair that fails server-side before probing. The pricing tier is now DERIVED from the selected package (explicit PACKAGE_PRICING map 80→241 … 84→257; unknown packages refused with the known pairs listed; an explicit --pricing-id must agree with the derived value or the probe refuses).

#54 (r4124126778, P2): _find_cloudflared evaluated _cloudflared_cache_dir() before examining system installs — a missing/read-only/foreign-owned cache dir raised before an installed /usr/local/bin binary was considered. System installs are now iterated first; the cache dir is created/consulted only when none exists.

#55 (r4124126788, P2): the download partial path was a fixed name (cloudflared.download) — two fresh-cache invocations raced on one inode (second chmod failure; first caller could execute a partially-replaced binary). Unique per-invocation temp (pid + uuid) before the atomic replace.

#53 (r4124126757, P1 docs): CHANGELOG [Unreleased] backfills #51's user-visible changes (restored generated-client enum classes, safe cloudflared cache, regression suites) with #51/#33/#34 pointers — per the AGENTS.md:202-204 same-commit mandate.

Verification: tests/test_tunnel_security.py 5/5 green; full suite identical to the pristine base (6 pre-existing env-dependent failures on BOTH sides — register tests need the nostr/coincurve extras, catalog/unit are environment-sensitive; base re-run at stash).

… cache dir, unique download temp, #51 changelog backfill

#57 (r3696609579): dev-zone-probe derives the pricing tier from the
selected package (explicit PACKAGE_PRICING map; unknown packages refused;
an explicit --pricing-id must agree with the derived value) — package 81
can no longer be submitted with package 80's pricing 241.

#54 (r4124126778): _find_cloudflared iterates system installs FIRST;
the cache dir is consulted (and created) only when no installed binary
exists — a missing/read-only/foreign-owned cache dir no longer shadows
/usr/local/bin/cloudflared.

#55 (r4124126788): the download partial gets a unique name per
invocation (pid + uuid) — two fresh-cache races can no longer fight over
one partial path (second chmod failure / first caller executing a
partially-replaced binary).

#53 (r4124126757): CHANGELOG [Unreleased] backfills the #51 security
arc's user-visible changes (restored generated-client enum classes, safe
cloudflared cache, regression suites) with the #51/#33/#34 pointers.

Verified: tests/test_tunnel_security.py 5/5 green; full suite matches
the pristine base exactly (6 pre-existing env-dependent failures on both
sides — register tests need coincurve/nostr extras, catalog/unit are
environment-sensitive).
@Amperstrand
Amperstrand merged commit d18730a into main Nov 20, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment