Expand description
Shape-aware conformance harness for extension types.
This module provides a unified harness that can load, exercise, and validate each extension shape (tool, command, provider, event hook, UI component, configuration, multi, general) through standardized lifecycle hooks:
- Load — Parse and load the extension into the QuickJS runtime.
- Verify registrations — Check that expected registration types appeared.
- Invoke — Exercise the extension’s primary dispatch path (tool call, command execution, event dispatch, etc.).
- Shutdown — Cleanly tear down the runtime and verify no panics or leaks.
Each lifecycle step emits structured JSONL events for diagnostics. Error reporting classifies failures into actionable categories.
Structs§
- NaClassification
- A single N/A classification entry: one extension mapped to a bucket.
- NaClassification
Summary - Aggregate summary of N/A classifications.
- Registration
Snapshot - Registration snapshot extracted after extension load.
- Shape
Batch Summary - Summary of a batch run.
- Shape
Event - Structured JSONL event emitted by the harness.
- Shape
Failure - A classified conformance failure with context.
- Shape
Harness Config - Configuration for running the shape harness.
- Shape
Harness Input - Input specification for running the shape harness on one extension.
- Shape
Shape Summary - Per-shape aggregate in batch summary.
- Shape
Test Result - Aggregate result for a single extension run through the shape harness.
Enums§
- Extension
Shape - Maps 1:1 to
ExtensionCategorybut is specialized for harness dispatch. - Failure
Class - Failure category for conformance diagnostics.
- Lifecycle
Phase - Lifecycle phase for JSONL event tagging.
- Remediation
Bucket - Remediation bucket for N/A (not-applicable) extension conformance states.
- Shape
Event Status - Status of a lifecycle event.
- Shape
Invocation - What to invoke after loading an extension.
Functions§
- base_
fixture_ name - Known base fixtures per shape (under
tests/ext_conformance/artifacts/base_fixtures/). - base_
fixture_ path - Build the path to a base fixture’s entry point.
- classify_
cause_ to_ bucket - Classify a failure cause code into a remediation bucket.
- classify_
failure_ to_ bucket - Classify a
FailureClassinto a remediation bucket. - verify_
registrations - Verify that a registration snapshot matches the expected shape.