Skip to content

bug(desktop): stale contract hashes fail Windows validation #1995

Closed

Description

@hidb4ai

Describe the bug

Desktop validation fails when the checked-in frontend and native operation manifests retain an old OpenAPI SHA-256. The lint failure skips installer construction and acceptance tests, but the unconditional artifact upload then reports a second error about missing files.

Affected run: https://github.com/oceanbase/powercontext/actions/runs/38522801348/job/115741438175

Both attempts of this run fail at the same contract check. Retrying this commit does not resolve the failure.

Steps to reproduce

  1. Check out 0867144ceed7e78910d1745df66ce72ca1a05ce0.
  2. Install the pinned Desktop dependencies with pnpm --dir desktop install --frozen-lockfile.
  3. Run pnpm --dir desktop generate:check or pnpm --dir desktop lint.

Expected behavior

All checked-in Desktop contract outputs should match openapi/powercontext.yaml. The regular contract checks should detect a stale frontend or native contract identity before it reaches the Windows packaging workflow.

When an earlier validation step fails before producing artifacts, the upload step should preserve the original failure without adding a misleading missing-files error. Successful builds should still reject missing artifacts.

Actual behavior

The first failure is:

Error: Contract drift: ui/src/generated/operations.ts

The current normalized OpenAPI SHA-256 is c4571e4bd59833451e3091ee604e836d185643b0b0d9fa08dceb8eea43060cbf, while both manifests retain 7e1c301bf7f2ac51781280959efd0b2d92511ddeadee8314ba1683d956c93cc7:

  • desktop/ui/src/generated/operations.ts
  • desktop/src-tauri/src/transport/operations.json

Installer construction and smoke testing are skipped. The upload step uses if: always() with if-no-files-found: error, so it also fails because neither the installer nor the acceptance reports were created.

A previous run also failed on generated-contract drift in both attempts: https://github.com/oceanbase/powercontext/actions/runs/37881095166. These reproduced failures are deterministic; they do not establish the cause of every reported intermittent failure.

Environment

  • Commit: 0867144ceed7e78910d1745df66ce72ca1a05ce0
  • Workflow: .github/workflows/desktop.yml, windows job
  • Runner: windows-2025
  • Node: 24.14.1
  • pnpm: 11.13.1
  • The same contract mismatch was reproduced locally on Linux.

Are you willing to submit a PR to fix this bug?

Yes. The fix regenerates both manifests, adds a contract identity regression check to the regular Python contract suite, and keeps artifact uploads strict on successful jobs while warning on empty uploads after an earlier failure.

Activity

  1. added
    bug
    on Oct 14, 2026
  2. moved this from Todo to In progress in PowerContexton Oct 14, 2026
  3. E2ern1ty commented on Oct 14, 2026

    @E2ern1ty

    Hi maintainers, I'd like to work on this issue.

    I confirmed on current master (666b043a) that both manifests still retain the stale hash 7e1c301b…, and the last change to openapi/powercontext.yaml landed in #1933 (0867144c) — the contract outputs were not regenerated with it. Plan:

    • Regenerate the desktop frontend and native operation manifests from the current OpenAPI spec so pnpm --dir desktop generate:check passes again.
    • Fix the Windows packaging workflow so an upload after a skipped build reports the original validation failure instead of an if-no-files-found error, while successful builds still fail on missing artifacts.
    • Verify locally with generate:check and lint.
  4. added a commit that references this issue on Oct 14, 2026
    407f31c
  5. moved this from In progress to Done in PowerContexton Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions