feat: default stores get to the active store and clarify two flag names - #111
Merged
Conversation
`ofga stores get` demanded a store ID even when one was configured, unlike every other store-scoped command; the argument is now optional and falls back to the active store. Two flags meant something other than what their names suggested. `tuples changes --token-file` writes a changelog cursor, while --token-file on `profiles add` reads an API token — opposite directions for the same name; it becomes --cursor-file. `model test --timeout` is a per-test bound that shadowed the global per-request --timeout; it becomes --test-timeout. Both old names keep working as hidden aliases, so nothing breaks, and passing a name together with its alias is rejected rather than silently picking one.
sergiught
force-pushed
the
feat/store-default-and-flag-names
branch
from
August 3, 2026 07:15
9a96afe to
b53cf9b
Compare
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.
📝 Summary
stores getnow defaults to the active store. It was the only store-scoped command that demanded the ID be typed even when one was configured (fga store getdoesn't either):An explicit ID still wins, so another store can be inspected without switching profiles.
Two flags said something other than what they did.
tuples changes --token-filewrites a changelog cursor, while--token-fileonprofiles addreads an API token — the same name pointing in opposite directions. It becomes--cursor-file.model test --timeoutis a per-test bound that shadowed the global per-request--timeout, so one flag name meant two different things depending on the command. It becomes--test-timeout.Both old names keep working as hidden aliases, so no existing script or poller breaks; they just no longer appear in help. Passing a name together with its alias is rejected rather than silently letting one win (they write the same variable).
The
--timeoutshadowing itself is preserved for compatibility — the alias is still a local flag — but help now shows only--test-timeout, so the ambiguity is gone from the surface a user reads.🏷 Type of change
✅ How to verify
Checked against the built binary with a fake server:
stores getwith no argument fetches the configured store, with an ID fetches that one, and the old binary still errors on the no-argument form. Both deprecated aliases were driven end to end, as was the both-at-once rejection. The generated command reference is regenerated.📋 Checklist
--help/ examples) if behavior changed — help, examples and the generated referencemake checkpasses locally