Skip to content

(MOT-4660) perf(editor,database,computer,document,email,github,security-scan): trim function contract prose - #1065

Merged
andersonleal merged 1 commit into
mainfrom
andersonleal/mot-4660-medium-workers-prose
Sep 3, 2026
Merged

(MOT-4660) perf(editor,database,computer,document,email,github,security-scan): trim function contract prose#1065
andersonleal merged 1 commit into
mainfrom
andersonleal/mot-4660-medium-workers-prose

Conversation

@andersonleal

Copy link
Copy Markdown
Collaborator

Closes MOT-4660. Sub-issue of MOT-4636; same rule as #1056, #1058, #1060, #1061, #1063, applied to the medium batch of workers the survey flagged.

Change (editorial, at the source)

Function description ≤ ~300 chars (what it does + the one non-obvious calling rule); request property one sentence ≤ ~140; internal notes moved from /// to //; no type, field, or serde change. Response-only types (editor Buffer, document Body/Asset/DetectedFrom) and config structs untouched, per scope.

crate text before after
email email::send 632 235 (payload shape dropped, schema carries it; html/text rule + credential source kept)
email email::search 416 284 (IMAP SEARCH syntax + NDJSON frame shape kept, schema cannot express them)
editor SaveInput.expected_version / .expected_mtime 479 / 458 137 / 139
editor editor::changes 325 210
editor FindInput.include_untracked, GitHunksInput.context_lines, Against::Upstream, … 152–268 97–139
database QueryReq.record_history (serde-skipped, never in schema) 420 48
database SchemaDiagramReq.focus, FilterOp::In, FilterSpec.disabled, ExecuteBatchReq.statements, RowChangedConfig.db, … 145–302 30–127
computer sessions::start 333 252
computer StartInput.endpoint / .image / .os / .monitor 359 / 337 / 259 / 161 127 / 115 / 118 / 136
document ocr / markdown descriptions 346 / 318 232 / 262
document ocr::Request.pages, DocumentSource.file_name / .fs_scope, FsScope 189–361 68–132
github api / exec descriptions, ApiRequest.path 330 / 304 / 159 232 / 196 / 132
security-scan security-scan::request 324 219

No enum conversions: StartInput.os inherits a free-text configured value for remote sessions (not a closed set); isolation is validated at runtime and already under the limit.

Gates

All seven crates: cargo fmt, cargo clippy --all-features --all-targets -D warnings, cargo test green (editor 178, database 386, computer 32, document 89, email 14, github 55, security-scan 108). 17 goldens regenerated with UPDATE_GOLDENS=1, description lines only. database's tests/e2e/ is a TypeScript/docker harness outside cargo test and was not run.

https://claude.ai/code/session_01EUoLR66baA2QL7x6fH72bT

…ty-scan): trim function contract prose

Same rule as MOT-4639 / MOT-4654 / MOT-4655 / MOT-4656 / MOT-4658, applied
to the medium batch of workers the survey flagged: function description
<= ~300 chars (what it does + the one non-obvious calling rule), request
property one sentence <= ~140, internal notes moved from `///` to `//`,
no type, field, or serde change.

  email::send            632 -> 235   editor SaveInput.expected_version 479 -> 137
  email::search          416 -> 284   editor SaveInput.expected_mtime   458 -> 139
  document ocr           346 -> 232   database QueryReq.record_history  420 -> 48
  computer sessions::start 333 -> 252 computer StartInput.endpoint      359 -> 127
  github api             330 -> 232   computer StartInput.image         337 -> 115
  editor::changes        325 -> 210   database SchemaDiagramReq.focus   302 -> 63
  security-scan::request 324 -> 219   document ocr Request.pages        272 -> 129

17 goldens regenerated (description lines only). Response-only types
(editor Buffer, document Body/Asset/DetectedFrom) and config structs left
as they were, per scope.

Claude-Session: https://claude.ai/code/session_01EUoLR66baA2QL7x6fH72bT
@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
workers Ready Ready Preview Sep 2, 2026 9:28pm UTC
workers-tech-spec Ready Ready Preview Sep 2, 2026 9:28pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: eecc8e79-c037-4ed0-be41-d2f49180effd

📥 Commits

Reviewing files that changed from the base of the PR and between 92564af and e2d5551.

📒 Files selected for processing (37)
  • computer/src/functions/mod.rs
  • computer/src/functions/sessions.rs
  • computer/tests/golden/schemas/computer.sessions.start.json
  • database/src/handlers/diagram.rs
  • database/src/handlers/execute_batch.rs
  • database/src/handlers/filter.rs
  • database/src/handlers/query.rs
  • database/src/handlers/schema.rs
  • database/src/handlers/table_view.rs
  • database/src/triggers/bus.rs
  • database/src/triggers/sql.rs
  • document/src/format.rs
  • document/src/functions/markdown.rs
  • document/src/functions/ocr.rs
  • document/src/source.rs
  • document/tests/golden/schemas/document.detect.json
  • document/tests/golden/schemas/document.extract-assets.json
  • document/tests/golden/schemas/document.ocr.json
  • document/tests/golden/schemas/document.to-markdown.json
  • editor/src/functions/mod.rs
  • editor/src/functions/types.rs
  • editor/tests/golden/schemas/editor.changes.json
  • editor/tests/golden/schemas/editor.find.json
  • editor/tests/golden/schemas/editor.git.hunks.json
  • editor/tests/golden/schemas/editor.save.json
  • editor/tests/golden/schemas/editor.tree.json
  • editor/tests/golden/schemas/editor.workspace.open.json
  • email/src/handlers/search.rs
  • email/src/handlers/send.rs
  • email/src/provider/smtp.rs
  • github/src/functions/passthrough.rs
  • github/tests/golden/schemas/github.api.json
  • github/tests/golden/schemas/github.exec.json
  • security-scan/src/contract.rs
  • security-scan/src/functions.rs
  • security-scan/tests/golden/schemas/security-scan.on-schedule.json
  • security-scan/tests/golden/schemas/security-scan.request.json

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

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

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 70 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

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