Skip to main content
All Python modules · Import and compatibility guidance

Smoke client operations

Exports

AgentTestError

An authored test suite does not follow the Harnest convention.

ChannelStoreConformanceMixin

Subclass with IsolatedAsyncioTestCase and an async make_store factory.

ChannelStoreConformanceMixin.make_store

Override to return an unstarted provider implementing ChannelStore. Tests use a unique installation scope per case. Register backend cleanup with addAsyncCleanup; the mixin owns starting and closing it.

ChannelStoreConformanceMixin.asyncSetUp

Give every check its own installation scope and provider lifecycle.

ChannelStoreConformanceMixin.channel_event

Build deterministic safe event input independently of provider details.

ChannelStoreConformanceMixin.channel_reply

Build one queued reply targeting this scope’s default conversation.

ChannelStoreConformanceMixin.test_admit_is_idempotent_conflict_checked_and_scope_isolated

Concurrent retries admit once and reject a changed redefinition.

ChannelStoreConformanceMixin.test_get_event_reads_only_the_admitted_identity

Reads are scoped to platform, installation, and provider event ID.

ChannelStoreConformanceMixin.test_session_binding_is_first_write_wins

A conversation scope keeps its first bound session across retries.

ChannelStoreConformanceMixin.test_reply_lifecycle_claims_pending_and_finishes_once

Replies are claimable while pending and terminal exactly once.

MemoryStoreConformanceMixin

Combine with IsolatedAsyncioTestCase and implement async make_store().

MemoryStoreConformanceMixin.make_store

Return an unstarted provider; register any test-data cleanup yourself.

MemoryStoreConformanceMixin.asyncSetUp

Own a fresh provider and unique application scope for each check.

MemoryStoreConformanceMixin.record

Build a valid explicit write without coupling tests to a datastore.

MemoryStoreConformanceMixin.test_memory_is_scoped_and_explicit

Identical keys never cross application, user or namespace boundaries.

MemoryStoreConformanceMixin.test_memory_results_are_detached

Callers cannot silently mutate persisted metadata through returned objects.

MemoryStoreConformanceMixin.test_memory_json_roundtrip_is_lossless

Provider scripting must preserve arrays, exact integers and floats.

MemoryStoreConformanceMixin.test_memory_maintenance_preserves_other_owners

Bulk erasure includes expired records but never another application/user.

MemoryStoreConformanceMixin.test_memory_purge_physically_removes_expired_pages

Zero-deletion pages continue and live data survives a bounded sweep.

MemoryStoreConformanceMixin.test_memory_revision_fences_concurrent_writers

Exactly one writer can replace the same revision across concurrent calls.

MemoryStoreConformanceMixin.test_memory_delete_does_not_allow_stale_resurrection

Deletion removes search membership and invalidates earlier revisions.
Paginate datastore-filtered results without interpreting wildcard syntax.

MemoryStoreConformanceMixin.test_memory_expiry_hides_records_and_fences_updates

Expiry applies to get, list, search and conditional mutation alike.

MemoryStoreConformanceMixin.test_memory_rejects_invalid_payloads_and_limits

Validation never silently truncates private data or unbounded queries.

SmokeClient

Small neutral-API helper injected into opted-in smoke tests.

SmokeClient.respond

Invoke the neutral response endpoint and return its JSON object.

SmokeClient.stream

Invoke the streaming endpoint and return parsed server-sent events.

TaskStoreConformanceMixin

Subclass with IsolatedAsyncioTestCase and an async make_store factory.

TaskStoreConformanceMixin.make_store

Override to return an unstarted provider implementing both contracts. Tests use a unique application scope per case. Register backend cleanup with addAsyncCleanup; the mixin owns starting and closing the provider.

TaskStoreConformanceMixin.asyncSetUp

Give every check its own application scope and provider lifecycle.

TaskStoreConformanceMixin.task_record

Build deterministic safe job input independently of provider details.

TaskStoreConformanceMixin.cron_record

Build one due user schedule with stable ownership and definition.

TaskStoreConformanceMixin.claim

Claim one bounded batch through the shared worker contract.

TaskStoreConformanceMixin.read_task

Read a task as the selected owner.

TaskStoreConformanceMixin.finish

Finish the exact lease with deterministic test timestamps.

TaskStoreConformanceMixin.test_enqueue_is_atomic_idempotent_and_owner_scoped

Concurrent retries produce one job without crossing task/user scope.

TaskStoreConformanceMixin.test_completed_task_retains_idempotency_but_scrubs_payload

Private inputs disappear while retained fingerprints deduplicate retries.

TaskStoreConformanceMixin.test_claim_filters_due_queue_and_application_and_never_duplicates

Replicas atomically claim distinct jobs using datastore scope predicates.

TaskStoreConformanceMixin.test_expired_lease_cannot_finish_and_reclaim_uses_new_token

Fencing rejects old workers before and after a replacement claim.

TaskStoreConformanceMixin.test_renewal_prevents_early_reclaim

A valid heartbeat extends exclusive attempt ownership.

TaskStoreConformanceMixin.test_retry_delay_and_exhausted_crash_recovery

Retries retain inputs and crashed final attempts reach a terminal state.

TaskStoreConformanceMixin.test_cancellation_is_scoped_terminal_and_fences_running_attempt

Cancellation cannot reveal another owner’s work or accept late results.

TaskStoreConformanceMixin.test_snapshots_do_not_share_mutable_payload

Mutating submitted or returned objects cannot rewrite durable records.

TaskStoreConformanceMixin.test_cron_idempotency_revision_and_terminal_cancellation

Definition retry preserves inactive state and stale edits cannot win.

TaskStoreConformanceMixin.test_cron_lists_enforce_owner_due_state_and_keyset_pagination

Due pagination includes equal timestamps without leaking foreign scopes.

TaskStoreConformanceMixin.test_cron_occurrence_commit_is_atomic_and_exactly_deduplicated

Concurrent dispatchers advance once and commit exactly one runnable job.

TaskStoreConformanceMixin.test_cron_max_runs_caps_atomic_handoffs

A schedule cannot enqueue more occurrences than its run cap.

TaskStoreConformanceMixin.test_cron_failure_streak_resets_after_success

Only consecutive terminal failures stop later occurrences.

TaskStoreConformanceMixin.test_cancelled_cron_cannot_commit_and_conflict_rolls_back_cursor

A cancelled/stale schedule or failed enqueue leaves no partial handoff.

TaskStoreConformanceMixin.test_occurrence_cannot_substitute_schedule_arguments

Atomic handoff must preserve the validated schedule’s authored input.

TaskStoreConformanceMixin.test_limits_reject_unbounded_or_ambiguous_requests

Providers share the public bounded-page contract before datastore I/O.

run_agent_tests

Test authored source with eval preparation progress and optional quiet output.