Skip to content

feat(android): bind cached Access admission to owned discovery - #156232

Draft
vincentkoc wants to merge 1 commit into
split/android-ingress-route-classification-20260923from
split/android-ingress-cached-admission-20260923
Draft

vincentkoc wants to merge 1 commit into
split/android-ingress-route-classification-20260923from
split/android-ingress-cached-admission-20260923

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

A cached Access grant must remain tied to the current profile, origin, revision and lifetime throughout discovery and transport admission. Revocation or cancellation must also retain ownership of an in-flight credentialed probe until its cleanup finishes.

User Impact

This adds cached-grant admission to the dormant Android ingress controller. Service-header access stays independent, and expired or superseded grants cannot authorize an upgrade. No app wiring or browser authentication is introduced.

Why This Change Was Made

Discovery is enrolled atomically against the current grant, started outside the owner monitors, and canceled and joined before custody is released. Leases recheck registration, revision, expiry and request authority. Ordinary admission drains the operations it actually displaced; origin-owned expiry and retirement cannot be swallowed by a replacement profile.

This is the fifth narrow slice of #147305, stacked on #156231. It changes 304 production lines and adds 500 test lines, 804 total.

Evidence

  • Twelve additional existing regression methods bring the prefix to 20 Controller methods. They cover cached/service-header separation, request custody, reentrant ordinary admission, canceled callers, expiry, replacement registration and same-origin attention. Retirement currently exercises expiry; Forget/Sign out and cleartext cells enter with those real APIs.
  • The complete discovery, lease and expiry guards are projected from final aggregate 8aa382d7d196ec7ede0fbaa50980c9e6b1992e22. No temporary unguarded cached-send path is introduced.
  • Normal signed commit hooks and git diff --check passed. Prefix compilation and test execution remain pending; prior aggregate results do not qualify this new prefix. The following small slice adds actual TLS/Gateway transport proof using this owner.
  • 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 added P2 Normal backlog priority with limited blast radius. 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 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 23, 2026, 1:48 AM ET / 05:48 UTC.

ClawSweeper review

What this changes

Adds cached Cloudflare Access admission to Android’s dormant connection controller, with credentialed discovery ownership, expiring authorization leases, and cancellation coverage.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open: this maintainer-authored slice adds a distinct capability absent from current main and the latest release. No concrete introduced correctness defect was found, but the split’s authority-boundary proof remains incomplete.

Priority: P2
Reviewed head: 05622dbe57c477addca119ab10c136f5608ff3d8

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Coherent ownership and meaningful regression cases provide useful signal, but the new authority boundary remains unqualified in this split.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: Authority-chain proof required: the controller now grants cached credential authority, but this split has no executed production-transport evidence for allowed use, foreign-origin rejection, and expiry or replacement before queued credential I/O. Aggregate results are useful precedent, not qualification of this prefix. Redacted terminal traces or logs suffice; remove tokens, private endpoints and personal data. Updating the PR body should trigger review; otherwise ask a maintainer for @clawsweeper re-review. No stored-data format 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.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: Authority-chain proof required: the controller now grants cached credential authority, but this split has no executed production-transport evidence for allowed use, foreign-origin rejection, and expiry or replacement before queued credential I/O. Aggregate results are useful precedent, not qualification of this prefix. Redacted terminal traces or logs suffice; remove tokens, private endpoints and personal data. Updating the PR body should trigger review; otherwise ask a maintainer for @clawsweeper re-review. No stored-data format 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.
Evidence reviewed 7 items Pinned introduction boundary: Reviewed the introduced controller changes between the supplied base and head, plus the original controller blob. Raw head metadata confirms d691cc4 is its recorded parent; fetched main is separate context.
Authority ownership and final transport checks: Discovery enrolls a lazy task under the controller and Store locks, checks caller, registration and snapshot before credentialed exchanges, and joins cancellation before removing custody. Leases check registration, revision, expiry and request origin. The existing CloudflareAccessClient network interceptor invokes the captured authorization check before sending headers.
Meaningful owner-level tests: The added cases cover discovery cancellation custody, reentrant ordinary admission, cached/service-header separation, expired grants, replacement registration and shared-origin attention. Their injected request function bypasses the real network interceptor, so they do not independently prove final-I/O rejection.
Findings None None.
Security None None.

How this fits together

