Skip to content

refactor: centralize Gateway production and beta Store requests - #212

Merged
RomneyDa merged 9 commits into
mainfrom
refactor/store-publisher-central-request
Nov 17, 2026
Merged

RomneyDa merged 9 commits into
mainfrom
refactor/store-publisher-central-request

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Gateway betas must reach the Store Development flight as well as GitHub prereleases, without leaving a second credential-bearing publisher in the packaging repository.

User Impact

There is no installed-product change. Packaging retains the signed beta prerelease, current-attempt Store bundle/source witness, shared revision-zero Store version allocation, and upgrade behavior from #246 and #247.

The native Store action becomes a main-only, manual recovery request to the standalone central publisher. Operators choose production or development; acceptance means queued for central approval, not accepted by Microsoft. Automatic stable and beta handoff belongs to core #181446, which waits for packaging and requests Production for stable or the Development flight for beta.

Why This Change Was Made

  • Stack this cutover on feat: deliver Gateway betas through a Store development flight #247, itself on feat: support beta Gateway MSIX GitHub releases #246, rather than competing with their beta artifacts, flight versioning, or upgrade model. The merge preserves both prior histories.
  • Dispatch only openclaw/releases/windows-store-publish.yml@main with product=gateway, a canonical positive run_id, normalized channel, and automatic=false.
  • Remove the native Store API engine, source authorizer, OIDC helper, policy, retired suites, and CI registrations. No workflow-run automatic publisher or native Store credential remains.
  • Keep one central owner for channel-specific source authorization, flight selection, protected approval, byte verification, and Microsoft submission. Packaging executes no Store API code.
  • Preserve release-manager CODEOWNERS and document the full administrative cutover and flight qualification requirement.

Stack and Activation

  1. Packaging #246: signed GitHub beta prereleases.
  2. Packaging #247: beta Store artifacts, shared Store versions, and upgrade proof.
  3. This PR: replace native production/Development publishers with request-only recovery.
  4. Coordinate central releases #48 and core #181446, including the protected core-tooling recut.

Do not activate on merge alone. Configure the central exact-main release-manager environment without bypass, eligible code owners and enforced review/CI rules, scoped existing App access, product identifiers, and exclusive central Entra federation. Remove the native trust after draining old runs/tokens.

Central repository variables MSSTORE_GATEWAY_DEVELOPMENT_FLIGHT_ID and MSSTORE_GATEWAY_DEVELOPMENT_ENABLED own beta activation. Keep automatic Development delivery disabled until a manually approved central submission, certification, and data-preserving tester upgrade are qualified. Both Store destinations retain release-manager approval. No new PAT or flight-specific identity/federation is required.

Evidence

Validated signed head: 218217961be04ef965f668ca2be8ddebcc3bb71b.
Integrated main: 59a981674c3091df2520f4d1655f4b07e4bf65fd.
Validated/committed tree: 03d234b9f01fa23a7fa7a498e89a9974eb8f9c1e.

Conflict resolution preserves the central request-only adapter and all landed #247 build/version/witness behavior. Newly landed tests for the retired native publisher were removed with their owner; the request workflow, adapter, and documentation retain their prior behavior.

Passed from the repository root in PowerShell 7 on macOS:

  • Test-Request-MicrosoftStorePublish.Tests.ps1: 22 scenarios.
  • Test-SigningInputs.Tests.ps1 and Test-WorkflowSigningConfiguration.ps1, including eight Store runner-preparation fixtures.
  • Test-WorkflowPackageVersion.Tests.ps1, Test-MSIXUpgradeMatrix.Tests.ps1, and Test-PackagingRelevance.Tests.ps1.
  • Test-DocReferences.ps1: 0 findings; actionlint .github/workflows/submit-microsoft-store.yml; staged and base-relative git diff --check.
  • Existing independent review applies to the unchanged request implementation; no new independent review claimed for this base-integration commit.

Not run: managed quality/xUnit (no managed code changed by this residual), Windows NativeAOT/MSIX composition or installed upgrades, live App dispatch/approval/Store delivery, admin/federation cutover, artifact signing or release publication. New-head hosted CI is pending, not claimed green.

Coordinated Store Approval Rollout

Land evidence-writer compatibility before enforcing PR-only main. These PRs do not apply live settings, merge themselves, or authorize a Store submission.

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

🦞👀
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 clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 27, 2026
@clawsweeper

clawsweeper Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge.

What this changes

This PR replaces native Microsoft Store publication with a manual request to the central release repository.

Example: An operator selects Gateway build run 123.

  • Before: The packaging workflow can upload and commit its bundle directly to Microsoft Store.
  • After: The adapter requests windows-store-publish.yml on openclaw/releases main with product=gateway and run_id=123, reporting only request acceptance.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The adapter is focused and source review found no discrete defect, but the claimed authority boundary remains unproven and its central deployment is outstanding.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Packaging-repository write access can affect Store publishing code without mandatory central release-manager approval.
