Skip to content

test(automation): big-loop run-history integration test + fix pre-existing test-file type errors#3254

Merged
os-zhuang merged 1 commit into
mainfrom
claude/step-logs-run-observability-plxc2p
Jul 19, 2026
Merged

test(automation): big-loop run-history integration test + fix pre-existing test-file type errors#3254
os-zhuang merged 1 commit into
mainfrom
claude/step-logs-run-observability-plxc2p

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Summary

Two test-only hardening follow-ups to the #3234 region-aware history compaction (merged in #3240). No src/ runtime/API change, so this releases nothing (empty changeset).

1. End-to-end integration test (#3234)

The compaction fix was covered by pure-function unit tests over synthetic step logs. This adds a run-history.test.ts case that drives the real engine path: register a loop container over a 250-item collection (> MAX_PERSISTED_HISTORY_STEPS), executerecordTerminal → spin up a fresh engine sharing the same durable store (simulating a restart) → getRun. It asserts the rehydrated, compacted history row:

This pins the engine's fold-into-run-log (#1479) + persist (#2585) + compact (#3234) chain, not just the pure function.

2. Clear pre-existing tsc --noEmit errors in the package's test files

@objectstack/service-automation accumulated 11 type errors in *.test.ts files (invisible to the tsup build and to vitest, which don't type-check tests, and to CI's type-check which excludes them). Fixed so the whole package type-checks clean:

  • engine.test.ts — add the now-required maturity: 'ga' to two inline action descriptors; underscore an unused executor param.
  • nested-composition.test.ts — type the {}-inferred flow output before indexing it.
  • connector-descriptor-audit.test.ts — annotate two implicit-any callback params.
  • connector-nodes.test.ts / connector-materialization.test.tsas unknown as Connector on the partial connector-def test doubles (the materializer reads only a subset at runtime, which is why vitest passed).

Verification

  • Full @objectstack/service-automation suite — 329/329 pass.
  • tsc --noEmit on the package — 0 errors (was 11).
  • Changeset gates pass locally (check-changeset-no-major ✓, check-changeset-fixed ✓); empty changeset = no release.

🤖 Generated with Claude Code


Generated by Claude Code

…sting test-file type errors

Adds an end-to-end run-history.test.ts case that drives a >MAX-step loop through
the real engine (execute → recordTerminal → restart → getRun) and asserts the
region-aware history compaction (#3234) keeps the loop container + most-recent
iterations with no orphans across a restart — complementing the pure-function
unit tests already merged.

Also clears the pre-existing `tsc --noEmit` errors in the package's test files so
the whole @objectstack/service-automation package type-checks clean:
- engine.test.ts: add required `maturity: 'ga'` to two inline action descriptors;
  underscore an unused executor param.
- nested-composition.test.ts: type the `{}`-inferred flow output before indexing.
- connector-descriptor-audit.test.ts: annotate two implicit-any callback params.
- connector-nodes.test.ts / connector-materialization.test.ts: `as unknown as
  Connector` on the partial connector-def test doubles (the runtime reads a subset).

Test-only — no runtime/API change. Full suite 329/329 green; tsc --noEmit clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VuvxWgoadqryqBcjs7TpVi
@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jul 19, 2026 6:29am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling size/s labels Jul 19, 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 19, 2026 07:35
@os-zhuang
os-zhuang merged commit b28fd59 into main Jul 19, 2026
16 checks passed
@os-zhuang
os-zhuang deleted the claude/step-logs-run-observability-plxc2p branch July 19, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants