Repository navigation
fix(hitl): restore form API compatibility and harden IM workflows - #46548
Merged
Merged
Conversation
Resolve existing workspace Contacts by Account identity in a single read-only snapshot. Preserve external one-time email recipients and reject unavailable members without email matching. Update migration, transport, repository, and runtime regression coverage, together with generated API descriptions. Specs: dify-specs@3a2e3c8 Assisted-by: Codex:gpt-6.1-sol (cherry picked from commit 6339e077a3daa2a2f9d2aa6d7cc97dae6282254f)
Assisted-by: Codex:gpt-6.1-sol
Verify both providers appear from the available catalog and open their credential forms for first connections and replacements of an active IM channel. This protects the behavior reported by WTA-4080, whose development environment still serves an older mock catalog. Assisted-by: Codex:gpt-6.1-sol
Assisted-by: Codex:gpt-6.1-sol
Read safe Microsoft error codes from the Azure Identity/MSAL exception chain so nonexistent tenant IDs return invalid_credentials instead of HTTP 500. Explain the Azure Bot App Tenant ID and Microsoft App ID fields when Teams rejects the configured tenant. Preserve unclassified execution failures. Refs: WTA-4091 Assisted-by: Codex:gpt-6.1-sol
Assisted-by: Codex:gpt-6.1-sol
Guide users to check the Corp ID and application credentials when DingTalk returns 500/unknownError. Preserve the failure status and upstream error facts, and log safe request identifiers without raw provider messages or credentials. Add regressions for configuration guidance, unaffected error combinations, and safe OAuth rejection diagnostics. Refs: WTA-4085 Assisted-by: Codex:gpt-6.1-sol
Preserve Teams tenant feedback alongside actionable DingTalk configuration guidance. Validate the combined service, controller and provider paths. Validation: 333 focused tests; Ruff lint/format; Pyrefly checks. Specs: QuantumGhost/dify-specs@2152629 Refs: WTA-4085 Assisted-by: Codex:gpt-6.1-sol
Carry the original upstream request identifier through credential-test failures and management errors. Preserve numeric DingTalk errcode values instead of SDK wrapper codes, and keep opaque request IDs unchanged in responses and logs. Remove the inferred Corp ID guidance. Expected provider rejections remain business failures without exposing raw provider messages or credentials. Validation: 345 focused tests; Ruff; Pyrefly; live Console-handler HTTP checks. Refs: WTA-4085 Assisted-by: Codex:gpt-6.1-sol
Expose original DingTalk error codes and opaque request IDs to configuration callers instead of inferring a Corp ID problem from an ambiguous provider error. Validation: 345 focused tests; Ruff; Pyrefly; live HTTP response checks. Specs: QuantumGhost/dify-specs@ce3c5c7 Refs: WTA-4085 Assisted-by: Codex:gpt-6.1-sol
Reject Community email channel management before authentication and provider access, and omit tenant email channels from discovery. Keep self-hosted delivery on the global mail client and preserve Cloud workspace Resend configuration. Refs: WTA-3539 Assisted-by: Codex:gpt-6.1-sol
Apply Slack's 12,000-character limit across all Markdown fragments before choosing card delivery. Keep representable forms intact and route oversized forms through the existing approval link delivery. Cover exact and exceeded limits with the real Slack SDK against local HTTP, and verify link submission retains its form, recipient and delivery identity. Refs: WTA-3543 Specs-commit: 4e9aaf7c2ac3dbac48e539794c73fa5a40c79af3 Assisted-by: Codex:gpt-6.1-sol
Expose provider_error_code and provider_request_id on candidate and saved connection tests and configuration mutation failures. Missing diagnostics remain null without falling back to Dify request or trace identifiers. Regenerate API contracts and documentation and cover structured HTTP responses. Refs: WTA-4085 Assisted-by: Codex:gpt-6.1-sol
Assisted-by: Codex:gpt-6.1-sol
Assisted-by: Codex:gpt-6.1-sol
Regenerate channel documentation and route summaries from the combined API. Assisted-by: Codex:gpt-6.1-sol
Expose original provider error codes and request IDs as nullable API fields. Missing provider identifiers are never generated or replaced by local IDs. Refs: WTA-4085 Assisted-by: Codex:gpt-6.1-sol
Read structured Microsoft OAuth responses through the SDK response hook instead of searching exception descriptions. Raise the adapter's safe credential rejection with the upstream error code and optional request ID. Preserve the exception through the Channel Service and translate it only at the API boundary, retaining diagnostics on tests and configuration failures. Never create a provider request ID when Microsoft did not supply one. Refs: WTA-4091 Assisted-by: Codex:gpt-6.1-sol
Assisted-by: Codex:gpt-6.1-sol # Conflicts: # api/controllers/console/human_input_v2/channel.py # api/controllers/console/human_input_v2/errors.py # api/openapi/markdown/console-openapi.md # api/tests/unit_tests/controllers/console/test_human_input_channel_api.py # packages/contracts/generated/api/console/workspaces/types.gen.ts # packages/contracts/generated/api/console/workspaces/zod.gen.ts
Assisted-by: Codex:gpt-6.1-sol
Read workspace, platform, and external contacts through tenant-scoped visibility sources while preserving membership precedence and pagination. Consolidate regression coverage into the existing repository cases. Validation: 37 repository tests passed; focused Ruff and format checks passed. Assisted-by: Codex:gpt-6.1-sol
Preserve all provider-supplied string request IDs without regular-expression or length validation. Escape IDs only when formatting logs, without changing the diagnostic value returned by the adapter or API. Cover empty, whitespace, control-character, Unicode and long identifiers. Refs: WTA-4085 Assisted-by: Codex:gpt-6.1-sol
Refs: WTA-4085 Assisted-by: Codex:gpt-6.1-sol
Report the complete Markdown character count and the 12000-character payload limit in assessment diagnostics, including fragments after the first exceeded prefix. Refs: WTA-3543 Specs-commit: b7abb74 Assisted-by: Codex:gpt-6.1-sol
Assisted-by: Codex:gpt-6.1-sol
Align frontend and container defaults, document missing environment settings, and include the Human Input queues in development and debugger workers. Move repository database coverage into container E2E tests without external database URL overrides, and cover default worker queue consumption. Assisted-by: Codex:gpt-6.1-sol
Assisted-by: Codex:gpt-6.1-sol
Move reusable Slack transport and form runtime helpers into tests/helpers and provide fixtures through scoped conftest modules. Preserve existing assessment and delivery coverage. Assisted-by: Codex:gpt-6.1-sol
Prepare recipient, contact, channel, effective binding, and identity contexts once per delivery round. Keep provider and credential I/O outside database transactions and retain a recorded attempt for every actual send. Cover mixed recipient mapping, current subject visibility, override targets, and credential transaction boundaries. Use three internal contacts across both channel scopes to avoid redundant size-based functional coverage. Validation: 362 focused tests passed; Ruff, formatting, and type checks passed. Measured context SELECTs fell from 603 to 6 for 100 internal contacts plus an external contact and a direct email recipient; all 202 attempt inserts were retained. Assisted-by: Codex:gpt-6.1-sol
Return version-specific Human Input schemas and standard notification defaults. Report v2 DSL configuration errors at their field locations. Read and submit v2 initiator forms through OpenAPI with the existing Account and EndUser recipient rules, preserving v1 behavior and first-success resume semantics. Regenerate OpenAPI contracts and cover default templates, caller identity, form authorization, submission, and compatibility with regression tests. Assisted-by: Codex:gpt-6.1-sol
Assisted-by: Codex:gpt-6.1-sol
Adjust model extra policies and cover additive reads, target snapshot updates, and preservation of read-only snapshots and opaque callback payloads. Keep credential update implementations unchanged. Refs: WTA-4105 Spec: dify-specs@cea7aebcfee397a9a99b822846b8479be92f2325 Assisted-by: Codex:gpt-6.1-sol
Expire pending v2 forms when their run stops, retain deprecated default selectors, and isolate public response DTOs from frozen persistence values. Preserve legacy paragraph text while keeping resolved defaults explicit across runtime and IM consumers. Validation: 1633 related unit tests passed; Ruff, format, Pyrefly and OpenSpec checks passed. OpenSpec-commit: 2627255eda41d005a5f75527f161f20039887687 Assisted-by: Codex:gpt-6.1-sol
Integrate stopped-form invalidation, stable form response projections and resolved-default naming. Update the concurrent OpenAPI fixture to use the renamed internal field. Validation: 1633 task unit tests passed; integrated suites passed with the OpenAPI fixture adapted. OpenSpec-commit: 2627255eda41d005a5f75527f161f20039887687 Assisted-by: Codex:gpt-6.1-sol
Assisted-by: Codex:gpt-6.1-sol
6 tasks done
QuantumGhost
marked this pull request as ready for review
November 17, 2026 12:17
QuantumGhost
requested review from
CodingOnStar,
crazywoola,
hyoban,
iamjoel,
laipz8200 and
lyzno1
as code owners
November 17, 2026 12:17
Align HITLv2 contract assertions and the Console type baseline with the current implementation. Use a real bearer authenticator in the External SSO test and retain Controller and Integration coverage uploads after test failures. Validation: 43 focused tests, Ruff, test-double guard, Console type audit, workflow lint, and formatting checks passed. Assisted-by: Codex:gpt-6.1-sol
Add the missing batch Account lookup method to the Contact capability test port. Keep unexpected identity reads rejected and preserve the existing service scenarios. Validation: make type-check-core, three focused tests, and Ruff checks passed. Assisted-by: Codex:gpt-6.1-sol
Wait for password-save requests to reach the network boundary before asserting their exact count. Preserve the focus and retry checks, and upload available browser coverage even when a test fails. Validation: focused Chromium spec, scoped vp check, workflow lint, and formatting checks passed. Assisted-by: Codex:gpt-6.1-sol
WTW0313
previously approved these changes
Nov 17, 2026
WTW0313
enabled auto-merge
November 17, 2026 13:24
WTW0313
approved these changes
Nov 17, 2026
3 of 5 tasks
This was referenced Nov 18, 2026
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.
AI disclosure: This PR description was primarily drafted with Codex using gpt-6.1-sol. Final human review of the diff and description is pending.
Important
Fixes #<issue number>.Summary
Fixes #46547
Fix Human Input v2 compatibility and reliability across form APIs, workspace channel setup, and IM delivery.
Update OpenAPI/generated contracts and regression coverage for the affected APIs, authorization, persistence, and delivery paths.
Validation at
6db7320ba6ad:git diff --checkpassed. CI is not green: API controller/integration, OpenAPI SDK/Next.js adapter, Python style, and coverage checks have failures. Tests and live deployment scenarios were not rerun for this description update.Screenshots
Checklist
make lint && make type-check(backend) andvp staged(frontend) to appease the lint godsFrom Codex