Skip to content

feat(global): add a cross-Goal lifecycle board over status projections - #9511

Open
gcl-coder wants to merge 2 commits into
loopx-project:mainfrom
gcl-coder:codex/global-lifecycle-board
Open

gcl-coder wants to merge 2 commits into
loopx-project:mainfrom
gcl-coder:codex/global-lifecycle-board

Conversation

@gcl-coder

@gcl-coder gcl-coder commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

  • Outcome basis / optional anchor: accepted RFC goal-artifact-lifecycle-projection-v0 §4, mid-term application 1, "Global goal board": aggregate the per-goal projection across goals into one cross-goal view (which goals reached which milestones, which guards block how many goals, what is the next transition per goal). This is the natural home in the existing /loopx-global-* family and the operator dashboard. Specification revision: docs/architecture/rfcs/goal-artifact-lifecycle-projection-v0.md at eba8a7f95f54fe09cb3dcc28bb1f55443898bbed (unchanged on current main).
  • Goal/source and gap: loopx status already derives a per-Goal goal_artifact_lifecycle_projection_v0 (phases, milestones, guards, next transitions), and GLOBAL_READ_COMMANDS exposes five global-* read commands — but none of them aggregates that projection. There is no loopx/global_lifecycle.py, no loopx/control_plane/goals/lifecycle_board.py, and global-lifecycle is absent from the command set on main (6915df67d; both paths 404). An operator answering "which Goals are waiting on which owner, and where does each go next" has to read status per Goal and merge by hand.
  • Observable before → after, with the validation row that proves it: before, the command does not exist (loopx global-lifecycle fails closed with help). After, one read-only command returns a global_goal_lifecycle_board_v0 with phase, guard and milestone rollups plus bounded per-Goal rows, and it composes the same loopx_projection_envelope_v0 coverage contract as its four peers, with the global-membership denominator rather than the local registry. The test_global_lifecycle.py rows and the extended test_real_cli_global_membership_failure_and_recovery row prove both the aggregation and the coverage semantics. complete on the response repeats the envelope verdict, so a board that covers every Goal status returned still reports complete=false when global membership was never read.
  • Issue/task and intended base: Related to [Task]: Implement the first Goal artifact lifecycle read-model slice #4128. Intended base main.

Author Declaration

Implemented against

  • Specification and revision: docs/architecture/rfcs/goal-artifact-lifecycle-projection-v0.md (Accepted), §4 application 1, plus docs/reference/protocols/global-manager-command-v0.md for the command family and docs/reference/contracts/projection-envelope-contract.md for the envelope carrier.
  • Criteria:
Criterion (spec clause) Disposition Symbol / path Test or command
§4.1 cross-Goal view: which Goals reached which milestones implemented milestones rollup, goals[].milestones_reached (loopx/control_plane/goals/lifecycle_board.py) test_aggregates_phases_guards_and_milestones_across_goals
§4.1 which guards block how many Goals implemented guards rollup keyed by (kind, owner) with blocked_goal_ids test_rollups_count_a_goal_once_per_guard_and_milestone, test_rollup_rows_are_deterministic_across_goal_order
§4.1 next transition per Goal implemented goals[].next_transition from the projection's first transition test_aggregates_phases_guards_and_milestones_across_goals
§4.1 natural home in the /loopx-global-* family implemented COMMAND = "/loopx-global-lifecycle", legacy /loop-global-lifecycle, CLI loopx global-lifecycle; GLOBAL_READ_COMMANDS test_cli_registers_global_lifecycle_and_handles_json, tests/test_cli_entrypoint.py global-read rows
RFC §2 non-goals: no state machine, no second lifecycle implemented the board only re-reads artifact_lifecycle and re-validates its text; unmatched projections become typed gaps test_goals_without_a_projection_are_typed_gaps_not_silent_omissions, test_board_rejects_a_projection_that_breaks_the_public_boundary
Envelope contract: global scope uses the global denominator implemented _scope_counts/_envelope use global_registry.global_goal_count; omissions are outside_current_registry, goal_scan_omitted, goal_identity_unavailable, projection_not_derived, status_unavailable; top-level complete repeats the envelope verdict test_global_membership_sets_the_denominator_and_names_exclusions, test_unknown_global_membership_never_certifies_the_board, test_a_bounded_status_read_reports_the_goals_it_never_scanned
Operator dashboard consumer deferred the RFC's second consumer; this PR ships the CLI/JSON face only see Scope
  • Self-check before submission: I ran the 18 new tests, the surrounding global-read suites, the doc-governance/protocol/host-registry smoke scripts, the file-provider end-to-end CLI smoke, a real loopx check public-boundary scan over the new files, and the --format json/markdown failure paths against a broken registry. I read the whole diff against the merge base. I did not run ruff (not installed here), the SQLite provider, Windows, or managed CI.

Scope And Continuation

  • Completed scope and remaining work: the CLI/JSON lifecycle board described above, its envelope coverage, docs and smoke coverage. Remaining RFC work: the operator-dashboard surface (§4.1 second consumer), the periodic digest (§4.2), the replan substrate (§4.3) and the completion guard (§4.4). This is the first of those four and does not block them.
  • Slice boundary / successor: the RFC itself splits these into separate applications, and each needs its own consumer. This slice is independently reversible: it adds one read command and one pure aggregation module; removing them leaves status, settlement, quota and the other four global reads untouched.

There is no separate manager-alias family here. /loopx-global-lifecycle is the canonical command name that §4.1 asks for, registered in the existing GLOBAL_READ_COMMANDS set beside global-summary, global-gates, global-todos and global-risks; it reuses their request/response schema, their envelope, and their --agent-id/--limit flags. The slash-skill catalog (loopx/slash_commands.py) is unchanged: goal-portfolio is also in GLOBAL_READ_COMMANDS without a slash entry, and tests/test_slash_command_install_equivalence.py pins the installed catalog to a fixed baseline commit, so publishing a new host slug is a maintainer decision rather than part of this read path.

Validation

  • Tested revision: 6d1840854 (rebased onto main 6915df67d)
  • Run state: finished
  • Input classes: synthetic
Check kind Result Public-safe evidence / limitation
unit passed python3 -m pytest tests/test_global_lifecycle.py -q → 19 passed: aggregation, typed gaps, limit vs rollup, phase filter, unknown phase fails before any status read, status failure, redacted exception path, private-label downgrade, boundary rejection, CLI registration, unpublishable identity, guard/milestone de-duplication, deterministic rollups, agent_lane_id pass-through, future phases, markdown error/empty rendering, global denominator, unknown denominator, bounded-scan omission, and published-count agreement for unpublishable/duplicate milestone ids.
unit passed python3 -m pytest tests/test_global_lifecycle.py tests/test_projection_envelope.py tests/test_public_check_disclosure.py tests/test_global_todos.py tests/test_global_risks.py tests/test_cli_manual_visibility.py tests/architecture/test_top_level_module_budget.py -q → 186 passed.
unit passed python3 -m pytest tests/test_cli_entrypoint.py -q -k "global_lifecycle or global_read or selected_parser_matches" → 7 passed (help/unknown-option/invalid-limit parity and empty-coverage preservation).
unit passed python3 -m pytest tests/test_summary_all.py -q -k "not sqlite" → 30 passed. The 8 deselected rows need a qualified SQLite driver that this host lacks; a clean baseline fails them identically.
real_entrypoint passed File-provider end-to-end CLI smoke (examples/project/global-manager-command-cli-smoke.py, run_scenario("file")): json, markdown, --phase qualifying --limit 1, missing-registry error and unhealthy-status paths, snapshot unchanged.
integration passed test_real_cli_global_membership_failure_and_recovery now covers global-lifecycle for missing and unreadable global membership, local-vs-global denominators, and recovery to a whole global scope.
static passed python3 examples/docs-governance-smoke.py, python3 examples/project/global-manager-command-protocol-smoke.py, python3 examples/codex-app-host-command-registry-smoke.py; python3 -m loopx.cli check --scan-path over the new files reports a clean public boundary; git diff --check clean; commit is -s signed.
real_backend not_run SQLite provider and Windows filesystem not exercised locally. The board only reads the status dict, and the status path is unchanged, so no new backend behavior is introduced.
static not_run ruff is not installed in this environment.
  • Coverage and gaps: the changed paths are the pure aggregation module, the CLI wrapper and its registration, the docs entries and the smoke script. The aggregation is covered directly by unit tests over status payloads; the CLI wrapper is covered by parser tests, the summary-all dispatch test, the real membership test and the end-to-end file-provider smoke. The dashboard consumer and the host-slug catalog are out of scope. Lowered coverage: no Windows run, no SQLite run, no managed CI query, no ruff run.

