diff --git a/fleetd/src/main/java/dev/ltms/fleet/session/SessionManager.java b/fleetd/src/main/java/dev/ltms/fleet/session/SessionManager.java index af23289..ae06834 100644 --- a/fleetd/src/main/java/dev/ltms/fleet/session/SessionManager.java +++ b/fleetd/src/main/java/dev/ltms/fleet/session/SessionManager.java @@ -872,11 +872,17 @@ public final class SessionManager implements TurnListener { // records whether a role charter was configured ("fleet.charters.") or only the reply // charter was composed ("none"). // #604: charterBytes rides along with charterSha256, not with charterSource — it is only - // meaningful as the digest's companion (a length turns "they differ" into "by how much"), - // and the receipt only ever pairs a non-null digest with a real byte count (CharterReceipt's - // own contract: no composed charter is an explicit null digest AND a zero byte count, never - // one without the other). A member with no composed charter at all reports charterSource and - // nothing else, exactly as before this change. + // meaningful as the digest's companion (a length turns "they differ" into "by how much"). + // A member with no composed charter reports charterSource and nothing else, as before. + // + // Gating on the DIGEST rather than on the receipt is deliberate, and the two are not + // always null together. CharterReceipt.compose() derives the digest with digestOf(), which + // returns null for BLANK text, while the byte count is composed.getBytes().length, which + // does not. So a whitespace-only charter (a blank fleet.charters. on a profile with + // no MCP, so no reply charter is appended) yields a null digest beside a non-zero size. + // Reporting a size with no digest would say "they differ by N bytes" about an artifact we + // cannot fingerprint, so this gate omits both. Never widen it to the receipt-level null + // check without deciding what that case should report. if (session.charterReceipt() != null) { m.put("charterSource", session.charterReceipt().charterSource()); if (session.charterReceipt().charterSha256() != null) {