Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: exclude AWAITING_HOST from seed-insights random status selection#25414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
eunjae-lee wants to merge5 commits intomain
base:main
Choose a base branch
Loading
fromdevin/fix-seed-insights-instant-meetings-1764167601

Conversation

@eunjae-lee
Copy link
Contributor

@eunjae-leeeunjae-lee commentedNov 26, 2025
edited by devin-ai-integrationbot
Loading

What does this PR do?

Fixes a bug in the seed-insights script whereAWAITING_HOST status was randomly assigned to bookings along with auserId, which violates the correct behavior of instant meetings.

Problem:

  • The seed script randomly picked from all 5 booking statuses (includingAWAITING_HOST)
  • WhenAWAITING_HOST was selected, the script still assigned auserId
  • Real instant meetings withAWAITING_HOST status should haveuserId = NULL until a host joins
  • This created incorrect test data that doesn't match production behavior

Solution:

  • Filter outAWAITING_HOST fromBookingStatus values usingObject.values(BookingStatus).filter()
  • This approach is more maintainable than listing valid statuses explicitly - if new statuses are added in the future, they will automatically be included
  • MovedvalidStatusesForSeed to module level so it's calculated once at load time instead of on every shuffle call
  • Added comments explaining why this status requires special handling

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require adocumentation change. N/A - seed script only.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works. N/A - this is a seed script for test data generation.

How should this be tested?

  1. Run the seed script:yarn seed-insights
  2. Verify noAWAITING_HOST bookings are created with auserId:
SELECTCOUNT(*)FROM"Booking"WHERE status='awaiting_host'AND"userId"IS NOT NULLAND"createdAt"> NOW()- INTERVAL'1 day';-- Should return 0 for newly seeded data
  1. Verify other statuses are still generated:
SELECT status,COUNT(*)FROM"Booking"WHERE"createdAt"> NOW()- INTERVAL'1 day'GROUP BY status;-- Should show ACCEPTED, PENDING, CANCELLED, REJECTED (but not AWAITING_HOST)

Checklist

  • I have read thecontributing guide
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have checked if my changes generate no new warnings

Link to Devin run:https://app.devin.ai/sessions/08f634e7210d415982d71c8f687b4468
Requested by:eunjae@cal.com (@eunjae-lee)

AWAITING_HOST status requires special handling for instant meetings:- userId must be NULL (not assigned until host joins)- Requires InstantMeetingToken to be created- Only used for actual instant meetings via InstantBookingCreateServiceThis fix prevents the seed script from creating invalid test data whereAWAITING_HOST bookings have a userId assigned, which doesn't matchproduction behavior.Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@keithwillcodekeithwillcode added consumer corearea: core, team members only labelsNov 26, 2025
More maintainable approach - if new statuses are added in the future,they will automatically be included in seed data generation.Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
@vercel
Copy link

vercelbot commentedNov 26, 2025
edited
Loading

The latest updates on your projects. Learn more aboutVercel for GitHub.

2 Skipped Deployments
ProjectDeploymentPreviewCommentsUpdated (UTC)
calIgnoredIgnoredNov 26, 2025 4:14pm
cal-euIgnoredIgnoredNov 26, 2025 4:14pm

Calculate the filtered statuses once at module load instead of on everyshuffle call for better performance.Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
@eunjae-leeeunjae-lee marked this pull request as ready for reviewNovember 26, 2025 16:15
@graphite-appgraphite-appbot requested a review froma teamNovember 26, 2025 16:15
Copy link
Contributor

@cubic-dev-aicubic-dev-aibot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@github-actions
Copy link
Contributor

E2E results are ready!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@cubic-dev-aicubic-dev-ai[bot]cubic-dev-ai[bot] left review comments

@Udit-takkarUdit-takkarUdit-takkar approved these changes

Assignees

No one assigned

Labels

consumercorearea: core, team members onlyready-for-e2esize/S

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@eunjae-lee@Udit-takkar@keithwillcode

[8]ページ先頭

©2009-2025 Movatter.jp