Skip to content

TW-4829: Harden CLI calendar scheduling flows and test coverage#49

Merged
qasim-nylas merged 1 commit intomainfrom
codex/tw-4829-harden-cli-calendar-scheduling
Apr 12, 2026
Merged

TW-4829: Harden CLI calendar scheduling flows and test coverage#49
qasim-nylas merged 1 commit intomainfrom
codex/tw-4829-harden-cli-calendar-scheduling

Conversation

@qasim-nylas
Copy link
Copy Markdown
Collaborator

@qasim-nylas qasim-nylas commented Apr 12, 2026

Summary

This PR hardens the CLI calendar and timezone scheduling paths by replacing misleading or stubbed behavior with real scheduling logic, reducing duplicate helper code in touched paths, and restoring test discovery that was previously missing important coverage.

Jira

What changed

  • wired calendar ai schedule through real event-creation logic instead of reporting success without creating anything
  • moved AI scheduling tool behavior onto a real implementation path in internal/adapters/ai/scheduler_tools.go
  • replaced placeholder timezone meeting-finder behavior with real overlap computation in the shared timezone service
  • removed hard-coded participant timezone assumptions from calendar find-time and aligned it with shared scheduling logic
  • fixed minute-precision working-hours scoring so ranges like 09:30-17:30 are handled correctly
  • reduced duplicate JSON request/response handling in the touched Nylas adapter methods by routing through shared helpers
  • introduced a shared CLI command test helper in internal/cli/testutil/command.go
  • renamed previously skipped *_test_basic.go / *_test_advanced.go files to real *_test.go names so go test discovers them normally
  • added regression coverage for AI scheduling and minute-based meeting-time scoring
  • removed the false-positive security-scan trigger in internal/cli/dashboard/keys.go

Why this matters

Before this change, parts of the scheduling experience could report success without actually performing the underlying action, or return false negatives because the implementation was effectively stubbed. On top of that, some important tests were not being executed at all because of filename conventions, which made regressions easy to miss.

Validation

  • make ci-full
  • full unit tests
  • race detector suite
  • security scan
  • vuln check
  • integration tests
  • Air integration tests

Notes

  • make ci-full passed on this branch immediately before opening the PR.
  • The PR includes the test-file renames that restore discovery, so the diff is larger but most of those changes are mechanical renames rather than logic churn.

@qasim-nylas qasim-nylas requested a review from AaronDDM April 12, 2026 12:13
Copy link
Copy Markdown
Collaborator

@AaronDDM AaronDDM left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@qasim-nylas qasim-nylas merged commit 2380d9a into main Apr 12, 2026
6 checks passed
@qasim-nylas qasim-nylas deleted the codex/tw-4829-harden-cli-calendar-scheduling branch April 12, 2026 12:13
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.

2 participants