Skip to content

Preserve PR media referenced through GitHub blob URLs - #18562

Merged
teamleaderleo merged 2 commits into
manaflow-ai:mainfrom
BlueRaddish:fix/oct8-pr-media-blob-links
Oct 8, 2026
Merged

teamleaderleo merged 2 commits into
manaflow-ai:mainfrom
BlueRaddish:fix/oct8-pr-media-blob-links

Conversation

@BlueRaddish

@BlueRaddish BlueRaddish commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The media pruner now retains old screenshots still referenced through GitHub blob URLs, including images linked with ?raw=true. Previously those references were missed, so pruning could delete evidence still embedded in a pull request. The shared matcher accepts both blob/pr-media and blob/refs/heads/pr-media, while keeping the existing repository and path checks.

Testing

  • python3 tests/test_ci_prune_pr_media.py RevisionPlanTests.test_blob_urls_preserve_referenced_media: both URL forms fail in the committed regression before repair and pass after it.
  • python3 tests/test_ci_prune_pr_media.py: all 20 tests pass, covering retention planning, incomplete metadata, repository isolation, and local branch rewrite/lease behavior.
  • python3 scripts/ci/validate_test_execution_registry.py --repo-root .: passes; the existing ci-guards.yml lane runs this suite. Both native Linux commits ran the normal installed repository hooks.

Only these scoped Python checks ran; no complete static recipe or macOS app build was run. OpenAI Codex assisted with the change. Fresh open-PR searches and actual related PR file patches were checked; no existing open patch changes this matcher. An independent read-only review found no correctness defect.

Changelog

none

Proof

CI tooling only. The regression proves a reliably old revision survives because of its link, rather than current-head or recent-upload retention.

Checklist

  • Behavior changes have added or updated tests
  • User-facing docs updated if needed (internal tooling; none needed)

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Fixes the PR media pruner so it no longer deletes screenshots referenced through GitHub blob URLs, including links with ?raw=true. Previously only raw URLs were recognized, so pruning could remove media still embedded in a pull request. The matcher now accepts both blob/pr-media and blob/refs/heads/pr-media, keeping the existing repository and path checks intact.

Written for commit 83ebf4a. Summary will update on new commits.

View guided diff


Note

Low Risk
Scoped CI tooling change with a targeted regex extension and new unit test; no user-facing or security-critical paths.

Overview
PR media pruning now treats GitHub blob/.../pr-media links (including ?raw=true) the same as existing raw.githubusercontent.com and github.com/.../raw/... URLs when deciding which files to keep.

The shared RAW_MEDIA_URL pattern accepts blob or raw on github.com paths for both pr-media and refs/heads/pr-media, so evidence embedded via the web UI blob viewer is no longer pruned as “unreferenced.” A regression test covers both branch path forms.

Reviewed by Cursor Bugbot for commit 83ebf4a. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Bug Fixes
    • Media referenced through GitHub /blob/ URLs is now preserved for supported pr-media branch paths.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 953f2468-bf2e-4507-a519-20d2f58678db
📥 Commits

Reviewing files that changed from the base of the PR and between 46fe4d4 and 83ebf4a.

📒 Files selected for processing (2)
  • scripts/ci/prune_pr_media.py
  • tests/test_ci_prune_pr_media.py

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The PR updates RAW_MEDIA_URL to recognize GitHub /blob/ URLs as well as /raw/ URLs for pr-media paths. A test checks that plan_media retains referenced media for both supported branch-path forms.

Changes

PR media URL recognition

Layer / File(s) Summary
Match blob URLs and verify media retention
scripts/ci/prune_pr_media.py, tests/test_ci_prune_pr_media.py
RAW_MEDIA_URL now matches GitHub /blob/ URLs in addition to /raw/ URLs. The test checks that plan_media retains referenced media for both supported branch-path forms when revision-age data is supplied.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: teamleaderleo

Merge Risk: ⚪ Minimal · up to 83ebf

The new handling preserves media referenced through both blob URL forms, including links with ?raw=true; no merge-blocking issue is established in the reviewed change.

🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: preserving PR media referenced through GitHub blob URLs.
Description check ✅ Passed The description includes Summary, Testing, Changelog, Proof, and Checklist sections. It explains the behavior change, lists executed tests and their results, identifies unverified checks, and document…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Cloud Persistent Session And Early Input ✅ Passed PASS. The pull request changes only scripts/ci/prune_pr_media.py and its tests. The code adds GitHub blob URL matching for PR media and a regression test. It does not change Cloud terminal creatio…
Cmux Swift Actor Isolation ✅ Passed The pull request changes only Python production code and Python tests: scripts/ci/prune_pr_media.py and tests/test_ci_prune_pr_media.py. The diff contains no Swift changes, so it does not introduc…
Cmux Swift Blocking Runtime ✅ Passed The pull request changes only Python files: scripts/ci/prune_pr_media.py and tests/test_ci_prune_pr_media.py. The reviewed diff contains no Swift changes, so it does not introduce or expand the sp…
Cmux Browser Automation Off-Main ✅ Passed The pull request changes only scripts/ci/prune_pr_media.py and tests/test_ci_prune_pr_media.py. The changes update GitHub media URL matching and add Python tests. They do not change browser socket…
Cmux Expensive Synchronous Load ✅ Passed PASS: The pull request changes only scripts/ci/prune_pr_media.py and tests/test_ci_prune_pr_media.py. It adds a Python URL-matching rule and a Python regression test. It introduces no production S…
Cmux Cache Substitution Correctness ✅ Passed PASS: The pull request changes only Python files (scripts/ci/prune_pr_media.py and tests/test_ci_prune_pr_media.py). The custom check applies only to production Swift, TypeScript, and JavaScript c…
Cmux No Hacky Sleeps ✅ Passed PASS. The pull request changes a Python CI media-pruning regex and adds a deterministic unit test. The diff introduces no sleep, timer, polling, fixed delay, wall-clock wait, or retry synchronization.…
Cmux Algorithmic Complexity ✅ Passed PASS: The production diff only expands RAW_MEDIA_URL with the finite (raw|blob) alternative. It adds no collection iteration, nested scan, sorting, filtering, join, or batch rescan. `protected_med…
Cmux Swift Concurrency ✅ Passed The pull request changes only scripts/ci/prune_pr_media.py and tests/test_ci_prune_pr_media.py. No cmux-owned Swift code changed, so the Swift concurrency failure conditions do not apply.
Cmux Swift @Concurrent ✅ Passed PASS: The pull request changes only Python files (scripts/ci/prune_pr_media.py and tests/test_ci_prune_pr_media.py). It introduces no Swift code or Swift concurrency annotations, so the `@concurre…
Cmux Swift Package Boundaries ✅ Passed PASS: The pull request changes only scripts/ci/prune_pr_media.py and tests/test_ci_prune_pr_media.py. It introduces no production Swift changes, so the Swift package-boundary rule does not apply.
Cmux Swiftpm Lockfiles ✅ Passed The pull request changes only scripts/ci/prune_pr_media.py and tests/test_ci_prune_pr_media.py. It does not change SwiftPM packages, Xcode project references, .gitignore files, workflows, or dep…
Cmux Swift Logging ✅ Passed PASS: The pull request changes only scripts/ci/prune_pr_media.py and tests/test_ci_prune_pr_media.py. It adds no Swift code or logging changes, so the Swift logging rules do not apply.
Cmux User-Facing Error Privacy ✅ Passed PASS: The diff changes only the internal CI media-pruning URL matcher and adds a regression test. The workflow runs as scheduled or manually dispatched GitHub CI, and the changed matcher affects reten…
Cmux Full Internationalization ✅ Passed PASS. The pull request changes only scripts/ci/prune_pr_media.py and its Python test. The production change expands a GitHub media URL regular expression from raw to raw|blob; it adds no user-fa…
Cmux Swiftui State Layout ✅ Passed PASS: The pull request changes only Python files (scripts/ci/prune_pr_media.py and tests/test_ci_prune_pr_media.py). It introduces no SwiftUI state, ObservableObject, @Published, `GeometryRead…
Cmux Architecture Rethink ✅ Passed The pull request changes only scripts/ci/prune_pr_media.py and its Python test file. It adds /blob/ URL matching and regression coverage. It introduces no Swift code, timing workaround, mutable st…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS: The pull request changes only Python files (scripts/ci/prune_pr_media.py and tests/test_ci_prune_pr_media.py). It adds no Swift auxiliary window, NSWindow, NSPanel, NSWindowController, Swift…
Cmux Source Artifacts ✅ Passed The PR changes only scripts/ci/prune_pr_media.py and tests/test_ci_prune_pr_media.py. The diff contains a hand-written matcher update and a focused regression test. Neither path is a local/generat…
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS. The reviewed diff changes only scripts/ci/prune_pr_media.py and tests/test_ci_prune_pr_media.py. It contains no Swift file under a production Sources/ path and introduces no test or debug …
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator

Thank you @BlueRaddish! :D

@teamleaderleo
teamleaderleo merged commit 3430354 into manaflow-ai:main Oct 8, 2026
60 checks passed
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Merge receipt for 83ebf4aee6: every check was green at merge (10 verified; 16 skipped by policy). Full suite runs on main after merge.

rustybret pushed a commit to rustybret/bmux that referenced this pull request Oct 8, 2026
29661b9 gh-merge-green: allow explicit Vercel status override (manaflow-ai#18614)
dd6e295 fix: preserve SSH ProxyCommand child environment (manaflow-ai#18285)
f0a2bad Reject invalid Python regression-lane timeouts (manaflow-ai#18476)
3430354 Preserve PR media referenced through GitHub blob URLs (manaflow-ai#18562)
3b71b41 Reset a browser pane's selected frame and element refs when the page navigates (manaflow-ai#18577)
04e1d68 Clear force-close bypass when a confirmed close is rejected (manaflow-ai#18414)
8d86447 Treat Copilot value flags as value options when restoring (manaflow-ai#18470)
f6c678a Keep __proto__ keys in whole-area browser storage reads (manaflow-ai#18527)
7e97128 Keep minimized windows in the Dock when the global hotkey reveals cmux (manaflow-ai#18533)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants