Skip to content

chore: restore v4 generated artifact checks - #2478

Closed
shrey150 wants to merge 1 commit into
v4-spikefrom
shrey/stg-2724-v4-ci-cleanup
Closed

chore: restore v4 generated artifact checks#2478
shrey150 wants to merge 1 commit into
v4-spikefrom
shrey/stg-2724-v4-ci-cleanup

Conversation

@shrey150

@shrey150 shrey150 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the remaining z.object(...).strict() protocol schemas with the equivalent z.strictObject(...) form
  • regenerate the Go protocol models to remove an unreachable generated catalog field
  • refresh the deterministic Stagehand extension archive embedded by the Go SDK

These files drifted out of sync while the v4 SDK stack landed, causing unrelated pull requests against v4-spike to fail the TypeScript, Python build, and Go generation checks.

E2E Test Matrix

Command / flow Observed output Confidence / sufficiency
corepack pnpm build && git diff --exit-code -- packages/protocol/stagehand.v4.json && corepack pnpm check && corepack pnpm exec vitest run Builds and checks passed; generated protocol JSON remained unchanged; 119 test files passed, 1 skipped, with 1,093 tests passed. Covers the complete TypeScript CI path that previously rejected the noncanonical strict schemas.
uv --directory packages/sdk-python run --locked python scripts/generate.py --check plus Ruff, ty, and pytest Generation, formatting, lint, and type checks passed; 196 tests passed. Confirms the protocol cleanup does not make the generated Python SDK stale or invalid.
Build the Python wheel, install it into an isolated environment, and run packages/sdk-python/scripts/smoke.py with local Chrome The installed wheel initialized Stagehand, navigated a real headless Chrome page, verified its title, and closed cleanly. Exercises the packaged extension through a real browser, beyond static generation checks.
Go generation check, gofmt, vet, example compilation, package tests with local Chrome, generator tests, and build All commands passed; the Stagehand package and extension packages passed their test suites. Covers the complete Go CI path and proves the regenerated model and embedded extension compile and run together.
Rebuild the server extension and rerun go generate ./... twice The generated Go model and embedded extension SHA-256 hashes were identical across runs, with no additional diff. Confirms the checked-in binary artifact is deterministic rather than a one-off local build.

Tracking

STG-2724


Summary by cubic

Restores v4-spike generated artifacts and strict schemas to bring CI back to green. Addresses STG-2724 by syncing TypeScript, Python, and Go SDK outputs and making the embedded Stagehand extension deterministic.

  • Refactors
    • Replace remaining z.object(...).strict() with z.strictObject(...) in packages/protocol/schemas.ts.
    • Regenerate Go protocol models to drop unreachable __schema8 from generatedModelCatalog.
    • Refresh the embedded Stagehand extension archive at packages/sdk-go/internal/extensionassets/stagehand-extension.zip to the deterministic build.

Written for commit 3b24135. Summary will update on new commits.

Review in cubic

@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3b24135

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

cubic analysis

No issues found across 3 files

Confidence score: 5/5

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

Linked issue analysis

Linked issue: STG-2724: Repair v4-spike generated artifacts and schema strictness

Status Acceptance criteria Notes
Replace remaining z.object(...).strict() schemas with z.strictObject(...) in packages/protocol/schemas.ts The diff shows multiple schema definitions changed from .object(...).strict() to .strictObject(...).
Regenerate Go protocol models to remove the unreachable __schema8 field from generatedModelCatalog models.gen.go diff removes the Schema8 field as described in the issue.
Refresh the embedded Stagehand extension archive to a deterministic build The extension archive is listed as updated and the PR's reproducibility check shows identical SHA-256 across repeated generation runs.
TypeScript, Python, and Go generation/build/tests pass (restoring v4-spike CI) The PR includes E2E test results demonstrating successful TypeScript build/check/tests, Python generation/tests, and Go generation/build/tests after the changes.
Architecture diagram
sequenceDiagram
    participant TS as TypeScript SDK
    participant PV as Protocol Schemas
    participant GoGen as Go Codegen
    participant GoModel as Go Models
    participant GoSDK as Go SDK
    participant Ext as Stagehand Extension

    Note over TS,Ext: PR restores consistency across generated artifacts

    TS->>PV: define schemas with z.strictObject()
    PV->>GoGen: generate Go models from canonical JSON schema
    GoGen->>GoModel: output models.gen.go
    GoModel->>GoSDK: compiled into SDK

    TS->>Ext: build Stagehand extension archive
    Ext->>GoSDK: embedded as stagehand-extension.zip

    alt CI validation
        TS->>PV: verify generated JSON unchanged
        GoSDK->>GoModel: go generate twice yields identical hashes
    end

    Note over GoModel: unreachable __schema8 field removed
Loading

Re-trigger cubic

@shrey150

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #2460. That merge incorporated the schema strictness and refreshed the generated Go model and embedded extension; the three previously failing checks now pass directly on v4-spike.

@shrey150 shrey150 closed this Jul 28, 2026
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.

1 participant