Skip to content

feat(minutes,vc): emit typed error envelopes across both domains#1234

Merged
evandance merged 1 commit into
mainfrom
feat/errs-migrate-minutes-vc
Jun 8, 2026
Merged

feat(minutes,vc): emit typed error envelopes across both domains#1234
evandance merged 1 commit into
mainfrom
feat/errs-migrate-minutes-vc

Conversation

@evandance

@evandance evandance commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Migrate error handling in the minutes and vc (video-conference) command domains from the legacy output.Err* / output.Exit* / fmt.Errorf style to typed errs.* errors. Failures now carry a stable category and subtype, so callers can branch on the error kind — invalid input, missing permissions, network/file-I/O failures, remote API errors — instead of scraping free-form text.

The migration covers both domains end to end: input/flag validation, network/transport, local file I/O, missing-scope, and remote API-boundary errors are all typed, and batch commands report partial failures explicitly.

Changes

  • shortcuts/minutes/ (+upload, +update, +speaker-replace, +search, +download) and shortcuts/vc/ (+meeting-join, +meeting-leave, +meeting-events, +search, +recording, +notes) now build typed errors for validation, network, and file-I/O failures, and route their API calls through the typed request path (runtime.CallAPITyped) so remote API errors are classified rather than surfaced as free-form envelopes.
  • API-error enrichment reads the typed problem in place to attach command-specific messages and hints (e.g. no-edit-permission, speaker-not-found) while preserving the server-provided code and subtype. Endpoint-specific codes such as minutes 2091001 are enriched at the command site; cross-command codes (2091005, vc 121004 / 121005) are registered in internal/errclass/codemeta_{minutes,vc}.go for stable classification.
  • Batch commands (+download, +recording, +notes) report all-failed runs as an explicit partial-failure result — per-item results on stdout with a non-zero exit — instead of a success-shaped envelope.
  • Shared pre-check helpers (exactly-one, safe-path, open-id resolution, user-id, page-size) and the file-save mapping are called through their typed common.*Typed variants, so the migrated paths neither construct nor forward legacy errors. The only remaining intermediate fmt.Errorf sites (an net/http redirect callback and a timestamp parser whose error is re-wrapped into a typed validation error) are annotated.
  • Extends the typed-error lint guards to cover both domains: the errscontract migrated-envelope and legacy-common-helper rules plus golangci forbidigo now forbid legacy error construction and legacy shared-helper calls on shortcuts/minutes/ and shortcuts/vc/, so regressions cannot reappear.

Behavioral notes

  • No change to flags, command output schema, or success-path behavior.
  • Permission failures (minutes no-edit/read, vc no-view) now exit with the permission exit code rather than the generic API code, matching the typed taxonomy.
  • A batch run where every item fails now exits non-zero with ok:false and the per-item results still on stdout (previously a success-shaped envelope plus a generic API error).

Test Plan

  • go build ./... — clean.
  • go vet ./shortcuts/minutes/... ./shortcuts/vc/... ./internal/errclass/... — clean.
  • gofmt -l on the migrated dirs — no output.
  • go test ./shortcuts/minutes/... ./shortcuts/vc/... ./internal/errclass/... — green; tests assert the typed shape (category, subtype, param, exit code) and the partial-failure envelope.
  • go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6 run --new-from-rev=origin/main — 0 issues.
  • go run -C lint . .. (errscontract: migrated-envelope + legacy-common-helper rules) — 0 violations on the migrated paths.

Related Issues

