Skip to content

feat(android): share current Access browser attempts across profiles - #147305

Draft
vincentkoc wants to merge 1 commit into
split/android-ingress-cleartext-departure-20260923from
feat/android-cloudflare-ingress-20260913
Draft

vincentkoc wants to merge 1 commit into
split/android-ingress-cleartext-departure-20260923from
feat/android-cloudflare-ingress-20260913

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

What problem does this solve?

Allow current profiles for the same Access application to share one browser attempt. Reusing an attempt must retain its exact task and participant ownership; creator departure, cancellation, Retry, ordinary readmission, or Forget must preserve a current peer without reviving stale work.

Why this approach?

This PR is now the final, narrow coalescing slice, based on #156251. The earlier aggregate has been split into the ordered draft stack below. The only production addition here is the guarded same-application, nonterminal intent/task reuse branch; the complete participant and retirement owners already exist in its prerequisites.

This comparison is two files, +879/-24 (903 changed lines): production +15/-0; tests +864/-24. Eleven regression methods and the remaining shared-peer matrix cells arrive with the capability. No production abstraction, scenario deletion, app activation, or weakened guard was added to make the split smaller.

Order Scope PR Changed lines
1 Store retirement authority #156215 736
2 HTTP grant currentness and TLS test helper #156217 218
3 Native persistence test and CI selection #156224 337
4 Ordinary routes, durable association and observer ownership #156231 813
5 Cached admission and owned discovery #156232 804
6 Real cached TLS and streaming transport proof #156233 336
7 Single browser renewal and cancellation #156236 1,272
8 Profile Forget and acknowledged departure #156239 886
9 Origin-wide Sign out and acknowledgement ownership #156248 858
10 Captured TLS Retry and failure ownership #156250 1,083
11 Cleartext departure and admission #156251 360
12 Shared browser attempt coalescing this PR 903

The two larger capability slices keep their cancellation, custody, reentry, and failure tests together. Earlier prefixes expose only implemented APIs; later slices restore the corresponding mixed-mode matrix cells. Each draft needs its own relevant compile/test and review qualification before landing.

Evidence and remaining gates

  • Signed rebuilt head baadf5c12726522894525624bd594ce5859faeda, parent fa607a6562d08e59f85b990483aacdcc93658f3f. All twelve commits are signed and form a linear chain from cf101c4fb09936e31ee3dac615d7944896241f58.
  • The complete final repository tree is 68917090ad4bef1d2c1ff178b9c2c0a9e6fe115b, identical to preserved original head 8aa382d7d196ec7ede0fbaa50980c9e6b1992e22. All 93 Controller methods, their full bodies/order, shared fixtures, and the complete 150-method focused inventory are conserved: Controller 93, Client 18, Store 20, CustomHeaders 19. Normal scoped commit hooks and git diff --check pass.
  • Historical identical-tree CI 35736406554, attempt 1 executed unit-test compilation and both flavor test tasks, passing all 150 named methods per flavor without failures, errors, or skips. The Play and ThirdParty reports were independently verified. This remains historical identical-source evidence, not a new-head required-check result or intermediate-prefix proof.
  • Prior aggregate source review and ClawSweeper revision 28 covered original 8aa382d7, with no actionable source/security finding. Fresh split-source review remains held by the existing fixture filename classification. No blocked input is resubmitted and no substitute clearance is claimed.
  • Historical native run 35590208051 covered packaged crypto and installed-current AndroidKeyStore restore/delete at older source 8717b579; it is not new-head native or installed-old upgrade proof.

Dependent #147877 and #147307 remain drafts with unchanged source heads. The former is pinned to its exact old parent through an immutable hold branch, preserving its narrow 97-line comparison; the latter keeps its existing base. Integration still requires a separate restack onto this rebuilt stack and qualification after their held-input boundary is resolved. This metadata preservation provides no source-review or app-activation clearance.

Before merge: qualify the split prefixes, native results and remaining required CI; complete ClawSweeper's fresh-install and same-signer installed-old preservation gate for profiles, selection, custom headers, settings and pairing. A seeded-record fixture does not prove a genuine Gateway/identity-provider handshake. Full app/Custom Tabs/Settings activation remains outside this stack and unqualified. All slices stay draft; nothing here claims merge readiness.

