Skip to content

Make removing a webhook's custom path actually remove it - #670

Open
elias-ba wants to merge 1 commit into
mainfrom
feat/webhook-custom-path
Open

Make removing a webhook's custom path actually remove it#670
elias-ba wants to merge 1 commit into
mainfrom
feat/webhook-custom-path

Conversation

@elias-ba

@elias-ba elias-ba commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Ready for review, but don't merge yet. This goes out alongside the Lightning release that carries custom paths. Merged before it, the assistant offers users a field Lightning refuses.

Short Description

Teaches workflow chat about custom_path on webhook triggers, so the assistant can set one when asked and remove one when asked.

Fixes #669

Implementation Details

Lightning reads an absent custom_path as "leave it alone" and restores the stored one. So an assistant that removes the key when asked to remove the path reports success while the old URL keeps working. Told that custom_path: null is what clears it, the model writes the null and the path goes.

The prompt now carries the field and the rules the server enforces, and says not to invent a path, since uniqueness is per project and Apollo never sees the project.

The judges guarded "every job and edge" but not triggers, so a dropped sub-key graded as fine. Both now cover the trigger.

The trigger id is pinned too. Lightning restores an omitted custom_path by matching that id, so an id that changes on its way through here takes the custom URL with it. It survives because it is preserved under a flat key rather than one keyed on the trigger name, which reads like something to tidy up.

custom_path is deliberately not preserved in extract_and_preserve_components alongside the ids. A user could then never remove a path through chat, since an omission and a deliberate drop are indistinguishable there.

poetry run pytest services/*/tests/unit passes. Of the live tests, test_removes_a_custom_path_with_an_explicit_null is the one that fails without this change; the others guard against a later regression.

AI Usage

Please disclose whether you've used AI in this work (it's cool, we just want to know!):

  • Yes, I have used AI
  • No, I have not used AI

You can read more details in our Responsible AI Policy

@elias-ba elias-ba changed the title Teach workflow chat about webhook custom paths Make removing a webhook's custom path actually remove it Sep 4, 2026
@elias-ba
elias-ba marked this pull request as draft September 4, 2026 23:29
Lightning reads an absent custom_path as "leave it alone" and restores the
stored one, so an assistant that removes the key when asked to remove the path
reports success while the old URL keeps working. Told that custom_path: null is
what clears it, the model writes the null and the path goes.

The prompt carries the field and the rules the server enforces, and says not to
invent a path: uniqueness is per project and Apollo never sees the project.

The judges guarded every job and edge but not the trigger, so a dropped sub-key
graded as fine.

The trigger id is pinned. Lightning restores an omitted custom_path by matching
that id, and the id survives here only because it is preserved under a flat key
rather than one keyed on the trigger name, which reads like something to tidy
up.

custom_path is deliberately not preserved alongside the ids. A user could then
never remove a path through chat, since an omission and a deliberate drop are
indistinguishable from here.
@elias-ba
elias-ba force-pushed the feat/webhook-custom-path branch from 8d572da to be11611 Compare September 4, 2026 23:40
@elias-ba
elias-ba marked this pull request as ready for review September 5, 2026 02:23
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.

Workflow chat does not know about webhook custom paths

1 participant