Skip to content

chassis-harness 0.5.1

Choose a tag to compare

@andreolli-davide andreolli-davide released this 22 Sep 09:54
· 80 commits to main since this release
pip install chassis-harness==0.5.1

Fixed

  • Generation lease accounting is authoritative (roadmap R001). The idle event
    is now cleared on the 0 -> 1 lease transition, so a wait_idle() that joins
    after a reacquisition waits for the current cycle instead of observing a stale
    idle signal. Releasing a lease id that is not outstanding — a forged id or a
    duplicate release — raises the new UnknownLeaseError and never alters the
    accounting. GenerationManager.retire() refuses a generation with outstanding
    leases outside terminal shutdown; the explicit begin_shutdown() transition is
    the only context where a still-leased generation may retire, and late releases
    against it stay exact. GenerationManager(history_limit=...) now rejects a
    negative value with ConfigurationError.
  • Migration note: callers that released a lease twice or released an unknown
    lease id previously corrupted the lease count silently; they now receive
    UnknownLeaseError. Catch it only if you intentionally tolerate buggy release
    paths; correct callers are unaffected.
  • Policy and secret resolution fails closed (roadmap R002). Registered policy
    and secret providers are resolved as explicit system requirements: the
    configured default is used only when the generation registers no provider,
    several eligible providers are rejected unless an explicit
    prefer_provider(...) preference selects one, and a registration that does not
    implement the contract is a provider failure. Resolution failures deny the tool
    call (and deny secret reads) instead of falling back to AllowAllPolicy or the
    environment-backed default, and a policy provider that raises while deciding
    denies the call with PolicyDenied, preserving the original exception only as
    an internal cause.
  • One end-to-end redaction boundary (roadmap R003). A single harness-owned
    SecretRedactor now covers replay, diagnostics, tool execution, agent
    execution, LangGraph run configuration, recording telemetry, and LangSmith.
    Telemetry backends receive pre-scrubbed attributes, updates, events, and errors
    through the new RedactingTelemetry wrapper, and LangSmithSpan scrubs
    attribute updates on its own path. Redaction is recursive over nested mappings
    and sequences and replaces whole values under sensitive key names on request
    and response paths. Policy-denial reasons and agent runtime exceptions are
    sanitized before crossing a public, hook, diagnostic, replay, or telemetry
    boundary, with the original exception preserved only as an internal cause.
    EffectCleanupError and cleanup reports render sanitized text while keeping
    the original exceptions as structured detail. Tool, capability, and
    replay-session metadata are scrubbed, and a ReplaySession attached to a
    harness adopts the harness redactor and is re-scrubbed (bind_redactor).
  • Migration note: an agent runtime failure other than a ChassisError now
    surfaces as AgentExecutionError (cause preserved) instead of the raw runtime
    exception. New: AgentExecutionError, RedactingTelemetry,
    ReplaySession.bind_redactor, LangSmithSpan(run, redactor=...).
  • Secret values shorter than four characters are now protected like any
    other; only the empty string is untrackable. Callers relying on add()
    refusing short values must stop doing so.
  • Publication validates actual capability registrations (roadmap R004).
    Before a candidate generation is published, every mounted plugin's effective
    registrations are compared with the contracts its manifest promises, and the
    resolution fixpoint is re-checked against the registrations consumers actually
    got. A provider that promised a capability but registered none — including in
    the first generation — a registration on the wrong contract generation, or a
    registered version no consumer's requirement accepts now rolls the entire
    candidate back with a structured PluginContractError naming the provider,
    promised contract, actual registrations, affected consumers, and rollback
    result. Previously such a candidate published silently and the gap surfaced
    only at run time.
  • Migration note: plugin fixtures that declare provides without registering
    the capability now fail at publication; register what you declare or narrow
    the manifest.
  • Failed scope entry and failed plugin cleanup are reversible (roadmap R005).
    A __enter__/__aenter__ that fails no longer leaves an effect record the
    scope cannot revert. Rollback cleanup failures are aggregated into the raised
    PluginSetupError (cleanup_failures, with a count in the structured
    context) and into last_cleanup_failures instead of being hidden inside the
    failed scope. Failed plugin instances stay inspectable and retryable while
    their entry is desired, and are reclaimed once it is not — no orphaned
    FAILED instances remain resident. Owned tasks that resist cancellation past
    the shutdown timeout are reported and stay visible (Scope.stragglers), and
    such a scope is never presented as fully disposed (Scope.fully_disposed,
    plus stragglers/fully_disposed in Scope.to_dict()).
  • Migration note: PluginSetupError gained cleanup_failures= and reports
    a cleanup_failures count in its context; a scope that failed to stop all its
    tasks now reports fully_disposed: False where it previously claimed a clean
    close.

Documentation

  • Added the release roadmap, mapping every finding from the 0.5.0
    repository audit to the planned 0.5.1–0.8.0 releases, with acceptance criteria,
    dependencies, exit gates, and permanent traceability.
  • Marked the known 0.5.0 enforcement gaps in the design guarantees and security
    guide so the documentation does not overstate current secret, lifecycle, and
    transactional protections while remediation is pending.