agents: dead-code sweep + shared agent setup form#1484
Merged
Conversation
Remaining cleanup from the agents audit (tasks/agents-system-audit-and- reconciler-design.md sections 3 and the UI shrink): - Extract the ~90%-identical "new agent" / "new preset" forms into one AgentSetupFormPage component; the routes keep only their path normalization, preview building, and submit mutations. - Delete the legacy generated-Slack-OpenAI preset filter in agent-presets.ts. It guarded against a preset shape that no longer exists in prd (the iterate project has zero presets), and we don't keep data-backcompat bridges. - Drop the stale "Migrated from packages/shared/src/stream-processors" header comments across all processors — those source files were deleted. Where the old text carried a real constraint (event types, payloads, and idempotency-key derivations are stable wire formats), the constraint stays, stated on its own. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jonastemplestein
added a commit
that referenced
this pull request
Jun 11, 2026
Post-merge grooming after the agents workstream landed (#1460, #1475, #1483, #1484). Grooming rules (docs/tasks-grooming.md) say tasks are deleted when done: - **Deleted** `tasks/streams-core-processor-host-homogenization.md` — the plan of record for what shipped in #1460. - **Deleted** `tasks/agents-system-audit-and-reconciler-design.md` — the audit knowledge dump; every verified bug and design direction in it is now either shipped or carried by a live task file. - **Updated** the two deferred follow-ups (`streams-core-clock-durable-timers.md`, `streams-event-kinds-metadata.md`) to drop their `dependsOn`/background references to the deleted docs, pointing at the merged PRs instead. - **Added** `tasks/streams-conditional-appends.md` — the one audit finding that survived everything: the check-then-act window between a provider's still-current check and its `agent/output-added` append. Backlog, with the conditional-append direction written down so it isn't lost with the audit doc. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Documentation-only changes under `tasks/` with no runtime or API impact. > > **Overview** > **Grooms the `tasks/` backlog** after agents/streams work landed in #1460 and related PRs, per `docs/tasks-grooming.md` (delete tasks when done). > > **Removes** the shipped plan-of-record (`streams-core-processor-host-homogenization.md`) and the umbrella audit/knowledge dump (`agents-system-audit-and-reconciler-design.md`), since their content is either merged or split elsewhere. > > **Refreshes** deferred follow-ups: `streams-core-clock-durable-timers.md` and `streams-event-kinds-metadata.md` drop `dependsOn` on deleted tasks and cite PR #1460 in background instead of dead links. > > **Adds** `streams-conditional-appends.md` (backlog) to capture the remaining audit item—the LLM output **check-then-act** race—and the direction (stream-level conditional append / CAS), so it isn’t lost with the audit doc. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit d9b9d7f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The last batch of outstanding work from the agents audit (after #1460, #1475, #1483): the section-3 dead-code sweep and the UI shrink. Net −188 lines (−503/+315).
One agent setup form
agents/new.tsxandagents/new-preset.tsxwere ~270-line, ~90%-identical forms (provider/model/runOpts/system-prompt/custom-events fields plus the YAML preview pane). They now share oneAgentSetupFormPagecomponent; each route keeps only what genuinely differs — its path normalization, its preview builder, and its submit mutation:The routes drop from ~270 lines each to ~125, and the next form tweak happens once instead of twice.
Legacy Slack preset filter deleted
agent-presets.tscarriedisLegacyGeneratedSlackOpenAiPreset— a content-sniffing filter that suppressed an old auto-generated/agents/slackpreset by matching its system-prompt text. Checked prd before deleting: the iterate project has zero stored presets, so the filter guards nothing. The intentional behavior next to it (Slack agents never inherit the generic/agentspreset) stays, with its tests.Stale migration headers
Every processor under
apps/os/src/domains/{agents,slack}/stream-processors/opened with "Migrated frompackages/shared/src/stream-processors/..." — a directory that no longer exists. Those provenance paragraphs are gone. Where they carried a live constraint, the constraint survives in its own words:Audit bug status (no code change needed)
pendingTriggerCount— fixed by construction since streams: subscriber presence facts + reconciler homogenization #1460: the reconcilers guarantee dangling requests reach a terminal event, and a queued count only ever represents real user inputs whose follow-up turn rebuilds from full history.pnpm typecheck && pnpm lint && pnpm format && pnpm testall green.🤖 Generated with Claude Code
Note
Low Risk
Mostly UI deduplication and comment edits; Slack preset selection is slightly broader if old auto-generated presets exist in storage, which the PR assumes is empty.
Overview
Introduces
AgentSetupFormPageso New Agent and New Agent Preset share one form (provider, model, run options, system prompt, custom events YAML, live preview). Each route only keeps path handling, its preview builder, and submit logic—roughly halving page size.Removes the legacy
isLegacyGeneratedSlackOpenAiPresetfilter and its test fromagent-presets.ts. Slack agents still only match Slack-scoped presets; stored/agents/slackpresets are no longer sniffed and ignored by prompt text.Trims stale “migrated from
packages/shared…” headers across agent and Slack stream-processor modules, leaving short notes where wire formats and idempotency keys must stay stable.Reviewed by Cursor Bugbot for commit c9cf738. Bugbot is set up for automated code reviews on this repo. Configure here.
Environment Config Lease
No active environment config lease.
OS
Status: released
Commit:
c9cf738Preview: https://os.iterate-preview-4.com
Summary: Preview app released.
Workflow run
Updated: 2026-06-10T22:27:04.770Z