Android’s ingress controller decides whether a saved Gateway connection can use ordinary service headers or a cached Cloudflare Access grant. It supplies authorization checks to discovery, WebSocket upgrades, and media requests; this slice does not activate it in the app.

flowchart TD
  A[Saved Gateway profile] --> C[Ingress controller]
  B[Cached Access grant] --> C
  C --> D[Service header probe]
  D -->|Access challenge| E[Owned credentialed discovery]
  E --> F[Current authorization lease]
  F --> G[Gateway and media transport]
  F -->|Expiry or replacement| H[Invalidate and drain work]
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: Authority-chain proof required: the controller now grants cached credential authority, but this split has no executed production-transport evidence for allowed use, foreign-origin rejection, and expiry or replacement before queued credential I/O. Aggregate results are useful precedent, not qualification of this prefix. Redacted terminal traces or logs suffice; remove tokens, private endpoints and personal data. Updating the PR body should trigger review; otherwise ask a maintainer for @clawsweeper re-review. No stored-data format 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 (P1) - This split lacks executed final-I/O evidence that a cached lease succeeds for its own authority while a foreign authority, replaced registration, or grant expiring during queued discovery receives no managed credentials.
  • Complete next step (P2) - Record compilation and focused test results for this split and retain the draft hold until its scoped authority proof is qualified.
Agent review details

Security

None.

PR surface

Tests +500, Other +274. Total +774 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 500 0 +500
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 289 15 +274
Total 2 789 15 +774

Review metrics

Metric Value Why it matters
Production versus test growth Production +274 net lines; tests +500 lines Production growth has a stated purpose: keeping discovery custody, lease admission and expiry under the existing controller owner.

Root-cause cluster

Relationship: partial_overlap
Canonical: #147305
Summary: This is an explicitly extracted slice of the open aggregate, with a separate prerequisite and follow-on transport-proof slice; none is a merged replacement.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Qualify the cached-admission boundary (recommended)
    Attach source-bound results from the production controller and real transport showing allowed use and rejection of foreign or stale authority before credential I/O.

Technical review

Best possible solution:

Keep one controller responsible for cached-grant admission and retirement, with scoped transport proof before this capability becomes available to app wiring.

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

Not applicable: this adds a dormant capability rather than repairing an established current-main failure. Tests were inspected but not executed in this read-only review.

Is this the best way to solve the issue?

Yes, extending the existing admission owner is a coherent approach and preserves independent service-header access; merge readiness still depends on proving its transport boundary.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This is a bounded Android capability prerequisite with no app activation or demonstrated urgent shipped regression.
  • add merge-risk: 🚨 security-boundary: The patch makes cached credentials usable through durable-in-memory leases, leaving final-network rejection of foreign and stale authority as a material proof obligation.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Authority-chain proof required: the controller now grants cached credential authority, but this split has no executed production-transport evidence for allowed use, foreign-origin rejection, and expiry or replacement before queued credential I/O. Aggregate results are useful precedent, not qualification of this prefix. Redacted terminal traces or logs suffice; remove tokens, private endpoints and personal data. Updating the PR body should trigger review; otherwise ask a maintainer for @clawsweeper re-review. No stored-data format 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.

Label justifications:

  • P2: This is a bounded Android capability prerequisite with no app activation or demonstrated urgent shipped regression.
  • merge-risk: 🚨 security-boundary: The patch makes cached credentials usable through durable-in-memory leases, leaving final-network rejection of foreign and stale authority as a material proof obligation.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Authority-chain proof required: the controller now grants cached credential authority, but this split has no executed production-transport evidence for allowed use, foreign-origin rejection, and expiry or replacement before queued credential I/O. Aggregate results are useful precedent, not qualification of this prefix. Redacted terminal traces or logs suffice; remove tokens, private endpoints and personal data. Updating the PR body should trigger review; otherwise ask a maintainer for @clawsweeper re-review. No stored-data format 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.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: 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)

Rank-up moves

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

  • Provide final-network evidence for the current grant, wrong authority, and queued expiry or registration replacement using the actual controller and transport.
  • Record successful prefix compilation and focused test execution, including measured test duration.

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.

@clawsweeper

clawsweeper Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: feat(android): bind cached Access admission to owned discovery This is item 3/3 in the current shard. Shard 38/89.

This temporary status tracks the active review worker. The completed review will appear in the durable ClawSweeper review comment.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L 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