Frontend / Visual Evidence

  • UI impact: none
  • Before: N/A (no UI change; CLI markdown/JSON text only)
  • After: N/A
  • First viewport and preview: N/A
  • States and viewports shown: N/A
  • Source data: none
  • Attention review: The board leads with the phase rollup and guard owners, which are the decision-bearing rows, then the bounded per-Goal list, then the gaps. Truncation, absent projections and unknown global membership are stated in the envelope line before any row, so an incomplete read cannot read as a healthy estate.
  • Craft review: N/A for a CLI-only change.

Type of Change

  • Feature
  • Fix
  • Docs
  • Tests

Checklist

  • I read CONTRIBUTING.md and the relevant protocol documents.
  • The change is read-only: it closes no Goal, resolves no guard, spends no quota and writes no state.
  • Public-safe output only; no paths, transcripts or credentials are published.
  • Commit message references the related issue with Refs #4128. and the commit is signed off.

@gcl-coder
gcl-coder force-pushed the codex/global-lifecycle-board branch 3 times, most recently from fb5886a to 6d18408 Compare November 27, 2026 02:55

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh

Exact head: 6d18408547f2fe2edad3ee36e01928bbd2b8ebfe

[P2] 指定 Agent 时只展示该 Agent 的 Goal

当前全局 registry 有三个 Goal,指定只注册于其中两个的 Agent,或输入未注册 Agent。 两个后端的正式 CLI 中,默认命令、指定注册在两个 Goal 的 Agent、指定未知 Agent 都退出 0 并返回相同三个 Goal。请求包也没有 agent_filter。 实行已注册 Agent 的精确筛选且在请求包中回显其作用域,或撤掉本切片未支持的 --agent-id。 实际 CLI fixture 分别核对同一 Goal 集合在无筛选、已注册及未知 Agent 时的返回范围和请求回显。 代码

[P2] 阶段筛选后页范围要和 envelope 一致

有三个非 closed Goal,执行 global-lifecycle --phase closed,显示上限没有裁掉任何匹配行。 两个后端在零个 closed Goal 时均返回 filtered_goal_count=0 与 summary.truncated=false;同一响应的 envelope 却为 shown=0、available=3、truncated=true。 用阶段筛选后、页截断前的行数给 envelope.available_count,继续使用全局成员数计算覆盖率与跨 Goal rollups。 组合零匹配以及有匹配但 limit 截断,再独立核对全局 coverage 与过滤后显示分页。 代码

动机 / Motivation

管理多个 Goal 的操作者需要在一处看到哪些工作已达里程碑、哪些卡在负责人,以及下一步。 原来要逐个查看 Goal 状态。新命令把现有状态汇到一张表,可以筛选要看的行。 不筛选时,真实 CLI 能在 File 和 SQLite 两种隔离环境汇总三个 Goal;按 Agent 筛选和按阶段显示的范围仍有两处错误。 本次交付的是 CLI JSON 和 Markdown;Dashboard 与宿主 slash 安装并未进入这次提案。

改动思路 / Approach

沿用 Status 已推导的 lifecycle 和 TypeScript 的 envelope 封装。Python 组装保留展示范围的因果边界,状态、权限和结算由原所有者管理。 本切片只需要已有 CLI 报告的筛选语义和覆盖语义一致。仪表板采用仍需单独验收。 一个 Status 读同时服务全局汇总与 Goal 行。全局覆盖的分母需要保留全局成员,展示分页的分母来自已经匹配筛选的行。使用现有协议的 Agent 范围可以让分诊始终对应实际注册。 范围合同 分页合同

具体改动 / Changes

13 个文件,+1745/-11。新增只读 board、CLI wrapper、help 与注册,更新协议并扩充现有 provider smoke。全局生命周期汇总已实装。Agent 范围和页显示范围未满足已接受的全局命令及 envelope 语义。Dashboard 消费仍待交付。规范基线 6915df67db6a8836df344a661f295006873a3ba8。 基线 RFC §4.1

关键代码讲解

  • build_global_lifecycle 执行一次 Status 读取,原 --agent-id 只传入 lane context,后续 board 仍遍历所有 lifecycle。 CLI
  • build_global_goal_lifecycle_board 汇总全部观察行并独立筛选要显示的阶段。分页之前已有 filtered_goal_count。 聚合
  • _envelope 把当前已返回的行与全局投影数交给 TypeScript kernel,导致零匹配也被标成截断。 显示范围

对主干的风险 / Risks

同一三 Goal fixture,真实 loopx global-lifecycle CLI 经 File/SQLite,依次运行无筛选、已注册/未知 Agent、空 phase、limit=1 并回读 fixture。 两个 provider 均复现以上结果,fixture 的可观察状态保持原样。默认回三行,真正 --limit 1 时应当截断。187 项定向测试通过,精确 diff whitespace 与 DCO 检查已完成。现有 Agent 测试能看到参数传递,仍需要断言实际 Goal 列表从三行缩到两行或零行。未查询托管 CI。

我的整体评价 / Verdict

按 Agent 分诊时混入其他 Goal;全局运维可能反复追查一个当前 Agent 无法处理的阻塞。 请求中的 Agent 条件悄悄失效;匹配结果为空时,同一份 JSON 对是否另有页面给出相反答案。 修复两个范围后可保留同一次 Status 读取和相同聚合。运行界面变化属于 CLI JSON/Markdown;未改动 Dashboard 渲染代码。 Windows 和 Dashboard 的实际使用体验尚未验证。

English verdict: REQUEST_CHANGES. The real CLI ignores its advertised Agent filter and reports a filtered empty page as truncated on both File and SQLite. Fix the selection and display-count semantics and cover both at the public CLI.

add_subcommand_format(lifecycle_parser)
_add_current_manager_flags(
lifecycle_parser,
agent_help="Registered agent id used to narrow the status read.",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 指定 Agent 时只展示该 Agent 的 Goal。两个后端的正式 CLI 中,默认命令、指定注册在两个 Goal 的 Agent、指定未知 Agent 都退出 0 并返回相同三个 Goal。请求包也没有 agent_filter。 实行已注册 Agent 的精确筛选且在请求包中回显其作用域,或撤掉本切片未支持的 --agent-id。

Comment thread loopx/cli_commands/global_lifecycle.py Outdated
"included_count": included,
"omitted": omitted,
"shown_count": summary.get("returned_goal_count"),
"available_count": (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 阶段筛选后页范围要和 envelope 一致。两个后端在零个 closed Goal 时均返回 filtered_goal_count=0 与 summary.truncated=false;同一响应的 envelope 却为 shown=0、available=3、truncated=true。 用阶段筛选后、页截断前的行数给 envelope.available_count,继续使用全局成员数计算覆盖率与跨 Goal rollups。

@gcl-coder
gcl-coder force-pushed the codex/global-lifecycle-board branch from 6d18408 to af31441 Compare November 27, 2026 09:38
@gcl-coder

Copy link
Copy Markdown
Contributor Author

已按两条 P2 修改,提交 af3144172(基于 06941016e,单提交,DCO 已签)。

[P2] 指定 Agent 时只展示该 Agent 的 Goal:--agent-id 现在按 Goal 记录的 coordination.registered_agents 名册做精确筛选,只列出注册了该身份的行;作用域同时回显在 request.agent_filter 与 summary.agent_filter。未注册的身份(包括名册形状不接受的输入)返回空页且 agent_scope_goal_count=0,不会退回全量。任意 8 个 Goal 名册里逐个找,不做前缀或模糊匹配。

[P2] 阶段筛选后页范围要和 envelope 一致:summary.filtered_goal_count 在 Agent 与 phase 双过滤之后、limit 之前计数,envelope 的 available_count 直接复用它,shown_count 仍是实际返回行数。因此零匹配的 --phase closed 是 shown=0/available=0/truncated=false,而真正被 limit 截断时仍是 truncated=true。全局覆盖率与 phases/guards/milestones rollup 继续按全局成员与全部被检查 Goal 计算。

真实 CLI(File provider,同一三 Goal fixture 的 registry 副本)验证:无筛选三行;只注册于两个 Goal 的 Agent 两行且 agent_filter 回显;未知 Agent 零行;--limit 1 截断为一行、available_count=2;--phase closed 组合下零行且不报截断。fixture 可观察状态前后不变。

定向测试:tests/test_global_lifecycle.py 23 项通过(新增 Agent 筛选、未知/不可用身份、双过滤分页、空 phase 页四个用例);test_projection_envelope、test_public_check_disclosure、test_cli_manual_visibility、test_top_level_module_budget 合计 106 项通过;public CLI smoke 的 File 场景端到端通过。SQLite smoke 在本机仍因 SQLite 3.49.1 未资格化而无法启动(与本次改动无关,干净基线同样失败)。托管 CI 未查询,已推送等待其运行。

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh

Exact head: af31441

动机 / Motivation

管理多个 Goal 的操作者需要一起看到阻塞、里程碑和下一步,并按注册 Agent 分诊。主干需要逐个查看 Goal 的 lifecycle。上一版的新命令会忽略 Agent 过滤,并把空阶段页标成截断。同一报告若扩大了筛选范围,操作者可能把其他 Goal 的进度、守卫或下一步归给当前 Agent。

在同一三 Goal fixture 上,普通 Agent 和阶段筛选已收窄显示范围。给已指定的 Agent 参数传空值,或两个合法 Goal ID 的前缀相同,返回页仍会越出请求的范围。现有 Status 汇总通过,普通注册 Agent 和空 phase 的两个既有反例通过。对应的缺省参数与显式无效参数、长 Goal 标识仍需保留身份差异。本提案交付 CLI JSON 和 Markdown。Dashboard 使用和宿主 slash 安装仍是后续工作,原 Status、Goal 和结算权限沿用现有所有者。 前次评审 · 维护者范围说明

改动思路 / Approach

一次 Status 读取给 lifecycle board 提供已推导字段,既有 TypeScript kernel 封装覆盖。保留全局 rollup 和 coverage,先按完整 Goal 标识与规范化 Agent 选择页面,再对展示文案压缩。 页面分页的 shown/available 已由同一对过滤后计数生成,全局成员保持独立分母。应把命令参数是否存在和机器身份保留到范围计算结束。 覆盖契约

具体改动 / Changes

固定基线 0694101,复核当前 af31441 的 13 份文件,+2039/-11。对照 RFC §4.1 的三项报告内容和原有只读边界。 基线 RFC

  • LIFECYCLE-ROLLUP。原 Status 的阶段、里程碑、守卫与下一步已进入 CLI 汇总。保留原 lifecycle 推导。 聚合
  • LIFECYCLE-PAGE。普通注册 Agent 从三行缩到所注册的行,未知 Agent 得到零行。空 closed 阶段的 shown/available 为 0/0,truncated=false。发布 smoke 的三 Goal、双注册与 limit 对照在 File 和 SQLite 均通过。 分页覆盖
  • LIFECYCLE-EXACT-SCOPE。普通 Agent 路径已修复。下列两个选择边界仍会返回不匹配的 Goal。 精确筛选文档

对主干的风险 / Risks

[P2] 显式空白 Agent 筛选返回未过滤的 Goal。 在两种真实 provider 上,显式空串和纯空白均退出 0、回显 agent_filter=[],返回未筛选的三个 Goal。普通未知 Agent 返回零行。保持是否传入筛选参数的独立判断。空串或纯空白应返回空页,或在 Status 读取前明确拒绝。 CLI 选择入口

[P2] 截断 Goal ID 导致 Agent 筛选混入其他 Goal。 File 与 SQLite 上,两项合法 Goal ID 在 120 字符显示压缩后重合,只有其中一项注册所选 Agent。response 的 agent_scope_goal_count=1,实际返回两个相同 Goal ID 的条目,shown_count=2。使用完整、已校验的 Goal ID 进行成员匹配、去重和 JSON 标识;展示可单独截断。 范围集合的标识

两组定向 pytest 分别通过 191 与 346 项。File 与 SQLite 的公开 CLI smoke、文档治理和协议 smoke 通过。Ruff 通过,两份新增生产模块的 strict mypy 在 lifecycle_board.py 的两处排序键报 3 个诊断。 两个反例均从公开 CLI 执行,隔离 registry、状态文件与现有 canonical 读取保持原样。Dashboard 与 Windows 路径未验证。按 Goal 配置未查询托管 CI。

我的整体评价 / Verdict

保留一次 Status 读取和现有 envelope,并补齐显式空 Agent、纯空白以及共用展示前缀的长 Goal ID。补测须断言实际 Goal 行及匹配前后计数,再复核精确提交。原有阶段过滤与普通 Agent 路径可沿用当前实现。

English verdict: REQUEST_CHANGES on exact head af31441. File and SQLite pass the regular Agent and filtered-pagination regressions. An explicit blank Agent broadens the page, and two supported long Goal IDs sharing a display prefix collide in the Agent-scoped list.

Comment thread loopx/cli_commands/global_lifecycle.py Outdated
agent_id: str | None = None,
) -> dict[str, Any]:
wanted = [str(phase) for phase in (phases or []) if phase]
requested_agent = _redact_text(agent_id, limit=120) if agent_id else None

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 显式空白 Agent 筛选返回未过滤的 Goal。 在两种真实 provider 上,显式空串和纯空白均退出 0、回显 agent_filter=[],返回未筛选的三个 Goal。普通未知 Agent 返回零行。保持是否传入筛选参数的独立判断。空串或纯空白应返回空页,或在 Status 读取前明确拒绝。同一真实三 Goal fixture 比较缺省、空串、纯空白与未知 Agent 的显示范围和请求回显。

normalize_registered_agents(agent_id) if agent_scope_requested else []
)
for goal in goals:
goal_id = _label(goal.get("id"), limit=120)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 截断 Goal ID 导致 Agent 筛选混入其他 Goal。 File 与 SQLite 上,两项合法 Goal ID 在 120 字符显示压缩后重合,只有其中一项注册所选 Agent。response 的 agent_scope_goal_count=1,实际返回两个相同 Goal ID 的条目,shown_count=2。使用完整、已校验的 Goal ID 进行成员匹配、去重和 JSON 标识;展示可单独截断。真实 CLI 用两个长 Goal ID 和不同 roster,断言 scoped 页只返回一项,并保留独立的精确 JSON ID 和汇总身份。

@gcl-coder
gcl-coder force-pushed the codex/global-lifecycle-board branch from af31441 to 521b73d Compare November 27, 2026 10:05
@gcl-coder

Copy link
Copy Markdown
Contributor Author

已按两条 P2 修改,提交 521b73df0(仍为单提交,DCO 已签,基线 06941016e 未变)。

[P2] 显式空白 Agent 筛选返回未过滤的 Goal:现在由参数是否存在决定是否上锁,不再看值是否真值。--agent-id "" 与纯空白都会得到空页:request.agent_filter == [""]、summary.agent_scope_requested=true、agent_scope_goal_count=0、filtered_goal_count=0,envelope shown/available=0/0、truncated=false。真正的「未传参」仍是 agent_filter=[] + agent_scope_requested=false 的全量读。未知 Agent 与名册形状不接受的输入一并走空页路径。

[P2] 截断 Goal ID 导致 Agent 筛选混入其他 Goal:引入 _identity(),只用完整、已通过公共边界校验的 Goal ID 做名册匹配、行去重、rollup 成员和 JSON 里的 goal_id;_label() 的 120 字符压缩只用于 Markdown 文案。两个共享 120 字符前缀的长 ID 现在是两行,agent_scope_goal_count=1 / filtered_goal_count=1 / shown=available=1,不会互相冒充。

