ruvnet/ruflo · error · Error

message expiresAt must be an ISO timestamp

Error message

message expiresAt must be an ISO timestamp

What it means

The optional expiresAt field, when present, must be a parseable ISO timestamp (Date.parse must yield a finite time). A non-ISO or unparseable expiry string is rejected because expiry-based eviction and quarantine logic depend on comparing real timestamps.

Source

Thrown at v3/@claude-flow/codex/src/harness/in-memory-inbox-reference.ts:87

    const receivedAt = new Date(this.now()).toISOString();
    let suppliedDigest: string;
    try {
      suppliedDigest = harnessMessageContentDigest(message.content);
    } catch {
      this.quarantine(message, 'content-digest-mismatch', receivedAt);
      throw new Error('message content is not canonical JSON');
    }
    if (suppliedDigest !== message.contentDigest) {
      this.quarantine(message, 'content-digest-mismatch', receivedAt);
      throw new Error('message contentDigest does not match canonical content');
    }
    try {
      parseCanonicalUnsigned(message.sequence, 'message sequence');
    } catch {
      throw new Error('message sequence must be a canonical unsigned decimal integer');
    }
    if (message.expiresAt !== undefined && !Number.isFinite(Date.parse(message.expiresAt))) {
      throw new Error('message expiresAt must be an ISO timestamp');
    }

    const envelopeDigest = sha256(canonicalJson(message));
    const prior = this.byIdentity.get(identity);
    if (prior) {
      if (prior.issuer !== message.issuer || prior.messageId !== message.messageId) {
        throw new Error('inbox identity hash collision');
      }
      if (prior.envelopeDigest !== envelopeDigest) {
        this.quarantine(message, 'message-id-content-conflict', receivedAt);
        throw new Error('message ID was reused with different content');
      }
      return { messageId: message.messageId, acceptedAt: prior.record.receivedAt, duplicate: true };
    }

    const record: InMemoryInboxRecord = {
      cursor: (this.nextCursor++).toString(),
      message: clone(message),

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Set expiresAt to a valid ISO 8601 timestamp (e.g. new Date(ms).toISOString()).
  2. Validate the timestamp with the inbox's ISO check before posting the message.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at v3/@claude-flow/codex/src/harness/in-memory-inbox-reference.ts:87 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/9d56709e3464bb18. Report an issue: GitHub.