Skip to content

test(service-automation): measure a connector definition published on one replica across two replicas (#27977) - #28010

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-8uxskf
Oct 30, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-8uxskf

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread
Fixes #27977

domain:server#3 · os-elon-musk · session_016WV4cx4GVsYbtK2oE4scBf

Clause-②: no
Metadata-protocol: none

维护者速读

What changes

One new test file, packages/services/service-automation/src/connector-definition-cluster.test.ts, built like connector-credential-cluster.test.ts (#27941): two ObjectKernel replicas, each running ObjectQLPlugin's metadata protocol and AutomationServicePlugin, over ONE better-sqlite3 file both open, joined by a bus that delivers every publish to every subscriber (publisher included). Each replica is attached the way MetadataClusterBridgePlugin attaches it at kernel:ready: lane 2 (attachMetadataMutationPubSub) and lane 4 (attachConnectorCredentialPubSub). Lane 1 (metadata.changed) is not attached: it replays into a MetadataManager's caches, and the connector reconcile reads the ObjectQL registry and the protocol's execution view, never that manager.

A definition change is published on A through the per-item door (a draft saveMetaItem, then publishMetaItem), changing providerConfig.endpoint from V1 to V2.

Measurement

result
A, the publishing replica re-materializes with V2 (ObjectQLPlugin announces A's own metadata:reloaded after the per-item publish)
lane 2 to B delivered: B's protocol replays connector/NAME into B's mutation listeners
B's live instance, no reload on B does not converge: B's provider is never called (expected undefined to be 'https://v2.billing.example.test')
control: metadata:reloaded on B B materializes V2 from its own read of the shared store

Cause, read from the code: subscribeFlowMutations in plugin.ts returns early for any mutation whose type is not flow, and metadata:reloaded is a kernel-local hook a peer never receives. So the gap is the trigger, not the store or the read. The lane choice for the fix belongs to #28002.

Tests

Acceptance notes

Verification

Head 022ad12c, base 46943657.

Derived gate families and lint

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 50 families over the 1 changed path. 49 exited 0. pnpm check:dual-build-cjs-loads exited 3 (PREREQUISITE NOT MET: it needs every package's dist in this worktree), so it is NOT MEASURED locally and CI runs it. check-plugin-teardown-shape --self-test exited 3 on the shallow clone and 0 after git fetch --unshallow. --ran reconciliation: 50 derived, 49 run, 1 NOT-MEASURED, 0 UNRUN. pnpm lint exited 0.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (Not touched.)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset: nothing published, skip-changeset.
  • 6. packages/spec touched: not touched.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_016WV4cx4GVsYbtK2oE4scBf

…ross two replicas

Two kernels over one shared SQLite file and one shared bus, attached on
lanes 2 and 4 the way MetadataClusterBridgePlugin attaches them. A
definition published through the per-item door re-materializes on the
publishing replica, and lane 2 delivers the mutation to the peer, but the
peer's live instance does not follow until a metadata:reloaded on the
peer. The gap is pinned as an expected failure; a control shows a reload
on the peer converges it from its own read of the shared store.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cx4GVsYbtK2oE4scBf
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs.

What this run could not see

Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json b1eb3cf9411f773bf6bac996e52a1b8db7ba3d30 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#3 · os-elon-musk · session_016WV4czuTWNgKR22fKv7jia

Seat ACCEPT · PR #28010 · head 022ad12cff5a202bf1155d69de81cb8bfd4fd277 · 2026-10-30T07:56Z

维护者速读

This PR is test only. It measures what #27977 asked: when one replica publishes a changed connector definition, does a peer pick it up? It does not. The publishing replica re-materialises, and lane 2 delivers the mutation to the peer, but the automation plugin on the peer ignores a connector mutation, so the peer keeps its old instance until a reload. The gap is pinned as it.fails, and the fix card is #28002 (lane choice is triage's). A control shows that a reload on the peer converges it from the shared store, so only the trigger is missing.

席位核对

ACCEPT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

automation (cluster): measure whether a published connector definition change materialises on every replica or only on the publishing one

1 participant