Skip to content

test(api): pin the list budget and sync limit cases that the reviews left open - #898

Open
ThomasK33 wants to merge 2 commits into
mainfrom
api-limit-test-gaps
Open

ThomasK33 wants to merge 2 commits into
mainfrom
api-limit-test-gaps

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

The reviews of #890 and #892 left five mutants of their checks alive. This PR adds the test cases that kill them, plus a README line and a comment fix that the #892 review asked for. No behavior change.

Gap (from the review) New case Mutant it kills
The grep test put the bad entry only at index 0 bad entry at index 0, 1500 and 3000 of a 3,001-entry list over the budget: each names only paths.N bad set only for entry 0 (M23)
Nothing pinned that a bare / counts against the budget 1,985 bare / entries answer 200, 1,986 answer the list 400 (each counts 1 + 32 bytes) the total taken over the trimmed pathspecs instead of the request (M18)
No query-route list with a blank or outside entry over the budget diff (outside, blank), branches/diff (outside) and blame (blank range) lists over the budget answer the entry's own message the list total checked inside the blank or outside branch of cleanPathParams (M24, M24b), or in the blame entry loop (after the length check, or inside the blank branch)
Nothing pinned that a list is checked before the repository lookup (review of c6cf70e) each list route with a list over the budget for a repository that does not exist answers the list 400, not 404 the blame list check moved after resolveQueryRepo
No over-limit username next to a short valid password POST and PUT by path: 400 naming only username the username length checked only when the password failed (M39) or is long (M42)

Evidence

  • Mutants: each one above is built with go test -overlay and fails TestReadValueListsPastGitArgBudget or TestSyncValuesGitCannotTakeAtRegistration; a no-op control passes.
  • Lanes: go test -race -tags=openstorage_viewcheck ./internal/api/... without pg passes at 0c5fcf8 (370 s; 371 s at c6cf70e). PostgreSQL and S3-WAL rely on CI. Both fingerprint gates pass.
  • lint, vet (linux and darwin), gofmt and the docs gate pass.

Desk follow-up to the reviews of #890 and #892.

Review

  • Independent review of c6cf70e: PASS with four P3 points. 0c5fcf8 adds the repository-lookup case above; the body no longer claims A9 (main already killed it) and names the blame mutants that main really left alive. A bare / grep entry matches no file, as docs/reference/http-api.md says; the 1,985-entry case pins that answer as well as the budget boundary.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: xhigh

…left open

The reviews of #890 and #892 left five mutants alive. The grep test now
puts the bad entry first, in the middle and last; bare "/" entries count
against the budget as sent; a diff, branches/diff or blame list over the
budget with a blank or outside entry answers that entry's own message;
and an over-limit username next to a short valid password is refused.
Each of those mutants now fails. The api README lists the sync limits,
and the gcredValidate comment says that each value, not the entry, must
fit MaxCredentialBytes.

Signed-off-by: Thomas Kosiewski <tk@coder.com>

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh`_

Change-Id: Ia0f1e0a1b12c06ce68ca921178f1e7621044255d
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T19:05:06.016209Z 0c5fcf8 Manual request
🔒 Security Review ✅ Completed 2026-11-16T19:05:20.754604Z 0c5fcf8 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: c6cf70e962

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: c6cf70e962

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

…pository lookup

The review found that moving the blame list check after the repository
lookup passed every test: nothing pinned "400 before git starts" for a
list. Each list route now gets a list over the budget for a repository
that does not exist, and must answer the list 400, not 404.

Signed-off-by: Thomas Kosiewski <tk@coder.com>

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh`_

Change-Id: If971c15d9dde27a97e9a4961f945cb775f54820c
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 0c5fcf8e8f

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 0c5fcf8e8f

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant