Skip to content

feat(walkthrough): add observable artifact handle poll walkthrough sm… - #3133

Open
rootkiller6788 wants to merge 5 commits into
huangruiteng:mainfrom
rootkiller6788:feat/gh-c50-observable-artifact-handle-poll
Open

feat(walkthrough): add observable artifact handle poll walkthrough sm…#3133
rootkiller6788 wants to merge 5 commits into
huangruiteng:mainfrom
rootkiller6788:feat/gh-c50-observable-artifact-handle-poll

Conversation

@rootkiller6788

Copy link
Copy Markdown
Contributor

…oke (GH-C50)

Provider-neutral poll cycle that reads a compact handle, simulates the allowed poll command, and stops at a terminal marker — without assuming a benchmark, CI, deployment, or ML adapter.

Scenarios:

  • Build a compact launch handle with read boundary and poll command
  • Running snapshot: policy says poll_observable_handle
  • Completed snapshot: policy detects terminal closeout (scored)
  • Failed snapshot: policy detects compact failure closeout
  • Missing handle directory: write blocker, don't poll
  • Full poll cycle: launch -> poll*2 -> terminal stop
  • No specific adapter assumptions (4 scheduler kinds, non-benchmark artifact shapes)
  • Public safety across 4 snapshot types
  • Terminal marker state enumeration (5 distinct states: running, not_started, scored, failure_attribution, missing)

Summary

Issue Or Task

  • Closes #
  • Contributor task ID:

