jetlinks-boundary

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

JetLinks Boundary

JetLinks 边界交互

Read
references/module-reference.md
first.
请先阅读
references/module-reference.md

Workflow

工作流程

  1. Identify the capability boundary that the task needs to cross.
  2. If this is a new backend feature, large cross-boundary behavior change, or boundary decision that affects data ownership, permissions, transactions, or external messages, first follow
    ../jetlinks-router/references/backend-design-test-driven-rules.md
    : write the design draft and realistic test goals to the appropriate docs directory and wait for explicit user confirmation.
  3. Confirm whether the current workspace already has command services, proxies, support IDs, or concrete command classes.
  4. Read
    references/cross-service-call-rules.md
    before implementing providers or consumers.
  5. Keep the chosen pattern aligned with the module's execution model, existing naming scheme, and local command invocation style.
  1. 明确任务需要跨越的能力边界。
  2. 如果是新增后端功能、大规模跨边界行为变更,或是涉及数据归属、权限、事务或外部消息的边界决策,请首先遵循
    ../jetlinks-router/references/backend-design-test-driven-rules.md
    :将设计草案和实际测试目标写入对应文档目录,并等待用户明确确认。
  3. 确认当前工作区是否已存在命令服务、代理、支持ID或具体命令类。
  4. 在实现服务提供者或消费者之前,请阅读
    references/cross-service-call-rules.md
  5. 确保所选模式与模块的执行模型、现有命名规范及本地命令调用风格保持一致。

Required Constraints

强制约束

  • Do not invent command IDs, service IDs, support IDs, or proxy contracts.
  • Do not directly inject another boundary's internal implementation class.
  • When local command classes already exist, prefer explicit command objects with
    commandSupport.execute(...)
    over shortcut calls such as
    executeToMono(...)
    .
  • In reactive modules, keep the cross-boundary call non-blocking.
  • Do not implement a large boundary change before the design draft, rejected options, data permission implications, and realistic test goals have been documented and confirmed.
  • Do not fake boundary tests by mocking away the contract being selected; verify request payloads, permission context, success and failure semantics, and fallback behavior that matter to the caller.
  • When boundary code changes are made, run relevant validation when possible; otherwise state the exact pending commands and cross-boundary risks.
  • 不得自行创建命令ID、服务ID、支持ID或代理契约。
  • 不得直接注入其他边界的内部实现类。
  • 当本地已存在命令类时,优先使用带有
    commandSupport.execute(...)
    的显式命令对象,而非
    executeToMono(...)
    这类快捷调用。
  • 在响应式模块中,确保跨边界调用为非阻塞式。
  • 在设计草案、被否决的方案、数据权限影响及实际测试目标被记录并确认之前,不得实施大规模边界变更。
  • 不得通过模拟所选契约来伪造边界测试;需验证对调用方重要的请求负载、权限上下文、成功/失败语义及降级行为。
  • 当边界代码发生变更时,尽可能运行相关验证;否则需明确说明待处理的命令及跨边界风险。

Response Shape

响应格式

  1. Boundary to cross
  2. Existing mechanisms found in the workspace
  3. Recommended interaction pattern
  4. Design doc path and test goals when the backend design gate applies
  5. Rejected patterns and reasons
  6. Verification evidence or exact pending commands
  1. 需要跨越的边界
  2. 工作区中已有的机制
  3. 推荐的交互模式
  4. 当适用后端设计规范时的文档路径及测试目标
  5. 被否决的模式及原因
  6. 验证证据或明确的待处理命令