Skip to content

fix: users me fails loudly without email; warn on ignored override-timestamp forms#90

Merged
yorkable merged 1 commit into
mainfrom
fix/no-silent-wrong-answers
Jun 4, 2026
Merged

fix: users me fails loudly without email; warn on ignored override-timestamp forms#90
yorkable merged 1 commit into
mainfrom
fix/no-silent-wrong-answers

Conversation

@yorkable

@yorkable yorkable commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Two fixes with the same theme: never give a silently wrong answer.

users me (#71)

Without a configured email, the command fetched /api/v1/users/?limit=1 and presented the first user in the org as "me" — with only a stderr hint that the lookup was approximate. Anyone scripting "what role does my key have" could build on another user's account.

The API offers no identity endpoint (nothing maps an API key to its owner — see the triage note on the issue), so there is no correct fallback. The command now fails loudly:

$ syllable users me
Error: no email configured — run `syllable setup` and set your email so `users me` can look up your account
(exit 1)

The email-configured exact-lookup path is unchanged. AGENTS.md updated to match.

--override-timestamp (#77)

The conversation-test server honors only timezone-naive ISO 8601; offset/Z/space-separated forms are silently dropped (HTTP 200, real wall clock). Per the issue's design notes this adds a stderr warning on the three confirmed-ignored signals only — trailing Z, ±HH:MM offset, space separator — and still sends the value (warn, don't block; a hard error would break the passthrough contract and become wrong once the server accepts tz-aware values):

warning: --override-timestamp "2030-12-25T09:30:00Z" ends in 'Z' (UTC designator); the server only honors timezone-naive ISO 8601 (e.g. 2030-12-25T09:30:00) and will silently ignore this value, falling back to the real clock

Stderr keeps --output json stdout clean, and the warning also fires under --dry-run for preflighting. Code comment marks it for removal when ZOO-7814 lands server-side — the spec-drift workflow will flag the TestMessage.override_timestamp schema change as the cue.

Tests

  • TestUsersMeNoEmailFailsLoudly — errors before any request; message names syllable setup
  • TestUsersMeWithEmailLooksUpExactUser — exact-lookup path unchanged
  • TestOverrideTimestampWarning — table-driven: honored/unconfirmed/garbage forms stay silent; Z/z/±offset/space warn
  • TestSendTestMessageWarnsButStillSends — warning on stderr, value sent unchanged

go test ./... green locally.

Closes #71
Closes #77

🤖 Generated with Claude Code

…mestamp forms

Two silent-wrong-answer fixes:

- users me: when no email is configured, the command listed users with
  limit=1 and presented the first result as "me" — a different user's
  account, silently. The API has no key-identity endpoint, so there is
  no correct fallback; the command now errors (exit 1) pointing at
  `syllable setup` instead of returning someone else.

- agents send-test-message: the conversation-test server silently
  ignores --override-timestamp values carrying a trailing Z, a ±HH:MM
  offset, or a space separator, falling back to the real clock with
  HTTP 200. The CLI now prints a stderr warning on those confirmed
  signals (negative checks only) while still sending the value.
  Remove once ZOO-7814 lands; spec drift will flag the schema change.

Closes #71
Closes #77

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@yorkable
yorkable merged commit 2cfd14b into main Jun 4, 2026
2 checks passed
@yorkable
yorkable deleted the fix/no-silent-wrong-answers branch June 4, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant