feat: add --override-timestamp to agents send-test-message#74
Merged
Conversation
Surface the TestMessage.override_timestamp field (already present in the embedded OpenAPI spec) as a flag on `syllable agents send-test-message`. When set, the value is forwarded verbatim into the request body's override_timestamp field; when unset, the field is omitted entirely so existing invocations produce an identical body. This pins the agent's wall-clock time for a turn, making date-sensitive agent tests (relative-date fixtures) deterministic without bypassing the CLI. Thin passthrough: no client-side validation; the server validates format and returns a structured 422. ZOO-7809 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This was referenced Jun 1, 2026
yorkable
added a commit
that referenced
this pull request
Jun 1, 2026
…format (#78) The conversation-test server honors override_timestamp only when it is a timezone-naive ISO 8601 string (e.g. 2030-12-25T09:30:00, interpreted in the agent's timezone). Offset (-07:00), 'Z', and space-separated forms are silently dropped — the agent falls back to the real wall clock with HTTP 200 and no error. The example shipped in #74 used the offset form, so pasting it was a silent no-op that defeated the flag's purpose. Correct the example, flag help, and AGENTS.md to a known-honored tz-naive value and note which forms are ignored; fix the unit test, which asserted on the offset form. No behavior change — client-side guarding is tracked as a separate feature request. (The #74 claim that the server returns a structured 422 was wrong: override_timestamp is typed anyOf[string,null] with no date-time format, so there is no schema-level validation.) Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Adds an
--override-timestamp <iso8601>flag tosyllable agents send-test-message, bringing the CLI to parity with the conversation-test API (POST /api/v1/agents/test/messages), whoseTestMessageschema already supportsoverride_timestamp.Date-sensitive agent tests (relative-date fixtures, "two weeks from today") drift daily because the agent's
@get_current_datetimereturns the real wall clock. This flag pins the agent's time for a turn so those tests are deterministic — without dropping to raw HTTP and re-implementing config/auth resolution.Resolves ZOO-7809.
Behavior
override_timestamp.Changes
cmd/agents.go— new flag onagentsSendTestMessageCmd(), conditional body inclusion viacmd.Flags().Changed(...)(mirrors the sibling--textpattern), plus help text and an example.cmd/cmd_test.go— two tests: field present when set, omitted when unset.AGENTS.md— documentssend-test-messagein the Agents section (previously undocumented).No spec change —
override_timestampalready exists in the embeddedTestMessageschema.Verification
go build✅ ·go test ./...✅ ·go vet ./cmd/✅--helplists--override-timestampwith an ISO 8601 example.--dry-runincludesoverride_timestampiff the flag is passed; the omitted-field body is identical to today's.🤖 Generated with Claude Code