fix(onboarding-complete): use /profile/ endpoint; drop workspace_join#61
Merged
Merged
Conversation
# What was wrong PR #59 added tests/auth/onboarding-complete-flag.spec.ts probing Plane's `/api/users/me/` for `is_onboarded` + `onboarding_step` — fields that don't exist on that endpoint. Live verification was blocked at PR-time by the bundle's IDP loop; the test failed on the first green-bundle CI run with `is_onboarded: undefined`. # What we found probing the live API Plane splits user data across three endpoints: /api/users/me/ basic identity (email, name, etc.) /api/users/me/profile/ onboarding state — is_onboarded, onboarding_step, last_workspace_id /api/users/me/settings/ workspace settings (used elsewhere) All three contract observables live on `/profile/`. Verified against the live sandbox 2026-06-05 for FOSS_USER: - is_onboarded: true - last_workspace_id: <matches PLANE_WORKSPACE_ID> - onboarding_step.profile_complete: true - onboarding_step.workspace_create: true - onboarding_step.workspace_invite: true - onboarding_step.workspace_join: false ← intentional The fourth sub-step (`workspace_join`) tracks Plane's invite-link join flow. SSO-auto-joined users (FOSS_USER, NORMAL_USER) are added by the bundle's system-bot directly, NOT through Plane's invite UI, so this flag legitimately stays false. The load-bearing contract observable — `is_onboarded: true` — is correctly set; Plane treats the user as fully onboarded for UX purposes. # Fixes 1. tests/auth/onboarding-complete-flag.spec.ts - Consolidate to a single endpoint: /api/users/me/profile/ (carries is_onboarded + onboarding_step + last_workspace_id) - Drop workspace_join from the expected sub-step list — it's auto-join-vacuous (set only through the invite flow) - File-head comment documents the empirical probe + the workspace_join rationale 2. vendor/openspec/specs/workspace-auto-join/spec.md - Requirement body now spells out the three deterministic sub-step flags plus is_onboarded + last_workspace_id - Explicit note that workspace_join legitimately stays False for SSO-auto-joined users (the openspec was previously claiming True for all four — wrong for the SSO path) - Scenario lists the three deterministic AND flags plus a deliberate AND-False on workspace_join, so a future implementation that flips workspace_join to True under auto-join would surface as a contract drift (catchable by the shape-review checklist) # Audit 88 total / 65 covered / 23 deferred / 0 missing — unchanged (this PR fixes an existing test, doesn't add or remove requirements). NOT live-verified yet — bundle IDP was looping during commit; will be validated on the next green-bundle CI pass. Test now matches Plane's actual API shape so it should pass cleanly.
SSO Spec Coverage AuditContract source:
All 88 spec requirements are accounted for. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
PR #59 added tests/auth/onboarding-complete-flag.spec.ts probing Plane's
/api/users/me/foris_onboarded+onboarding_step— fields that don't exist on that endpoint. Live verification was blocked at PR-time by the bundle's IDP loop; the test failed on the first green-bundle CI run withis_onboarded: undefined.What we found probing the live API
Plane splits user data across three endpoints:
/api/users/me/ basic identity (email, name, etc.)
/api/users/me/profile/ onboarding state — is_onboarded,
onboarding_step, last_workspace_id
/api/users/me/settings/ workspace settings (used elsewhere)
All three contract observables live on
/profile/. Verified against the live sandbox 2026-06-05 for FOSS_USER:The fourth sub-step (
workspace_join) tracks Plane's invite-link join flow. SSO-auto-joined users (FOSS_USER, NORMAL_USER) are added by the bundle's system-bot directly, NOT through Plane's invite UI, so this flag legitimately stays false. The load-bearing contract observable —is_onboarded: true— is correctly set; Plane treats the user as fully onboarded for UX purposes.Fixes
tests/auth/onboarding-complete-flag.spec.ts - Consolidate to a single endpoint: /api/users/me/profile/ (carries is_onboarded + onboarding_step + last_workspace_id) - Drop workspace_join from the expected sub-step list — it's auto-join-vacuous (set only through the invite flow) - File-head comment documents the empirical probe + the workspace_join rationale
vendor/openspec/specs/workspace-auto-join/spec.md
Audit
88 total / 65 covered / 23 deferred / 0 missing — unchanged (this PR fixes an existing test, doesn't add or remove requirements).
NOT live-verified yet — bundle IDP was looping during commit; will be validated on the next green-bundle CI pass. Test now matches Plane's actual API shape so it should pass cleanly.
Motivation / Background
This Pull Request has been created because:
Detail
This Pull Request changes:
Additional information
TIP: Provide additional information such as screenshots, benchmarks, reference to other repositories or alternative solutions
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]