Skip to content

Address admission and security CodeRabbit findings - #1055

Merged
CaliLuke merged 2 commits into
mainfrom
luca/address-coderabbit-reviews
Oct 28, 2026
Merged

CaliLuke merged 2 commits into
mainfrom
luca/address-coderabbit-reviews

Conversation

@CaliLuke

@CaliLuke CaliLuke commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

CodeRabbit identified unsafe fatal assertions in concurrency test workers, a nil-channel hang on unexpected service execution, and a race in the documented overload demonstration. Use non-fatal worker assertions, let rejected-call regressions reach their assertions, and wait for explicit service-start messages before the third demo request.

A separate commit addresses the security review: correct the normalized scope/role field contract, place the OAuth model in the model table, format model identifiers, and move the private copy helper below public methods without changing its body.

Addresses all seven actionable findings on #1046 and #1050, including the outside-diff field comment. The other release ticket PRs and #1054 had no actionable CodeRabbit findings at audit time.

Validation: concurrency race tests; generated HTTP/gRPC example compilation and race tests; focused expression/importer security tests; canonical lint; full root test suite and coverage through the normal pre-push hook. Both exact commit diffs received independent review, with all findings fixed and re-reviewed. Normal commit and push hooks remain enabled.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a4c9bdfb-a4ef-4729-91bb-0206a4d13de7
Commits

Reviewing files that changed from the base of the PR and between e974017 and 5f88142.

Files selected for processing: 8
  • .agents/skills/loom-framework/references/formal-models.md
  • admission/concurrency_test.go
  • codegen/generator/testdata/concurrency_admission_test.go.txt
  • docs/admission.md
  • docs/examples/concurrency/main.go.txt
  • expr/security_scopes.go
  • expr/tla/security_requirements/README.md
  • internal/openapiimport/model.go

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details
Context from checks skipped due to timeout: 14
  • GitHub Check: testdata-compile (http/codegen)
  • GitHub Check: testdata-compile (codegen/service)
  • GitHub Check: testdata-compile (jsonrpc/codegen)
  • GitHub Check: testdata-compile (expr)
  • GitHub Check: testdata-compile (grpc/codegen)
  • GitHub Check: race (http)
  • GitHub Check: pulse-redis
  • GitHub Check: race (remaining)
  • GitHub Check: race (grpc)
  • GitHub Check: race (generator)
  • GitHub Check: ci
  • GitHub Check: openapi-contract
  • GitHub Check: Analyze (go)
  • GitHub Check: generated-code-quality
Additional context used
Code guidelines: 1
AGENTS.md — auto-discovered
Path-based instructions: 1
Source excerpt: **Prioritize architectural fixes for actual bugs.**

CodeRabbit inference engine (AGENTS.md)

Files:

  • expr/tla/security_requirements/README.md
  • internal/openapiimport/model.go
  • docs/examples/concurrency/main.go.txt
  • codegen/generator/testdata/concurrency_admission_test.go.txt
  • expr/security_scopes.go
  • docs/admission.md
  • admission/concurrency_test.go
Betterleaks (1.9.0)
docs/admission.md

[low] 126-126: Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource. Found in a documentation file. The same value appears in 1 other place in this change.

(curl-auth-header)

Additional comments: 8
admission/concurrency_test.go: 1

11-11: LGTM!

Also applies to: 104-104, 146-146, 168-168, 212-212, 221-221, 224-224, 226-226, 255-262

codegen/generator/testdata/concurrency_admission_test.go.txt: 1

20-20: LGTM!

Also applies to: 81-82, 137-139

docs/examples/concurrency/main.go.txt: 1

49-49: LGTM!

docs/admission.md: 1

123-137: LGTM!

internal/openapiimport/model.go: 1

136-138: LGTM!

expr/security_scopes.go: 1

74-84: LGTM!

expr/tla/security_requirements/README.md: 1

8-8: LGTM!

Also applies to: 18-18

.agents/skills/loom-framework/references/formal-models.md: 1

277-277: LGTM!

Also applies to: 360-360

📝 Summary

Summary by CodeRabbit

  • Documentation
    • Clarified the steps for reproducing concurrency admission behavior, including how to handle calls that finish early.
    • Updated OpenAPI guidance to explain how OAuth scopes and application roles are handled across specification versions.
    • Improved formatting and examples in the security and concurrency documentation.
  • Tests
    • Improved concurrency test checks so failures are reported without unnecessarily stopping related test paths.

This pull request updates security-scope references and an OpenAPI model comment, relocates an unchanged helper, and adjusts concurrency-admission tests and example instructions.

Changes: Security scope documentation

Layer / File(s) Summary
Scope contract and references
internal/openapiimport/model.go, expr/security_scopes.go, expr/tla/security_requirements/README.md, .agents/skills/loom-framework/references/formal-models.md
The OpenAPI model comment describes OAuth scopes and application roles in OpenAPI 3.1 and 3.2, and empty non-OAuth scope lists in OpenAPI 3.0. dupSchemeRequirements moves after ScopeNames without an implementation change. The README formatting and formal-model index are updated.

Concurrency admission tests and examples

Layer / File(s) Summary
Admission test checks
admission/concurrency_test.go, codegen/generator/testdata/concurrency_admission_test.go.txt
Selected test assertions change from fatal to non-fatal. A helper checks overloaded service errors. The generated test closes its finish channel before constructing the service.
Admission example instructions
docs/examples/concurrency/main.go.txt, docs/admission.md
The example logs when work starts. The instructions require confirming that both calls acquired permits before sending a third request.

Priority: Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix

Possibly related PRs

  • CaliLuke/loom#1050: This pull request updates the OAuth flow model index and the OpenAPI scope and role contract referenced by that PR.
  • CaliLuke/loom#1046: This pull request changes admission-test assertions and fixture behavior, and updates the admission example instructions.
Merge Risk: Minimal · up to 5f881

No actionable correctness, security, availability, or documentation risk is established by this PR.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the two main areas of change: admission and security findings. It is concise and related to the pull request.
Description check Passed The description accurately explains the concurrency test fixes, overload demonstration changes, security documentation updates, and validation performed.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 3 files. (5 skipped: 5 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the permits in a row.
Two calls begin; their start-time logs now show.
A third waits until the first two hold.
Test checks keep running when a fault is told.
Scope notes mark the roles and paths in view.

Comment @coderabbitai help to get the list of available commands.

@CaliLuke
CaliLuke merged commit 73762eb into main Oct 28, 2026
10 of 17 checks passed
@CaliLuke
CaliLuke deleted the luca/address-coderabbit-reviews branch October 28, 2026 19:17
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