Part of the typed-errors migration; builds on the drive-domain pattern (#1205) and the typed shared pre-checks (#1242).

Summary by CodeRabbit

  • Bug Fixes
    • Standardized typed errors across Minutes and VC commands for clearer validation, permission, and network messages; improved overwrite/format validation and partial-failure reporting (returns structured partial-failure outputs when batch workbooks fail).
  • Tests
    • Added extensive tests asserting typed validation, permission, network, and partial-failure behaviors for Minutes and VC flows.

@evandance evandance added domain/minutes Minutes domain domain/vc PR touches the vc domain size/M Single-domain feat or fix with limited business impact feature labels Jun 2, 2026
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Migrates minutes and VC shortcuts from legacy output-based errors to typed errs, switches API calls to CallAPITyped, registers minutes/vc codemeta, extends forbidigo lint scopes, refactors query params to map-based payloads, and adds tests asserting typed validation/permission errors and partial-failure output.

Changes

Typed Error Framework Migration for Minutes and VC Shortcuts

Layer / File(s) Summary
Error framework infrastructure and lint configuration
.golangci.yml, internal/errclass/codemeta_minutes.go, internal/errclass/codemeta_vc.go, lint/errscontract/*
Extend forbidigo path scopes to include shortcuts/minutes/ and shortcuts/vc/, add minutes and VC codemeta registrations via mergeCodeMeta, and mark minutes paths as migrated for legacy envelope/helper prohibitions.
Minutes +download: validation, network, file save, output
shortcuts/minutes/minutes_download.go, shortcuts/minutes/minutes_download_test.go
Validation, API/network, and file-save errors are converted to typed errs; per-token results carry a typed err; single-token mode returns typed errors directly; batch all-fail returns runtime.OutPartialFailure; adds typed-error lock tests.
Minutes search, speaker-replace, update, upload & tests
shortcuts/minutes/minutes_*.go, shortcuts/minutes/minutes_*_test.go
Switch validation to typed errs.NewValidationError(...).WithParam(...), use typed helpers for ID/page validation/resolution, swap API calls to runtime.CallAPITyped, and update tests to assert typed Validation/Permission errors and params.
VC meeting events, join, leave & tests
shortcuts/vc/vc_meeting_*.go, shortcuts/vc/vc_meeting_*_test.go
Refactor meeting-events params to map[string]interface{}, change API calls to CallAPITyped, emit typed validation errors for meeting-id/page-size/time flags with .WithParam(...), update auto-pagination and flattening, and add tests validating param shapes and typed errors.
VC notes orchestration and error enrichment
shortcuts/vc/vc_notes.go, shortcuts/vc/vc_notes_test.go
Migrate multi-API flows (calendar, meeting relations, minute token, note/detail, artifacts) to CallAPITyped with map params, use errs.ProblemOf to enrich permission messages/hints, convert validation to typed errs, return OutPartialFailure when appropriate, and add tests for enrichment and partial-failure JSON.
VC recording & search: typed errs, params, and tests
shortcuts/vc/vc_recording.go, shortcuts/vc/vc_search.go, shortcuts/vc/vc_*_test.go
Convert recording/search validation to typed errs (missing-scope as PermissionError), refactor search params to map-based shape, switch to CallAPITyped, return partial-failure outputs on all-fail batches, and add tests for missing-scope, typed validation params, scalar param shapes, and partial-failure output.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • larksuite/cli#1242: Adds shortcuts/minutes/ to migrated-paths for no_legacy_common_helper_call (related lint + typed-helper migration).
  • larksuite/cli#984: Introduced core errs framework and lint guards extended by this PR.
  • larksuite/cli#333: Overlaps in resolveMeetingIDsFromCalendarEvent and VC notes-related logic.

Suggested labels

domain/calendar

Suggested reviewers

  • zhaoleibd
  • liangshuo-1

Poem

🐰 I hopped through code with tiny paws,

Replacing wraps and legacy jaws.
Typed errs now guard each CLI bend,
Lints and tests keep errors penned.
A carrot cheers this migration's end.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.39% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: migrating error handling in minutes and vc domains to typed error envelopes.
Description check ✅ Passed The PR description comprehensively covers all required sections: clear summary of the migration scope, detailed change list, test plan with verification steps, and related issue references.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/errs-migrate-minutes-vc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot added size/L Large or sensitive change across domains or core paths and removed domain/minutes Minutes domain size/M Single-domain feat or fix with limited business impact labels Jun 2, 2026
@evandance evandance added the domain/minutes Minutes domain label Jun 2, 2026
@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.62338% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.24%. Comparing base (e40ef66) to head (501f2ba).

Files with missing lines Patch % Lines
shortcuts/minutes/minutes_download.go 60.00% 12 Missing ⚠️
shortcuts/vc/vc_notes.go 80.00% 4 Missing and 2 partials ⚠️
shortcuts/minutes/minutes_speaker_replace.go 72.22% 4 Missing and 1 partial ⚠️
shortcuts/vc/vc_meeting_events.go 78.94% 4 Missing ⚠️
shortcuts/minutes/minutes_search.go 81.25% 3 Missing ⚠️
shortcuts/minutes/minutes_update.go 66.66% 2 Missing and 1 partial ⚠️
shortcuts/vc/vc_search.go 85.71% 2 Missing ⚠️
shortcuts/minutes/minutes_upload.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1234      +/-   ##
==========================================
+ Coverage   71.14%   71.24%   +0.09%     
==========================================
  Files         685      687       +2     
  Lines       65770    65714      -56     
==========================================
+ Hits        46793    46815      +22     
+ Misses      15326    15258      -68     
+ Partials     3651     3641      -10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@evandance evandance force-pushed the feat/errs-migrate-minutes-vc branch from b60ea07 to 0d4fab3 Compare June 3, 2026 07:18
@github-actions github-actions Bot removed the domain/minutes Minutes domain label Jun 3, 2026
@evandance evandance marked this pull request as ready for review June 3, 2026 08:27
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@501f2ba21a7e845456b3d81640dd6637950a4d3f

🧩 Skill update

npx skills add larksuite/cli#feat/errs-migrate-minutes-vc -y -g

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
shortcuts/vc/vc_recording.go (1)

119-129: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use the active credential resolver for the missing-scope precheck.

This block only inspects auth.GetStoredToken(appID, userOpenID), so the new typed missing_scope error is skipped whenever the current user credential comes from another resolver path or a refreshed token that is not mirrored in the store. shortcuts/vc/vc_notes.go already uses runtime.Factory.Credential.ResolveToken(...) for the same check, so these two VC commands will diverge for the same login state unless this one resolves scopes the same way.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@shortcuts/vc/vc_recording.go` around lines 119 - 129, The missing-scope
precheck currently uses auth.GetStoredToken(appID, userOpenID) which misses
credentials resolved via the active resolver; update this block to call
runtime.Factory.Credential.ResolveToken(runtime.As(), appID, userOpenID)
(matching shortcuts/vc/vc_notes.go) and use the returned token when invoking
auth.MissingScopes, falling back to auth.GetStoredToken only if ResolveToken
returns nil or an error; keep the same error construction
(errs.NewPermissionError ... WithHint ... WithMissingScopes ...
WithIdentity(string(runtime.As()))) and ensure appID, userOpenID,
auth.MissingScopes, runtime.Factory.Credential.ResolveToken and runtime.As() are
the referenced symbols to locate the change.
shortcuts/vc/vc_notes.go (1)

372-381: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Don't count echoed minute_token inputs as successful payload.

On the error path, fetchNoteByMinuteToken still returns the queried minute_token, and hasNotesPayload later treats any non-empty minute_token as success. A batch where every /minutes/{token} call fails will therefore skip OutPartialFailure and exit 0, even though nothing was actually fetched. Count only fetched note/minute data here, or make the success test mode-aware so an echoed identifier does not satisfy it.

Also applies to: 390-397, 750-761

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@shortcuts/vc/vc_notes.go` around lines 372 - 381, The current success test
treats any non-empty "minute_token" as a valid payload which lets echoed tokens
from fetchNoteByMinuteToken count as success; update hasNotesPayload to ignore
"minute_token" (or require it be accompanied by real content like
"meeting_notes", "note_doc_token", "verbatim_doc_token", "shared_doc_tokens", or
"artifacts") so only actual fetched note data marks success, and adjust any
other places that relied on minute_token-as-success (including the other
occurrences you flagged) and related logic around fetchNoteByMinuteToken to
ensure echoed tokens do not short-circuit error handling.
🧹 Nitpick comments (1)
.golangci.yml (1)

79-82: 💤 Low value

Stale "drive-only" comment after adding minutes/vc.

Line 81 now enforces errs-no-legacy-helper on shortcuts/minutes/ and shortcuts/vc/, but the preceding comment still states the rule is "drive-only". The related comments in the forbid block (Lines 110-115, "this is drive-scoped") and the suggestion text pointing only to the drive-local helpers in shortcuts/drive/drive_errors.go (Lines 119-120) are now misleading for minutes/vc maintainers. Please update these comments to reflect the broadened scope.

📝 Suggested comment update
-      # errs-no-legacy-helper is drive-only: the shared helpers it bans are
-      # still used by other domains until their later migration phase.
+      # errs-no-legacy-helper enforced on migrated domains (drive, minutes, vc):
+      # the shared helpers it bans are still used by not-yet-migrated domains.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.golangci.yml around lines 79 - 82, Update the stale comment that says
"drive-only" to reflect that the errs-no-legacy-helper rule now applies to
shortcuts/drive/, shortcuts/minutes/, and shortcuts/vc/ (i.e., broaden the
wording to mention drive/minutes/vc or "drive-scoped and minutes/vc"), and
likewise adjust the related comments in the forbid block and the suggestion text
that currently point only to shortcuts/drive/drive_errors.go so they no longer
imply the rule is drive-exclusive; locate the comments around the path-except
entry for the errs-no-legacy-helper rule and the forbid/suggestion comments and
change their wording to accurately state the rule's expanded scope.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@shortcuts/vc/vc_notes.go`:
- Around line 372-381: The current success test treats any non-empty
"minute_token" as a valid payload which lets echoed tokens from
fetchNoteByMinuteToken count as success; update hasNotesPayload to ignore
"minute_token" (or require it be accompanied by real content like
"meeting_notes", "note_doc_token", "verbatim_doc_token", "shared_doc_tokens", or
"artifacts") so only actual fetched note data marks success, and adjust any
other places that relied on minute_token-as-success (including the other
occurrences you flagged) and related logic around fetchNoteByMinuteToken to
ensure echoed tokens do not short-circuit error handling.

In `@shortcuts/vc/vc_recording.go`:
- Around line 119-129: The missing-scope precheck currently uses
auth.GetStoredToken(appID, userOpenID) which misses credentials resolved via the
active resolver; update this block to call
runtime.Factory.Credential.ResolveToken(runtime.As(), appID, userOpenID)
(matching shortcuts/vc/vc_notes.go) and use the returned token when invoking
auth.MissingScopes, falling back to auth.GetStoredToken only if ResolveToken
returns nil or an error; keep the same error construction
(errs.NewPermissionError ... WithHint ... WithMissingScopes ...
WithIdentity(string(runtime.As()))) and ensure appID, userOpenID,
auth.MissingScopes, runtime.Factory.Credential.ResolveToken and runtime.As() are
the referenced symbols to locate the change.

---

Nitpick comments:
In @.golangci.yml:
- Around line 79-82: Update the stale comment that says "drive-only" to reflect
that the errs-no-legacy-helper rule now applies to shortcuts/drive/,
shortcuts/minutes/, and shortcuts/vc/ (i.e., broaden the wording to mention
drive/minutes/vc or "drive-scoped and minutes/vc"), and likewise adjust the
related comments in the forbid block and the suggestion text that currently
point only to shortcuts/drive/drive_errors.go so they no longer imply the rule
is drive-exclusive; locate the comments around the path-except entry for the
errs-no-legacy-helper rule and the forbid/suggestion comments and change their
wording to accurately state the rule's expanded scope.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5af2352e-e67a-4001-aba4-ee40fd098393

📥 Commits

Reviewing files that changed from the base of the PR and between 24ce3ec and 0d4fab3.

📒 Files selected for processing (25)
  • .golangci.yml
  • internal/errclass/codemeta_minutes.go
  • internal/errclass/codemeta_vc.go
  • lint/errscontract/rule_no_legacy_envelope_literal.go
  • shortcuts/minutes/minutes_download.go
  • shortcuts/minutes/minutes_download_test.go
  • shortcuts/minutes/minutes_search.go
  • shortcuts/minutes/minutes_search_test.go
  • shortcuts/minutes/minutes_speaker_replace.go
  • shortcuts/minutes/minutes_speaker_replace_test.go
  • shortcuts/minutes/minutes_update.go
  • shortcuts/minutes/minutes_update_test.go
  • shortcuts/minutes/minutes_upload.go
  • shortcuts/minutes/minutes_upload_test.go
  • shortcuts/vc/vc_meeting_events.go
  • shortcuts/vc/vc_meeting_events_test.go
  • shortcuts/vc/vc_meeting_join.go
  • shortcuts/vc/vc_meeting_leave.go
  • shortcuts/vc/vc_meeting_test.go
  • shortcuts/vc/vc_notes.go
  • shortcuts/vc/vc_notes_test.go
  • shortcuts/vc/vc_recording.go
  • shortcuts/vc/vc_recording_test.go
  • shortcuts/vc/vc_search.go
  • shortcuts/vc/vc_search_test.go

@evandance evandance force-pushed the feat/errs-migrate-minutes-vc branch from 0d4fab3 to e8db1f3 Compare June 3, 2026 08:46
@evandance evandance changed the title feat: emit typed error envelopes for minutes and vc commands feat(minutes,vc): emit typed error envelopes across both domains Jun 3, 2026
@evandance evandance force-pushed the feat/errs-migrate-minutes-vc branch 3 times, most recently from 2c1271c to 754a64a Compare June 4, 2026 13:25

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
shortcuts/minutes/minutes_download.go (1)

108-125: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Reject file paths passed to --output-dir before starting downloads.

Line 108 only re-stats --output. If --output-dir points to an existing file, validation passes and the command does network work before Save(...) finally fails with a file-I/O error. Please short-circuit that case here with a typed validation error on --output-dir.

💡 Suggested fix
 		if explicitOutputPath != "" {
 			fi, statErr := runtime.FileIO().Stat(explicitOutputPath)
 			switch {
 			case statErr == nil && fi.IsDir():
 				explicitOutputDir = explicitOutputPath
 				explicitOutputPath = ""
 			case statErr == nil && !fi.IsDir():
 				if !single {
 					return errs.NewValidationError(errs.SubtypeInvalidArgument, "--output %q is a file; batch mode expects a directory (use --output-dir)", explicitOutputPath).WithParam("--output")
 				}
 			case errors.Is(statErr, fs.ErrNotExist):
 				if !single {
 					explicitOutputDir = explicitOutputPath
 					explicitOutputPath = ""
 				}
 			default:
 				return errs.NewInternalError(errs.SubtypeFileIO, "cannot access --output %q: %s", explicitOutputPath, statErr).WithCause(statErr)
 			}
 		}
+		if explicitOutputDir != "" {
+			fi, statErr := runtime.FileIO().Stat(explicitOutputDir)
+			switch {
+			case statErr == nil && !fi.IsDir():
+				return errs.NewValidationError(errs.SubtypeInvalidArgument, "--output-dir %q is a file; expected a directory", explicitOutputDir).WithParam("--output-dir")
+			case statErr == nil || errors.Is(statErr, fs.ErrNotExist):
+				// ok
+			default:
+				return errs.NewInternalError(errs.SubtypeFileIO, "cannot access --output-dir %q: %s", explicitOutputDir, statErr).WithCause(statErr)
+			}
+		}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@shortcuts/minutes/minutes_download.go` around lines 108 - 125, The code
currently only validates explicitOutputPath; add a pre-download validation for
explicitOutputDir so that if explicitOutputDir != "" you call
runtime.FileIO().Stat(explicitOutputDir) and if statErr == nil && !fi.IsDir()
return a validation error (use
errs.NewValidationError(errs.SubtypeInvalidArgument, "--output-dir %q is a file;
expected a directory", explicitOutputDir).WithParam("--output-dir")). Also
handle errors.Is(statErr, fs.ErrNotExist) (treat as OK or create dir elsewhere
per existing behavior) and propagate other statErr values as an internal file-IO
error similar to the existing explicitOutputPath default case; reference
variables explicitOutputDir, explicitOutputPath and the same
runtime.FileIO().Stat usage so the check runs before any network/download work.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@shortcuts/minutes/minutes_download.go`:
- Around line 108-125: The code currently only validates explicitOutputPath; add
a pre-download validation for explicitOutputDir so that if explicitOutputDir !=
"" you call runtime.FileIO().Stat(explicitOutputDir) and if statErr == nil &&
!fi.IsDir() return a validation error (use
errs.NewValidationError(errs.SubtypeInvalidArgument, "--output-dir %q is a file;
expected a directory", explicitOutputDir).WithParam("--output-dir")). Also
handle errors.Is(statErr, fs.ErrNotExist) (treat as OK or create dir elsewhere
per existing behavior) and propagate other statErr values as an internal file-IO
error similar to the existing explicitOutputPath default case; reference
variables explicitOutputDir, explicitOutputPath and the same
runtime.FileIO().Stat usage so the check runs before any network/download work.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: eb801158-5630-4ab6-a153-46c0d1de8668

📥 Commits

Reviewing files that changed from the base of the PR and between 2c1271c and 754a64a.

📒 Files selected for processing (27)
  • .golangci.yml
  • internal/errclass/codemeta_minutes.go
  • internal/errclass/codemeta_test.go
  • internal/errclass/codemeta_vc.go
  • lint/errscontract/rule_no_legacy_common_helper_call.go
  • lint/errscontract/rule_no_legacy_envelope_literal.go
  • shortcuts/minutes/minutes_download.go
  • shortcuts/minutes/minutes_download_test.go
  • shortcuts/minutes/minutes_search.go
  • shortcuts/minutes/minutes_search_test.go
  • shortcuts/minutes/minutes_speaker_replace.go
  • shortcuts/minutes/minutes_speaker_replace_test.go
  • shortcuts/minutes/minutes_update.go
  • shortcuts/minutes/minutes_update_test.go
  • shortcuts/minutes/minutes_upload.go
  • shortcuts/minutes/minutes_upload_test.go
  • shortcuts/vc/vc_meeting_events.go
  • shortcuts/vc/vc_meeting_events_test.go
  • shortcuts/vc/vc_meeting_join.go
  • shortcuts/vc/vc_meeting_leave.go
  • shortcuts/vc/vc_meeting_test.go
  • shortcuts/vc/vc_notes.go
  • shortcuts/vc/vc_notes_test.go
  • shortcuts/vc/vc_recording.go
  • shortcuts/vc/vc_recording_test.go
  • shortcuts/vc/vc_search.go
  • shortcuts/vc/vc_search_test.go
✅ Files skipped from review due to trivial changes (1)
  • lint/errscontract/rule_no_legacy_common_helper_call.go
🚧 Files skipped from review as they are similar to previous changes (20)
  • internal/errclass/codemeta_minutes.go
  • internal/errclass/codemeta_test.go
  • shortcuts/minutes/minutes_upload_test.go
  • internal/errclass/codemeta_vc.go
  • shortcuts/minutes/minutes_update.go
  • shortcuts/minutes/minutes_speaker_replace_test.go
  • shortcuts/minutes/minutes_upload.go
  • shortcuts/minutes/minutes_search_test.go
  • shortcuts/minutes/minutes_search.go
  • shortcuts/vc/vc_recording_test.go
  • shortcuts/vc/vc_recording.go
  • shortcuts/minutes/minutes_update_test.go
  • shortcuts/minutes/minutes_download_test.go
  • shortcuts/vc/vc_search.go
  • shortcuts/vc/vc_meeting_events.go
  • shortcuts/vc/vc_search_test.go
  • shortcuts/vc/vc_notes.go
  • shortcuts/minutes/minutes_speaker_replace.go
  • shortcuts/vc/vc_notes_test.go
  • shortcuts/vc/vc_meeting_events_test.go

@evandance evandance force-pushed the feat/errs-migrate-minutes-vc branch 8 times, most recently from 75802ca to bf8d1d3 Compare June 8, 2026 03:21
Failures from the minutes and video-conference commands now surface as
structured, typed errors carrying a stable category and subtype — spanning
input validation, missing permissions, network and file-I/O failures, and
remote API errors — so callers can branch on the error kind instead of
parsing free-form text. Batch commands report partial failures explicitly,
emitting per-item results with a non-zero exit instead of masking them.
@evandance evandance force-pushed the feat/errs-migrate-minutes-vc branch from bf8d1d3 to 501f2ba Compare June 8, 2026 03:29
@evandance evandance merged commit 076f4d5 into main Jun 8, 2026
20 checks passed
@evandance evandance deleted the feat/errs-migrate-minutes-vc branch June 8, 2026 08:20
SunPeiYang996 pushed a commit that referenced this pull request Jun 8, 2026
Failures from the minutes and video-conference commands now surface as
structured, typed errors carrying a stable category and subtype — spanning
input validation, missing permissions, network and file-I/O failures, and
remote API errors — so callers can branch on the error kind instead of
parsing free-form text. Batch commands report partial failures explicitly,
emitting per-item results with a non-zero exit instead of masking them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/vc PR touches the vc domain feature size/L Large or sensitive change across domains or core paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants