Skip to content

chore: notecli を V6 (実体/所属分離) に bump - #1

Merged
hitalin merged 1 commit into
mainfrom
chore/notecli-v6-bump
Aug 3, 2026
Merged

chore: notecli を V6 (実体/所属分離) に bump#1
hitalin merged 1 commit into
mainfrom
chore/notecli-v6-bump

Conversation

@hitalin

@hitalin hitalin commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

なぜ

notedeck-dev/notecli#52 (V6: notes キャッシュの実体/所属分離) により、旧 rev の notebot は volume 共有の notecli.db を開けなくなる(refinery の missing migration)。notecli#30 仕様 v5 §10 第 3 段 / §12-11。

変更内容

  • rev bump: f1931af → 1f68a91(V6 含む)
  • subscribe_timeline(TimelineType)subscribe_notes(TimelineKey::parse)
  • FrontendEmitter の typed StreamEvent 化に追随 — ChannelEmitterkind() / payload_value() で従来の (イベント名, JSON) チャネル形式へ変換するため、parse_event・catch-up 再注入の経路は不変
  • NoteDeckError::Apiapi_code フィールド追加にテスト fixture を追随

テスト

cargo test 37 本全通過・clippy 警告ゼロ。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Improvements

    • Improved timeline subscription handling for configured timelines.
    • Standardized event delivery using typed stream events and their associated payloads.
  • Bug Fixes

    • Updated API error handling fixtures to include error codes, improving rate-limit and other error reporting.

notecli#30 の V6 migration により旧 rev のままでは volume 共有の
notecli.db が開けなくなるため追随する。

- subscribe_timeline(TimelineType) → subscribe_notes(TimelineKey)
- FrontendEmitter の typed StreamEvent 化に追随 (ChannelEmitter は
  kind()/payload_value() で従来の (名前, JSON) チャネルへ変換 —
  parse_event / catch-up 再注入の経路は不変)
- NoteDeckError::Api の api_code フィールド追加にテスト fixture を追随

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR pins a new notecli revision, updates bot timeline subscriptions to use TimelineKey, changes ChannelEmitter to accept StreamEvent, and adds api_code values to API error fixtures.

Changes

notecli integration

Layer / File(s) Summary
Timeline subscription API
Cargo.toml, src/bot.rs, src/gate.rs
The pinned notecli revision changes. The bot parses configured timelines into TimelineKey values and calls subscribe_notes. API error fixtures now include api_code values.
Typed stream event emission
src/event.rs
ChannelEmitter::emit now accepts StreamEvent and derives its canonical event name and JSON payload before sending them through the channel.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: bumping notecli to V6 for the separation of note entities and affiliations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/notecli-v6-bump

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

@hitalin hitalin self-assigned this Aug 3, 2026
@hitalin
hitalin merged commit 3878ace into main Aug 3, 2026
4 of 5 checks passed

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

🧹 Nitpick comments (1)
src/event.rs (1)

24-31: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Add regression coverage for the typed-event compatibility bridge.

ChannelEmitter::emit now connects notecli’s typed StreamEvent contract to the legacy (name, Value) contract. Add tests for stream-note, stream-mention, stream-notification, and stream-status. Assert that parse_event receives the expected note, notification, subscriptionId, and state fields.

🤖 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 `@src/event.rs` around lines 24 - 31, Add regression tests covering
ChannelEmitter::emit for stream-note, stream-mention, stream-notification, and
stream-status; receive each emitted legacy (name, Value) tuple, pass it through
parse_event, and assert the resulting payload contains the expected note,
notification, subscriptionId, and state fields.
🤖 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.

Nitpick comments:
In `@src/event.rs`:
- Around line 24-31: Add regression tests covering ChannelEmitter::emit for
stream-note, stream-mention, stream-notification, and stream-status; receive
each emitted legacy (name, Value) tuple, pass it through parse_event, and assert
the resulting payload contains the expected note, notification, subscriptionId,
and state fields.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3e9ce7d1-5310-4d0c-ac04-9c0ddb44c5ac

📥 Commits

Reviewing files that changed from the base of the PR and between 95fd4a9 and b96d017.

📒 Files selected for processing (4)
  • Cargo.toml
  • src/bot.rs
  • src/event.rs
  • src/gate.rs

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