Skip to content

docs(AGENTS): prefer Rrbvec over O(n²) List concat patterns - #35

Merged
RCmerci merged 1 commit into
mainfrom
devin/1790471293-agents-rrbvec
Sep 27, 2026
Merged

RCmerci merged 1 commit into
mainfrom
devin/1790471293-agents-rrbvec

Conversation

@RCmerci

@RCmerci RCmerci commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Appends OCaml guidance to AGENTS.md: avoid O(n²) List patterns such as List.concat and repeated List.append on large sequences; when the project already depends on the rrbvec package, use Rrbvec vectors instead.

Link to Devin session: https://app.devin.ai/sessions/cc13a6a77cdd40f89ea6695bff8ff7eb
Open in Devin Desktop: https://app.devin.ai/desktop/session/cc13a6a77cdd40f89ea6695bff8ff7eb?variant=devin
Requested by: @RCmerci

@devin-ai-integration

Copy link
Copy Markdown

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T01:11:37.538826Z a2e6ce9 PR opened
ℹ️ 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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a2e6ce936b

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

Comment thread AGENTS.md

A representative core action is the Swift FFI RPC `dispatch` / `send`, which optimistic-captures a journal block (see `shared/test/logseq_chat/rpc_test.ml` and `dune build @shared/native/runtest`).

- Avoid O(n²) `List` patterns such as `List.concat` and repeated `List.append` on large sequences; when the project already depends on the `rrbvec` package, use `Rrbvec` vectors instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Correct the complexity claim for List.concat

For a large list of lists, a single List.concat traverses each element once and is linear in the total input/output size; it does not have the quadratic behavior of repeatedly appending an ever-growing accumulator. Labeling List.concat itself as an O(n²) pattern directs future contributors to replace an appropriate standard-library operation with unnecessary vector conversions or dependencies. Limit this guidance to repeated/nested append patterns that actually retraverse accumulated data.

Useful? React with 👍 / 👎.

@RCmerci
RCmerci merged commit 7a40565 into main Sep 27, 2026
5 checks passed
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