feat(evidence): record engine-probed adapter CLI version per turn (issue #5 proposal 2) - #6
Merged
Merged
Conversation
Implements issue #5 proposal 2. Accepted-turn evidence gains an optional cli_version record: the adapter's --version argv, exit status, verbatim output (truncated to 500 chars), output SHA-256, and probe timestamp. Probing is engine-run (never adapter self-report), bounded (15s), and informational: a failed probe is recorded with an 'error' key instead of failing the turn — acceptance still rests on the identity evidence alone. - version_probe_argv hook on Adapter; implemented for hermes-cli (settings.command_name), fable-session (settings.command_name), and command (worker argv[0]) - runtime-evidence.schema.json gains the optional cli_version property (additionalProperties stays false; evidence_version unchanged: the field is additive and optional) - fakes learn --version: fake-hermes 1.1.0, fake-fable-session 0.3.0b1, fake-worker 1.0.0 - tests: probe recorded for all three adapters, two stubbed versions yield distinct evidence (canary), failed probe recorded not fatal
There was a problem hiding this comment.
Confidence Score: 4/5
Summary
Adds optional engine-probed cli_version provenance to accepted-turn evidence across all three adapters, with schema and tests. Verified locally: 219 tests pass, verify.py ok. Low risk; only minor robustness and strictness gaps.
Important Files Changed
| File | Overview |
|---|---|
| src/multi_agent_dialogue/adapters/base.py | New version_probe_argv hook and cli_version_evidence probe in base_evidence |
| src/multi_agent_dialogue/adapters/hermes.py | Probes settings.command_name --version |
| src/multi_agent_dialogue/adapters/claude_fable.py | Probes command_name --version with fable-session default |
| src/multi_agent_dialogue/adapters/command.py | Probes worker argv[0] --version; may report wrapper/interpreter, not worker |
| schemas/runtime-evidence.schema.json | Optional cli_version property; full-file reformat inflates diff |
| tests/test_real_contracts.py | Probe, two-version canary, and failed-probe tests; inheritance duplicates tests |
| examples/fakes/bin/fake-hermes | Adds --version fixture output |
| examples/fakes/bin/fake-fable-session | Adds --version fixture output |
| examples/fakes/bin/fake-worker | Adds argparse --version action |
| README.md | Documents per-turn cli_version evidence |
- version_probe_argv hook call moved inside the try: a subclass AdapterError degrades to a recorded error, never fails the turn. - output_sha256 now attests the FULL probe output, computed before the 500-char storage truncation; output_truncated flags the prefix case. - Probe runs under the actor substituted settings env so PATH- or env-dependent CLIs resolve the binary the turn actually used. - Schema: cli_version gains exit_status/output/output_sha256(64-hex)/ output_truncated/probed_at/error with additionalProperties=false. - Tests: CommandFixtureBase extracted (no verbatim re-run of the identity matrix); new guards for truncation hashing, hook-error degradation, and settings-env propagation.
…ion-evidence # Conflicts: # tests/test_real_contracts.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements issue #5, proposal 2 (per-turn adapter CLI version in evidence) — the highest-rated gap from the 3-agent self-review dialogue: the README says adapters "depend on the exact installed CLI versions", yet accepted-turn evidence recorded only provider/model/session.
What changes
Accepted-turn evidence gains an optional
cli_versionrecord:<cli> --versionitself (bounded 15s probe) per the adapter'sversion_probe_argvhook — implemented forhermes-cli(settings.command_name),fable-session(settings.command_name), andcommand(workerargv[0]).errorkey instead of failing the turn. Turn acceptance still rests on identity evidence alone; this field is provenance for later review/reproduction.runtime-evidence.schema.jsongains the optionalcli_versionproperty (additionalPropertiesstaysfalse;evidence_versionunchanged — the field is additive and optional).--version:fake-hermes 1.1.0,fake-fable-session 0.3.0b1,fake-worker 1.0.0.Tests (canary from the proposal)
cli_versionrecords; both turns validate.--versionsupport) → recorded, turn still accepted.scripts/verify.py→{"ok": true}.Submitted by the askclaw-lumen machine account (Hermes agent "Lumen"), implementing a proposal produced by the MADP self-improvement dialogue in issue #5. — Lumen 💡