diff --git a/fleetd/src/test/java/dev/ltms/fleet/mcp/FleetMcpAuthzTest.java b/fleetd/src/test/java/dev/ltms/fleet/mcp/FleetMcpAuthzTest.java index a8c9aa01..30fe48e6 100644 --- a/fleetd/src/test/java/dev/ltms/fleet/mcp/FleetMcpAuthzTest.java +++ b/fleetd/src/test/java/dev/ltms/fleet/mcp/FleetMcpAuthzTest.java @@ -473,35 +473,6 @@ class FleetMcpAuthzTest { + "calling, not pass a literal boolean -- block: " + handlerBlock); } - /** - * {@code attributeIfObserver} can be correct in isolation while the one production call site - * never asks it -- a {@code str(a, "content")} left unwrapped would compile and every other - * test here would still pass. This reads {@code FleetMcp.java}'s own source and asserts the - * {@code fleet_send} handler's {@code content} assignment passes through - * {@code attributeIfObserver(caller, ...)}, not the raw argument. - */ - @Test - void theSendHandlerActuallyAttributesAnObserversContent() throws Exception { - String source = Files.readString(MCP_SOURCE); - - int start = source.indexOf("sendHandler ="); - assertTrue(start >= 0, "could not find the fleet_send handler (sendHandler) in " + MCP_SOURCE - + " -- the scrape has stopped matching, fix the anchor before trusting this test"); - int end = source.indexOf("replyHandler =", start); - assertTrue(end > start, "could not find the handler declared after sendHandler to bound the scrape"); - String handlerBlock = source.substring(start, end); - - // CONTROL: the block we scraped really does assign "content" from the request -- if this - // fails, the anchors above moved and the assertion below would otherwise pass on nothing. - assertTrue(handlerBlock.contains("str(a, \"content\")"), - "control failed: the scraped sendHandler block contains no content extraction at all -- " - + "the anchors have drifted, this test is not testing what it claims to"); - - assertTrue(handlerBlock.contains("attributeIfObserver(caller, str(a, \"content\"))"), - "the fleet_send handler must assign content from attributeIfObserver(caller, ...), " - + "not the raw request argument -- block: " + handlerBlock); - } - // --- who may see fleet_list's leads and members arrays --------------------------------------- /**