Skip to content

feat(android): own browser Access renewal and cancellation - #156236

Draft
vincentkoc wants to merge 1 commit into
split/android-ingress-cached-transport-proof-20260923from
split/android-ingress-browser-renewal-20260923
Draft

vincentkoc wants to merge 1 commit into
split/android-ingress-cached-transport-proof-20260923from
split/android-ingress-browser-renewal-20260923

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Browser renewal needs one owner for the intent, Store task, caller eligibility and presentation. Cancellation, profile replacement or a late callback must not admit an obsolete grant or overwrite the current browser state.

User Impact

This adds explicit browser authentication and renewal to the dormant Android ingress controller. It includes consuming and canceling browser intents, while keeping automatic requests noninteractive. The app remains unwired. Same-application coalescing, public Forget/Sign out and Retry remain later capabilities.

Why This Change Was Made

Each interactive call retires the previous intent and acquires one immutable intent/task pair. The first implementation includes participant Job/current-registration checks, post-callback identity checks, detached Store custody, terminal guards and atomic presentation. Browser coalescing is genuinely absent until its own slice; these ownership guards are not deferred.

This is the seventh narrow slice of #147305, stacked on #156233. It changes 349 production lines and 923 test lines, 1,272 total. This deliberate size exception keeps one browser lifecycle and its regressions together; restoring earlier browser-only assertions and call signatures contributes to the test churn.

Evidence

  • Fourteen additional methods bring the prefix to 36 Controller methods. Coverage includes last-owner retirement before reacquisition, canceled and detached callers, late grants, replaced registrations, atomic browser consumption, ordinary admission, and actual renewed Gateway/media requests.
  • The original real-transport replacement and stale-range cells return with real G2 browser renewal. Earlier browser-only constructor parameters, prompt checks and launch assertions are restored.
  • All 32 complete method bodies equal aggregate 8aa382d7d196ec7ede0fbaa50980c9e6b1992e22; four methods retain only currently supported expiry, TLS, no-peer or replacement cells. Their remaining original cells enter with the corresponding APIs.
  • Normal signed commit hooks and git diff --check passed. Prefix compilation and test execution remain pending; historical aggregate proof does not qualify this prefix.
  • Automated source review remains held by the review tool's synthetic-fixture filename classification. No substitute review or new clean verdict is claimed. Keep this draft unmerged until applicable review and validation are resolved. Native persistence and final-app fresh-install/same-signer install-over proof remain outstanding for the composition.

@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 real behavior proof before merge.

What this changes

Adds owned browser sign-in, renewal, launch consumption, and cancellation to Android’s dormant Gateway access controller.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The source is coherent, but required authority-boundary proof has no execution results for this prefix.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes
Reason: This is a coherent prerequisite for browser-authenticated Android connections, with application activation deliberately deferred. The merged Access foundation explicitly places browser ownership in this follow-up stack.

Merge readiness

⛔ Blocked before merge - 3 items remain

This PR needs real behavior proof before merge. The browser lifecycle slice remains distinct from current main, and no concrete introduced defect was identified; the prior authority-boundary proof gap remains unresolved.

Priority: P2
Reviewed head: 2837f74cbebf2fcb75e73cb62bdc09a609a59b19

Before merge

  • Add real behavior proof - Authority-chain proof required: browser renewal now feeds the Store and Gateway/media authorization, but this prefix has no observed allowed-authority, wrong-authority, canceled, replaced, or stale-grant final-effect results. Existing production-boundary scenarios are relevant; historical aggregate runs do not qualify this prefix. No stored-data contract changes occur here. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk - Renewed credentials can persist and authorize Gateway/media requests, but this prefix has no executed final-effect evidence for allowed authority, wrong authority, cancellation, registration replacement, or stale grants.
  • Complete next step - Record compilation and focused test results for this prefix, including measured test cost, and attach the required authority-boundary output. Redact IP addresses, keys, and private endpoints; updating the PR body triggers fresh review, or a maintainer can comment @clawsweeper re-review.

Findings

None.

Tests

  • Missing end-to-end proof: No executed results are available for this prefix’s browser cancellation/replacement scenarios or renewed Gateway and media transport scenarios; compilation and base/head qualification remain pending.
Agent review details

How this fits together

Android’s access controller evaluates Cloudflare Access challenges and obtains authorization for Gateway and media connections. This slice manages browser attempts and caller eligibility; application wiring remains outside its scope.

flowchart TD
 A[Connection request] --> B[Access controller]
 B --> C{Interactive sign-in?}
 C -->|No| D[Cached authorization or sign-in required]
 C -->|Yes| E[Owned browser attempt]
 E --> F[Session store]
 F --> G[Current authorization]
 G --> H[Gateway and media requests]
Loading

Technical review

Best possible solution:

Keep browser eligibility and presentation in the controller, grant settlement in the Store, and current-authority enforcement at each transport boundary.

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

Not applicable: this is a dormant feature slice rather than a reported current-main defect; this read-only review executed no target code.

Is this the best way to solve the issue?

Yes, the ownership split fits the existing Access foundation and preserves noninteractive automatic requests; execution evidence is still needed to qualify its authority boundaries.

AGENTS.md: found and applied where relevant.

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

Merge-risk options

Maintainer options:

  1. Qualify the existing authority scenarios (recommended)
    Attach results for this prefix showing successful renewal and rejection of wrong-authority, canceled, replaced, and stale authorization before persistence or subsequent transport requests.

Provenance checked

  • GatewayIngressController.prepareRegistered and automatic admission keeps the original intent (05622db: The preceding stack slice binds cached Access admission to owned discovery while leaving interactive browser renewal for this capability slice.)
  • GatewayIngressController registration replacement and ordinary-route classification keeps the original intent (d691cc4: The earlier slice classifies Access routes and retains origin ownership; the stack description separates ordinary admission from subsequent browser capabilities.)
  • GatewayIngressControllerTest real transport replacement scenarios keeps the original intent (e73c3ac: The prerequisite tests establish cached authorization and wrong-authority rejection through real TLS transports, explicitly reserving replacement and stale-range cells for browser renewal.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

PR surface

Source +317, Tests +847. Total +1164 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 333 16 +317
Tests 1 885 38 +847
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 1218 54 +1164

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded Android capability prerequisite with no app activation or demonstrated urgent user regression.
  • merge-risk: 🚨 security-boundary: The new browser lifecycle supplies persistent credentials and transport authority whose cancellation and replacement boundaries lack executed evidence for this prefix.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

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

  • Attach source-bound output from the existing renewal and final-effect rejection scenarios.
  • Record prefix compilation, focused test results, and measured test cost.

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 execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-23T05:55:04.025Z sha 2837f74 :: needs real behavior proof before merge. :: none

Reviewed October 7, 2026, 9:10 PM ET / October 8, 2026, 01:10 UTC (Revision 2).

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. 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 merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant