feat(cli): madp canary — one turn through the real acceptance path (issue #5 proposal 4) - #9
Merged
Merged
Conversation
…ssue #5 proposal 4) Operationalizes the README live-smoke/canary advice as a standard command: builds a tiny two-actor/one-turn protocol in a fresh local Git repo, launches the turn through the normal runner, and validates with the production gate (--require-git --require-runner-completion). Binaries default to the shipped fakes (MADP_FAKE_BIN override); hermes-cli can probe a real installed CLI via --command-name with explicit --expected-provider/--expected-model (a canary never guesses identity). Scratch runtime state lives in a .canary-scratch sibling outside the dialogue repo so the clean-tree gate still passes; canaries are always local-only (--no-push accepted for explicitness). Canary: fakes of all three transports exit 0; a tampered published turn flips validation to non-zero with no new commit.
There was a problem hiding this comment.
Confidence Score: 4/5
Summary
Adds a local-only canary command exercising the real runner and production validation gate; core logic is sound and verified (full suite plus verify.py pass), but several edge cases crash with raw tracebacks.
Important Files Changed
| File | Overview |
|---|---|
| src/multi_agent_dialogue/canary.py | New canary module; unhandled FileExistsError/NotADirectoryError edge cases |
| src/multi_agent_dialogue/cli.py | Registers canary subcommand; expected-* flags lack help and validation |
| tests/test_cli.py | Six canary tests; helper oddly placed mid-class |
| tests/test_provenance_recovery.py | Namespace guard updated to include canary |
| README.md | Replaces manual canary advice with the command |
- stale .canary-scratch and file-as-dialogue paths raise CanaryError with clear messages instead of raw tracebacks; - --expected-provider/--expected-model without --command-name are rejected instead of silently ignored (and now carry help text); - the missing-fakes error states plainly that fakes ship with the source repo, not the installed package, and how MADP_FAKE_BIN helps; - test helper placement tidied; guards covered by new tests.
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 4 (standard canary command).
What
madp canary --adapter A --dialogue DIR [--no-push]:--require-git --require-runner-completion).cli_version.Details
MADP_FAKE_BINoverrides their location); all three transports supported.--command-name /path/to/hermes --expected-provider P --expected-model M. The expected identity flags are mandatory with an override — a canary never guesses identity.DIR.canary-scratch/sibling outside the dialogue repo, so the clean-tree gate passes.--no-pushis accepted for explicitness.identity_fallback_installed).Canary (from the proposal)
ok: true,completed_via: runner-launch.validate --require-git --require-runner-completionexits 1, commit count unchanged, nothing pushed (test_sabotaged_turn_fails_validation_afterwards).Tests
6 new CLI-level tests; the public-namespace guard test now expects
canary. Full suite: 283 passed;scripts/verify.py→{"ok": true}.