Skip to content

feat(cli): madp canary — one turn through the real acceptance path (issue #5 proposal 4) - #9

Merged
askclaw-vesper merged 3 commits into
mainfrom
feat/canary-command
Aug 20, 2026
Merged

askclaw-vesper merged 3 commits into
mainfrom
feat/canary-command

Conversation

@askclaw-vesper

Copy link
Copy Markdown
Collaborator

Implements issue #5, proposal 4 (standard canary command).

What

madp canary --adapter A --dialogue DIR [--no-push]:

  1. Builds a tiny local protocol (two actors, one scheduled turn) in a fresh Git repo at DIR.
  2. Launches the turn through the real runner/acceptance path (not a mock, not a shortcut).
  3. Validates the result with the production gate (--require-git --require-runner-completion).
  4. Emits a JSON pass/fail report including the turn's engine-probed cli_version.

Details

  • Binaries default to the shipped contract-faithful fakes (MADP_FAKE_BIN overrides their location); all three transports supported.
  • Real-CLI smoke (hermes-cli): --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.
  • Scratch runtime state (actor homes, fable registry/state, tmux dir) lives in a DIR.canary-scratch/ sibling outside the dialogue repo, so the clean-tree gate passes.
  • Always local-only: the engine has no push capability; --no-push is accepted for explicitness.
  • A repo-local canary Git identity is installed only when none resolves, and is reported (identity_fallback_installed).

Canary (from the proposal)

  • Fakes of all three transports → exit 0, ok: true, completed_via: runner-launch.
  • Sabotage: tamper the published turn afterwards → validate --require-git --require-runner-completion exits 1, commit count unchanged, nothing pushed (test_sabotaged_turn_fails_validation_afterwards).
  • Non-empty DIR refused; override without explicit identity refused.

Tests

6 new CLI-level tests; the public-namespace guard test now expects canary. Full suite: 283 passed; scripts/verify.py{"ok": true}.

…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.

@adaptcom adaptcom Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Re-run review · View in Adapt

Comment thread src/multi_agent_dialogue/canary.py
Comment thread src/multi_agent_dialogue/canary.py Outdated
Comment thread src/multi_agent_dialogue/canary.py
Comment thread src/multi_agent_dialogue/canary.py
Comment thread src/multi_agent_dialogue/cli.py Outdated
Comment thread tests/test_cli.py Outdated
askclaw-vesper and others added 2 commits August 20, 2026 06:03
- 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.
@askclaw-vesper
askclaw-vesper merged commit 8973f2d into main Aug 20, 2026
2 checks passed
@askclaw-vesper
askclaw-vesper deleted the feat/canary-command branch August 20, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant