Skip to content

fix(team): accept omitted system_created in team responses - #378

Merged
l1shen merged 1 commit into
oomol-lab:mainfrom
l1shen:fix/team-list-missing-system-created
Oct 14, 2026
Merged

l1shen merged 1 commit into
oomol-lab:mainfrom
l1shen:fix/team-list-missing-system-created

Conversation

@l1shen

@l1shen l1shen commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

The membership API can return a team without system_created, causing oo team list to reject an otherwise successful response with “The team list response body is unsupported.” Accept an omitted marker as false, while continuing to reject invalid field types and missing required identity or role fields.

Add regression coverage for omitted and invalid markers, and exercise a mixed response through the existing team CLI tests. The CLI output contract and telemetry remain unchanged; no documentation update is needed.

Validation:

  • bun run lint:fix
  • bun run ts-check
  • bun run knip
  • bun run test: 2031 passed, 9 skipped, 0 failed
  • Live API verification with bun run index.ts team list --json: exited successfully and returned 4 teams

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 7c1cf325-a8ff-4940-a0f5-06634b0c25da
📥 Commits

Reviewing files that changed from the base of the PR and between 17f5e45 and b4e3e42.

📒 Files selected for processing: 3
  • src/application/commands/team/index.cli.test.ts
  • src/application/commands/team/shared.test.ts
  • src/application/commands/team/shared.ts
💤 Files with no reviewable changes: 1
  • src/application/commands/team/index.cli.test.ts

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Summary by CodeRabbit

  • Bug Fixes
    • Team responses that omit the system-created marker are now accepted and treated as not system-created. Invalid marker values are still rejected.

Walkthrough

The team response schema now defaults an omitted system_created field to false. Tests cover this default, reject null, "false", and 0 as marker values, and continue to require role. A CLI test fixture no longer includes the marker on its second team.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to b4e3e

Omitted markers are accepted as false while invalid markers and missing required fields remain rejected. No material merge risk is evident.

Pre-merge checks: Passed 4
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title uses the required <type>(<scope>): <subject> format, uses English, and accurately describes the team response change.
Description check Passed The description directly explains the omitted system_created handling, validation behavior, regression coverage, and reported verification for the changeset.
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.
✨ Finishing Touches
✨ Simplify code
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@l1shen
l1shen merged commit 144cec4 into oomol-lab:main Oct 14, 2026
6 checks passed
@l1shen
l1shen deleted the fix/team-list-missing-system-created branch October 14, 2026 09:07
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