Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ba3ab8c
feat: show exact spend threshold units and alert semantics
saioai Oct 9, 2026
ae7fe7f
test: size spend replays to their output
saioai Oct 9, 2026
56bc61b
fix: preserve ambiguous duplicate spend response fields
saioai Oct 9, 2026
e2c123b
Merge main and preserve spend threshold presentation contracts
saioai Oct 16, 2026
2ba025b
Merge commit '9023b9e9c202aaf0eb6f0d1d3d7d1c4112570fb7' into codex/sp…
saioai Oct 19, 2026
b86245e
feat: add interactive limits workspace and recovery guidance
saioai Oct 19, 2026
5691555
test: align limits replay with confirmed outcomes
saioai Oct 19, 2026
cd195fc
test: correct Limits receipts and execute shell previews
saioai Oct 19, 2026
453dfe1
Merge current main into Limits workspace feature
saioai Oct 19, 2026
c1f5899
test: import atomic counters for Limits Costs coverage
saioai Oct 19, 2026
55374ff
test: exercise real shell previews in Limits demos
saioai Oct 19, 2026
b07ef80
fix: preserve safe limits validation recovery
saioai Oct 19, 2026
26f64b6
Merge branch 'main' of https://github.com/openai/openai-cli into code…
saioai Oct 19, 2026
662a05c
fix: adapt limits output to shared terminal writer
saioai Oct 19, 2026
7dd327f
fix: preserve limits failures after closed stdout pipes
saioai Oct 19, 2026
79ccf6b
Merge branch 'main' of https://github.com/openai/openai-cli into code…
saioai Oct 19, 2026
834d8bb
test: verify limits endpoint validation and precedence
saioai Oct 19, 2026
d4a4849
fix: verify terminal restoration and clarify reported Costs
saioai Oct 19, 2026
5566e9f
fix(limits): print complete reviewed commands after terminal exit
saioai Oct 19, 2026
985eee1
fix(demo): pass the explicit base URL for command printing
saioai Oct 19, 2026
9c852a9
Merge main 44fa4f3f and adapt spend admin metadata
saioai Oct 19, 2026
2b3edf5
fix(limits): preserve checkpoint rendering and clarify prefix edits
saioai Oct 19, 2026
6304fb9
fix(limits): explain preflight HTTP failures and record recovery
saioai Oct 19, 2026
3aedfab
test(limits): return Costs page in preflight fixture
saioai Oct 19, 2026
ab6b57c
fix limits recovery guidance after workspace exit
saioai Oct 19, 2026
e396844
clarify limits overview count labels
saioai Oct 19, 2026
a7e435a
Merge commit 'fa7f917e8a872cda9ac4174ec437b495ccd522c2' into codex/sp…
saioai Oct 19, 2026
555fbc7
test: audit Limits command group errors
saioai Oct 19, 2026
9343cf2
fix: preserve Limits terminal and recovery contracts
saioai Oct 19, 2026
2d8b411
test: reject Limits watchdog fallback
saioai Oct 19, 2026
7cd3066
test: correct Limits failure probes
saioai Oct 19, 2026
ed7fbd9
fix: explain terminal output failures safely
saioai Oct 19, 2026
3966baf
Merge commit 'e539d9772a0db679dc2c5c1f77fec4df556c9980' into codex/sp…
saioai Oct 19, 2026
35d74ad
test: keep Limits shell recorder helpers local
saioai Oct 19, 2026
cc902da
Polish Limits workflows and expose fine-tuning model limits
saioai Oct 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions cmd/openai/error_coverage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ func buildErrorCoverageManifest(root *cli.Command) (errorCoverageManifest, error
}
if entry.HasChildren && (command.Action != nil || len(command.Arguments) != 0 || command.ArgValidator != nil) {
switch name {
case "help", "help setup", "tokenizer":
case "help", "help setup", "tokenizer",
"admin limits", "admin organization limits",
"projects limits", "admin projects limits", "admin organization projects limits":
entry.Class += "; reviewed positional-error group"
entry.ActionContract = name
default:
Expand Down Expand Up @@ -511,6 +513,7 @@ func declaredErrorCoverageCases(manifest errorCoverageManifest) []errorCoverageC
}
message += " to see commands."
code := 3
suffix := []string{private}
switch path {
case "help":
message = "Unknown help topic. Run openai help to see commands."
Expand All @@ -520,8 +523,16 @@ func declaredErrorCoverageCases(manifest errorCoverageManifest) []errorCoverageC
// This action-bearing group owns positional input validation.
message = "Tokenizer takes no positional input. Open the editor without arguments, or use tokenizer count --text TEXT."
code = 1
case "admin limits", "admin organization limits",
"projects limits", "admin projects limits", "admin organization projects limits":
message = "Limits does not accept positional arguments. Use --help to inspect its options."
code = 1
if strings.HasSuffix(path, "projects limits") {
// Reach positional validation without masking it behind a missing project identifier.
suffix = []string{"--project-id=proj_synthetic", private}
}
}
add("unknown-child", "", []string{private}, code, message)
add("unknown-child", "", suffix, code, message)
}
var required, requiredAfterInput []string
aliasOwners := map[string]string{}
Expand Down
381 changes: 381 additions & 0 deletions cmd/openai/fine_tuning_model_limits_test.go

