-
Notifications
You must be signed in to change notification settings - Fork 1
Feat/request #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/request #26
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds LuaBody support for HTTP and gRPC requests, introduces a shared internal Lua VM, updates Lua-based rules to use it, adjusts configs and examples to demonstrate Lua usage, upgrades Go toolchain/dependencies, tweaks CI linting, restructures documentation, activates a gRPC rule file, updates tests, and bumps version. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant CLI as CLI (autotest)
participant Cmd as Command Layer
participant Lua as luavm.ExecuteLuaWithGlobals
participant HTTP as HTTP Client
participant GRPC as gRPC Client
rect rgb(235,245,255)
note over User,CLI: Run HTTP test
User->>CLI: autotest run
CLI->>Cmd: renderRequestHttp(req)
alt req.LuaBody present
Cmd->>Lua: Execute luaBody + "return body()"
Lua-->>Cmd: rendered JSON (or error)
opt on error
Cmd-->>CLI: fail test
end
else template body
Cmd-->>Cmd: templateRender(req.Body)
end
Cmd->>HTTP: POST with body
HTTP-->>Cmd: response
Cmd-->>CLI: verify rules
end
rect rgb(245,235,255)
note over User,CLI: Run gRPC test
User->>CLI: autotest run
CLI->>Cmd: renderRequestGrpc(req)
alt req.LuaBody present
Cmd->>Lua: Execute luaBody + "return body()"
Lua-->>Cmd: rendered JSON (or error)
opt on error
Cmd-->>CLI: fail test
end
else template body
Cmd-->>Cmd: templateRender(req.Body)
end
Cmd->>GRPC: Invoke RPC with body
GRPC-->>Cmd: response
Cmd-->>CLI: verify rules
end
rect rgb(235,255,245)
note over Cmd,Lua: Lua-based rule verification
Cmd->>Lua: Execute "return verify(r)" with globals (codeStr, bodyStr)
Lua-->>Cmd: boolean result
Cmd-->>CLI: pass/fail
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (20)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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. Comment |
Summary by CodeRabbit