Skip to content

test(desktop): lock macOS stable-never-beta appcast contract (#9528) - #11100

Merged
kodjima33 merged 1 commit into
BasedHardware:mainfrom
aryanorastar:test/9528-stable-never-beta-contract
Aug 6, 2026
Merged

kodjima33 merged 1 commit into
BasedHardware:mainfrom
aryanorastar:test/9528-stable-never-beta-contract

Conversation

@aryanorastar

@aryanorastar aryanorastar commented Aug 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Test plan

  • pytest tests/unit/test_desktop_updates.py::TestAppcastEndpoint::test_appcast_never_exposes_implicit_stable_item_when_only_beta_resolves
  • pytest tests/unit/test_desktop_updates.py::TestAppcastEndpoint::test_appcast_stable_item_is_untagged_and_beta_item_is_explicit
  • Confirm existing test_stable_never_falls_back_to_beta download tests still pass in CI

Review in cubic

…rdware#9528)

Codify that beta-only feeds never emit an untagged Sparkle item (legacy
stable-default), and that dual-channel feeds keep stable untagged while
tagging beta explicitly.

Co-authored-by: Cursor <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@Git-on-my-level

Copy link
Copy Markdown
Member

Thanks @aryanorastar — this is a clean, well-scoped Day-1 slice for #9528.

Verified the two new tests against backend/routers/updates.py:

  • _generate_appcast_xml tags only beta items with <sparkle:channel>beta</sparkle:channel>; stable items are left untagged (the Sparkle default). Both tests assert exactly this invariant.
  • test_appcast_never_exposes_implicit_stable_item_when_only_beta_resolves guards the real regression risk: a beta-only resolved feed must never emit an untagged <item> that legacy Sparkle could silently treat as a stable-default update. Good catch locking this down.
  • test_appcast_stable_item_is_untagged_and_beta_item_is_explicit correctly verifies the dual-channel contract by splitting on <item> boundaries — stable item has no <sparkle:channel>, beta item has the explicit tag.

The workflow_contracts.json invariant addition is accurate and source-backed by the resolver behavior on main.

One note: the test-plan checkbox for the existing test_stable_never_falls_back_to_beta download test is unchecked — worth confirming it still passes in CI before merge.

Positive signal on the technical content. Leaving formal merge timing to maintainers since this is part of the sequenced #9528 program.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Thanks for the review — confirmed in CI (Backend unit suite @ 93da99c, run 30942957980):

  • test_appcast_never_exposes_implicit_stable_item_when_only_beta_resolves ✅
  • test_appcast_stable_item_is_untagged_and_beta_item_is_explicit ✅
  • test_stable_never_falls_back_to_beta ✅

All three test-plan items green. Leaving merge timing to maintainers per the #9528 sequence.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appcast stable-never-beta contract test (#9528) is a good guard; approving — test-only, no product fix, so not auto-merging.

@aryanorastar

Copy link
Copy Markdown
Collaborator Author

@kodjima33 Thanks for the approve on the Day-1 #9528 appcast contract.

All clear on 93da99cd: CI green, your APPROVE stands, and the three test-plan items (incl. test_stable_never_falls_back_to_beta) are confirmed green in CI.

Ready whenever you want to land this test-only guard in the #9528 sequence — no further author work pending.

@Git-on-my-level

Copy link
Copy Markdown
Member

Thanks @aryanorastar — re-confirmed on 93da99cd: _generate_appcast_xml tags only beta items and leaves stable as the implicit Sparkle default, so both new tests lock existing resolver behavior rather than adding new surface. The cancelled "PR Metadata Preflight" noted in CI history is a superseded earlier run; the latest run on this head is green, as are the backend hermetic/E2E gauntlet checks.

One small follow-up worth tracking against the rest of the #9528 rollout rather than blocking here: the two new assertions rely on substring matching against serialized XML (<item> / <sparkle:channel>). That's robust for the current serializer, but as the #9528 program adds pointer seeding / GCS repair installers, consider asserting on parsed item attributes (e.g. xml.etree) so a future formatting change to _generate_appcast_xml (whitespace, attribute reordering) doesn't silently flip a passing test into a false failure.

Positive signal on the technical content. No new labels needed beyond macOS; merge timing stays with maintainers given this is the Day-1 slice of the sequenced #9528 program.


by AI on behalf of David — if you need David's attention urgently, please @Git-on-my-level and escalate with need human response.

@aryanorastar

Copy link
Copy Markdown
Collaborator Author

@Git-on-my-level Thanks for the re-confirm.

Agreed on the XML follow-up — substring asserts are fine for this Day-1 serializer lock; when #9528 adds pointer seeding / GCS repair installers we'll switch those cases to parsed item attributes (xml.etree) so formatting churn can't false-fail the contract.

No further author work on this head — merge timing stays with maintainers for the #9528 sequence.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test-only: locks the stable-never-beta appcast invariant that the resolver already enforces.

@kodjima33
kodjima33 merged commit e07cdd6 into BasedHardware:main Aug 6, 2026
41 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants