Repository navigation
Add concise read-only OCaml review skill - #53
Conversation
Codex Review SummaryThis 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: 9470a961f9
ℹ️ 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".
| 只读审查请求范围内的代码,只报告问题,不修改代码或其他文件。 | ||
|
|
||
| 1. 检查读写放大:单次操作是否重复全量读取、遍历或重写,结合数据量与调用频率判断影响。 | ||
| 2. `List` 仅用于明确小于 1000 项的数据;数量未知或可能 >= 1000 时指出应替换为 `rrbvec`,尤其检查高频 `List.length`、`List.nth`、`List.append` 等低性能调用。 |
There was a problem hiding this comment.
Restrict rrbvec findings to harmful List access patterns
When a reviewed collection has an unknown or large size but is consumed with a single sequential List.map/List.fold or efficient head operations, this rule still requires reporting it and recommending rrbvec, even though no performance defect has been established and the replacement may add overhead. Base findings on demonstrated costly access patterns such as repeated traversal, indexing, or append rather than a blanket 1,000-item threshold; the repository guidance likewise targets O(n²) List usage, not every large list.
AGENTS.md reference: AGENTS.md:L11-L11
Useful? React with 👍 / 👎.
Add a concise OCaml review skill and move the existing List performance guidance from
AGENTS.mdinto that skill.The skill applies when reviewing OCaml and reports evidence-backed findings without modifying files. Its three checks cover read/write amplification,
Listuse only for collections explicitly below 1,000 items (unknown or potentially larger collections should userrbvec), and stronger type constraints inspec/.mliinterfaces. The List check includes frequent linear APIs, quadratic repeated concatenation, and usingRrbvecvectors when the package is already a dependency.Findings should include severity, location, trigger and impact in one sentence, distinguish observed facts from inference, and explicitly say when no issues were found.
Validation: YAML frontmatter, naming and scaffold checks passed with Ruby; the three checks, read-only reporting constraints and migration of the matching
AGENTS.mdrule were verified;git diff --checkpassed. The bundled skill validator could not run because its Python environment lacks PyYAML. Only.agents/skills/ocaml-review/SKILL.mdand the corresponding List guidance inAGENTS.mdchange.