(MOT-3948) feat(fp): standalone fp worker — pipe + 17 lodash-style transforms + injected guidance#524
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
skill-check — worker0 verified, 45 skipped (no docs/).
Four for four. Nicely done. |
|
Warning Review limit reached
Next review available in: 58 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (31)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
…ansforms + injected guidance - fp::pipe runs worker-side pipelines in one call: fp::* transform steps execute inline, every other step goes over the bus; the caller gets per-step size receipts and a preview (default 400 chars, capped at 8000), never the value - steps run with worker authority, so the pipe statically refuses every agent-policy hard-denied class (credentials, model spend, turn control, session/approval, bus internals) — state::* stays allowed on purpose: the approval-gated pipe call is the surface an approver reviews - seventeen fp::* transforms with lodash semantics and teachable errors: get/pick/omit/take/drop/map/filter/split/join/uniq plus size/compact/nth/getOr/flatten/sortBy/reverse (fp calling convention: capped arity, config in payload, data threaded last). Deliberate loud deviations where lodash is silent: misses name available keys, compact removes null only, nth OOB and size on non-collections error, sortBy refuses holes and mixed key types; refusal errors redirect to the sanctioned pattern (nest refusal teaches the seed rule; sortBy "." miss teaches that the pointer for the element itself is "") - usage guidance is injected into the agent system prompt via a harness::hook::pre-generate hook (fail_open, presence-gated, one-shot bind relying on engine recoverable triggers); transforms are allowed for agents in the active root policy, fp::pipe stays needs_approval - console: fp tool family (pipe/transform views, parsers, param chips, fixture gallery covering all seventeen ops and the teachable error cards) - harness: pipe/util moved out; react/session_id prompt fixes stay, with the stale "leave metadata.session_id out" sentence reconciled - release wiring: fp in create-tag options and release tag triggers; tests/ contract suite for the changed-worker CI gate
b80561a to
4dcab97
Compare
skill-check — worker0 verified, 46 skipped (no docs/).
Four for four. Nicely done. |
iii-hq/iii pruned old releases; the 0.17.0 tag no longer resolves, which failed every worker's interface-boot-smoke job identically. 0.21.6 is the current stable release and matches the workers' iii-sdk = "=0.21.6" pin.
skill-check — worker0 verified, 46 skipped (no docs/).
Four for four. Nicely done. |
What
Extracts the pipe feature out of the harness into a new standalone fp worker (fp calling convention, lodash-defined results — under lodash/fp naming,
pipeis the canonical alias offlow):fp::pipe— worker-side pipelines in one call: each step triggers a function and its result lands in the next step's payload atinto(default/value).fp::*transform steps run inline; every other step is one bus trigger (120 s budget). The caller gets per-step size receipts and a preview (default 400 chars, capped at 8000) — never the value, so bulk data moves worker→worker without entering the chat.fp::{get, pick, omit, take, drop, map, filter, split, join, uniq, size, compact, nth, getOr, flatten, sortBy, reverse}with lodash semantics and fp's capped arity (config in payload, data threaded last). Deliberately loud where lodash is silent: agetmiss names the available keys,maptotal-miss errors (with thefp::sizehint for the/lengthtrap),compactremoves null only (a full-falsey removal would eat legitimate0/false/""),nthout-of-bounds andsizeon non-collections error,sortByrefuses holes and mixed key types. Refusal errors redirect to the sanctioned pattern — live sessions showed models repeat a mistake until the error teaches the alternative.harness::hook::pre-generatehook (fp::inject-guidance,fail_open), presence-gated: no fp worker, no prompt text. One-shot bind relying on engine recoverable triggers (iii#1962).getOr'sdefault, approval preview, fixture gallery covering all seventeen ops and the teachable error cards).Security posture
Pipe steps run with the worker's authority, not the calling agent's per-step policy — so
fp::pipestaysneeds_approval(the step list is what an approver reviews) and the worker statically refuses every agent-policy hard-denied class as a step:session::*/approval::*,configuration::*/oauth::*(credentials),router::*/provider::*(model spend),harness::*/run::*(turn control),stream::*/bus internals,*::on-config-change, plusshell::*/coder::*and nested pipes.state::*is the deliberate exception — persisting the threaded value is the pipe's purpose. The seventeen pure transforms are allowed for agents in the root policy.Harness
harness/srcis byte-identical to main — pipe/util code, registrations, goldens, and surface entries are all gone. Only the prompt files change: the pipe sections were removed (now injected by the worker) and the reactmetadata.session_idguidance was reconciled (explicit unique id per distinct stage; omit only to deliver back into the registering chat).Verification
cargo fmt/clippy -D warnings/cargo test: 29 tests across 4 suites, including atests/contract.rssuite for the changed-worker CI gate, the byte-exact live request an old strict build rejected (_caller_worker_idinjection), and every documented deviation pinned.tscclean.fpadded tocreate-tag.ymloptions andrelease.ymltag triggers.