refactor: standardize session function naming and enhance permissions - #272
Conversation
- Updated session function names to use kebab-case format for consistency: `session::set_meta` to `session::set-meta`, `session::set_status` to `session::set-status`, `session::append_many` to `session::append-many`, and `session::update_message` to `session::update-message`. - Added new permission rule `!session::config-status` to enhance security by preventing unauthorized access to configuration status. - Improved documentation to reflect these changes and ensure clarity in function usage.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (73)
📝 WalkthroughWalkthroughRenames all ChangesSession-manager typed config, hot-reload runtime, and global API rename
Sequence DiagramsequenceDiagram
participant main as main.rs boot
participant configuration as configuration worker
participant apply_runtime as apply_runtime
participant SessionRuntime
participant resync_triggers
participant iii as III engine
participant on_config_change as session::on-config-change
main->>configuration: register_config(schema, seed)
main->>configuration: fetch_config()
configuration-->>main: WorkerConfig
main->>SessionRuntime: build_runtime(cfg, ctx)
main->>iii: register store protocol + session functions + config trigger
Note over iii,on_config_change: Runtime operation
iii->>on_config_change: configuration:updated fired
on_config_change->>configuration: configuration::get (re-fetch)
configuration-->>on_config_change: WorkerConfig
on_config_change->>apply_runtime: apply new config
apply_runtime->>apply_runtime: compare boot_signature
alt adapter unchanged
apply_runtime->>SessionRuntime: swap ConfigCell snapshot only
else adapter changed
apply_runtime->>SessionRuntime: build new SessionRuntime
apply_runtime->>resync_triggers: replay store state → events
apply_runtime->>SessionRuntime: shutdown old bridge
end
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
skill-check — worker0 verified, 22 skipped (no docs/).
Four for four. Nicely done. |
session::set_metatosession::set-meta,session::set_statustosession::set-status,session::append_manytosession::append-many, andsession::update_messagetosession::update-message.!session::config-statusto enhance security by preventing unauthorized access to configuration status.Summary by CodeRabbit
New Features
Refactoring
set_meta→set-meta).Documentation