Reason: The maintainer-authored direction places publication under one central owner while preserving bundle production and manual recovery.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep open: this maintainer-authored PR provides a useful publication boundary change that requires a coordinated central cutover.

Priority: P2
Reviewed head: 0bde7cb3c7ef9f130118bd60c09c746c527defb6

Before merge

  • Add real behavior proof - Authority-chain proof required: the body explicitly leaves live App-backed dispatch, central approval, exclusive federation, and Store behavior unrun. Synthetic command fixtures establish request construction only. Provide redacted logs or terminal evidence mapping an allowed request through the real central owner and showing that a packaging writer without release-manager approval, legacy packaging federation, and revoked approval on queued or retried work cannot reach Store mutation; redact credentials, IPs, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Resolve security concern: Release-manager code ownership is currently ineffective - GitHub reports the intended team as unknown on every new ownership rule; administrators must establish eligible ownership and enforce the documented review controls before relying on this boundary.
  • Resolve merge risk - Before merge, release administrators must establish the coordinated central publishing boundary: the target workflow is absent from inspected central main, and effective review protection and exclusive federation remain outstanding.
  • Await maintainer action - Release administrators must make the release-manager team eligible, enforce code-owner and central environment approval, verify App grants, and replace legacy Store federation with exclusive central federation before allowing the cutover.

Findings

  • [medium] Release-manager code ownership is currently ineffective — .github/CODEOWNERS:2

Tests

  • Missing end-to-end proof: Supply production-path evidence for an allowed request and denial before Store mutation for a packaging writer without release-manager approval, including a historical workflow after federation removal and revoked approval on queued or retried work.
Agent review details

How this fits together

Packaging produces the authorized multi-architecture bundle; the adapter forwards its build run ID, while the central publisher must own source validation, release-manager approval, credentials, and Store mutations.

flowchart LR
  A[Authorized Gateway build] --> B[Retained Store bundle]
  A --> C[Manual request adapter]
  C --> D[Central source validation]
  B --> D
  D --> E[Release manager approval]
  E --> F[Central Store publisher]
  F --> G[Microsoft Store]
Loading

Technical review

Best possible solution:

Complete the central publisher and administrative cutover first, preserving one authoritative publisher and the existing authorized bundle handoff.

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

Source confirms that current main publishes locally and the PR instead dispatches the central workflow; no live publication or unauthorized-principal experiment was performed.

Is this the best way to solve the issue?

Central ownership is a coherent solution, and the adapter is small with no retired local callers found; its security outcome depends on completing the explicitly documented external cutover.

AGENTS.md: found and applied where relevant.

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

Merge-risk options

Maintainer options:

  1. Complete the coordinated cutover (recommended)
    Release administrators land the central publisher, establish effective approval and federation controls, and then allow this request-only replacement to merge.
  2. Hold the packaging cutover
    Keep this PR open without retiring the existing publisher until the central owner and administrative prerequisites are ready.

Provenance checked

  • Local Store publisher, authorization, policy, and scenario suites changes intended behavior with a stated reason (b50ec33: Provide retryable publication of validated bundles while preserving metadata, rejecting foreign drafts, and retaining ambiguous commits; later merged repairs refined Store response handling.)
  • Automatic trigger and manual Store workflow changes intended behavior with a stated reason (feat(release): automate Microsoft Store submissions #99: Support manual recovery and optional automatic delivery from successful release builds; this PR deliberately transfers both publication authority and automatic callers to the coordinated central design.)
  • Authorized Store bundle retention and release gates keeps the original intent (131fae3: Separate Store and sideload artifacts while retaining authorized Store bundles; the PR changes the publication consumer without changing their producer.)

Testing

Proof path: unit tests only.

Security

Needs attention: The adapter has no concrete security defect, but effective central publication authority is not yet established.

Evidence

Security concerns:

  • [medium] Release-manager code ownership is currently ineffective — .github/CODEOWNERS:2
    GitHub reports the intended team as unknown on every new ownership rule; administrators must establish eligible ownership and enforce the documented review controls before relying on this boundary.
    Confidence: 1

What I checked:

  • Verified introduced change: The pinned introduction removes the local publisher, source authorizer, OIDC helper, policy, and their suites; the replacement fixes the central repository, workflow, main branch, product, and canonical run ID. (scripts/Request-MicrosoftStorePublish.ps1:29, 0bde7cb3c7ef)
  • Current main still publishes locally: Current main retains workflow_run activation, the microsoft-store environment, Store OIDC, and direct publisher execution; this PR's central cutover is not already implemented. (.github/workflows/submit-microsoft-store.yml:62, dfa5d77d0a5c)
  • Administrative prerequisite confirmed: GitHub reports Unknown owner for every new release-manager CODEOWNERS rule, matching the PR's explicit outstanding prerequisite; the file cannot presently establish the intended review protection. (.github/CODEOWNERS:2, 0bde7cb3c7ef)
  • Central dependency not landed: The public repository is readable, but the target workflow returns 404 at its inspected main revision. Target docs explicitly designate this repository as the authoritative source-validation and publication owner, establishing the dependency contract; no dependency AGENTS.md was available at the queried root or .github paths. (.github/workflows/windows-store-publish.yml, 3d63d6a83318)
  • Accepted direction and cutover constraint: The maintainer-authored body and activation guide explicitly require central-first deployment, eligible code owners, enforced review, protected environment approval, and removal of historical packaging federation; retiring the local automatic publisher is intentional. (docs/microsoft-store.md:9, 0bde7cb3c7ef)
  • Coordinated upstream caller: The same author's open feat(release): request stable and beta Gateway Store delivery openclaw#181446 targets the central publisher directly and explicitly requires this packaging cutover, administrative controls, and exclusive federation. (95716a4f185b)

Likely related people:

  • Dallin Romney: Raw commit 131fae3 adds .github/workflows/gateway-msix.yml:1187 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 131fae3f0f43; files: .github/workflows/gateway-msix.yml)
  • Paul Campbell (AgOS): Raw commit 4a55f98 adds .github/workflows/gateway-msix.yml:1001 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 4a55f98a85f5; files: .github/workflows/gateway-msix.yml)

