Skip to content

[Manager]: route missing PR evidence to a capability-matched Agent #4305

Description

@huangruiteng

Summary

The Lark manager can receive a question about a concrete pull request in a repository connected to an authorized Goal, but its bounded read tool exposes only sources, portfolio, todos, deliveries, and handoffs. If the PR was not previously materialized into a Core Todo/delivery record, the manager cannot inspect the PR body or diff. In the observed incident it paginated unrelated Goal records, then answered from the user's quoted sentence while saying it could not obtain the PR record.

This is not a transient GitHub/network failure. The current manager contract intentionally says arbitrary external links are not fetched and grants no shell. The product gap is that the manager did not convert the unsupported evidence request into a typed handoff to the capability-matched repository engineering Agent. A second configuration/source problem then exposed only the finance research Agent in the handoff directory, so the repair request was routed to the wrong responsibility lane.

Reproduction

  1. Bind a Lark Goal Topic to a Goal with two registered Agents: a research Agent and a steward engineering Agent.
  2. Ask the manager why a concrete LoopX PR preserves a compatibility behavior, using only #<number> in the message.
  3. Ensure that PR has no exact Core Todo/delivery evidence row in the authorized manager projection.
  4. Observe the manager Turn.

Observed on LoopX 1.0.3:

  • manager.context was healthy but intentionally partial (complete=false);
  • the model issued six successful loopx_manager_read calls over finance and LoopX-meta Todos/deliveries;
  • no repository/PR evidence view or capability was available;
  • the final answer correctly disclosed that the PR body/diff was unavailable, but still offered an architecture inference rather than opening a typed evidence-acquisition handoff;
  • the follow-up repair was handed to the only projected candidate, finance-research-explorer, even though it was steward engineering work.

Root-cause allocation

  1. Manager behavior gap: a concrete artifact question without exact evidence should not degrade into repeated broad pagination plus inference.
  2. Product capability gap: the bounded manager read surface has no repository artifact view and no explicit evidence_unavailable -> capability-matched handoff route.
  3. Configuration/source amplification: the delegation directory may be built from a stale/global projection and omit an Agent registered in the canonical Goal source. PR fix(configuration): preserve settings through canonical Goal source #4303 addresses that source-authority loss but does not by itself add the fallback policy.

Expected behavior

  • Keep the manager sandbox bounded: do not grant arbitrary shell, credentials, or unconstrained network access.
  • Resolve an explicit PR reference against the Goal's registered repository identity through one reviewed repository-evidence capability, or emit a typed unavailable result.
  • When evidence is unavailable locally, offer/perform an authorized context_handoff to the registered Agent whose responsibility/capability matches repository engineering.
  • Never select the sole visible Agent merely because it is the sole candidate; fail closed with a typed routing-gap receipt if no compatible receiver exists.
  • Return the acquired conclusion through the existing inbox/link/conclusion receipt path and original Lark conversation, without rerunning the original request.

Acceptance coverage

  • A fixture with two Agents and a PR-only question routes to the steward engineering Agent, not the research Agent.
  • A stale global mirror followed by canonical-source refresh retains both registered Agents; cover source -> global -> restart readback alongside fix(configuration): preserve settings through canonical Goal source #4303.
  • An unavailable PR record emits a typed evidence gap and one handoff, not repeated unrelated pagination or an unsupported factual claim.
  • The receiving Agent's evidence link and conclusion return to the original Lark audience exactly once.
  • Negative tests prove the manager still cannot read arbitrary paths, use raw shell, widen Goal scope, or infer a receiver from list position.

Evidence boundary

The reproduction was derived from bounded local manager Turn receipts: one healthy manager context, six successful Core reads, no tool/provider errors, and no PR/repository read tool in the advertised schema. Private message bodies and workspace paths are intentionally omitted.

Activity

  1. huangruiteng commented on Sep 24, 2026

    @huangruiteng
    CollaboratorAuthor

    重新评估结论:用户问题有价值,但不再保留“缺 PR 证据就自动交接”的独立实现任务。按 superseded / not planned 关闭,未验收的真实场景已并入 #4339 的 “Inherited acceptance” 正文。不是 completed / fixed。

    理由与当前证据:

    核对了 origin/main@0056a3120cfe87b4ba327578844fe0c137832fb4 的当前 RFC 与合并记录。相关实现核对及回归运行于 d64c4d3772400c958d51b773f1e1e165cbaca801;上述 Manager/profile/handoff/return 文件与该 origin/main 一致。uv run --extra test python -m pytest tests/capabilities/test_manager_runtime_profile.py tests/test_manager_context_handoff.py tests/test_manager_context_roundtrip.py -q:43 passed。这证明现有 profile、scope、幂等交接与回传回归通过,不是一次新的真实模型/飞书端到端验收。本次没有修改产品代码或启动 Agent/发送飞书消息。

    后续只有在真实旅程复现具体残余失败时,才在现有 M1/M2/M3 owner 上补最小完整修复;保留 RFC §6 的 live investigation/routing 验收义务,不复活 #4306,也不凭 issue 关闭宣称能力完成。

    English disposition: superseded, not fixed. Consolidated the remaining direct-investigation, responsibility-selection and original-audience return acceptance into #4339. Existing host tools and semantic collaboration are the product path; no PR-specific provider or automatic delegation on a missing read is planned. The exact external/Lark scenario remains unqualified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions