[pitboss] phase 20: Track M.2 — MessageHandler end-to-end (Kafka / SQS / Pub-Sub / NATS / RabbitMQ)

This commit is contained in:
pitboss 2026-05-20 16:03:40 -05:00
parent fedc507e6a
commit bd0135e423
45 changed files with 3227 additions and 25 deletions

View file

@ -394,17 +394,16 @@ mod tests {
assert_eq!(EntryKind::Unknown.tag(), T::Unknown);
}
/// Phase 18 (Track M.0) baseline — the Phase 18 variants not yet
/// wired by a follow-up phase still route through the
/// supported-set gate so the verifier produces a structured
/// `Inconclusive(EntryKindUnsupported)` rather than degrading
/// silently. Phase 19 lands `ClassMethod`, so it is excluded
/// from the still-unsupported set.
/// Phase 18 (Track M.0) baseline — the variants not yet wired by a
/// follow-up phase still route through the supported-set gate so the
/// verifier produces a structured `Inconclusive(EntryKindUnsupported)`
/// rather than degrading silently. Phase 19 lands `ClassMethod`;
/// Phase 20 lands `MessageHandler` on five langs (Python, Java,
/// JavaScript, TypeScript, Go); the rest stay unsupported.
#[test]
fn entry_kind_phase_20_21_variants_are_unsupported_everywhere() {
fn entry_kind_phase_21_variants_are_unsupported_everywhere() {
use crate::evidence::EntryKindTag as T;
let still_unsupported = [
T::MessageHandler,
T::ScheduledJob,
T::GraphQLResolver,
T::WebSocket,
@ -427,7 +426,7 @@ mod tests {
for tag in still_unsupported {
assert!(
!supported.contains(&tag),
"{lang:?} prematurely advertised {tag:?} — Phase 20 / 21 has not landed the per-lang adapters for this variant"
"{lang:?} prematurely advertised {tag:?} — Phase 21 has not landed the per-lang adapters for this variant"
);
let hint = entry_kind_hint(lang, tag);
assert!(
@ -438,6 +437,44 @@ mod tests {
}
}
/// Phase 20 (Track M.2) — `MessageHandler` is supported on the five
/// langs the brief lists (Python, Java, JavaScript, TypeScript, Go)
/// and remains unsupported on the rest (Ruby, PHP, Rust, C, Cpp).
/// The verifier should produce a structured
/// `Inconclusive(EntryKindUnsupported)` for the unsupported set.
#[test]
fn entry_kind_message_handler_supported_in_phase_20_langs() {
use crate::evidence::EntryKindTag as T;
let supported_langs = [
Lang::Python,
Lang::Java,
Lang::JavaScript,
Lang::TypeScript,
Lang::Go,
];
let unsupported_langs = [
Lang::Php,
Lang::Ruby,
Lang::Rust,
Lang::C,
Lang::Cpp,
];
for lang in supported_langs {
let supported = entry_kinds_supported(lang);
assert!(
supported.contains(&T::MessageHandler),
"{lang:?} must advertise MessageHandler after Phase 20; got {supported:?}",
);
}
for lang in unsupported_langs {
let supported = entry_kinds_supported(lang);
assert!(
!supported.contains(&T::MessageHandler),
"{lang:?} must not yet advertise MessageHandler — Phase 20 only covers 5 langs",
);
}
}
/// Phase 19 (Track M.1) — every lang emitter now advertises
/// `ClassMethod` so the verifier dispatches structurally instead
/// of degrading to `Inconclusive(EntryKindUnsupported)`.