Skip to content

feat(platform): Support input nodes alongside trigger nodes - #11220

Open
Pwuts wants to merge 30 commits into
devfrom
pwuts/open-2547-support-input-blocks-alongside-trigger-blocks
Open

feat(platform): Support input nodes alongside trigger nodes#11220
Pwuts wants to merge 30 commits into
devfrom
pwuts/open-2547-support-input-blocks-alongside-trigger-blocks

Conversation

@Pwuts

@Pwuts Pwuts commented Oct 21, 2025

Copy link
Copy Markdown
Member

This PR lets a triggered preset carry regular graph inputs alongside its trigger config, so a graph can have both a webhook-trigger node and input nodes instead of being forced to choose one.

Why

Previously a graph could have either a webhook-trigger node or input nodes, but not both: the builder blocked combining them, and a triggered preset stored only the trigger config as its inputs. That meant you couldn't configure regular graph inputs on a webhook-triggered agent.

How

  • A preset's inputs now hold the regular graph inputs plus the trigger node's config nested under a per-node key _node_input_mask_{node_id}. The name matches the executor's existing nodes_input_masks concept.
  • TriggeredPresetSetupRequest gains a constant_inputs field (regular graph input values). setup_triggered_preset wraps the trigger config under the per-node key and stores constant_inputs alongside it.
  • On a webhook delivery, _execute_webhook_preset_trigger separates the two again: regular inputs are passed as graph inputs, while the trigger config + webhook payload become the trigger node's nodes_input_masks entry. The event-type filter is checked against the unwrapped trigger config.
  • update_triggered_preset extracts the trigger config from the same per-node key when re-registering the webhook.
  • The setup/update/delete logic lives in shared helpers (api/features/library/triggers.py) reused by the /presets routes, the copilot preset tools, and a DatabaseManager RPC endpoint, so all paths produce/consume the same input shape.
  • A data migration (migrate_preset_trigger_params) converts the bulk of existing triggered presets at deploy time. Its trigger-block list is fixed when the migration is written and an applied migration cannot re-run, so the authoritative conversion is migrate_flat_triggered_preset_inputs(), which runs on each REST boot and derives the block set from get_webhook_block_ids(). It also reaches presets whose webhook was detached, which SQL cannot distinguish from a run-template preset — it compares the preset's input names against the trigger block's config schema. On a converged database it is one selective query and no per-preset work; on the first boot after the migration it is bounded by asyncio.wait_for(..., timeout=30), and since each preset commits on its own, a timeout defers the remainder to the next boot rather than delaying the port.

Changes 🏗️

  • Add constant_inputs to TriggeredPresetSetupRequest; wrap the trigger config under _node_input_mask_{node_id} and store regular inputs alongside it
  • Update webhook execution to split the node input mask from regular graph inputs, and check the event filter against the unwrapped trigger config (fixes event-filtered triggers such as GitHub raising "Event filter is not configured on trigger")
  • Add a Prisma data migration to convert existing triggered presets
  • Tests for the wrap/extract helpers and the webhook execution path
  • Address the 2026-09-02 review: derive the trigger-block set from the registry rather than a literal list, wrap the preset version bump and mask re-key in one transaction, validate updated inputs in update_triggered_preset the way setup does, give the copilot update_preset tool a separate trigger_config so graph inputs stop landing inside the trigger config, and stop the UI reporting success on a trigger edit it silently dropped
  • Raise the copilot tool-schema char budget 61,000 → 62,000 for the two new tool parameters (constant_inputs, trigger_config), after trimming 303 chars of restatement from both tools' descriptions. Without this the PR is over budget: restoring setup_agent_webhook_trigger.py and manage_presets.py to their dev versions makes test_total_schema_char_budget pass, so the overage is this PR's

If this conflicts with another PR on _CHAR_BUDGET, keep the higher value. #14424 (63,000) and #14455 (65,000) are bumping the same line right now, so whichever lands first leaves the others conflicting. The budget has to cover what every in-flight PR adds together, while each branch's CI only measures its own delta against dev — taking the incoming side blindly lowers the ceiling and ejects the next green PR from the merge queue. The same note sits above the constant, where a resolver will see it.

Verified