Review metrics

Metric Value Why it matters
Publisher consolidation Production scripts +40/-492; scenario tests +76/-512 The introduced diff removes the native publication owner and its fixtures rather than retaining a competing implementation.

Labels

Label changes:

  • add P2: This is a release-operator trust-boundary improvement with no installed-product behavior change.
  • add merge-risk: 🚨 security-boundary: Publication authority moves across repositories and depends on effective release-manager approval and exclusive cloud federation.
  • add merge-risk: 🚨 automation: The diff removes direct and automatic Store publication and dispatches a central workflow that is not yet present on inspected main.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P2: This is a release-operator trust-boundary improvement with no installed-product behavior change.
  • merge-risk: 🚨 security-boundary: Publication authority moves across repositories and depends on effective release-manager approval and exclusive cloud federation.
  • merge-risk: 🚨 automation: The diff removes direct and automatic Store publication and dispatches a central workflow that is not yet present on inspected main.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

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

  • Add final-effect proof that an unapproved packaging writer and historical packaging workflow cannot mutate Microsoft Store, and that revoked approval blocks queued or retried publication.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 27, 2026, 2:07 PM ET / 18:07 UTC.

@paulcam206

Copy link
Copy Markdown
Collaborator

One credential-scope concern to resolve before the cutover: the request job in .github/workflows/submit-microsoft-store.yml reads secrets.GH_APP_PRIVATE_KEY without declaring an environment:.

The github.ref == 'refs/heads/main' condition gates this job, but it doesn't protect a repository- or organization-scoped secret from another permitted workflow on a same-repository branch. Likewise, repositories: releases and permission-actions: write constrain the token minted by this step, not the underlying App private key. Someone with the key could request tokens within the App's actual installation permissions and repository access.

Please bind the request job to a protected environment restricted to the exact main branch, and make the key available to this repository only through that environment's secret. Adding environment: alone isn't sufficient if the same key remains accessible through repository or organization secrets.

Step 3 in docs/microsoft-store.md should spell out that configuration and its verification as a cutover prerequisite. In particular:

  • Verify the environment's actual branch policy and that non-main jobs cannot obtain its secret.
  • Verify there is no repository- or organization-secret path exposing the same key to other workflows in this repository.
  • Confirm the App's installation scope and permissions are the minimum required for the dispatch, and that the main-branch request still works without changing central Store approval.

I haven't verified the deployed secret scope or App permissions, so this is a conditional exposure concern, not a confirmed leaked key or a demonstrated bypass of central Store approval. The workflow and setup instructions currently leave that credential boundary unspecified.

@RomneyDa RomneyDa changed the title refactor: require central approval for Gateway Store publication refactor: centralize Gateway production and beta Store requests Nov 7, 2026
@RomneyDa
RomneyDa changed the base branch from main to feat/store-development-flight November 7, 2026 00:36
Base automatically changed from feat/store-development-flight to main November 16, 2026 03:02
@RomneyDa
RomneyDa merged commit c6ef88e into main Nov 17, 2026
13 checks passed
@RomneyDa
RomneyDa deleted the refactor/store-publisher-central-request branch November 17, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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.

2 participants