顺带修掉评审提到的 strict mypy:guards_summary 与 milestones_summary 改为按自身 key(-len(blocked)、kind、owner / milestone_id)排序,不再对类型擦除的 dict 取负;_label、_redact_text、_envelope 的返回也显式标注。python3 -m mypy --strict --follow-imports=skip 对两个新增生产模块 no issues found。

验证:tests/test_global_lifecycle.py 25 项通过(新增「空串/纯空白上锁」「长 ID 共享展示前缀仍区分」两组);test_projection_envelope、test_public_check_disclosure、test_global_todos、test_global_risks、test_cli_manual_visibility、test_top_level_module_budget、test_summary_all 合计 223 项通过(8 个 SQLite 用例按 -k "not sqlite" 排除,本机 SQLite 3.49.1 未资格化,干净基线同样失败)。真实 CLI File 场景端到端通过,新增了 --agent-id "" 这一组断言,fixture 可观察状态不变。

原本计划在最终说明里提一句:Ruff 在本机未安装(No module named ruff),所以未能本地复现「Ruff 通过」,仅依赖仓库 premerge 任务。托管 CI 已推送,等待新 head 的结果。

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh

Exact head: 521b73df049a9d443405a86ab9b234f1fa65020f

[P2] 全局看板仍将非成员的历史计入当前汇总

