Repository navigation
fix(platform-objects): a team record no longer lists Sessions with "Sign out other devices" - #24881
Conversation
… list on a team Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NftZtMY2EJSyAjctCSfkis
…d list Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NftZtMY2EJSyAjctCSfkis
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NftZtMY2EJSyAjctCSfkis
…gh unknown Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NftZtMY2EJSyAjctCSfkis
…am-sessions-related-list
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 3 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 612b47cb72436bc2805a084f36390eaec91ca086 && git checkout 612b47cb72436bc2805a084f36390eaec91ca086
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin b1676441ba59cc32682ffd41e63e74474ad7fa42 ae89b5720b605d3f79c107f6c1d689c081e6ce3d && git checkout -B drift-repro b1676441ba59cc32682ffd41e63e74474ad7fa42 && git merge --no-ff ae89b5720b605d3f79c107f6c1d689c081e6ce3d
node scripts/docs-audit/affected-docs.mjs --json b1676441ba59cc32682ffd41e63e74474ad7fa42 |
…am-sessions-related-list
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NftZtMY2EJSyAjctCSfkis
Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: FAIL Seat note ·
|
Seat delta note ·
|
席位核对 ·
|
| Item | Reading |
|---|---|
| Shape | Draft PR → main. The body opens Fixes #24765. 3 files, +111/−0. Not governed: check-governed-merges matched 0 of 3 paths. |
| Scope | sys_session.active_team_id sets relatedList: false, so a team record no longer derives a Sessions related list carrying the caller's own "Sign out other devices". The field, its lookup, its column, better-auth's write of activeTeamId, the user's own Sessions list, and the team's Members and Invitations lists are unchanged. |
| Seat's own read | Fix round 1 is changeset-only. The source and test files are byte-identical to the reviewed head. The PR body's changeset line is patched to minor. git merge-tree against main is clean. |
| Review | CONTRACT_REVIEW_TIER, narrowing face. Record 6291356402 was FAIL on 4f4bb1fab7 on the changeset grade alone. That was the seat's claim error: it named patch for a narrowing. The seat's delta 6291722500 carries the record to this head as PASS. |
| Declaration | One changeset, @objectstack/platform-objects minor, BREAKING banner, Clause-②: no (narrowing) at a line start, adr-0087: not-required (no-migration-prescription). No export, key or stored shape moves. |
| Cross-lane | None: packages/platform-objects is this lane's (lane objection 6285664872, answered by triage's relabel). No objection on the card or the seat posts. |
| Gates | Dev at 4f4bb1fab: 66 derived, 66 run, all exit 0. Suites: platform-objects 1204, plugin-auth, plugin-security, runtime, rest and verify in full, with core test:repo 82 passed. Fix round at ae89b5720: the changeset gates exit 0, and the level axis was replayed with the PR's own event (exit 1 on the old head, exit 0 on the new). |
| CI | At this read on ae89b5720b: ci-failure GREEN, all 41 check-runs completed, none failed, the six Test Core shards included. |
Disposition:
open_questions: B,minor(record ②, enforced by Check Changeset). A, no renderer-side pin in objectui: the key is ledgeredlivewith objectui'sderiveRelatedListsas its evidence.deviations: all accepted (record ③). The dependent suites were narrowed, and thecliunit layer was declared to CI, whose Test Core shards are green on this head. The attribution footer is compliant.out_of_scope_findings:sys_invitation.team_id's Invitations list carries an organization-scoped action and invitee-only row actions; it meets no filing gate.
Landing: ordinary queue (pr_ready + automerge_enable through the relay). Fixes #24765 then closes the card.
Generated by Claude Code
Fixes #24765
Clause-②: no (narrowing)
Developer run for the
domain:engineseat 1 dispatch (claim comment 6289444669), sessionsession_01NftZtMY2EJSyAjctCSfkis.What changes
sys_session.active_team_idis a lookup tosys_team. It did not setrelatedList: false, so every team record derived a Sessions related list (Setup → Teams → a team → Related). That list carried the session object's onlylist_toolbaraction, "Sign out other devices". Its confirmation reads "Sign out of every other device where you're currently logged in?", and it revokes the caller's own other sessions, not the team's.packages/platform-objects/src/identity/sys-session.object.ts:active_team_idnow setsrelatedList: false, with a one-line comment saying why. The field, its lookup, its label and its column stay. better-auth still writesactiveTeamIdthere (plugin-auth/src/auth-schema-config.ts).packages/platform-objects/src/identity/sys-team-derived-related-lists.test.ts(new): the pins below..changeset/24765-team-sessions-related-list.md:minorfor@objectstack/platform-objects(fix round 1: a narrowing shipsminorin the launch window, as Check Changeset's level axis enforces), with the BREAKING banner and the ADR-0087 dispositionnot-required (no-migration-prescription)thatcheck-adr-0087-registrationasks of a(narrowing)arm.The read, done before the edit (base
abd5acdaf7)sys_teamdeclares no record page anywhere in the repo (onlysys_organizationandsys_userhave pages), so the console derives the team page's related lists.FieldSchema.relatedListsaysfalsesuppresses the child and absent shows it. The key isliveinpackages/spec/liveness/field.json, whose evidence is objectuideriveRelatedListsskipping the foreign key whenrelatedListisfalse.sys_team(alllookup/master_detailfields inpackages/andexamples/):sys_session.active_team_id(fixed here),sys_team_member.team_id(the team's Members list, which is wanted) andsys_invitation.team_id. The Invitations list on a team is named, not changed. Its toolbar actioninvite_useris org-scoped and not self-scoped. Itsaccept_invitation/reject_invitationrow actions are visible only to the invitee (record.email == ctx.user.email).qa/file ordocs/qa/platform-checklist/item names it.identity-auth.json's revoke-other-sessions item is about a user's own sessions and is unchanged.record:related_listtab onSysUserDetailPage, keyed onsys_session.user_id, and does not go throughactive_team_id.Pins
In
sys-team-derived-related-lists.test.ts, applying the spec's derivation rule to every object this package exports:sys_teamexcludesys_sessionand still includesys_team_member.team_id(a guard against over-applying the key);sys_session.active_team_idis still alookuptosys_teamlabelled "Active Team", withrelatedList: false;SysUserDetailPagestill listssys_sessionbyuser_id;sys_session.user_idstill derives a list onsys_user;revoke_my_other_sessionsis still alist_toolbaraction.Ablation, run through
scripts/ablation-replace.mjson the committed fix. The anchorrelatedList: false,went 1 → 0 on disk and the blob wentadf2c552a667→55e8613a1c8f. The file then ran 2 failed | 3 passed:exclude sys_sessionand the declaration pin went red. Restored: blob == HEADadf2c552a667, andgit diff HEADis empty. The tests importsrc/directly, so nodist/leg applies.Pin sweep: I swept
active_team_id, "Active Team",revoke_my_other_sessions, "Sign out other devices" and the confirmation text acrosspackages/,qa/,docs/qa/platform-checklist/andcontent/docs/. No existing pin moves.Verification
Run at
4f4bb1fab, which is the branch merged withorigin/main3fbef41b4, unless a line says otherwise.pnpm --filter @objectstack/platform-objects typecheck: exit 0. The first run went red on two type errors in the new test file, which I fixed. I did not add a ledger entry.pnpm --filter @objectstack/platform-objects test: exit 0, 80 files, 1204 tests.pnpm --filter @objectstack/core test:repo: exit 0, 6 files, 82 tests (pre-merge head).plugin-authexit 0 (3240 passed, 10 skipped) ·plugin-securityexit 0 (4047 passed, 45 skipped) ·runtimeexit 0 (6782 passed, 19 skipped) ·restexit 0 (6144 passed, 326 skipped) ·verifyexit 0 (376 passed). The fullcliunit layer runs longer than the 10-minute foreground cap, so I left it to CI. Its tests that read identity objects (organization-ownership-inventory,unmanaged-tables,src/lint) ran: exit 0, 94 passed.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackwith no paths derived 66 commands, and I ran all 66. 65 exited 0 on the first pass.pnpm check:dual-build-cjs-loadsexited 3 (PREREQUISITE NOT MET: nodist/). Afterpnpm buildit exited 0.--ranreconciliation: 66 derived, 66 run, 0 NOT-MEASURED, 0 UNRUN, with every line carrying its exit code. After the merge I re-rancheck-adr-0087-registration,check-changeset-no-major,check-empty-changeset,check:i18n,check:type-check-debtandcheck:nul-bytes: all exit 0.node scripts/check-i18n-bundles.mjs: exit 0. All bundles are in sync, so this change regenerates no translation bundle.Acceptance notes
revoke_sessionor to the header action.CONTRACT_REVIEW_TIERreview of record before the queue, run by the seat.Generated by Claude Code