Large diffs are not rendered by default.

111 changes: 111 additions & 0 deletions cmd/openai/fine_tuning_model_limits_unix_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
//go:build !windows

package main

import (
"fmt"
"io"
"net/http"
"net/http/httptest"
"os"
"os/exec"
"path/filepath"
"slices"
"strings"
"sync/atomic"
"testing"
)

func TestMainFineTuningModelLimitsNativeHelpExamples(t *testing.T) {
work, binary := buildNativeShellCLI(t)
executable := filepath.Join(work, binary)
invocation := "'" + strings.ReplaceAll(executable, "'", "'\\''") + "'"
var requests, adminRequests atomic.Int32
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
requests.Add(1)
if strings.HasPrefix(r.URL.Path, "/organization/") || strings.HasPrefix(r.URL.Path, "/admin/") {
adminRequests.Add(1)
}
if r.Method != http.MethodGet || r.URL.RequestURI() != "/fine_tuning/model_limits" {
t.Errorf("unexpected request: %s %s", r.Method, r.URL.RequestURI())
}
if r.Header.Get("Authorization") != "Bearer fake-native-shell-key" {
t.Error("request omitted the ordinary synthetic credential")
}
body, err := io.ReadAll(r.Body)
if err != nil || len(body) != 0 {
t.Errorf("read request has a body or read error: bytes=%d error=%v", len(body), err)
}
w.Header().Set("Content-Type", "application/json")
if _, err := fmt.Fprint(w, fineTuningModelLimitsResponse); err != nil {
t.Errorf("write synthetic limits response: %v", err)
}
}))
defer server.Close()
required := strings.Split(os.Getenv("OPENAI_CLI_REQUIRE_NATIVE_SHELLS"), ",")
for _, shell := range []nativeShell{
{"bash", "bash", "", "export OPENAI_API_KEY='fake-native-shell-key'; ", []string{"--noprofile", "--norc", "-c"}},
{"zsh", "zsh", "", "export OPENAI_API_KEY='fake-native-shell-key'; ", []string{"-f", "-c"}},
} {
t.Run(shell.name, func(t *testing.T) {
path, err := exec.LookPath(shell.executable)
if err != nil {
if slices.Contains(required, shell.name) {
t.Fatalf("required shell is unavailable: %v", err)
}
t.Skipf("%s is not installed", shell.name)
}
shell.executable = path
for _, lookup := range []string{"direct_path", "installed"} {
t.Run(lookup, func(t *testing.T) {
directory, home, searchPath := t.TempDir(), t.TempDir(), t.TempDir()
printedInvocation := invocation
if lookup == "direct_path" {
if err := os.WriteFile(filepath.Join(searchPath, "openai"), []byte("#!/bin/sh\nprintf 'wrong executable\\n'\nexit 99\n"), 0o700); err != nil {
t.Fatal(err)
}
} else {
searchPath, printedInvocation = work, "openai"
}
t.Setenv("PATH", searchPath)
for _, helpArgs := range []struct{ name, args string }{
{"concise", " fine-tuning model-limits --help"},
{"full", " help fine-tuning model-limits"},
} {
t.Run(helpArgs.name, func(t *testing.T) {
requests.Store(0)
adminRequests.Store(0)
help := runNativeShell(t, shell, directory, home, server.URL, invocation+helpArgs.args)
if help.code != 0 || help.stderr != "" || requests.Load() != 0 {
t.Fatalf("help failed or made a request: %+v", help)
}
_, examples, found := strings.Cut(help.stdout, "EXAMPLES:\n")
if !found {
t.Fatal("help omitted executable examples")
}
examples, _, _ = strings.Cut(examples, "\nOPTIONS:")
var commands []string
for line := range strings.SplitSeq(examples, "\n") {
if strings.HasPrefix(strings.TrimSpace(line), printedInvocation+" fine-tuning model-limits") {
commands = append(commands, strings.TrimSpace(line))
}
}
if len(commands) != 1 || commands[0] != printedInvocation+" fine-tuning model-limits" {
t.Fatalf("help changed the example or executable identity %q:\n%s", printedInvocation, help.stdout)
}
got := runNativeShell(t, shell, directory, home, server.URL, shell.setKey+commands[0])
if got.code != 0 || got.stderr != "" || requests.Load() != 1 || adminRequests.Load() != 0 {
t.Fatalf("copied example failed: result=%+v requests=%d admin=%d", got, requests.Load(), adminRequests.Load())
}
for _, value := range []string{"synthetic-model", "9007199254740993", "0.100000000000000001", "synthetic-unfollowed-cursor"} {
if strings.Count(got.stdout, value) != 1 {
t.Fatalf("example output lost or duplicated %q: %q", value, got.stdout)
}
}
})
}
})
}
})
}
}
Loading
Loading