Repository navigation
refactor(persist-user-identity): split 534-LOC index.ts → commands.ts + context.ts (oc-hygiene #6) - #32
Conversation
…ntity/index.ts into commands.ts + context.ts (oc-hygiene #6) index.ts had grown to 500 lines: the register() wiring, two prependContext formatters, and four full slash-command handlers (!verify/!identify/!register/ !whoami) all inline. Split into focused modules: - context.ts — formatIdentityContext + formatUnknownUserContext (pure, 69 LOC) - commands.ts — registerIdentityCommands(api, deps): the 4 command blocks moved VERBATIM; deps {sql, authConfig, ensureReady, pendingIdentify} thread register()'s closure state, api carries the SDK types (355) - index.ts — now a thin 116-LOC wiring layer (config gate, schema latch, before_agent_start hook, registerIdentityCommands, gateway_stop) Behavior-preserving: a pure move, no logic change. tsgo --noEmit passes clean — which is the proof the extraction wired every closure dependency (a missed one would be an unresolved-symbol type error). Added context.test.ts (4 tests) — the FIRST unit coverage for this extension — locking the [USER_IDENTITY] block downstream memory plugins parse. oxlint 0/0 (no orphaned imports), oxfmt clean, sealed 38/38. Generated-With: Claude Code Co-Authored-By: openclaw <[email protected]> Co-Authored-By: Claude <[email protected]>
|
Warning Review limit reached
More reviews will be available in 10 minutes and 18 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
The formal models extracted constants ( This check is informational (not blocking merges yet). If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there. |
Release-prep hygiene #6 of 8 (FINAL internal). Pure extraction of persist-user-identity/index.ts: context.ts (pure formatters) + commands.ts (registerIdentityCommands — the 4 command blocks moved VERBATIM) + thin index.ts (config gate, schema latch, hook, register, gateway_stop). No logic change — tsgo --noEmit clean is the deps-wired proof (any unthreaded closure var = unresolved-symbol type error). Added context.test.ts (4) — first unit coverage for this extension, locks the [USER_IDENTITY] block downstream memory plugins parse. sealed 38/38, oxlint 0/0, oxfmt clean. Re-anchored onto latest main. QGR d58a093. CTO code-reviewed (pure-move confirmed) + receipt-verified.