Skip to content

Observation settlements cannot be bound to their basis evidence #26

Description

@flyingrobots

Observed

The patch witness can prove that a settlement's retained evidence describes the bytes that were actually observed. The observation witness cannot, because effect-host does not project the fields that would make it checkable.

A patch settlement reports:

kind, observation/patch, commitDigest, resultDigest,
basisDigest, externalEvidenceDigest, schemaAdmissionEvidenceDigest,
requestBasis, resultingBasis, beforeContentDigest, afterContentDigest

An observation settlement reports:

kind, observation, commitDigest, resultDigest, canonicalResultByteCount

jq '.settlement | keys' on .build/effect-tests/golden/settlement-report.json returns exactly those five. basisDigest, externalEvidenceDigest, and schemaAdmissionEvidenceDigest are absent, and tests/effect-runtime.sh contains zero references to any of them.

Why it matters

Review of #24 spent several rounds establishing that an assertion comparing evidence fields only against each other proves nothing: a producer emitting one arbitrary value for all of them passes. The fix was a two-route derivation — ask the host for the same basis by an independent path and compare. That work landed for the patch path and is structurally unavailable for the observation path.

The observation request is basis-bound in exactly the same way. A regression in BoundedWorkspaceObservationAdapterV1 that retained a basis over the wrong bytes would not be caught by the current witness, which checks the returned file contents but nothing about the durable evidence recorded alongside them.

This is not a defect in shipped behaviour. It is a gap in what the witness is able to observe.

Not done in #24 deliberately

Adding report fields to effect-host is a new capability rather than a repair, and #24 is already 45 commits past its original scope. Filing instead of growing it further.

Acceptance

  • effect-host projects the settlement's basis and evidence identities, as patch-host does.
  • tests/effect-runtime.sh binds the retained basis to the observed bytes by a two-route derivation, in both directions — equal for the observed bytes, different for other bytes.
  • The uncertainty settlement gets the same treatment, since that is the one observation case where the declared and observed states differ.

Related: #24, #25.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bad-codeObserved defect, smell, or invariant violationroadmap-aRoadmap A: standalone Hello Echoroadmap-a1Roadmap A.1: bounded Hello external effects

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions