fix: users me fails loudly without email; warn on ignored override-timestamp forms#90
Merged
Merged
Conversation
…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]>
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.
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=1and 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:
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 — trailingZ,±HH:MMoffset, 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):Stderr keeps
--output jsonstdout clean, and the warning also fires under--dry-runfor preflighting. Code comment marks it for removal when ZOO-7814 lands server-side — the spec-drift workflow will flag theTestMessage.override_timestampschema change as the cue.Tests
TestUsersMeNoEmailFailsLoudly— errors before any request; message namessyllable setupTestUsersMeWithEmailLooksUpExactUser— exact-lookup path unchangedTestOverrideTimestampWarning— table-driven: honored/unconfirmed/garbage forms stay silent; Z/z/±offset/space warnTestSendTestMessageWarnsButStillSends— warning on stderr, value sent unchangedgo test ./...green locally.Closes #71
Closes #77
🤖 Generated with Claude Code