Repository navigation
feat: 载体启用入口抬到契约 3 - #45
Conversation
入口表新增 CarrierEnabled,载体插件被父级启用时由原生侧调用,引发 CarrierEnableSignal。Endstone 在调 onEnable 之前就置了 enabled,能力层的闸门 等到这一刻才放开,才能赶在子插件的 OnEnable 之前挂上监听与调度器。 顺带把 EventBus 的定时器回调统一叫 Raise(事件用 raise)。
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f5d2605ab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| catch (Exception ex) | ||
| { | ||
| s_loggerFactory?.CreateLogger("Hosihikari").LogError(ex, "启用信号分发失败"); |
There was a problem hiding this comment.
Localize the carrier-enable failure diagnostic
If a carrier-enable signal handler throws, this catch block emits a hard-coded Chinese diagnostic even on English or other non-Chinese servers, bypassing the existing UI-culture lookup and neutral English fallback. Add a resource key to CoreStrings.resx and CoreStrings.zh.resx and log it through CoreText.Get, as the other native-entry failure paths do. This violates the operator-message localization invariant in AGENTS.md.
AGENTS.md reference: AGENTS.md:L34-L35
Useful? React with 👍 / 👎.
Summary
入口表新增
CarrierEnabled,载体插件被父级启用时由原生侧调用,引发CarrierEnableSignal。FX-0067 定下这条:Endstone 的插件启用顺序按插入序,载体在自己的
onLoad里发起嵌套轮、最后入列,子插件的OnEnable永远先跑,那时registerEvent与addTask全被拒。载体声明load = Startup把启用方向掰正;停用方向掰不动(disablePlugins()按插入序反向),由载体onDisable的StopUnderParent自回收兜住。宿主契约 2 → 3。顺带把
EventBus的定时器回调Fire改名Raise(事件用 raise)。Verification
hosihikari → capability_smoke → hosihikari_csharp正确,无 CLR assert依赖 PluginAbstractions#27(信号类)。