Skip to content

feat(android): retire Access ownership before cleartext admission - #156251

Draft
vincentkoc wants to merge 1 commit into
split/android-ingress-tls-retry-20260923from
split/android-ingress-cleartext-departure-20260923
Draft

vincentkoc wants to merge 1 commit into
split/android-ingress-tls-retry-20260923from
split/android-ingress-cleartext-departure-20260923

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What problem does this solve?

A profile moving from TLS Access to a cleartext route must retire its old managed ownership before admission. Completion must still belong to the current caller and profile, without letting another profile's origin-wide retirement veto an otherwise valid departure.

Why this approach?

This eleventh slice of #147305 depends on #156250. Both ordinary prepare and captured Retry call the existing canonical Forget flow, then check caller cancellation/currentness and the absence of a replacement registration. There is no separate cleanup implementation or weakened Store retirement guard.

The two-file delta is 360 changed lines: production +26/-2; tests +292/-40. Nullable TLS is introduced only with this implemented capability. App activation and shared-browser reuse remain absent.

Evidence and remaining gates

  • Add six existing regression methods and complete the TLS/cleartext cancellation, overlapping-departure, and renewed-grant matrices: 82 Controller methods are now present. Of these, 81 method bodies match the preserved aggregate exactly; only the explicit shared-browser matrix awaits coalescing.
  • Cover last-owner deletion acknowledgement, shared-profile preservation, late browser completion, captured Retry/caller cancellation, replacement registration, and independent sibling retirement.
  • Normal scoped commit hooks and git diff --check pass. Standalone compile/runtime proof remains pending; original aggregate test results are historical only.
  • Automated source review remains held by the existing fixture filename classification. This draft does not retry that input or claim substitute clearance.
  • Native persistence and complete fresh-install/same-signer install-over profiles, selection, custom headers, settings, and pairing proof remain final-composition gates. This draft is not ready to merge.

@vincentkoc vincentkoc self-assigned this Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed October 7, 2026, 10:46 PM ET / October 8, 2026, 02:46 UTC (Revision 2).

ClawSweeper review

What this changes

The Android Access controller retires a profile’s previous authorization before returning a cleartext admission result, including through captured Retry.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused ownership change and meaningful regression scenarios are useful, but historical aggregate evidence leaves confidence in this intermediate prefix limited.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The ordinary external-contributor proof gate does not apply to this MEMBER-authored dormant capability. Source inspection found no unresolved material authority-chain violation: Retry validates its captured owner before cleanup, and admission rechecks caller and replacement state afterward. Intermediate-prefix execution remains pending; final app activation proof is separately scoped. No stored-format migration is introduced.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: A profile leaving Cloudflare Access for a cleartext connection needs to release its old authorization without disrupting another profile’s valid grant.
Reason: This supplies a necessary departure capability within the existing Android Access ownership model. The author’s prior merged work establishes relevant area ownership; activation remains a separate integration step.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-authored PR contains a distinct, useful capability absent from current main. No definite introduced defect was found, but this intermediate stack prefix remains unqualified by standalone execution.

Priority: P2
Reviewed head: fa607a6562d08e59f85b990483aacdcc93658f3f

Before merge

  • Complete next step (P2) - Complete standalone compilation and Controller regression qualification for this exact prefix while preserving the recorded dependency-stack composition hold.

Findings

None.

Tests

  • Missing end-to-end proof: Historical aggregate unit results do not establish compilation or passing execution for this intermediate prefix. The changed controller scenarios use synthetic transport/persistence inputs; no current-prefix failing-base/passing-head execution was established, and downstream app activation remains separately scoped.
Agent review details

How this fits together

The Android ingress controller coordinates Cloudflare Access authorization, saved Gateway profiles, and connection admission. This controller remains dormant: app integration is handled by downstream work.

flowchart TD
 A[Gateway profile admission request] --> B{TLS configured?}
 B -->|Yes| C[Existing Access admission]
 B -->|No| D[Canonical profile Forget]
 D --> E[Preserve peers or retire last grant]
 E --> F[Check caller and replacement ownership]
 F --> G[Return cleartext admission or cancel]
Loading

Technical review

Best possible solution:

Keep profile departure and origin retirement with their existing owners, qualify each intermediate prefix, and integrate the stack in dependency order.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this adds cleartext departure support to a dormant controller rather than repairing a demonstrated current-main user failure.

Is this the best way to solve the issue?

Yes: reusing canonical Forget and adding caller/profile completion checks is a narrow extension that preserves the existing retirement owner and shared-profile safeguards.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against d327a36593da.

Provenance checked

  • GatewayIngressController.prepare keeps the original intent (d691cc4: The route-classification slice deliberately exposed only implemented TLS capabilities, preserving durable origin ownership and ordinary-route behavior.)
  • GatewayIngressController.Retry.prepare keeps the original intent (8c31dfa: The preceding Retry slice binds actions to captured ownership and intentionally accepts only TLS until cleartext support arrives.)
  • GatewayIngressControllerTest departure matrices keeps the original intent (631c079: The Forget slice included only supported departure cells; cleartext and Retry cases were reserved for their corresponding capabilities.)

Testing

Proof path: unit tests only. Added test files: 1.

Security

None.

Evidence

What I checked:

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

PR surface

Tests +252, Other +24. Total +276 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 292 40 +252
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 26 2 +24
Total 2 318 42 +276

Labels

Label changes:

  • add P2: This is a bounded Android authorization capability with downstream app activation still outside its scope.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This is a bounded Android authorization capability with downstream app activation still outside its scope.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Provide standalone Android compilation and Controller regression results for this exact intermediate prefix.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-23T06:04:40.614Z sha fa607a6 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 8, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant