Skip to content

test(automation): end-to-end coverage for the #1928 object-schema resolver wiring#3208

Merged
os-zhuang merged 1 commit into
mainfrom
claude/automation-schema-resolver-e2e
Jul 18, 2026
Merged

test(automation): end-to-end coverage for the #1928 object-schema resolver wiring#3208
os-zhuang merged 1 commit into
mainfrom
claude/automation-schema-resolver-e2e

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What

Closes the last coverage gap from the #1928 series. #3190 added AutomationEngine.setObjectSchemaResolver and wired it in AutomationServicePlugin.start() to objectql.registry.getObject, but the engine-level tests set the resolver by hand — so the plugin's actual production wiring was never exercised end-to-end. This test does.

The test

Boots a real LiteKernel with a minimal fake objectql plugin (exposing registry.getObject) + the AutomationServicePlugin, then asserts:

  1. The resolver is bridged. After bootstrap, the engine's objectSchemaResolver is a function that returns the object's fields + fieldTypes resolved from the registry, and undefined for an unknown object.
  2. The advisory fires through the running kernel. A flow registered via engine.registerFlow(...) whose condition does arithmetic on a text field (title * 2 > 10) emits the tier-4 type mismatch warning (captured from process.stdout) — and does not throw.
  3. Sound conditions stay quiet. stage == "won" && amount > 1000 produces no schema advisory.

Relies on the kernel's real bootstrap ordering (all init() before any start()), so the fake objectql service is present exactly when automation's start() bridges the resolver — the same sequence production uses.

Testing

  • @objectstack/service-automation319 green (+3 e2e); full suite unaffected.
  • Test-only; no behavior change (changeset is a patch for the coverage).

Refs: #1928 (closed), #3190.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Hnji7EEYR2mGt6pY53a8Bm


Generated by Claude Code

…olver wiring

Adds a kernel-level integration test that boots LiteKernel with a fake objectql
service (registry.getObject) + AutomationServicePlugin and proves the plugin
bridges the engine's object-schema resolver to the live registry at start():
- the wired resolver returns the object's fields + types;
- a flow registered through the running kernel doing arithmetic on a text field
  emits the tier-4 advisory (captured via process.stdout);
- a sound condition stays quiet.

Locks in the production integration point that #3190's engine-level unit tests
(resolver set by hand) could not exercise. Test-only; no behavior change.

Tests: service-automation 319 (+3 e2e); full suite green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hnji7EEYR2mGt6pY53a8Bm
@vercel

vercel Bot commented Jul 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment Jul 18, 2026 12:24pm

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling size/m and removed documentation Improvements or additions to documentation tests tooling labels Jul 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): packages/services.

6 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/automation/webhooks.mdx (via packages/services)
  • content/docs/kernel/runtime-services/audit-service.mdx (via packages/services)
  • content/docs/kernel/runtime-services/index.mdx (via packages/services)
  • content/docs/kernel/runtime-services/settings-service.mdx (via packages/services)
  • content/docs/plugins/packages.mdx (via packages/services)
  • content/docs/protocol/kernel/i18n-standard.mdx (via packages/services)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@os-zhuang
os-zhuang marked this pull request as ready for review July 18, 2026 12:35
@os-zhuang
os-zhuang merged commit 02eafa5 into main Jul 18, 2026
15 of 16 checks passed
@os-zhuang
os-zhuang deleted the claude/automation-schema-resolver-e2e branch July 18, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants