Skip to content

(MOT-3948) feat(fp): standalone fp worker — pipe + 17 lodash-style transforms + injected guidance#524

Merged
andersonleal merged 2 commits into
mainfrom
andersonleal/mot-3948-harness-pipe
Jul 17, 2026
Merged

(MOT-3948) feat(fp): standalone fp worker — pipe + 17 lodash-style transforms + injected guidance#524
andersonleal merged 2 commits into
mainfrom
andersonleal/mot-3948-harness-pipe

Conversation

@andersonleal

@andersonleal andersonleal commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

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, pipe is the canonical alias of flow):

  • fp::pipe — worker-side pipelines in one call: each step triggers a function and its result lands in the next step's payload at into (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.
  • Seventeen transformsfp::{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: a get miss names the available keys, map total-miss errors (with the fp::size hint for the /length trap), compact removes null only (a full-falsey removal would eat legitimate 0/false/""), nth out-of-bounds and size on non-collections error, sortBy refuses 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.
  • Injected guidance — the "moving big values" HARD RULE moved from the static harness prompts into a harness::hook::pre-generate hook (fp::inject-guidance, fail_open), presence-gated: no fp worker, no prompt text. One-shot bind relying on engine recoverable triggers (iii#1962).
  • Console — fp tool family (pipe step-list view with receipts + preview, transform views with per-op param chips incl. getOr's default, 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::pipe stays needs_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, plus shell::*/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/src is 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 react metadata.session_id guidance 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 a tests/contract.rs suite for the changed-worker CI gate, the byte-exact live request an old strict build rejected (_caller_worker_id injection), and every documented deviation pinned.
  • Console: fp family vitest 9/9, tsc clean.
  • Live-tested across four model tiers (glm-5.2, grok-4.5, ornith-35b-Q4, haiku-4.5) against a running engine — each session's failures fed back into teachable errors and regression tests.
  • Release wiring: fp added to create-tag.yml options and release.yml tag triggers.

@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview, Comment Jul 17, 2026 12:02am
workers-tech-spec Ready Ready Preview, Comment Jul 17, 2026 12:02am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 45 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@andersonleal, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 61e37846-a56d-4074-bcf5-d274388ec84f

📥 Commits

Reviewing files that changed from the base of the PR and between 782b331 and b80561a.

⛔ Files ignored due to path filters (1)
  • lodash/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (31)
  • .github/workflows/create-tag.yml
  • .github/workflows/release.yml
  • README.md
  • console/web/src/components/chat/FunctionCallMessage.stories.tsx
  • console/web/src/components/chat/lodash/PipeView.tsx
  • console/web/src/components/chat/lodash/UtilView.tsx
  • console/web/src/components/chat/lodash/__tests__/parsers.test.ts
  • console/web/src/components/chat/lodash/index.tsx
  • console/web/src/components/chat/lodash/parsers.ts
  • console/web/src/components/function-call/FunctionCallCard.tsx
  • console/web/src/stories/fixtures/lodash-fixtures.ts
  • harness/prompts/cli.txt
  • harness/prompts/default.txt
  • iii-permissions.yaml
  • lodash/Cargo.toml
  • lodash/README.md
  • lodash/iii-permissions.yaml
  • lodash/iii.worker.yaml
  • lodash/skills/SKILL.md
  • lodash/src/guidance.rs
  • lodash/src/lib.rs
  • lodash/src/main.rs
  • lodash/src/pipe.rs
  • lodash/src/util.rs
  • lodash/tests/contract.rs
  • provider-anthropic/prompts/identity.txt
  • provider-llamacpp/prompts/identity.txt
  • provider-openai-codex/prompts/identity.txt
  • provider-openai/prompts/identity.txt
  • provider-xai/prompts/identity.txt
  • provider-zai/prompts/identity.txt
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch andersonleal/mot-3948-harness-pipe

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.

…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
@andersonleal
andersonleal force-pushed the andersonleal/mot-3948-harness-pipe branch from b80561a to 4dcab97 Compare July 16, 2026 22:49
@github-actions

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 46 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

@andersonleal andersonleal changed the title (MOT-3948) feat(lodash): standalone lodash worker — pipe, transforms, injected guidance (MOT-3948) feat(fp): standalone fp worker — pipe + 17 lodash-style transforms + injected guidance Jul 16, 2026
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.
@github-actions

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 46 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

@andersonleal
andersonleal merged commit 50d9440 into main Jul 17, 2026
93 of 108 checks passed
@andersonleal
andersonleal deleted the andersonleal/mot-3948-harness-pipe branch July 17, 2026 16:09
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.

2 participants