Validation

  • python3 -m py_compile loopx/*.py
  • loopx check --scan-root .
  • Other:

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring (no functional changes)
  • Documentation update
  • Test update

LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)
  • Benchmark boundary (adapters, runners, verifiers, scoring, evidence)
  • Capability or extension (providers, adapters, skills)
  • Public docs or presentation surface (README, protocols, dashboard)
  • Build, packaging, installer, or CI
  • Host or runtime integration

Boundary Checklist

  • I did not commit .loopx/, .codex/goals/, live ACTIVE_GOAL_STATE.md, credentials, private benchmark traces, verifier output, raw agent sessions, internal document links, or local machine paths.
  • I did not duplicate maintainer-owned benchmark work unless a maintainer split out a public issue for it.
  • I kept the change scoped to the linked issue/task.

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

详细中文评审

精确评审头: 3133@0cf7a42280d9f08457d6c19ceb2e8000a579ca22

动机

本 PR 对应 CONTRIBUTOR_TASKS 中 GH-C50 的后继切片:为 observable artifact handle 提供一个 provider-neutral 的 poll walkthrough smoke——读取一个紧凑 handle、模拟允许的 poll 命令输出、在 terminal marker 处停止,并且不假设 benchmark、CI、deployment 或 ML adapter。仓库当前已合并 loopx.benchmark_core.observable_handles(exact head 上存在该模块),本 smoke 基于这套已发布代码做合成快照演示,为贡献者提供一条可运行、可离线验证的读路径参考。

改动思路

单文件 545 行,9 个 scenario:构建 launch handle(校验 schema/read boundary/raw 不记录/public safety);running 快照→policy 继续 poll;completed 快照→terminal closeout(scored);failed 快照→failure closeout;missing 目录→写 blocker 不 poll;完整 poll 循环(launch→poll×2→terminal 停止);4 种 scheduler kind 与自定义 artifact shape 的无 adapter 假设验证;4 类快照的 public safety;5 种 terminal/非 terminal 状态枚举。所有快照都是合成数据,不启动真实进程,确定性、可离线运行。

具体改动

新增 examples/observable-artifact-handle-poll-walkthrough-smoke.py(+545),无运行时代码改动。

关键内容讲解

  • scenario_build_launch_handle:验证 BENCHMARK_LAUNCH_OBSERVABLE_HANDLE_SCHEMA_VERSIONmonitor_poll_allowedraw_handle_payload_recorded=Falseargv_recorded/raw_command_recorded=Falseread_boundary.compact_only=True,并做 public-safety 断言。
  • scenario_running_poll_cycle / completed / failed / missing:分别断言 next_actionpoll_observable_handledisable_one_shot_scheduler_label_and_ingest_compact_closeoutwrite_missing_run_directory_blocker)、terminal_closeoutcleanup_requiredobservable_handle.state 转换。
  • scenario_full_poll_cycle:完整走 launch → poll_1 → poll_2 → poll_3 terminal,验证循环在 terminal marker 处停止。
  • scenario_no_specific_adapter_assumptions:4 种 scheduler kind(manual/systemd/launchd/custom-cron)+ 非 CI/ML 的 artifact shape 均可被 policy 处理。
  • scenario_terminal_marker_states:枚举 not_started、running、scored、failure_attribution、missing 五种状态及对应 terminal/next_action。

对主干的风险

风险低。纯 examples smoke,无运行时/权限/数据面行为变化;依赖的 loopx.benchmark_core.observable_handles 在 exact head 上存在;合成数据无网络与真实进程依赖;loopx check --scan-path public boundary 扫描干净。一点说明(非阻塞):PR 标题标注 GH-C50,但当前 smoke 使用的是已合并的 benchmark observable handles,而不是尚未合并的 #3080 通用 observable_artifact_handle;待 #3080 合并后可将 walkthrough 扩展到通用 handle 或明确命名边界。GitHub CI 中 pytest 仍在 IN_PROGRESS,dependency-review SUCCESS;本地已通过 smoke、py_compile 与 public-boundary 检查,发布前 head 未变。

我的整体评价

APPROVE。 这是一个自包含、确定性、公开安全的 walkthrough smoke,覆盖正向/负向路径、完整 poll 生命周期与状态枚举,符合 GH-C50 后继任务的 provider-neutral 要求,本地验证全绿,无阻塞项。


English Verdict

APPROVE — exact head 0cf7a42280d9f08457d6c19ceb2e8000a579ca22.

Single-file deterministic walkthrough smoke for provider-neutral observable-handle polling, using the shipped benchmark observable handles. Covers launch, running/completed/failed/missing snapshots, a full poll cycle, no adapter assumptions, terminal-state enumeration, and public safety. Verified at the exact head: smoke passes, py_compile passes, public-boundary scan clean. GitHub pytest still in progress; other checks green. No blockers. P2 only: the title references GH-C50's generic handle while exercising the merged benchmark handles; extend to the generic handle after #3080 merges.

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Corrected review under durable_smoke_value gate (supersedes earlier APPROVE)

详细中文评审(修正版)

精确评审头: 3133@0cf7a42280d9f08457d6c19ceb2e8000a579ca22

动机

本 PR 为单一 examples/observable-artifact-handle-poll-walkthrough-smoke.py(+545 行),用合成快照演示已合并的 benchmark observable handles 的 poll/terminal 语义。按新的 durable_smoke_value 评审门槛,例程类 PR 必须证明对仓库/产品的真实、持久价值;“能跑、确定性、public-safe”只是必要条件,不是充分条件。本 PR 目前不满足该门槛。

改动思路

作者用 9 个 scenario 覆盖 launch/running/completed/failed/missing、完整 poll 循环、无 adapter 假设、public safety 与 5 种 terminal 状态,全部为合成数据、无真实进程。作为“演示”它是自洽的,但作为“仓库价值”它是 545 行只读脚手架:没有把核心断言收敛为可复用的 focused test,也没有接入任何生产调用方。

具体改动(关键内容讲解)

  • shipped_behavior_or_boundary_guarded:唯一被守护的是 loopx.benchmark_core.observable_handles 的 policy 语义。全仓 tests/ 无任何引用该 policy 的测试,examples/ 只有本文件——即它确实是当前唯一覆盖点,这一点有正面价值。
  • existing_coverage_scanrg -l 'build_benchmark_observable_handle_policy|observable_handles' tests examples 仅命中本文件;但同一作者已有 11 个同构 walkthrough PR(#3113#3120#3130/#3131),本文件的形状与它们完全平行,属于“同模式堆叠”而非“差异化覆盖”。
  • same_author_batch_scan#3130(805 行)、#3131(585 行)、#3133(545 行)由同一作者在 2 分钟内(11:18:14/11:18:19/11:20:10)连续提交,全部为单文件 examples-only smoke;#3132 8 秒即被合并。这是典型的批量刷 PR 信号。
  • real_product_or_repo_value_verdict:把 545 行演示压成一个 focused pytest(如 tests/ 下覆盖 running/completed/failed/missing 四态断言)价值更高、更持久;以“walkthrough smoke”形态单独开 3 个 PR,对仓库是脚手架噪音。

对主干的风险

风险不在于代码本身(example-only、public-safe、可运行),而在于模式:同作者以每分钟一个的速度堆叠同形状 walkthrough PR,稀释评审队列、抬高维护成本,并让真正需要审阅的 runtime 改动被淹没。若照此放行,队列里的 #3130/#3131 及后续同类 PR 都会被模板化放行。

我的整体评价

REQUEST_CHANGES(修正此前 APPROVE)。 修复建议(择一):(1) 将本 smoke 收敛为 thin focused pytest,放进 tests/ 并只保留 policy 四态 + terminal 断言;(2) 若坚持 walkthrough,与 #3130/#3131 合并为一个有明确差异化价值的 walkthrough,并删除重复 scaffolding;(3) 至少证明该文件守护的是真实生产边界而非“演示已有行为”。本队列中同类同作者批量 PR 在满足上述要求前不应逐个放行。


English Verdict

REQUEST_CHANGES — exact head 0cf7a42280d9f08457d6c19ceb2e8000a579ca22 (corrected verdict; supersedes the earlier APPROVE).

Under the new durable_smoke_value gate, this 545-line example-only walkthrough does not prove real, durable value to the repository or product. It is the only coverage of the benchmark observable-handles policy, so the finding is not "delete it" but "make it thin and durable": collapse the assertions into a focused pytest, or consolidate this with the author's two other same-shape walkthrough PRs (#3130/#3131, opened within 2 minutes) into one differentiated artifact. Same-author batch submission of near-identical example-only PRs is itself a blocking quality signal. No product behavior changes.

@huangruiteng

Copy link
Copy Markdown
Owner

贡献行为警告(正式)

按新的 durable_smoke_value 评审门槛(PR #3134),本次 #3133 已给出 REQUEST_CHANGES

明确后果:如果同一作者在本警告后再提交此类低价值、同形状的 example/walkthrough/smoke PR(例如 2 分钟内连续提交 3 个 500+ 行纯示例脚本,或继续堆叠与已有 smoke 重复的 walkthrough),将禁止该账号继续向本仓库提交 PR(由 owner 通过 GitHub 账号屏蔽或协作者权限移除执行)。

这不是第一次提示:此前 #3113#3120 已是一整串同模式 walkthrough。请在重开/新提交前先满足收敛要求(thin pytest 或合并为一个有差异化价值的 PR),否则后续 PR 将按上述政策处理。


Contribution Warning

Under the new durable_smoke_value gate (PR #3134), this PR is now REQUEST_CHANGES.

Explicit consequence: if the same author submits more low-value, same-shape example/walkthrough/smoke PRs after this warning, the account will be blocked from submitting further PRs to this repository (enforced by the owner via GitHub account blocking or collaborator removal). Consolidate into thin tests or one differentiated PR before re-submitting.

@rootkiller6788

Copy link
Copy Markdown
Contributor Author

Fully understood and compliant with the new durable_smoke_value gate, and I acknowledge the batch submission pattern issue.
I agree that stacking independent large example-only walkthroughs creates maintenance noise and dilutes review bandwidth.
I will fix this with the consolidation + thin durable test approach:
I will merge #3130, #3131, #3133 into one unified differentiated walkthrough suite with deduplicated scaffolding, clearly separated by host parity / skill delivery / observable poll domains.
I will extract all core policy/state/boundary assertions into thin focused pytest cases under tests/ to provide durable long-term coverage for the observable handle policy, scheduler behavior, and host/skill contract boundaries.
The remaining example walkthrough will serve only as high-level demonstration material without redundant test logic.
Moving forward, I will no longer submit batch isolated example smoke PRs and will strictly follow the new durable smoke standards to avoid repository noise.
Thank you for the clear guidance.

@rootkiller6788

Copy link
Copy Markdown
Contributor Author

@huangruiteng
In compliance with the durable_smoke_value gate requirements, unique assertions from all walkthrough branches have been extracted into 10 thin pytest files and consolidated into this PR:
File Source GH Task Number of Tests
test_observable_handle_poll_policy.py GH-C50 10
test_host_parity_smoke.py GH-C60 35
test_auto_research_control.py GH-C43 7
test_explore_presentation_views.py GH-C69 11
test_turn_loop_disposition.py GH-C70 21
test_reward_memory_pipeline.py GH-C71 15
test_decision_context_material.py GH-C74 12
test_content_ops_lifecycle.py GH-C78 17
test_skill_delivery_parity.py GH-C79 19
test_pr_program_snapshot.py GH-C81 11
Total: 158 thin pytest cases, zero failures.
All files are assertion-only (no disk writes, no state mutation) and include public_safe scanning. Original walkthrough branches (C43/C69/C70/C71/C74/C78/C81) have been deleted locally and remotely; the corresponding standalone PRs will be closed manually shortly.

GH-C43 auto_research_control (7 tests)
GH-C69 explore_presentation_views (11 tests)
GH-C70 turn_loop_disposition (21 tests)
GH-C71 reward_memory_pipeline (15 tests)
GH-C74 decision_context_material (12 tests)
GH-C78 content_ops_lifecycle (17 tests)
GH-C81 pr_program_snapshot (11 tests)

Total: 158 thin pytest tests across 10 files, 0 failures.
- Move importlib.util to top of module (test_pr_program_snapshot.py)
- Remove unused import pytest (test_turn_loop_disposition.py)
@rootkiller6788
rootkiller6788 force-pushed the feat/gh-c50-observable-artifact-handle-poll branch from 5bc3fd7 to db6f705 Compare August 12, 2026 13:26

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

详细中文评审(新 head 复审)

精确评审头: 3133@db6f7057a3129e3ead6d2d17adb9849c0ccf9bd5

动机

作者在收到 durable_smoke_value REQUEST_CHANGES 后重构了本 PR:关闭 10 个 walkthrough PR,并把整批内容收敛为 10 个 thin pytest 文件(+2718 行,纯 tests)。这正是评审要求的“thin focused tests”方向。

改动思路

新 head 删除全部 examples 脚手架,改为 tests/test_* 下的聚焦断言:auto_research_control、content_ops_lifecycle、decision_context_material、explore_owner_board_views、host_parity、observable_handle_poll_policy、pr_program_snapshot、reward_memory_pipeline、skill_delivery_parity、turn_loop_disposition。同时保留 main 原有的 test_explore_presentation_views.py(37 项测试未被覆盖或改名破坏)。

具体改动(关键内容讲解)

  • 收敛质量:10 个文件 116–413 行,按行为域拆分,无 500+ 行示例脚手架;全部直接断言真实模块语义。
  • 保留既有覆盖tests/test_explore_presentation_views.py 原样保留,本 PR 仅新增,不覆盖/改名删除(commit 明确 restore 35→37 项测试)。
  • public safety:文件中的 /Users/... 均为正则黑名单模式,非真实路径;无凭据/本地路径。

对主干的风险

低。纯测试新增,无运行时行为变化;exact head 上 10 个新测试文件 158 项全部通过,main 原有 explore views 37 项通过;public boundary 干净。

我的整体评价

APPROVE。 作者按 CR 完成了从 example-only walkthrough 到 thin pytest 的收敛,同时关闭了 10 个重复 PR,符合 durable_smoke_value 门槛;无阻塞项。


English Verdict

APPROVE — exact head db6f7057a3129e3ead6d2d17adb9849c0ccf9bd5.

The author addressed the durable_smoke_value REQUEST_CHANGES by closing the 10 walkthrough PRs and consolidating them into 10 focused thin pytest files (+2718 lines, tests only). Main's existing test_explore_presentation_views.py is preserved (37 tests pass); all 158 new tests pass at the exact head; public-boundary scan clean. No blockers.

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