Skip to content

refactor(android): remove unused updater export root - #139198

Merged
steipete merged 1 commit into
mainfrom
codex/android-retire-updater-export-root
Sep 5, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/android-retire-updater-export-root

Conversation

@steipete

@steipete steipete commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Android's sharing configuration still exposes a cache root for the removed in-app updater. There is no remaining producer for that root. This removes obsolete configuration, not a demonstrated vulnerability or a user-visible feature.

Related: #139141.

Why This Change Was Made

Remove only the apk_updates mapping. Keep the widget_exports and workspace_files names, directories, provider authority, non-exported provider declaration, grant flags, and retention behavior unchanged.

The updater's original implementation and its last implementation before removal both wrote APK bytes through PackageInstaller.Session streams; neither issued FileProvider URIs. Its removal is already in stable v2026.3.8. This change does not assume that URI grants expire when a screen closes or an app upgrades.

User Impact

No intended user-visible change. Widget clipboard exports and workspace sharing retain their existing paths. No dependency, configuration option, permission, storage schema, or migration changes.

Evidence

  • Resource-backed tests use the manifest-declared AndroidX FileProvider: both active roots serve the original bytes, while the retired root cannot issue or resolve a URI. With the original XML, the two retired-root cases fail and the active-root case passes in both Android flavors; with the cleanup, all three pass.
  • 36 focused tests across Play and third-party flavors pass, covering FileProvider roots, workspace sharing and parsing, widget export, and inline-widget cleanup. All 13 selected changed checks pass, including Android lint.
  • Direct AndroidX Core 1.19.0 source review covers root parsing, URI issuance/resolution, and manifest attachment. Updater history and both current export callers were inspected. Independent review and Codex review found no actionable findings.
  • Production delta: one line removed. Tests: 77 lines added. No generated files changed.

Fresh committed-head Play and third-party APK builds passed. Both packaged manifests, resource tables, and compiled FileProvider mappings retain exactly the two active roots; both APK signatures verify. Exact-head CI and its required gate passed.

Installed API36 proof used exact Play APK 41669de2bd5c0a665258dde8764531b4741497003d5aea0994ef59b3ed13e44f from ce7fdc7888dc4ad47e366cadde0065542018e250, a real Gateway at c748cd5714b8160f0ce0a895071f039877082f08, and a separately signed receiving app on Blacksmith Testbox. The normal error retained the loaded preview; retry worked; first text, second same-name text, and PNG reached the same receiving Activity. It reopened all earlier URI streams and verified their distinct bytes, MIME types, permissions, and separate source/receiver UIDs. Root and independent review rehashed all 2,859 evidence files. The native run exited 0, and native/Gateway processes, ports, lease, temporary key and checkout were verified closed.

Share failure keeps the loaded preview

Separate receiving app verifies all three retained export streams

Installed scope is workspace sharing; widget clipboard coverage here is resource-backed tests and compiled mapping inspection, not a new installed clipboard test. This does not change or certify a new retention policy, OEM matrix, or release build.

Review dispositions

The completed review's APK/installed-proof prerequisite and rank-up move are now complete above. No source change followed review.

The review worker could not obtain dependency/history blobs; that evidence gap was resolved by direct maintainer and independent inspection, not assumed away. AndroidX Core 1.19.0 source, SHA256 dabdcce52939de70764cf967c7844da2222830d6a17ae20eefb41b2051964712, was inspected for FileProvider root parsing, issuance, resolution and manifest attachment. The original updater and last pre-removal updater use Session.openWrite, stream copy, fsync, and commit, not FileProvider grants. Raw-parent history and the removal commit were verified. No grant-expiry assumption, compatibility wrapper, or permission weakening is introduced.

The branch is in openclaw/openclaw, where maintainers can update it directly.

The retired updater streamed APKs through PackageInstaller sessions rather than FileProvider grants. Remove its unused cache mapping while preserving both active export roots and their retention. Resource-backed tests cover active byte reads and retired URI issuance and resolution.
@steipete steipete self-assigned this Sep 5, 2026
@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added app: android App: android size: S maintainer Maintainer-authored PR labels Sep 5, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 5, 2026, 12:41 PM ET / 16:41 UTC.

ClawSweeper review

What this changes

Removes Android’s unused updater file-sharing root and adds tests preserving active exports while rejecting retired updater URIs.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open for normal landing. The cleanup remains absent from main and the latest release, no actionable patch defects were found, and the updated evidence addresses the previous proof request.

Priority: P3
Reviewed head: ce7fdc7888dc4ad47e366cadde0065542018e250

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused cleanup with useful boundary tests, detailed installed proof, and no actionable correctness findings.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): Recorded exact-head APK inspection and API36 workspace sharing exercise the retained FileProvider path through a real share sheet and distinct-UID receiver, preserving all three export streams. Resource-backed tests cover retired-root rejection and both active roots; the previous proof request is addressed, without claiming installed clipboard coverage or personally reopened media.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): Recorded exact-head APK inspection and API36 workspace sharing exercise the retained FileProvider path through a real share sheet and distinct-UID receiver, preserving all three export streams. Resource-backed tests cover retired-root rejection and both active roots; the previous proof request is addressed, without claiming installed clipboard coverage or personally reopened media.
Evidence reviewed 10 items Verified introduced scope: The merge-base-to-head patch removes only the updater mapping and adds the provider tests. The verified test merge has the pinned base and head parents and changes the same two paths; unrelated endpoint drift is not attributed to this PR.
Cleanup still needed on main: Fetched main still declares apk_updates alongside both active roots.
Latest-release comparison: The supplied latest release, v2026.9.1, also retains the updater mapping.
Findings None None.
Security None None.

How this fits together

Android’s FileProvider turns exported cache files into content URIs that other apps can read through granted access. Workspace sharing and widget clipboard exports use the two retained roots.

flowchart TD
  A[Workspace file preview] --> C[Export cache files]
  B[Widget clipboard export] --> C
  C --> D[FileProvider root mapping]
  D --> E[Granted content URI]
  E --> F[Receiving app reads bytes]
  G[Retired updater path] --> H[URI rejected]
Loading

Before merge

  • Resolve merge risk (P1) - Reviewer-side limitation: AndroidX downloads, historical updater blobs, and linked media could not be independently reopened; their verification rests on the explicit captured maintainer disposition, not a new contributor-proof gap.
Agent review details

Security

None.

PR surface

Tests +77, Other -1. Total +76 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 77 0 +77
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 2 77 1 +76

Review metrics

Metric Value Why it matters
Production versus test delta Production −1 line; tests +77 lines Production configuration shrinks; all added code exercises the actual provider boundary without adding a production testing seam.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep only the two actively produced export roots while preserving their URI names, grants, and existing file-retention behavior.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep only the two actively produced export roots while preserving their URI names, grants, and existing file-retention behavior.

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

Not applicable: this is obsolete-configuration cleanup, not a reported runtime bug; current main still contains the unused mapping.

Is this the best way to solve the issue?

Yes. Removing the unused declaration at its resource owner is simpler than adding caller guards or compatibility paths, and both active callers remain unchanged.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against ac4c669dc5ae.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. Recorded exact-head APK inspection and API36 workspace sharing exercise the retained FileProvider path through a real share sheet and distinct-UID receiver, preserving all three export streams. Resource-backed tests cover retired-root rejection and both active roots; the previous proof request is addressed, without claiming installed clipboard coverage or personally reopened media.

Label justifications:

  • P3: This removes unused configuration with no demonstrated user-facing failure or intended behavior change for active exports.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster 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): Recorded exact-head APK inspection and API36 workspace sharing exercise the retained FileProvider path through a real share sheet and distinct-UID receiver, preserving all three export streams. Resource-backed tests cover retired-root rejection and both active roots; the previous proof request is addressed, without claiming installed clipboard coverage or personally reopened media.
  • proof: sufficient: Contributor real behavior proof is sufficient. Recorded exact-head APK inspection and API36 workspace sharing exercise the retained FileProvider path through a real share sheet and distinct-UID receiver, preserving all three export streams. Resource-backed tests cover retired-root rejection and both active roots; the previous proof request is addressed, without claiming installed clipboard coverage or personally reopened media.

Evidence

What I checked:

Likely related people:

  • 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 (1 earlier review cycle)
  • reviewed 2026-09-05T15:58:53.962Z sha ce7fdc7 :: blocked before merge. :: none

@steipete
steipete marked this pull request as ready for review September 5, 2026 16:14
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 5, 2026
@steipete
steipete merged commit 8637d26 into main Sep 5, 2026
131 of 132 checks passed
@steipete
steipete deleted the codex/android-retire-updater-export-root branch September 5, 2026 16:46
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to aniruddhaadak80/openclaw that referenced this pull request Sep 5, 2026
* commit '3e4becea5e2ce38ede69e8ecf5302805ecbfc09c':
  refactor: simplify outbound message execution context (openclaw#139107)
  fix(models): keep ordinary chat selections session-scoped (openclaw#139232)
  docs: slim root agent instructions and clarify testing scope (openclaw#139236)
  test(agents): give the sibling-drain completion wait a tolerance on slow runners (openclaw#139176)
  refactor(workboard): use canonical queries for card-tree writes (openclaw#139106)
  fix(canvas): recognize versioned macOS nodes (openclaw#138958)
  fix: load GitHub connections without a default agent (openclaw#139222)
  fix(memory): explain unsafe legacy host-event path recovery (openclaw#139195)
  refactor(talk): centralize typed voice session queries (openclaw#139103)
  fix(cli): preserve command dispatch and structured errors (openclaw#139067)
  refactor(agents): consolidate reply failure summaries (openclaw#139175)
  fix(auth): keep an unset default model unchanged during login (openclaw#139218)
  perf(media): reuse validated attachment read handles (openclaw#139168)
  refactor(channels): simplify account configuration updates (openclaw#139096)
  refactor(android): remove unused updater export root (openclaw#139198)
  fix(gateway): stop admitting post-ready producers during close (openclaw#139092)
  fix(gateway): expose agent hook completion outcomes (openclaw#139155)
  fix(config): return the saved configuration after plugin install commits (openclaw#139203)
  fix(android): reduce repeated retries to unreachable gateways (openclaw#138732)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
The retired updater streamed APKs through PackageInstaller sessions rather than FileProvider grants. Remove its unused cache mapping while preserving both active export roots and their retention. Resource-backed tests cover active byte reads and retired URI issuance and resolution.
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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