AI-assisted implementation. Fresh source review remains pending.

@vincentkoc vincentkoc self-assigned this Sep 13, 2026
@openclaw-barnacle openclaw-barnacle Bot added app: android App: android size: XL maintainer Maintainer-authored PR labels Sep 13, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review September 13, 2026 19:12
@clawsweeper

clawsweeper Bot commented Sep 13, 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.

@vincentkoc
vincentkoc force-pushed the feat/android-gateway-ingress-20260913 branch from 333c62e to 910241f Compare September 13, 2026 19:19
@vincentkoc
vincentkoc force-pushed the feat/android-cloudflare-ingress-20260913 branch from 39e159e to 1775ee6 Compare September 13, 2026 19:20
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed October 5, 2026, 10:40 AM ET / 14:40 UTC (Revision 31).

ClawSweeper review

What this changes

Allows Android Gateway profiles targeting the same Cloudflare Access application to share an active browser sign-in task while retaining separate participant ownership.

Merge readiness

⛔ Needs changes before merge - 1 item remains

This remains a useful capability absent from current main. No introduced correctness or security defect was found; the explicitly retained prerequisite-stack merge hold still applies.

Priority: P2
Reviewed head: baadf5c12726522894525624bd594ce5859faeda

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with meaningful lifecycle coverage and preserved behavior proof; the stack hold is separate from patch quality.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): Retain the accepted identical-tree evidence: controller scenarios cover shared-attempt lifecycle, and production GatewaySession and streaming clients over TLS cover allowed, foreign-authority and replaced-grant effects. Historical job results were verified; artifact XML was not reinspected. This slice changes no stored-data contract, and downstream app activation remains separately held.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): Retain the accepted identical-tree evidence: controller scenarios cover shared-attempt lifecycle, and production GatewaySession and streaming clients over TLS cover allowed, foreign-authority and replaced-grant effects. Historical job results were verified; artifact XML was not reinspected. This slice changes no stored-data contract, and downstream app activation remains separately held.
Evidence reviewed 9 items Pinned introduced production change: The production delta reuses only a live intent with an equal application and an unfinished task, recording participant and registration ownership together.
Independent authorization checks remain: Application identity includes origin, issuer and audience. Shared-task completion rechecks registration, caller eligibility, cancellation and application; admission and leases separately enforce grant revision, expiry and request authority.
Shared participant lifecycle coverage: Introduced scenarios cover creator and peer departure, delayed publication, terminal results, canceled callers, ordinary readmission, retained task custody and obsolete waiters. They exercise the existing controller boundary without adding production test seams.
Findings None None.
Security None None.

How this fits together

Android's ingress controller checks Access authorization before admitting Gateway connections. Shared browser authentication produces a grant that each profile must independently qualify before its transport can use it.

flowchart TD
 A[Gateway profile requests] --> B[Verified Access application]
 B --> C{Matching active browser task?}
 C -->|Yes| D[Join shared attempt]
 C -->|No| E[Create browser attempt]
 D --> F[Check profile and grant currentness]
 E --> F
 F --> G[Admit Gateway transport]
Loading

Before merge

  • Complete next step (P2) - Qualify the prerequisite prefixes and obtain the owner's release of the retained stack merge hold before landing this draft.
Agent review details

Security

None.

PR surface

Tests +840, Other +15. Total +855 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 864 24 +840
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 15 0 +15
Total 2 879 24 +855

Review metrics

None.

Technical review

Best possible solution:

Keep shared-attempt coordination in the existing controller, preserving exact application identity, task custody and independent per-profile admission.

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

Not applicable: this adds shared browser-attempt coordination to a dormant controller; no current-main bug reproduction is claimed.

Is this the best way to solve the issue?