Executed here: the new migrate_flat_triggered_preset_inputs() discriminator across all four preset cohorts, the backfill's steady-state cost and its wrapping of a preset the SQL migration missed, update_triggered_preset's input validation and its mask/graph-input split, the copilot tool's routing of inputs vs trigger_config, the refused save on a mask-less preset, and the read-only inputs panel. Every one of those was run against a mutation of the guard it covers and failed, so none of them passes vacuously. Suite runs: 1647 test_block.py, 233 integrations + webhooks, 118 library, 68 triggers + copilot presets, 3 architecture_test.py, 14 frontend vitest, and tsc --noEmit clean. The full 196-migration directory applied to a throwaway pgvector/pgvector:pg16 and migrate diff against schema.prisma showed only the pre-existing organizationId/trigram drift that dev already has; this migration contains no DDL.

The backfill was also run against a real Postgres, not only mocks: seeding a detached (webhookId = NULL) preset with flat repo/events rows on a graph carrying a GitHub Issues trigger node — the exact cohort the SQL migration skips — the boot backfill selected it, replaced both rows with one _node_input_mask_{prefix} row holding the same values, and a second run left it untouched.

Not executed: the two manual end-to-end items below, and the backfill at production scale — the timing of a large first-boot cohort is bounded by the timeout rather than measured.

Checklist 📋

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
    • Unit: setup_triggered_preset wraps regular inputs + trigger config under _node_input_mask_{node_id}
    • Unit: update_triggered_preset extracts trigger config from the per-node key; rejects reconfigure when the key is missing
    • Unit: webhook execution passes regular inputs as graph inputs, trigger config (+payload) as the node mask, and checks the event filter against the unwrapped config
    • Manual: build a graph with both a webhook-trigger node and input node(s), set up a trigger with constant inputs, fire the webhook, and confirm both the trigger payload and the regular inputs reach the execution
    • Manual: edit the preset's inputs and confirm the webhook re-registers correctly

For configuration changes:

  • .env.default is updated or already compatible with my changes
  • docker-compose.yml is updated or already compatible with my changes
  • I have included a list of my configuration changes in the PR description (under Changes)
    • Adds Prisma data migration 20251016151116_migrate_preset_trigger_params (converts existing triggered presets; no schema change)

@netlify

netlify Bot commented Oct 21, 2025

Copy link
Copy Markdown

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
🔨 Latest commit a65189f
🔍 Latest deploy log https://app.netlify.com/projects/auto-gpt-docs-dev/deploys/694077c4ed1d780008381d51

@github-actions github-actions Bot added platform/frontend AutoGPT Platform - Front end platform/backend AutoGPT Platform - Back end labels Oct 21, 2025
@coderabbitai

coderabbitai Bot commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Triggered preset inputs are split into regular graph inputs and per-node trigger masks across setup, reconfiguration, execution, validation tooling, UI, and a migration for stored presets.

Changes

Webhook preset input split

