Skip to content

feat: add note domain split#1345

Open
Ren1104 wants to merge 1 commit into
mainfrom
feat/note-domain-split
Open

feat: add note domain split#1345
Ren1104 wants to merge 1 commit into
mainfrom
feat/note-domain-split

Conversation

@Ren1104

@Ren1104 Ren1104 commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add a dedicated note shortcut domain for VC note artifacts and make the normal/unified note split explicit for agents. vc +notes now exposes the routing fields needed to decide whether transcript retrieval should use note +transcript for unified notes or docs +fetch for normal note transcript documents.

Changes

  • Add the shortcut-only note domain, register it for auth/login discovery, and document it in service descriptions.
  • Add note +detail to fetch VC note metadata by note_id, including note_display_type, note_doc_token, verbatim_doc_token, and shared document tokens.
  • Add note +transcript for unified-note transcript export with --transcript-format, locale handling, output overwrite protection, typed errors, and defensive cursor pagination.
  • Update vc +notes to delegate note detail lookup to the note domain, preserve note_id-only successful details, and surface note_id / note_display_type in table and JSON output.
  • Align lark-note, lark-vc, lark-minutes, lark-doc, and meeting-summary skill docs around the routing rule: fetch the document first, extract vc-node-id when present, then route note handling through the note metadata.
  • Extend lint allowlists for migrated shortcut paths and ignore generated local note/minutes transcript artifacts.

Test Plan

  • go test ./shortcuts/note ./shortcuts/vc ./internal/core ./internal/cmdutil
  • go test ./shortcuts/vc ./shortcuts/note ./tests/cli_e2e/note
  • gofmt -l shortcuts/vc/vc_notes.go shortcuts/vc/vc_notes_test.go
  • git diff --check
  • Manual local verification for note +detail and note +transcript unified-note flows

Related Issues

  • None

@coderabbitai

coderabbitai Bot commented Jun 9, 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

Adds a new note shortcut domain with note +detail and note +transcript, delegates VC note-detail parsing to the note package, implements unified-transcript pagination and file output, updates lint paths/tests, registers auth/service metadata, and adds skill docs and e2e dry-run tests.

Changes

Note domain implementation and integration

Layer / File(s) Summary
Core note parsing and detail fetching
shortcuts/note/note.go, shortcuts/note/note_test.go
Detail model and FetchDetail parse note API responses, normalize note_display_type, extract artifact/reference tokens, and include helpers (parseLooseInt, parseLooseCursorID) with unit tests.
Note detail command (note +detail)
shortcuts/note/note_detail.go
NoteDetail shortcut validates --note-id, issues DryRun GET, calls FetchDetail, outputs {"note": ...}, and maps no-read-permission API problems to typed PermissionError.
Note transcript command (note +transcript)
shortcuts/note/note_transcript.go, shortcuts/note/note_transcript_test.go
NoteTranscript ensures the note is unified, paginates the unified transcript with cursor/loop detection and throttling, concatenates pages, writes output file (respecting --output/--overwrite), resolves locale/format defaults, and emits metadata; tests cover error and success paths.
Package export, registration & VC delegation
shortcuts/note/shortcuts.go, shortcuts/register.go, shortcuts/vc/vc_notes.go, shortcuts/vc/vc_notes_test.go
Exports Shortcuts(), registers note.Shortcuts() globally, replaces in-file VC artifact parsing with note.FetchDetail, preserves legacy "note detail is empty" message for empty responses, and updates tests to use note.NoNoteReadPermissionCode.
Auth, service descriptions, login, ignore patterns
.gitignore, cmd/auth/login_messages.go, cmd/auth/login_test.go, internal/registry/service_descriptions.json
Adds /notes/ and /minutes/ to .gitignore, includes note in shortcut-only auth domains and tests, and inserts note service descriptions in registry JSON.
Lint rules and test invariants
lint/errscontract/rule_no_legacy_common_helper_call.go, lint/errscontract/rule_no_legacy_envelope_literal.go, lint/errscontract/rules_test.go
Expands migrated-path lists (shortcuts/im/, shortcuts/note/), updates rule tests, and adds an invariant ensuring migrated-envelope paths are covered by migrated-common-helper paths.
Skills and cross-domain docs
skills/lark-note/*, skills/lark-vc/*, skills/lark-doc/*, skills/lark-minutes/*, skills/lark-workflow-meeting-summary/*
Adds lark-note SKILL and reference docs; updates VC/Doc/Minutes/workflow docs to route by note_display_type, derive note_id from VC placeholders, and clarify domain boundaries for transcript retrieval.
E2E dry-run tests & coverage
tests/cli_e2e/note/*
Adds dry-run e2e tests verifying planned API calls and parameters for note +detail and note +transcript, plus a coverage.md documenting test coverage and expectations.

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • zhaoleibd
  • fangshuyu-768

"🐰 I hopped in with a note and a plan,
Fetching details and stitching pages by hand.
Cursors checked, loops caught tight,
Files saved neatly, tests passing bright.
Boundaries set — now onward we land."

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.81% 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 'feat: add note domain split' accurately describes the main change: introducing a dedicated note domain with new shortcuts and routing logic.
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.
Description check ✅ Passed The PR description comprehensively covers summary, changes, test plan with checkmarks, and related issues per template.

✏️ 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/note-domain-split

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 domain/ccm PR touches the ccm domain domain/vc PR touches the vc domain size/L Large or sensitive change across domains or core paths labels Jun 9, 2026
@Ren1104 Ren1104 force-pushed the feat/note-domain-split branch 6 times, most recently from ce93d8d to cbbf3ed Compare June 9, 2026 09:09
@Ren1104 Ren1104 requested a review from zhaoleibd June 9, 2026 12:13
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.68641% with 87 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.80%. Comparing base (154ecdb) to head (e4cb586).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
shortcuts/note/note_transcript.go 64.00% 34 Missing and 11 partials ⚠️
shortcuts/note/note_detail.go 47.61% 20 Missing and 2 partials ⚠️
shortcuts/note/note.go 84.15% 13 Missing and 3 partials ⚠️
shortcuts/vc/vc_notes.go 69.23% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1345      +/-   ##
==========================================
+ Coverage   72.75%   72.80%   +0.04%     
==========================================
  Files         730      735       +5     
  Lines       69030    69345     +315     
==========================================
+ Hits        50224    50484     +260     
- Misses      15034    15069      +35     
- Partials     3772     3792      +20     

☔ 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.

@Ren1104 Ren1104 force-pushed the feat/note-domain-split branch 5 times, most recently from 1c356e9 to d02c54f Compare June 10, 2026 06:37
@Ren1104 Ren1104 marked this pull request as ready for review June 10, 2026 06:38
@larksuite larksuite locked and limited conversation to collaborators Jun 10, 2026
@larksuite larksuite unlocked this conversation Jun 10, 2026
@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#feat/note-domain-split -y -g

@Ren1104 Ren1104 force-pushed the feat/note-domain-split branch from d02c54f to 5861ec5 Compare June 10, 2026 06:48

@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)
skills/lark-vc/SKILL.md (1)

148-170: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Specify language for fenced code block.

The fenced code block at line 148 should specify a language identifier for proper syntax highlighting.

📝 Proposed fix
-```
+```text
 Meeting (视频会议)
🤖 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 `@skills/lark-vc/SKILL.md` around lines 148 - 170, The fenced code block that
starts with ``` and contains the meeting tree (starting "Meeting (视频会议)") lacks
a language identifier; update the opening fence to include a language token
(e.g., ```text) so the block becomes ```text and closes with ``` to enable
proper syntax highlighting and rendering for that tree diagram.

Source: Linters/SAST tools

🧹 Nitpick comments (2)
lint/errscontract/rule_no_legacy_envelope_literal.go (1)

34-34: 💤 Low value

Consider reordering shortcuts/im/ for consistency.

The shortcuts/im/ entry is currently at the end of the list but should be in alphabetical order (between shortcuts/event/ and shortcuts/mail/, around line 27) to match the ordering in migratedCommonHelperPaths in rule_no_legacy_common_helper_call.go.

📝 Suggested reordering

Move line 34 to maintain alphabetical order:

 	"shortcuts/event/",
+	"shortcuts/im/",
 	"shortcuts/mail/",
 	"shortcuts/minutes/",
 	"shortcuts/note/",
 	"shortcuts/okr/",
 	"shortcuts/task/",
 	"shortcuts/vc/",
 	"shortcuts/whiteboard/",
-	"shortcuts/im/",
🤖 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 `@lint/errscontract/rule_no_legacy_envelope_literal.go` at line 34, Move the
"shortcuts/im/" list entry in rule_no_legacy_envelope_literal.go so the array
remains alphabetically ordered: place the "shortcuts/im/" string between
"shortcuts/event/" and "shortcuts/mail/" to match the ordering used by
migratedCommonHelperPaths in rule_no_legacy_common_helper_call.go.
skills/lark-vc/references/vc-domain-boundaries.md (1)

150-150: 💤 Low value

Optional: Add language specifier to fenced code block.

The fenced code block on line 150 lacks a language specifier, triggering a markdownlint warning. While the ASCII tree diagram renders correctly, consider adding ```text instead of ``` to silence the linter and follow markdown best practices.

📝 Proposed change
-```
+```text
 Meeting
 ├── meeting_id
🤖 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 `@skills/lark-vc/references/vc-domain-boundaries.md` at line 150, The fenced
code block containing the ASCII tree (starting with "Meeting" and the subsequent
tree lines) is missing a language specifier; update the opening backticks to
include a language label (e.g., replace ``` with ```text) so the block becomes
```text and the linter warning is resolved while preserving the ASCII diagram
formatting.

Source: Linters/SAST tools

🤖 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 `@skills/lark-vc/SKILL.md`:
- Around line 148-170: The fenced code block that starts with ``` and contains
the meeting tree (starting "Meeting (视频会议)") lacks a language identifier; update
the opening fence to include a language token (e.g., ```text) so the block
becomes ```text and closes with ``` to enable proper syntax highlighting and
rendering for that tree diagram.

---

Nitpick comments:
In `@lint/errscontract/rule_no_legacy_envelope_literal.go`:
- Line 34: Move the "shortcuts/im/" list entry in
rule_no_legacy_envelope_literal.go so the array remains alphabetically ordered:
place the "shortcuts/im/" string between "shortcuts/event/" and
"shortcuts/mail/" to match the ordering used by migratedCommonHelperPaths in
rule_no_legacy_common_helper_call.go.

In `@skills/lark-vc/references/vc-domain-boundaries.md`:
- Line 150: The fenced code block containing the ASCII tree (starting with
"Meeting" and the subsequent tree lines) is missing a language specifier; update
the opening backticks to include a language label (e.g., replace ``` with
```text) so the block becomes ```text and the linter warning is resolved while
preserving the ASCII diagram formatting.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6a92ba67-addb-484a-8d26-958b92024349

📥 Commits

Reviewing files that changed from the base of the PR and between 7cc0b49 and d02c54f.

📒 Files selected for processing (28)
  • .gitignore
  • cmd/auth/login_messages.go
  • cmd/auth/login_test.go
  • internal/registry/service_descriptions.json
  • lint/errscontract/rule_no_legacy_common_helper_call.go
  • lint/errscontract/rule_no_legacy_envelope_literal.go
  • lint/errscontract/rules_test.go
  • shortcuts/note/note.go
  • shortcuts/note/note_detail.go
  • shortcuts/note/note_test.go
  • shortcuts/note/note_transcript.go
  • shortcuts/note/note_transcript_test.go
  • shortcuts/note/shortcuts.go
  • shortcuts/register.go
  • shortcuts/vc/vc_notes.go
  • shortcuts/vc/vc_notes_test.go
  • skills/lark-doc/SKILL.md
  • skills/lark-doc/references/lark-doc-fetch.md
  • skills/lark-minutes/SKILL.md
  • skills/lark-note/SKILL.md
  • skills/lark-note/references/lark-note-detail.md
  • skills/lark-note/references/lark-note-transcript.md
  • skills/lark-vc/SKILL.md
  • skills/lark-vc/references/lark-vc-notes.md
  • skills/lark-vc/references/vc-domain-boundaries.md
  • skills/lark-workflow-meeting-summary/SKILL.md
  • tests/cli_e2e/note/coverage.md
  • tests/cli_e2e/note/note_dryrun_test.go

@Ren1104

Ren1104 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed CodeRabbit feedback in be00e90: reordered shortcuts/im/ alphabetically in migratedEnvelopePaths, and added text language identifiers to the ASCII tree fences in skills/lark-vc/SKILL.md and vc-domain-boundaries.md.

@Ren1104 Ren1104 force-pushed the feat/note-domain-split branch from be00e90 to 5e81d9e Compare June 10, 2026 10:41

@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.

Actionable comments posted: 3

🤖 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.

Inline comments:
In `@shortcuts/note/note_detail.go`:
- Around line 76-81: The branch that converts a typed 121005 into an
*errs.PermissionError (where mappedProblem := *problem, mappedProblem.Message =
message, return &errs.PermissionError{Problem: mappedProblem, Cause: err}) must
also normalize the embedded Problem metadata so callers using errs.ProblemOf see
authorization/permission-denied, not the original stale category/subtype; update
the mappedProblem fields (e.g., mappedProblem.Category and
mappedProblem.Subtype) to the canonical values for permission errors before
constructing the errs.PermissionError (keep mappedProblem.Message and Hint logic
intact).

In `@shortcuts/note/note_transcript.go`:
- Around line 108-110: The current file-exists branch embeds recovery steps in
the error Message and always attaches .WithParam("--output") even when the CLI
used the default outPath; instead create the
errs.NewValidationError(errs.SubtypeFailedPrecondition, "...file already exists:
%s", outPath) and move the recovery guidance ("use --overwrite to replace" or
"pick a different path") into .WithHint(...); only call .WithParam("--output")
when the user actually supplied the output flag (detect via whatever
runtime/flag check your CLI provides), and apply the same change to the similar
block around the other occurrence (the block at ~147-152).

In `@shortcuts/note/note.go`:
- Around line 148-155: The parseLooseInt function currently coerces float-like
inputs to int (e.g., float64 and json.Number) which silently accepts fractional
inputs like 1.9; update parseLooseInt to detect fractional values and reject
them instead of truncating: for json.Number try parsing as int first and if that
fails parse as float64 and check whether it has a fractional part (use
math.Trunc/Modf or compare float64(int(val)) == val); for float64 check the
fractional part similarly; if a fractional part exists return a clear invalid
sentinel (e.g., -1) so callers (note_display_type / artifact_type) can treat it
as unknown/ignored rather than a coerced enum value. Ensure changes are made in
the parseLooseInt function only.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b23d01f0-30db-4043-b130-67758d6f6b2a

📥 Commits

Reviewing files that changed from the base of the PR and between be00e90 and 5e81d9e.

📒 Files selected for processing (28)
  • .gitignore
  • cmd/auth/login_messages.go
  • cmd/auth/login_test.go
  • internal/registry/service_descriptions.json
  • lint/errscontract/rule_no_legacy_common_helper_call.go
  • lint/errscontract/rule_no_legacy_envelope_literal.go
  • lint/errscontract/rules_test.go
  • shortcuts/note/note.go
  • shortcuts/note/note_detail.go
  • shortcuts/note/note_test.go
  • shortcuts/note/note_transcript.go
  • shortcuts/note/note_transcript_test.go
  • shortcuts/note/shortcuts.go
  • shortcuts/register.go
  • shortcuts/vc/vc_notes.go
  • shortcuts/vc/vc_notes_test.go
  • skills/lark-doc/SKILL.md
  • skills/lark-doc/references/lark-doc-fetch.md
  • skills/lark-minutes/SKILL.md
  • skills/lark-note/SKILL.md
  • skills/lark-note/references/lark-note-detail.md
  • skills/lark-note/references/lark-note-transcript.md
  • skills/lark-vc/SKILL.md
  • skills/lark-vc/references/lark-vc-notes.md
  • skills/lark-vc/references/vc-domain-boundaries.md
  • skills/lark-workflow-meeting-summary/SKILL.md
  • tests/cli_e2e/note/coverage.md
  • tests/cli_e2e/note/note_dryrun_test.go
✅ Files skipped from review due to trivial changes (8)
  • tests/cli_e2e/note/coverage.md
  • cmd/auth/login_messages.go
  • .gitignore
  • skills/lark-note/references/lark-note-transcript.md
  • skills/lark-vc/references/lark-vc-notes.md
  • skills/lark-minutes/SKILL.md
  • skills/lark-note/SKILL.md
  • skills/lark-workflow-meeting-summary/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (16)
  • cmd/auth/login_test.go
  • skills/lark-note/references/lark-note-detail.md
  • shortcuts/register.go
  • lint/errscontract/rule_no_legacy_envelope_literal.go
  • internal/registry/service_descriptions.json
  • shortcuts/note/shortcuts.go
  • skills/lark-doc/references/lark-doc-fetch.md
  • lint/errscontract/rule_no_legacy_common_helper_call.go
  • lint/errscontract/rules_test.go
  • skills/lark-doc/SKILL.md
  • shortcuts/note/note_transcript_test.go
  • shortcuts/vc/vc_notes.go
  • skills/lark-vc/SKILL.md
  • skills/lark-vc/references/vc-domain-boundaries.md
  • tests/cli_e2e/note/note_dryrun_test.go
  • shortcuts/vc/vc_notes_test.go

Comment thread shortcuts/note/note_detail.go
Comment thread shortcuts/note/note_transcript.go Outdated
Comment thread shortcuts/note/note.go

@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.

Actionable comments posted: 2

Caution

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

⚠️ Outside diff range comments (2)
shortcuts/note/note_transcript_test.go (2)

251-252: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Add typed error metadata assertions.

The test checks only message substrings but does not assert Category or Subtype (expected: errs.CategoryInternal, errs.SubtypeInvalidResponse per note_transcript.go L195). As per coding guidelines, error-path tests must assert typed metadata via errs.ProblemOf, not message substrings alone.

🧪 Suggested addition
 	if got := err.Error(); !strings.Contains(got, "transcript is empty") || !strings.Contains(got, "note_empty") {
 		t.Fatalf("err = %q, want empty transcript error", got)
 	}
+	problem, ok := errs.ProblemOf(err)
+	if !ok {
+		t.Fatalf("expected typed error, got %T", err)
+	}
+	if problem.Category != errs.CategoryInternal || problem.Subtype != errs.SubtypeInvalidResponse {
+		t.Fatalf("category/subtype = %v/%v, want Internal/InvalidResponse", problem.Category, problem.Subtype)
+	}
🤖 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/note/note_transcript_test.go` around lines 251 - 252, Test
currently only checks error message substrings; update it to assert the typed
error metadata using errs.ProblemOf. After the existing error is obtained (err),
call p := errs.ProblemOf(err) and assert p.Category == errs.CategoryInternal and
p.Subtype == errs.SubtypeInvalidResponse (these are set in note_transcript.go
around L195); you can keep the existing message substring checks but add these
two explicit metadata assertions to satisfy error-path testing guidelines.

Source: Coding guidelines


315-316: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Add typed error metadata assertions.

The test checks only message substrings but does not assert Category or Subtype (expected: errs.CategoryInternal, errs.SubtypeInvalidResponse per note_transcript.go L191). As per coding guidelines, error-path tests must assert typed metadata via errs.ProblemOf, not message substrings alone.

🧪 Suggested addition
 	if got := err.Error(); !strings.Contains(got, "pagination cursor did not advance") {
 		t.Fatalf("err = %q, want cursor advance error", got)
 	}
+	problem, ok := errs.ProblemOf(err)
+	if !ok {
+		t.Fatalf("expected typed error, got %T", err)
+	}
+	if problem.Category != errs.CategoryInternal || problem.Subtype != errs.SubtypeInvalidResponse {
+		t.Fatalf("category/subtype = %v/%v, want Internal/InvalidResponse", problem.Category, problem.Subtype)
+	}
🤖 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/note/note_transcript_test.go` around lines 315 - 316, The test
currently only checks the error message substring; update the assertion to
extract typed metadata using errs.ProblemOf(err) and assert the returned Problem
has Category == errs.CategoryInternal and Subtype == errs.SubtypeInvalidResponse
(as set in note_transcript.go at L191), while you may retain the existing
message substring check for completeness; reference the test location that
currently calls err.Error() and replace/add assertions using errs.ProblemOf,
comparing Problem.Category and Problem.Subtype to the expected constants.

Source: Coding guidelines

🤖 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.

Inline comments:
In `@shortcuts/note/note_transcript_test.go`:
- Around line 211-221: Add an assertion that the typed validation error's
Subtype equals errs.SubtypeFailedPrecondition: after you already cast err to
*errs.ValidationError in note_transcript_test.go, check validationErr.Subtype ==
errs.SubtypeFailedPrecondition (mirrors the value set in note_transcript.go) so
the test validates category/subtype in addition to Hint and Param.
- Around line 35-37: The test currently checks problem.Hint but omits asserting
the error subtype; update the assertion after calling errs.ProblemOf(err) in
note_transcript_test.go to also check that problem.Subtype equals
errs.SubtypeFailedPrecondition (as set by ensureUnifiedNote in
note_transcript.go) and, per guidelines, include any other required
category/param assertions from ProblemOf to fully validate the typed error
metadata.

---

Outside diff comments:
In `@shortcuts/note/note_transcript_test.go`:
- Around line 251-252: Test currently only checks error message substrings;
update it to assert the typed error metadata using errs.ProblemOf. After the
existing error is obtained (err), call p := errs.ProblemOf(err) and assert
p.Category == errs.CategoryInternal and p.Subtype == errs.SubtypeInvalidResponse
(these are set in note_transcript.go around L195); you can keep the existing
message substring checks but add these two explicit metadata assertions to
satisfy error-path testing guidelines.
- Around line 315-316: The test currently only checks the error message
substring; update the assertion to extract typed metadata using
errs.ProblemOf(err) and assert the returned Problem has Category ==
errs.CategoryInternal and Subtype == errs.SubtypeInvalidResponse (as set in
note_transcript.go at L191), while you may retain the existing message substring
check for completeness; reference the test location that currently calls
err.Error() and replace/add assertions using errs.ProblemOf, comparing
Problem.Category and Problem.Subtype to the expected constants.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 06916fbb-8836-4234-9777-1e545bca49c3

📥 Commits

Reviewing files that changed from the base of the PR and between 5e81d9e and a99a21f.

📒 Files selected for processing (5)
  • shortcuts/note/note.go
  • shortcuts/note/note_detail.go
  • shortcuts/note/note_test.go
  • shortcuts/note/note_transcript.go
  • shortcuts/note/note_transcript_test.go
🚧 Files skipped from review as they are similar to previous changes (4)
  • shortcuts/note/note_detail.go
  • shortcuts/note/note_test.go
  • shortcuts/note/note_transcript.go
  • shortcuts/note/note.go

Comment thread shortcuts/note/note_transcript_test.go
Comment thread shortcuts/note/note_transcript_test.go
@Ren1104 Ren1104 force-pushed the feat/note-domain-split branch from 4f729c6 to c2b7329 Compare June 11, 2026 06:18
Add note shortcuts for note detail and unified transcript retrieval, route vc note detail parsing through the note domain, and update note/vc/minutes skill guidance for normal versus unified transcript handling.

Includes dry-run E2E coverage for the new note shortcuts and documents the remaining live E2E fixture gap.
@Ren1104 Ren1104 force-pushed the feat/note-domain-split branch from f46548d to e4cb586 Compare June 11, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/ccm PR touches the ccm domain domain/vc PR touches the vc domain 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