在同一隔离 runtime 建立三个 Goal,随后从全局 registry 移除其中一个并保留其历史。File 和 SQLite 上,显式使用只有两条记录的全局 registry,或使用仍有三条的项目 registry,都会在明细和阶段汇总中看到已移除的 Goal。响应同时给出 expected_count=2, included_count=2, shown_count=3, omitted=[], complete=true。这会把已离开范围的 Goal 算作当前运营工作。聚合读取全部历史行,最后用数量上限修正 envelope,但无法证明这些行属于同一全局成员集合。请在聚合前绑定已登记的完整 Goal ID,并用同一集合计算覆盖。回归可沿用两种 provider,分别从全局及项目 registry 读取并断言行 ID、阶段汇总及覆盖。 聚合入口 · 覆盖计算

动机 / Motivation

管理多个 Goal 的操作者需要在一处发现阻塞、里程碑和下一步。基线需要逐个读状态,新命令一次就能列出这些信息,成员移出全局登记后仍会把其历史呈现为当前工作。预期是让汇总和每条明细都对应同一份全局成员清单。Dashboard、已安装的宿主 slash、Windows 和托管 CI 未验证。 基线 RFC §4.1

改动思路 / Approach

一次 Status 读取提供已有的生命周期和 Agent roster,TypeScript envelope 负责覆盖与分页。新提交保留完整 Goal ID 做匹配,并独立记录 Agent 参数是否给出。两名全局成员时,CLI 仍发布三条明细并将全局覆盖标记为完整。把已验证的全局成员 ID 交给聚合层,让明细、阶段汇总和覆盖都基于这份集合。原有生命周期推导和状态权限继续由各自所有者负责。 协议

具体改动 / Changes

基线为 06941016e224ccdc7c0298fd7a28acec65cf8a35。整份 PR 涉及 13 个文件,+2147/-11。本轮改动涉及五个文件,+144/-36,包含命令和聚合的身份处理、排序类型、协议和回归。公开 CLI 保留 JSON 与 Markdown 的终端入口,沿用现有只读权限。

  • 显式空串和纯空白的 Agent 参数均得到空页,shown=0, available=0, truncated=false。有效、未知和阶段分页结果仍与预期相符。 Agent 参数
  • 两个合法长 ID 共用超过 120 字符的前缀。File 和 SQLite 的未过滤页均保留两个完整 ID,选定 Agent 后只返回其登记的一条,汇总仍保留完整 ID。 完整身份

对主干的风险 / Risks

固定提交上,生命周期、覆盖契约、相邻全局命令和架构共 231 项测试通过,另有 7 项 CLI 入口测试通过。File/SQLite 的 manager smoke、两后端的长 ID 与成员差异反事实、Ruff 和两份生产模块的 strict mypy 均已本机验证。两种后端都能从当前成员减少但旧数据仍在的普通状态复现上面的范围问题,fixture 文件未变。显示页准确与否直接影响操作者把哪些阻塞和下一步归给全局工作。

我的整体评价 / Verdict

空 Agent 和长 Goal ID 的两项求改已解决。全局看板仍需按已登记的 Goal 集合生成汇总及覆盖,避免把同一 runtime 的旧 Goal 算作当前全局工作。保留一次 Status 读取和现有 envelope 即可修复。

English verdict: REQUEST_CHANGES. File and SQLite confirm the blank Agent and long Goal ID fixes. The board still includes a Goal outside the global registry and reports complete global coverage.

Aggregate the per-Goal goal_artifact_lifecycle_projection_v0 that status
already derives into one read-only board: phase rollup, guard owners with
the Goals they block, reached milestones, and the next transition per Goal.

The projection envelope keeps global scope: the denominator is global
membership, unprojected or unnamed Goals and Goals outside a bounded status
scan are named omissions, and the top-level complete verdict repeats the
envelope's answer so a partial scan cannot read as a whole estate.

The returned page is filtered, the rollups are not. `--agent-id` lists only
Goals whose recorded `coordination.registered_agents` roster registers that
exact identity, and the flag's presence arms the filter: an unknown identity,
one the roster shape rejects, and an explicitly blank value all return an
empty page instead of widening back to the estate. Goal ids are matched,
deduplicated and published as the complete validated identity so two long ids
sharing a display prefix stay distinct rows. The envelope sizes its page from
the filtered row count measured before the limit, so an empty phase filter is
an empty page while a real limit still reports truncation; coverage and the
cross-Goal rollups keep describing every inspected Goal.

Refs loopx-project#4128.

Signed-off-by: ChengLong GU <88359731+gcl-coder@users.noreply.github.com>
Retained run history for a Goal that already left the global registry no longer appears in the board rows, phase rollups or coverage. The registry health payload now publishes the complete membership so aggregation can filter on the same set, and an identity-less Goal still counts as an identity gap instead of disappearing. Refs loopx-project#4128.

Signed-off-by: ChengLong GU <88359731+gcl-coder@users.noreply.github.com>
@gcl-coder
gcl-coder force-pushed the codex/global-lifecycle-board branch from a95bdcb to be88454 Compare November 28, 2026 01:39

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh

[P2] 成员清单缺失或与分母矛盾时仍报告完整。 保持全局成员数为 2,将合成输入的成员清单移除,或保留与该分母冲突的三项清单。两例都发布三条明细,覆盖却为 expected=2, included=2, complete=true,且没有缺口记录。完整的两项清单对照返回两条。请在认定完整前验证清单与分母一致,缺证据时显示覆盖缺口。 成员证据

[P2] 默认 Status 输出随全局成员数扩展。 在隔离的 File 和 SQLite 数据中,一行 Goal 状态原先只附带有界的排除示例。现提交还附带全量成员字段,19 个合成成员时这一个字段携带全部 19 项。请仅在内部把完整成员集合交给看板,保持普通 Status 对其他调用者的有界输出。 共享 Status 生产者

动机 / Motivation

管理多个 Goal 的操作者需要知道当前哪些工作被阻塞,以及每项接下来可以做什么。原提交在两个成员的报告里保留已移除 Goal;现提交在真实 File 和 SQLite 中只返回两个当前成员。从全局 registry 或含历史成员的项目 registry 进入时,明细、阶段和覆盖计数均得到相同的两个成员。实际入口验证 CLI JSON 和两种本地后端。Dashboard 和安装后的原生入口仍待交付,托管 CI 未验证。

改动思路 / Approach

全局 registry 持有成员身份,Status 持有每个 Goal 的生命周期,聚合层只基于观察生成只读报告。让新的看板使用 registry 的内部成员事实并复用既有覆盖协议,可避免改变独立的默认 Status 输出。覆盖使用同一份可验证成员依据,页面大小仍由命令控制。

具体改动 / Changes

提交 be88454b728cd9d2424d6774c066dac4c43d3844 相对基线 63c7c487410827cd3b846fc47ef818d3800b9c06 为 14 文件增加 2349 行、删除 11 行。相对先前评审,成员绑定相关改动约 5 文件。评审期间基线前移,所有结果均在新头复验。RFC 的跨 Goal 操作台要求仍以原协议验收,本提交范围是新 CLI 报告。 RFC §4.1

关键代码讲解

  • build_global_goal_lifecycle_board 的 global-member-binding 通过。保留被移除 Goal 的历史后,两种存储的两条入口都按当前成员汇总。
  • _global_member_ids 与 _envelope 的 missing-membership 仍缺证据。清单缺少或冲突时,覆盖分母限制了计入数,明细却仍保留额外内容。
  • collect_global_registry_health 的 bounded-status-default 出现新行为。完整集合加入共享 Status 响应,未调用新看板也会携带该列表。dashboard-consumer 仍待接入。

对主干的风险 / Risks

196 项定向测试、7 项 CLI 测试及差异检查通过。实际 CLI 验证了旧成员排除与 Status 字段扩展。缺失和矛盾成员数据的反例由合成输入驱动,使用现有覆盖构造入口,正常生产者仍提供完整列表。应在两个后端用相同成员变更重验行、阶段与覆盖。

语义与 CI 对齐

现有状态机和只读权限继续沿用。回归同时检查正常成员变更、无法证实的成员覆盖,以及普通 Status 默认字段范围,避免其他读取方承担新报告的明细成本。

我的整体评价 / Verdict

REQUEST_CHANGES。 正常成员过滤已修,并且两个后端均有真实入口证据。请补齐成员证据异常时的覆盖判定,并保持现有 Status 投影的字段边界。Dashboard 交付仍独立保留。

English verdict: REQUEST_CHANGES at be88454. Normal membership filtering works. Missing or inconsistent membership still yields false completeness, and ordinary Status now carries the entire membership list.

This branch has not been deployed

No deployments
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.

2 participants