Skip to main content

Module conformance_shapes

Module conformance_shapes 

Source
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:

  1. Load — Parse and load the extension into the QuickJS runtime.
  2. Verify registrations — Check that expected registration types appeared.
  3. Invoke — Exercise the extension’s primary dispatch path (tool call, command execution, event dispatch, etc.).
  4. 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.
NaClassificationSummary
Aggregate summary of N/A classifications.
RegistrationSnapshot
Registration snapshot extracted after extension load.
ShapeBatchSummary
Summary of a batch run.
ShapeEvent
Structured JSONL event emitted by the harness.
ShapeFailure
A classified conformance failure with context.
ShapeHarnessConfig
Configuration for running the shape harness.
ShapeHarnessInput
Input specification for running the shape harness on one extension.
ShapeShapeSummary
Per-shape aggregate in batch summary.
ShapeTestResult
Aggregate result for a single extension run through the shape harness.

Enums§

ExtensionShape
Maps 1:1 to ExtensionCategory but is specialized for harness dispatch.
FailureClass
Failure category for conformance diagnostics.
LifecyclePhase
Lifecycle phase for JSONL event tagging.
RemediationBucket
Remediation bucket for N/A (not-applicable) extension conformance states.
ShapeEventStatus
Status of a lifecycle event.
ShapeInvocation
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 FailureClass into a remediation bucket.
verify_registrations
Verify that a registration snapshot matches the expected shape.