Layer / File(s) Summary
Trigger setup request and preset storage
autogpt_platform/backend/backend/api/features/library/model.py, autogpt_platform/backend/backend/api/features/library/routes/presets.py, autogpt_platform/backend/backend/api/features/library/triggers.py, autogpt_platform/backend/backend/api/features/library/triggers_test.py, autogpt_platform/frontend/src/app/api/openapi.json
TriggeredPresetSetupRequest adds constant_inputs, the setup route forwards it, preset creation stores regular inputs separately from _node_input_mask_{trigger_node_id}, and the schema/test update to the same shape.
Triggered preset reconfiguration
autogpt_platform/backend/backend/api/features/library/triggers.py, autogpt_platform/backend/backend/api/features/library/triggers_test.py
update_triggered_preset now reads nested trigger config from _node_input_mask_{trigger_node_id}, rejects missing masks, and re-registers the webhook with the extracted trigger data plus credentials.
Webhook execution input split
autogpt_platform/backend/backend/api/features/integrations/router.py, autogpt_platform/backend/backend/api/features/integrations/webhook_preset_trigger_test.py
_execute_webhook_preset_trigger unwraps trigger inputs from _node_input_mask_{node_id}, checks event type against that config, passes remaining graph inputs separately to add_graph_execution, and tests cover matching, non-matching, and missing-mask cases.
Migration backfill for stored preset inputs
autogpt_platform/backend/migrations/20251016151116_migrate_preset_trigger_params/migration.sql
The migration rewrites existing triggered preset input rows into _node_input_mask_{node_prefix} entries and aggregated JSON input data within a transaction.
Webhook trigger tool contract
autogpt_platform/backend/backend/copilot/tools/setup_agent_webhook_trigger.py, autogpt_platform/backend/backend/copilot/tools/setup_agent_webhook_trigger_test.py, autogpt_platform/frontend/src/app/(platform)/copilot/tools/SetupTrigger/helpers.tsx
The setup-trigger tool and its client-facing schema add constant_inputs, validate missing regular inputs alongside trigger config, and forward both values into preset creation.
Run modal constant inputs
autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/*
Triggered-agent run modal state, field derivation, context, rendering, and tests add a separate constant-input section and include constant_inputs in the trigger payload.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~90 minutes

Suggested labels

platform/blocks

Suggested reviewers

  • majdyz
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 54.05% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description directly explains the changeset, including support for regular graph inputs alongside trigger configuration, input-mask storage, webhook execution, migration, tests, and remaining manu…
Title check ✅ Passed The title clearly and concisely summarizes the primary change: supporting input nodes alongside trigger nodes.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pwuts/open-2547-support-input-blocks-alongside-trigger-blocks

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.

@deepsource-io

deepsource-io Bot commented Oct 21, 2025

Copy link
Copy Markdown

Here's the code health analysis summary for commits e8d37ab..a65189f. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ Success
🎯 2 occurences resolved
View Check ↗
DeepSource Python LogoPython✅ Success
❗ 2 occurences introduced
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@netlify

netlify Bot commented Oct 21, 2025

Copy link
Copy Markdown

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit a65189f
🔍 Latest deploy log https://app.netlify.com/projects/auto-gpt-docs/deploys/694077c46696090008a9bfe4

@AutoGPT-Agent

Copy link
Copy Markdown
Contributor

Thank you for submitting this PR to support input nodes alongside trigger nodes!

Your changes look well-structured, including:

  • Updates to the trigger execution logic
  • Separation of trigger inputs from regular graph inputs
  • Addition of constant_inputs to the TriggeredPresetSetupRequest model
  • A migration script for existing presets
  • Removal of UI restrictions that prevented using input blocks with webhook-triggered blocks

However, before this PR can be merged, please:

  1. Complete the checklist in the PR description
    • Check the box confirming you've listed your changes
    • Create and document a test plan
    • Check the box confirming you've tested according to the plan

Once you've completed the checklist, this PR should be ready for another review. The code changes themselves look good and align well with the stated purpose of supporting input blocks alongside trigger nodes.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@github-actions github-actions Bot added the conflicts Automatically applied to PRs with merge conflicts label Oct 29, 2025
@github-actions

Copy link
Copy Markdown
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@github-actions github-actions Bot removed the conflicts Automatically applied to PRs with merge conflicts label Dec 15, 2025
@AutoGPT-Agent

Copy link
Copy Markdown
Contributor

Thanks for working on this feature to support input nodes alongside trigger nodes! The changes look good and are well-structured, but there are a couple of things to address before we can merge this PR:

  1. Please complete the checklist in the PR description by checking off the relevant items. This helps ensure your changes have been properly tested and reviewed.

  2. The PR currently has merge conflicts that need to be resolved before it can be merged. Please rebase your branch with the latest main branch to fix these conflicts.

Once these issues are addressed, your PR should be ready for review again.

@github-actions github-actions Bot added the conflicts Automatically applied to PRs with merge conflicts label Dec 20, 2025
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@nidhishgajjar

This comment was marked as low quality.

1 similar comment
@nidhishgajjar

This comment was marked as low quality.

@CLAassistant

CLAassistant commented May 11, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

…t-input-blocks-alongside-trigger-blocks

# Conflicts:
#	autogpt_platform/backend/backend/api/features/library/routes/presets.py
#	autogpt_platform/frontend/src/app/(platform)/build/components/legacy-builder/BlocksControl.tsx
@github-actions

Copy link
Copy Markdown
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@github-actions github-actions Bot removed the conflicts Automatically applied to PRs with merge conflicts label Jun 24, 2026
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🔍 PR Overlap Detection

This check compares your PR against all other open PRs targeting the same branch to detect potential merge conflicts early.

🟢 Low Risk — File Overlap Only

These PRs touch the same files but different sections (click to expand)

Summary: 0 conflict(s), 0 medium risk, 5 low risk (out of 5 PRs with file overlap)


Auto-generated on push. Ignores: openapi.json, lock files.

@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.48276% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.51%. Comparing base (4ac3646) to head (7f2f422).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #11220      +/-   ##
==========================================
+ Coverage   81.48%   81.51%   +0.03%     
==========================================
  Files        3553     3555       +2     
  Lines      265706   266086     +380     
  Branches    24618    24634      +16     
==========================================
+ Hits       216514   216904     +390     
+ Misses      43830    43786      -44     
- Partials     5362     5396      +34     
Flag Coverage Δ
platform-backend 86.47% <95.83%> (+0.01%) ⬆️
platform-frontend 61.12% <88.00%> (+0.19%) ⬆️
platform-frontend-e2e 28.01% <58.33%> (-0.22%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Platform Backend 86.47% <95.83%> (+0.01%) ⬆️
Platform Frontend 63.29% <88.00%> (+0.08%) ⬆️
AutoGPT Libs ∅ <ø> (∅)
Classic AutoGPT 28.43% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

… mask

When a triggered preset stores both regular graph inputs and the trigger
config, the trigger config is nested under a per-node key. The webhook
execution path was passing the full `preset.inputs` to
`is_triggered_by_event_type`, so the event filter (e.g. GitHub event
selection) couldn't be found and event-filtered triggers raised
"Event filter is not configured on trigger".

Extract the node's input mask before the event-type check and check it
against the unwrapped trigger config instead.

Also generalize the storage key `_trigger_params_{node_id}` ->
`_node_input_mask_{node_id}` to match the executor's `nodes_input_masks`
concept (route, copilot tools, RPC, and the data migration all updated).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…t-input-blocks-alongside-trigger-blocks

Conflicts resolved across the preset-trigger input-mask work and dev's
expert-scoping changes:

- triggers.py / db.py / router.py / manage_presets.py: keep both sides —
  the `_node_input_mask_{node_id}` wrap/extract plus dev's expert tenancy
  resolution and `WebhookPresetMigrationResult` return shape.
- triggers_test.py: both sides added different tests at the same point;
  kept the union. Adapted this branch's two tests to dev's 5-tuple
  `_patches()` signature (now yields `p_expert`), and fixed
  `test_invalid_inputs_rejected_before_webhook_setup`, which auto-merged
  outside the conflict region while still unpacking the old 4-tuple.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L5qijS3Tm9QxQzt2kARtLp
@github-actions

Copy link
Copy Markdown
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@github-actions github-actions Bot removed the conflicts Automatically applied to PRs with merge conflicts label Aug 27, 2026
Pwuts and others added 2 commits August 28, 2026 02:14
…contract

Post-merge fallout from combining the `_node_input_mask_{node_id}` input
shape with dev's expert-scoping work; all three are test-only.

- webhook_ingress_test.py: `_make_expert_preset` built a preset with flat
  `inputs={}`, so the new mask guard skipped the run and
  `add_graph_execution` was never awaited. Nest an (empty) trigger mask.
- triggers_test.py: dev's three expert update tests passed the trigger
  config flat; it now nests under the per-node mask key, so they failed
  with "Missing trigger configuration" before reaching the tenancy logic
  they actually assert on.
- webhook_preset_trigger_test.py: `_preset()` left `expert_id` as an
  auto-created MagicMock attribute, which is truthy, so dev's new private
  expert branch swallowed the run before the event-type check. Set it to
  None explicitly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L5qijS3Tm9QxQzt2kARtLp
Editing an existing trigger rendered empty fields and silently discarded the
edits: `SelectedTriggerView` read `preset.inputs` raw, but a triggered preset
nests its trigger config under `_node_input_mask_{node_id}` alongside the
regular graph inputs. Lookups by flat field name therefore missed, the graph
inputs were never shown at all, and saving wrote the edits back at the top
level where `update_triggered_preset` doesn't look — so the webhook
re-registered with the stale config.

- Split `getAgentInputFields` into the graph's input schema and a new
  `getTriggerConfigFields` for the trigger block's config. The old
  `trigger_setup_info?.config_schema ?? input_schema` fallback dates from when
  a triggered preset stored *only* the trigger config; a triggered agent now
  has both, so falling back from one to the other is wrong everywhere it was
  used (run, schedule and template views included).
- Add `splitPresetInputs`/`mergePresetInputs`, mirroring the backend's
  `node_input_mask_key()`. The trigger node id isn't exposed to the client, so
  the mask key is located by prefix and preserved on save rather than rebuilt.
- Render trigger config and graph inputs as separate sections, matching the
  setup modal.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YCuti3c1zp3RxejkiJrVGb
Comment thread autogpt_platform/backend/backend/api/features/library/db.py Outdated
Comment thread autogpt_platform/backend/backend/api/features/library/triggers.py
Comment thread autogpt_platform/backend/backend/copilot/tools/manage_presets.py Outdated
@Pwuts

Pwuts commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

/review

Pwuts and others added 3 commits September 9, 2026 00:40
…inputs

Addresses the review findings on the per-node input mask contract:

- The SQL data migration's trigger-block allowlist is fixed at authoring
  time, so it can never cover a block added later. Add the two it already
  missed (AllQuiet, Stripe) and make the boot backfill
  `migrate_flat_triggered_preset_inputs()` authoritative — it derives the
  set from `get_webhook_block_ids()` and picks up detached presets that
  SQL cannot tell apart from run templates.
- `migrate_legacy_triggered_graphs()` created presets with flat inputs
  after `migrate deploy` had already run; it now writes the mask key.
- Bump the preset version and re-key its mask in one transaction, so a
  half-applied migration can't strand a preset outside the retry filter.
- Validate updated inputs in `update_triggered_preset` the way setup does.
- Give the copilot `update_preset` tool a separate `trigger_config`, so
  graph inputs stop being injected into the trigger config.
- Refuse (rather than silently drop) a trigger edit on a preset with no
  mask key, and stop rendering an empty inputs card for historical runs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bound the boot backfill with the same `asyncio.wait_for` its guarded
neighbour uses: on a converged database it is one selective query, but the
first boot after the data migration walks whatever that migration could not
reach, and an unbounded backfill in the startup path delays the port before
the API serves traffic. Each preset commits on its own, so a timeout defers
the remainder to the next boot. Also count failures, so a systematic one
reports a total rather than only per-preset lines.

Tests, each proven to fail against the mutation it exists to catch:
the mask-less discriminator on all four cohorts, the backfill's steady-state
cost and its wrapping of a preset the SQL migration missed, the update path's
input validation and its mask/graph-input split, the copilot tool's routing
of `inputs` and `trigger_config`, the refused save on a preset with no mask
key, and the read-only inputs panel no longer rendering an empty card.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Pwuts

Pwuts commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

🤖 Review backlog closed: 8 fixed, 0 declined, 0 escalated

All eight open threads from the 2026-09-02 review were verified against the code before being acted on, and all eight turned out to be real at this head. Fixes are in 140e63f (code) and 43b3725 (tests), on top of a dev merge — the branch was 109 commits behind, which also meant its 191 migrations couldn't run app-stack tests against a 196-migration database.

Thread Bucket What changed
🔴 migration.sql:36 stale block allowlist fix Both missing ids added, plus a registry-derived boot backfill so it can't recur
🟠 migration.sql:56 excludes detached presets fix Backfill picks them up with a discriminator SQL can't express; SQL filter kept deliberately
🟠 SelectedTriggerView/helpers.ts:38 silent drop fix Save refused with an error instead of a success toast
🟠 router.py:1276 second unconverted producer fix migrate_legacy_triggered_graphs() writes the mask key; backfill repairs what it already created
🟠 db.py:2540 non-atomic version bump fix Both writes in one transaction()
🟠 triggers.py:222 unvalidated update fix Same validate_and_construct_node_execution_input call setup makes
🟡 manage_presets.py:361 mask routing fix Separate trigger_config parameter, and the tool descriptions corrected
🟡 AgentInputsReadOnly/helpers.ts:19 empty card fix Unschema'd entries excluded before hasInputs

The blocker's own suggestion is the part worth reading. Deriving the id set from block type is right in spirit but unavailable in SQL — block_type lives in Python and the AgentBlock table holds only id, name and the JSON schemas. More fundamentally, no list inside an applied migration can stay current. So the list is now the bulk fast path and migrate_flat_triggered_preset_inputs() is authoritative; details are in the PR body.

What the findings got wrong: nothing material. The one correction is to the fix proposed on migration.sql:56 — neither suggested discriminator is expressible in SQL, so that cohort is handled in the backfill instead of by narrowing the query.

Verification

Six mutations were run, one per new guard, and each was caught by the test that covers it: the mask-less discriminator forced true (3 tests fail), the query's mask-absence filter removed (1), the update path's validation swallowed (1), the copilot routing reverted to merging inputs into the mask (1), the frontend null-mask guard disabled (1), and the read-only schema filter disabled (1).

Suites: 1647 blocks/test/test_block.py, 233 api/features/integrations + integrations/webhooks, 118 api/features/library, 68 triggers_test + manage_presets_test, 3 util/architecture_test.py, 14 frontend vitest, tsc --noEmit clean.

Migration: all 196 migrations applied to a throwaway pgvector/pgvector:pg16; prisma migrate diff against schema.prisma returned only the pre-existing organizationId/trigram drift dev already carries. This migration has 0 DDL statements, so it cannot contribute schema drift.

A pyright error in data/activity_event_backfill.py during this work was a stale local prisma/types.pyi stub, not code — poetry run gen-prisma-stub cleared it. CI runs that step already.

@Pwuts

Pwuts commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

🤖 Follow-up evidence on the two migration threads: the boot backfill was exercised against a real Postgres, not only against mocked Prisma models.

Seeded on the local database: a graph with a GitHub Issues trigger node, and a preset with webhookId = NULL holding flat repo / events input rows — the detached cohort migration.sql:56 is about, and the one the SQL filter deliberately skips.

BEFORE: ['events', 'repo']
AFTER:  ['_node_input_mask_fc3712b1']
PASS: detached flat preset converted to the nested mask shape
PASS: second run is a no-op
CLEANED UP

That covers the parts unit tests could not: the AgentGraph.is.Nodes.some traversal and the InputPresets.none mask-absence filter really do select such a preset, the mask row carries the original values ({"repo": "owner/repo", "events": ["opened"]}), and the conversion is idempotent. The seeded rows were deleted afterwards.

Still unmeasured: first-boot timing against a production-scale cohort. That is what the asyncio.wait_for(..., timeout=30) bound is for — each preset commits on its own, so a timeout defers the remainder to the next boot instead of holding the port.

Pwuts and others added 2 commits September 9, 2026 01:13
`tool_schema_test.py::test_total_schema_char_budget` was already failing on
this branch at 61,313 chars against a 61,000 limit — the PR's own
`constant_inputs` and my `trigger_config` are new tool surface, and both
tools' descriptions had grown wordy. Restoring just those two files to their
dev versions makes the test pass, so the overage is this PR's.

Trimmed 303 chars of restatement from both tools first, keeping the
prohibitions the model actually needs ("never by editing the trigger node",
"not the trigger config"), then bumped the budget 61,000 -> 62,000 for the
two genuinely new parameters, in the same documented form as the five bumps
before it: what it buys, the measured total, the headroom.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Four comments ran to four and five lines where two or three carry the same
constraint. No behaviour change.

Also record, above `_CHAR_BUDGET` where a resolver will actually see it, that
a merge conflict on that constant resolves to the higher value: #14424 and
#14455 are bumping the same line concurrently, and each branch's CI only
measures its own delta against dev, so taking the incoming side lowers a
ceiling that has to cover every in-flight PR at once.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: signed CLA signed by all contributors platform/backend AutoGPT Platform - Back end platform/frontend AutoGPT Platform - Front end size/xl

Projects

Status: 🆕 Needs initial review
Status: No status

Development

Successfully merging this pull request may close these issues.

6 participants