mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? * The Callbacks component now detects Nexus URLs of the form `temporal://internal/chasm`, which are routed to CHASM components through a new `ChasmInvocation`. * CHASM routing information is serialized into a header, the URL is left opaque. * A new CHASM interface has been added, `chasm.NexusCompletionHandler`, which components can implement to receive Nexus callbacks. * A CHASM helper method, `GetNexusCallback`, has been added that returns a `Callback` protobuf routing to the given component. * The frontend's callback argument validator has been patched to allow "temporal" schemes unconditionally. Scheduler starts workflows through the frontend, in order to be counted by metering, and so frontend must allow requests with internal-facing callbacks. * I believe @chaptersix 's changes also touch this area, we may not need my interim patch there. ## Why? * CHASM Scheduler needs to find out about workflow completions, and we want to do that with Nexus completion callbacks. ## How did you test it? - [ ] built - [ ] run locally and tested manually - [ ] covered by existing tests - [x] added new unit test(s) - [ ] added new functional test(s) ## Potential risks * The funkiness is in the frontend handler - see the TODO. I don't think it presents a security risk, since a customer would only be able to forge completions within their own namespace (since this validation takes place within `StartWorkflowExecution`'s frontend flow). But it would be nice to validate that it was only coming from internal pods. --------- Co-authored-by: Roey Berman <[email protected]>