Skip to content

test: adapt cloudx tests to Console V3 and staging API changes - #463

Merged
alnr merged 5 commits into
masterfrom
alnr/console-v3-ci
Oct 22, 2026
Merged

alnr merged 5 commits into
masterfrom
alnr/console-v3-ci

Conversation

@alnr

@alnr alnr commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

The nightly CI on master has been red since Jul 29. The cloudx tests run against staging and broke on three changes outside this repo:

Since Failing Cause
Sep 4 cloudx/project Since the Go 1.27 bump in cloud (#14423), the hydra config type error says …into Go value of type string instead of naming the struct field.
Oct 15 cloudx/client Session-authenticated POST /projects requires a workspace_id (cloud #15262).
Oct 21 all cloudx packages Console V3 (cloud #14538) renders login with Ory Elements v1.

Changes

The Console V3 changes are in testhelpers.go:

  • Use the ory/form/node/input/<name> test IDs, which are now on the <input> itself. Wait for the password field, which renders both on a first login and when reconfirming a session, and fill the identifier only if it is visible.
  • Accept 422 from the login submission. Elements submits with fetch, and Kratos answers a login that continues to consent with 422 browser_location_change_required, its only use of 422 in self-service flows. The check uses the status alone because the page navigates away and the body can be discarded before it is read.
  • Block consent.ory.com. Its cookie banner covers the consent screen's Allow button (#consent-manager-root … intercepts pointer events).

The other changes:

  • client tests create every project in a workspace and assert that creating one without a workspace fails. ory create project already requires a workspace, so users are not affected.
  • project asserts on cannot unmarshal number into Go, which holds across Go versions.

Testing

Run locally against staging:

  • accountexperience, identity, oauth2, organizations, project and relationtuples pass.
  • In client, the preamble and func=Authenticate pass, covering a first login, a re-login with an existing session, consent, and authenticated API calls.
  • The client subtests ListProjects, CreateProject and SelectProjectWorkspace were not verified locally. Staging returned 429 on project creation from my IP. CI sends the rate-limit header, so this PR's run covers them.

Not fixed here

The Generate docs job will still fail:

  • ORY_BOT_PAT has failed since Oct 7, most likely because it expired 90 days after its Jul 9 update. The release job uses the same secret.
  • Since Jul 29, the ory/docs master ruleset rejects the bot's direct push. ory/ci/docs/cli-next needs a PR-based flow or a bypass actor. Hydra, Keto, Kratos and Oathkeeper use the same action.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UQhMvbXeT2HENW1Gdm5R9C

Summary by CodeRabbit

No user-facing changes are included in this update. The changes are limited to automated checks and test sign-in handling; the app’s features and behavior remain unchanged.

The nightly cloudx tests against staging broke on changes outside this repo:

- Console V3 renders login with Ory Elements v1. The inputs carry
  ory/form/node/input/<name> test IDs, the form is submitted with fetch
  so a login continuing to consent is answered with 422
  browser_location_change_required, and the consent.ory.com cookie
  banner covers the consent screen's Allow button.
- Session-authenticated project creation requires a workspace.
- Since Go 1.27, the hydra config type error no longer names the
  struct field.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UQhMvbXeT2HENW1Gdm5R9C
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e597ce0d-6086-47de-8b73-2b992f65a10f
📥 Commits

Reviewing files that changed from the base of the PR and between 962d6cf and b5d1364.

⛔ Files ignored due to path filters: 1
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing: 6
  • .docker/Dockerfile-build
  • .github/workflows/ci.yaml
  • Makefile
  • cmd/cloudx/client/command_helper_test.go
  • cmd/cloudx/proxy/helpers.go
  • go.mod

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 913d24da-21ae-458f-b716-61f8509c1ff5
📥 Commits

Reviewing files that changed from the base of the PR and between 7c82b95 and 962d6cf.

📒 Files selected for processing: 3
  • cmd/cloudx/client/command_helper_test.go
  • cmd/cloudx/project/update_test.go
  • cmd/cloudx/testhelpers/testhelpers.go

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

Project tests now use workspace-associated projects and check that project creation requires a workspace. Browser login helpers change request matching, response handling, and form-field checks. A project update test expects a shorter Hydra unmarshal error message.

Changes: Project workspace tests

Layer / File(s) Summary
Workspace-scoped project test setup
cmd/cloudx/client/command_helper_test.go
The tests associate projects with a workspace and check the required-workspace error during project creation.

Browser login helpers

Layer / File(s) Summary
Login request and field handling
cmd/cloudx/testhelpers/testhelpers.go
NewPage blocks requests to consent.ory.com. The login helper matches POST submissions, treats HTTP 422 as a successful continuation, and fills the password after waiting for its field.

Hydra error expectation

Layer / File(s) Summary
Unmarshal error expectation
cmd/cloudx/project/update_test.go
The expected Hydra unmarshal error message no longer includes the “struct field” suffix.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 962d6

The test updates are mergeable after normal checks; no confirmed issue remains that would block login or project-test workflows.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the primary change: adapting cloudx tests for Console V3, staging API changes, and updated error behavior.
Description check Passed The description clearly explains the causes, implemented changes, testing status, and remaining documentation-job failures. It does not reproduce the template headings or checklist, but the required c…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description clearly explains the causes, implemented changes, testing status, and remaining documentation-job failures. It does not reproduce the template headings or checklist, but the required change context is substantially complete.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

alnr and others added 4 commits October 22, 2026 14:16
golangci-lint supports Go 1.27 from v2.13.0, so the pin moves to v2.15.0.
Its install script comes from golangci-lint.run: the script on the
repository's abandoned master branch also matches the .sbom.json line
in the checksums of every release since v2.12.2 and rejects the
tarball.

The newer staticcheck flags rs/cors' deprecated AllowOriginRequestFunc.
The function never looks at the request, so AllowOriginFunc replaces
it with the same behavior.

There is no golang:1.27 image on Alpine 3.22, and the CGO build has to
run on the musl it was linked against, so both stages of
Dockerfile-build move to Alpine 3.24.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UQhMvbXeT2HENW1Gdm5R9C
A free workspace holds two development projects, so with every project
now in a workspace, the third one in a workspace fails with 402
quota_exceeded. SelectProjectWorkspace creates its project in a
workspace of its own, which it then selects, and CreateProject creates
two projects instead of three.

GET /projects lists only projects shared with the identity directly,
never workspace projects, so the ListProjects case for it has nothing to
list once projects cannot be created outside a workspace. The workspace
case covers sessions and workspace and project API keys.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UQhMvbXeT2HENW1Gdm5R9C
Fixes GO-2026-6612 (critical), which fails the image vulnerability scan.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UQhMvbXeT2HENW1Gdm5R9C
ory/docs only accepts changes to master through pull requests, so the
direct push in ory/ci/docs/cli-next is rejected, and ORY_BOT_PAT no
longer authenticates. The job stays defined so it can be re-enabled once
the action publishes through a pull request.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UQhMvbXeT2HENW1Gdm5R9C
@alnr
alnr merged commit 6d5f36c into master Oct 22, 2026
19 checks passed
@alnr
alnr deleted the alnr/console-v3-ci branch October 22, 2026 12:47
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