Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2337cab15f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for name, complete := range map[string]cobra.CompletionFunc{"service": services, "deployment": deployments} { | ||
| if cmd.Flags().Lookup(name) != nil { | ||
| if _, ok := cmd.GetFlagCompletionFunc(name); ok { | ||
| continue | ||
| } | ||
| if err := cmd.RegisterFlagCompletionFunc(name, complete); err != nil { |
There was a problem hiding this comment.
Restrict name completion to flags that accept service names
In a worktree with completion metadata, this registers local service-name suggestions for tnl publisher enroll --service and tnl publisher grant add --service, even though their help specifies “Exact saved service ID.” Both handlers pass that value to publisherCLIGrantScope, which rejects non-ID values with opaqueid.Valid(serviceID, opaqueid.ServicePrefix), so accepting these suggestions makes the command fail. Register project-name completion only for commands whose selectors accept those names; leave ID-only flags unregistered or give them an appropriate completer. This also preserves the service-name/service-ID distinction required by AGENTS.md.
AGENTS.md reference: AGENTS.md:L120-L121
Useful? React with 👍 / 👎.
| } else if err := meta.WriteCompletion(ctx, project); err != nil { | ||
| return err |
There was a problem hiding this comment.
Update the offline-generation test for the new local index
Every successful non-check generation now creates .tnl/local/completion.json and its lock file, but TestGenerateTypesWithoutGitOriginOrRuntimeValues still runs generate and then asserts that .tnl/local does not exist (cmd/tnl/generate_test.go:45–54). Both configuration variants therefore fail with “generation wrote runtime values,” breaking the routine task go:test suite invoked by .github/workflows/checks.yml. Update that assertion to permit the completion index while retaining checks that generation does not write runtime endpoint metadata or open client state.
Useful? React with 👍 / 👎.
1ea839e to
5b057f2
Compare
What
Homebrew installs the bash, zsh and fish completions for tnl and tnld. Typing
tnl connectortnl wait --serviceand pressing Tab offers service names from the current worktree.Why
The generated browser metadata has no deployment names and can omit connector-only services. Completing a name should not evaluate project code or open credentials.
Changes