test(automation): big-loop run-history integration test + fix pre-existing test-file type errors#3254
Merged
Conversation
…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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 6 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
July 19, 2026 07:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tscase that drives the real engine path: register aloopcontainer over a 250-item collection (>MAX_PERSISTED_HISTORY_STEPS),execute→recordTerminal→ 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 --noEmiterrors in the package's test files@objectstack/service-automationaccumulated 11 type errors in*.test.tsfiles (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-requiredmaturity: 'ga'to two inline action descriptors; underscore an unused executor param.nested-composition.test.ts— type the{}-inferred flowoutputbefore indexing it.connector-descriptor-audit.test.ts— annotate two implicit-anycallback params.connector-nodes.test.ts/connector-materialization.test.ts—as unknown as Connectoron the partial connector-def test doubles (the materializer reads only a subset at runtime, which is why vitest passed).Verification
@objectstack/service-automationsuite — 329/329 pass.tsc --noEmiton the package — 0 errors (was 11).check-changeset-no-major✓,check-changeset-fixed✓); empty changeset = no release.🤖 Generated with Claude Code
Generated by Claude Code