Skip to content

fix: Store submission fails when no pending draft is returned - #2252

Merged
RomneyDa merged 2 commits into
openclaw:mainfrom
RomneyDa:fix/store-optional-pending-submission
Nov 17, 2026
Merged

RomneyDa merged 2 commits into
openclaw:mainfrom
RomneyDa:fix/store-optional-pending-submission

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes: Microsoft Store submission fails before creating a draft when Partner Center omits the pending-submission field.

User Impact

User impact: release operators can submit an update when the product has no pending draft. Existing drafts remain protected. Live publication is not yet verified.

Why This Change Was Made

Treat an omitted pending-submission property like explicit null only during preflight. Keep the post-creation ownership check strict, and preserve metadata, package mutation and ambiguous-commit safeguards.

Evidence

Failed stable submission run for v2026.11.3: Store response is missing 'PendingApplicationSubmission'. The new omission regression fails with that same error on the original script and passes after repair. Added coverage also proves that omission after draft creation cannot authorize update/upload/commit. Existing foreign-draft and ambiguous-commit cases remain passing.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required proof pools

  • none: publisher response parsing only; no Windows app, installer, artifact construction or native runtime behavior changes. Protected main-only Store submission remains a separate post-merge proof obligation.

Validation

  • pwsh -NoProfile -File scripts/test-microsoft-store-submission.ps1: PASS, full script suite including two new scenarios (suite does not emit a case count).
  • git diff --check: PASS.
  • pwsh -NoProfile -File build.ps1: BLOCKED, requires Windows.
  • pwsh -NoProfile -File scripts/setup-dev.ps1 -CheckOnly: BLOCKED, requires Windows.
  • Required Shared/Tray dotnet test ... --no-restore: initially failed with NETSDK1004 in fresh worktree. Restore-enabled results below.
  • Restore-enabled Shared/Tray runs executed tests but encountered platform failures (unsupported Windows MXC/security primitives, Windows path semantics, and native Windows app initialization). Stopped both runs after establishing the host mismatch; no complete pass/count claimed.
  • Independent Codex autoreview at P0-P3: scoped-clean, no actionable findings. First review was invalidated by concurrent test activity; second review completed against the unchanged committed candidate.
  • Full native Windows closeout and CI remain required before merge. This PR is draft because those gates are not satisfied.

Real Behavior Proof

  • Environment tested: macOS, PowerShell 7; injected HTTP/upload test seam, no live credentials.
  • PR head or commit tested: 59c7d4da183ef46e8f7af9728e90a2a0ab9d63cb.
  • Exact steps or command run: pwsh -NoProfile -File scripts/test-microsoft-store-submission.ps1.
  • Evidence after fix: Microsoft Store submission tests passed.
  • Observed result: simulated omitted-field preflight reaches exactly one owned commit and writes a fresh receipt; missing post-creation ownership rejects mutations.
  • Screenshot or artifact links verified? Yes: failed workflow link verified; no UI change.
  • Not verified or blocked: live protected publisher, certification/public availability, Windows closeout and required CI. No production submission retried from this branch.

Security Impact

  • New permissions or capabilities? No
  • Secrets or tokens handling changed? No
  • New or changed network calls? No
  • Command or tool execution surface changed? No
  • Data access scope changed? No
  • If any answer is Yes, explain the risk and mitigation: N/A. Existing endpoints, credentials and draft guards unchanged.

Compatibility and Migration

  • Backward compatible? Yes
  • Config or environment changes? No
  • Migration needed? No
  • If yes, list the exact upgrade steps: N/A.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

@clawsweeper

clawsweeper Bot commented Nov 16, 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:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 16, 2026
@clawsweeper

clawsweeper Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

The PR permits an omitted pending-submission field during Store preflight while preserving strict ownership checks after draft creation.

Example: Partner Center returns application 9NTESTOPENCLAW without PendingApplicationSubmission.

  • Before: The publisher throws "Store response is missing 'PendingApplicationSubmission'." before creating a draft.
  • After: The publisher can create draft-2, but subsequent mutations still require an explicit matching pending-draft ID.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch is correct and has useful fixture coverage, while evidence remains simulated and the draft’s full validation is unfinished.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored release-automation repair exercises the production publisher through injected HTTP/upload fixtures, with exact-head focused CI passing; live Partner Center publication is explicitly deferred under the existing main-only rollout and is not claimed as proven.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Release operators cannot submit an update when Partner Center omits the field representing a pending draft.
Reason: The maintainer-authored repair restores the existing submission workflow without adding policy, options, or a competing implementation.

Merge readiness

✅ Ready for maintainer review

Keep open: current main still rejects an omitted pending-draft field, and this maintainer-authored PR provides a focused repair with no actionable code findings.

Priority: P2
Reviewed head: 59c7d4da183ef46e8f7af9728e90a2a0ab9d63cb

Before merge

None.

Findings

None.

Agent review details

How this fits together

The protected Store workflow passes an authorized release bundle and publishing credentials to the PowerShell publisher, which checks Partner Center state, creates and verifies its draft, uploads the bundle, and records commit acceptance.

flowchart TD
  A[Authorized release bundle] --> B[Protected Store workflow]
  B --> C[Publisher preflight]
  C --> D[Partner Center draft creation]
  D --> E[Explicit ownership checks]
  E --> F[Upload and commit]
  F --> G[Submission receipt]
Loading

Technical review

Best possible solution:

Land the focused preflight repair after the draft’s validation gates clear, retaining explicit draft ownership and the existing protected publication rollout.

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

Current-main source deterministically throws when PendingApplicationSubmission is omitted; the reported stable submission failure matches that path, and the author reports a base-failing/head-passing fixture reproduction.

Is this the best way to solve the issue?

This is the smallest complete repair: relax only the existing preflight read, preserve positive ownership checks after creation, and cover both outcomes through the existing publisher fixture.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Store pending-draft preflight and publisher fixture keeps the original intent (8ca63eb: The original Store automation rejects existing drafts, preserves product metadata, and binds mutations to its own submission; its merged PR documents these safeguards. Following history beyond the available creation boundary encountered a missing object.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Narrow introduced change: The pinned diff changes only preflight property access and adds two scenarios to the existing publisher fixture; no new production owner or configuration is introduced. (scripts/Submit-MicrosoftStore.ps1:241, 59c7d4da183e)
  • Current-main failure and retained invariant: Main requires the property during preflight; Assert-OwnedDraft separately requires an explicit matching ID after creation, and that ownership guard is unchanged. (scripts/Submit-MicrosoftStore.ps1:239, 177946621f0a)
  • Distinct regression coverage: The new cases exercise successful submission with omitted preflight data and rejection before update/upload/commit when ownership data disappears after creation. (scripts/test-microsoft-store-submission.ps1:254, 59c7d4da183e)
  • Observed release-workflow failure: The linked main-branch Store run failed at submission after source authorization, bundle download, environment validation, and OIDC succeeded. The PR reports the missing-property exception; detailed logs could not be inspected because their Azure storage redirect was blocked. (177946621f0a)
  • Exact-head focused CI: The exact-head fast-validation job passed its Store submission and source-authorization step. Other checks were still running when inspected; no failed check was observed. (.github/workflows/ci.yml:261, 59c7d4da183e)
  • Feature ownership and original intent: The feature history identifies Dallin Romney as author of the original publisher and tests in feat(release): automate Microsoft Store submission #1474 (feat(release): automate Microsoft Store submission), whose stated safeguards include rejecting existing drafts and committing only the owned submission. (scripts/Submit-MicrosoftStore.ps1:217, 8ca63eb746bf)

Likely related people:

  • Dallin Romney: Raw commit 8ca63eb adds scripts/Submit-MicrosoftStore.ps1:220 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 8ca63eb746bf; files: scripts/Submit-MicrosoftStore.ps1)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production and test delta Production +4/-1; tests +31/-1 The small parsing repair uses the existing owner and fixture, with separate coverage for permissive preflight and strict post-creation ownership.

Labels

Label changes:

  • add P2: The defect blocks a release-operator Store submission path without demonstrating an installed-app outage or emergency.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: The defect blocks a release-operator Store submission path without demonstrating an installed-app outage or emergency.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 November 16, 2026, 3:19 PM ET / 20:19 UTC.

@RomneyDa
RomneyDa marked this pull request as ready for review November 17, 2026 01:01
@RomneyDa

Copy link
Copy Markdown
Member Author

Resolved the modify/delete conflicts in 94aa4a4 by preserving the central publisher migration from #1891 (refactor(release): request central Companion Store publication). The retired native publisher and its tests remain deleted. The branch tree now exactly matches current main, so this PR has no remaining file changes and is superseded, not a candidate to restore the old publishing path.

Verified central main already handles omitted pending pointers at preflight while requiring explicit ownership after creation, and includes both omission regression cases:

Validation: pwsh -NoProfile -File scripts/test-store-publication-request.ps1 passed all 31 scenarios; git diff --cached --check passed before commit; git diff origin/main HEAD --exit-code confirms identical trees. No new production-code delta remains. Full Windows closeout remains unavailable on this macOS host; no Windows or live Store success is claimed. No publication action was dispatched.

@RomneyDa
RomneyDa merged commit 20b3175 into openclaw:main Nov 17, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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