Yes: capturing the existing intent and exact task extends the current ownership model without creating another authentication owner.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded Android authentication improvement whose app activation remains in a separate dependent change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): Retain the accepted identical-tree evidence: controller scenarios cover shared-attempt lifecycle, and production GatewaySession and streaming clients over TLS cover allowed, foreign-authority and replaced-grant effects. Historical job results were verified; artifact XML was not reinspected. This slice changes no stored-data contract, and downstream app activation remains separately held.
  • proof: sufficient: Contributor real behavior proof is sufficient. Retain the accepted identical-tree evidence: controller scenarios cover shared-attempt lifecycle, and production GatewaySession and streaming clients over TLS cover allowed, foreign-authority and replaced-grant effects. Historical job results were verified; artifact XML was not reinspected. This slice changes no stored-data contract, and downstream app activation remains separately held.

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)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (30 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-21T08:23:25.379Z sha 5d2162a :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-21T09:17:51.905Z sha dd4f0eb :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-21T10:51:42.381Z sha 8717b57 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-21T12:15:47.351Z sha 8717b57 :: blocked before merge. :: none
  • reviewed 2026-09-22T12:54:45.246Z sha f5a8e7d :: blocked before merge. :: none
  • reviewed 2026-09-22T14:00:30.583Z sha 8aa382d :: blocked before merge. :: none
  • reviewed 2026-09-22T14:29:09.468Z sha 8aa382d :: blocked before merge. :: none
  • reviewed 2026-09-23T06:13:11.722Z sha baadf5c :: needs changes before merge. :: none

@vincentkoc
vincentkoc force-pushed the feat/android-gateway-ingress-20260913 branch from 910241f to 7d4d95f Compare September 14, 2026 02:30
@vincentkoc
vincentkoc force-pushed the feat/android-cloudflare-ingress-20260913 branch from 38de691 to 82839cb Compare September 14, 2026 02:30
@vincentkoc
vincentkoc force-pushed the feat/android-gateway-ingress-20260913 branch from 7d4d95f to 5c91e10 Compare September 14, 2026 03:35
@vincentkoc
vincentkoc force-pushed the feat/android-cloudflare-ingress-20260913 branch from f3477d2 to 625bf69 Compare September 14, 2026 03:35
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 14, 2026
@vincentkoc
vincentkoc force-pushed the feat/android-gateway-ingress-20260913 branch from 5c91e10 to 67a7380 Compare September 14, 2026 07:33
@vincentkoc
vincentkoc force-pushed the feat/android-cloudflare-ingress-20260913 branch from 625bf69 to 7febdeb Compare September 14, 2026 07:33
@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 18, 2026
@vincentkoc
vincentkoc force-pushed the feat/android-cloudflare-ingress-20260913 branch from fa930cf to 470d805 Compare September 21, 2026 04:26
@vincentkoc
vincentkoc force-pushed the feat/android-gateway-ingress-20260913 branch from 8b8460f to 3e17af3 Compare September 21, 2026 04:26
@vincentkoc
vincentkoc force-pushed the feat/android-cloudflare-ingress-20260913 branch from 470d805 to cc954b4 Compare September 21, 2026 06:00
@vincentkoc
vincentkoc force-pushed the feat/android-gateway-ingress-20260913 branch from 3e17af3 to 5f408e4 Compare September 21, 2026 06:00
@vincentkoc
vincentkoc marked this pull request as ready for review September 21, 2026 06:08
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. label Sep 21, 2026
@blacksmith-sh

This comment has been minimized.

@vincentkoc
vincentkoc force-pushed the feat/android-cloudflare-ingress-20260913 branch from 6cbb1c5 to 6a4d47c Compare September 21, 2026 07:43
@vincentkoc
vincentkoc force-pushed the feat/android-gateway-ingress-20260913 branch from 5f408e4 to 1845fad Compare September 21, 2026 07:43
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. label Sep 21, 2026
@vincentkoc
vincentkoc force-pushed the feat/android-cloudflare-ingress-20260913 branch from 6a4d47c to 5d2162a Compare September 21, 2026 08:13
@vincentkoc
vincentkoc force-pushed the feat/android-gateway-ingress-20260913 branch from 1845fad to 50de8ab Compare September 21, 2026 08:13

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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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