fix(zara-discord): make startup resource-safe #222

Open
nsaspy wants to merge 10 commits from fix/zara-discord-startup-fail-closed into main
Owner

Worker mailbox: #508

Bounded Plugin D IMPLEMENT slice for zara-discord startup correctness:

  • lifecycle regression tests were committed before implementation
  • missing credentials remain zero-secret/API-v1 compatible and allocate no subscriptions/workers
  • Discord client construction now happens before runtime subscription allocation, so client setup failure cannot leak a subscription
  • worker-registration failures roll back the client and subscription and clear plugin state
  • stop() clears client/subscription handles after closing them
  • log output for missing configuration uses a bounded generic reason rather than raw ConfigError text

The originally frozen “Core must distinguish unavailable from successfully started” requirement cannot be completed inside plugin API v1: ServicePlugin.start(runtime) -> None has no canonical unavailable/disabled result and the current compatibility harness intentionally starts optional plugins with no provider secrets. Exact-head CI proved that throwing on missing Discord credentials makes both source and installed compatibility fail. Core blocker: lost-rob0t/zara#658.

No secret values are logged or surfaced. No Core internals are imported.

Required gates: zara-discord tests, registry/plugin compatibility, package/Nix checks at exact head.

Worker mailbox: #508 Bounded Plugin D IMPLEMENT slice for `zara-discord` startup correctness: - lifecycle regression tests were committed before implementation - missing credentials remain zero-secret/API-v1 compatible and allocate no subscriptions/workers - Discord client construction now happens before runtime subscription allocation, so client setup failure cannot leak a subscription - worker-registration failures roll back the client and subscription and clear plugin state - `stop()` clears client/subscription handles after closing them - log output for missing configuration uses a bounded generic reason rather than raw ConfigError text The originally frozen “Core must distinguish unavailable from successfully started” requirement cannot be completed inside plugin API v1: `ServicePlugin.start(runtime) -> None` has no canonical unavailable/disabled result and the current compatibility harness intentionally starts optional plugins with no provider secrets. Exact-head CI proved that throwing on missing Discord credentials makes both source and installed compatibility fail. Core blocker: lost-rob0t/zara#658. No secret values are logged or surfaced. No Core internals are imported. Required gates: zara-discord tests, registry/plugin compatibility, package/Nix checks at exact head.
Some checks failed
CI / test (pull_request) Failing after 33s
CI / zara-avatar idle CPU budget (pull_request) Failing after 15m2s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/zara-discord-startup-fail-closed:fix/zara-discord-startup-fail-closed
git switch fix/zara-discord-startup-fail-closed

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff fix/zara-discord-startup-fail-closed
git switch fix/zara-discord-startup-fail-closed
git rebase main
git switch main
git merge --ff-only fix/zara-discord-startup-fail-closed
git switch fix/zara-discord-startup-fail-closed
git rebase main
git switch main
git merge --no-ff fix/zara-discord-startup-fail-closed
git switch main
git merge --squash fix/zara-discord-startup-fail-closed
git switch main
git merge --ff-only fix/zara-discord-startup-fail-closed
git switch main
git merge fix/zara-discord-startup-fail-closed
git push origin main
Sign in to join this conversation.
No description provided.