Skip to content

docs(rfc-2251): add coordinator task-bounds measurement harness - #2254

Merged
hongmingwang-moleculeai merged 1 commit into
stagingfrom
docs/rfc-2251-issue-4-repro-harness
Apr 29, 2026
Merged

hongmingwang-moleculeai merged 1 commit into
stagingfrom
docs/rfc-2251-issue-4-repro-harness

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Closes follow-up #1 from my review on issue #2251: the RFC's V1.0 plan was built on Issue 4's hypothesized synthesis-phase hang, but Issue 4 was never reproduced. This adds the measurement harness that lets the team produce empirical evidence before the V1.0 implementation starts.

What this is

A bash script that drives a real coordinator workspace through a synthesis-heavy A2A task and outputs structured measurement data (one JSON event per phase). The script's header has the full interpretation guide.

Setup:    coordinator (PM, claude-code-default) + 1 child (Researcher, langgraph)
Task:     SYNTHESIS_DEPTH=3 sequential delegations + 600-word post-synthesis
Outputs:  per-phase timestamps, total elapsed, heartbeat trace

What this is NOT

  • Not a pass/fail CI test. Issue 4's claim is "absence of platform-side bound" — hard to assert in a single run. The harness outputs data; the team interprets.
  • Not auto-cleaning. Use scripts/cleanup-rogue-workspaces.sh after.
  • Not invoked by CI. Manual run against staging or local platform.

Interpretation guide (also in script header)

Elapsed Meaning
< 60s Not informative (LLM was just fast). Re-run with SYNTHESIS_DEPTH=8.
60–300s Ambiguous — within DELEGATION_TIMEOUT.
≥ 300s, no heartbeat transitions BUG CONFIRMED. Coordinator ran past HTTP timeout with no platform ceiling firing — exactly the gap RFC V1.0 plans to close.
curl_failed_or_timed_out Coordinator hung past A2A_TIMEOUT (default 600s) or extreme slow. Query workspace status to disambiguate.

Usage

PLATFORM=https://your-staging-tenant.example \
OPENROUTER_API_KEY=... \
  bash scripts/measure-coordinator-task-bounds.sh

Test plan

🤖 Generated with Claude Code

Adds a reproduction harness for Issue 4 of the 2026-04-28 CP review,
referenced in RFC molecule-core#2251. The RFC review (issue #2251
comment) flagged that Issue 4 was hypothesized but not reproduced
before V1.0 implementation begins — this script closes that gap.

What it does:
  - Provisions a coordinator (PM, claude-code-default) + 1 child
    (Researcher, langgraph) via the platform API.
  - Sends an A2A kickoff with a synthesis-heavy task that requires
    SYNTHESIS_DEPTH (default 3) sequential delegations followed by a
    600-word post-delegation synthesis.
  - Times the coordinator's full A2A round-trip with millisecond
    precision and emits one JSON event per phase (machine-readable).
  - Pulls the coordinator's heartbeat trace post-run so the team can
    see whether any platform-side state transition fired during the
    long synthesis (the V1.0 RFC's MAX_TASK_EXECUTION_SECS would
    surface as such a transition; absence of one in this trace
    confirms the RFC's premise).

Why a measurement harness, not a pass/fail test:
  Issue 4's claim is "absence of platform-side bound", which is hard
  to assert in a single CI run. Outputting structured measurement
  data lets the team interpret across multiple runs / staging vs
  prod / different SYNTHESIS_DEPTH values rather than relying on one
  reproduction snapshot.

The script's header has the full interpretation guide:
  - ELAPSED < 60s     → not informative (LLM was just fast)
  - 60–300s           → within DELEGATION_TIMEOUT, ambiguous
  - >= 300s without trace transitions → BUG CONFIRMED
  - curl_failed       → coordinator hung past A2A_TIMEOUT or genuinely
                        slow (disambiguate by querying status separately)

Doesn't run in CI by default — invoked manually against staging or a
local platform with PLATFORM=... and OPENROUTER_API_KEY=... env vars.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged via the queue into staging with commit daea276 Apr 29, 2026
20 checks passed
HongmingWang-Rabbit pushed a commit that referenced this pull request Apr 29, 2026
Two docs covering load-bearing patterns from today's work that
weren't previously discoverable:

1. workspace/platform_tools/README.md — explains the ToolSpec
   single-source-of-truth pattern (#2240), the CLI-block alignment
   gap that hand-maintained generation can't close (#2258), the
   snapshot golden files + LF-pinning (#2260), and the add/rename/
   remove playbook. The next reader who lands in
   workspace/platform_tools/ now has the design rationale + the
   safe-edit procedure colocated with the code.

2. scripts/README.md — disambiguates the three measure-coordinator-
   task-bounds.sh files that now exist across two repos:

     - scripts/measure-coordinator-task-bounds.sh        (canonical OSS, this repo)
     - scripts/measure-coordinator-task-bounds-runner.sh (Hermes/MiniMax variant, this repo)
     - scripts/measure-coordinator-task-bounds.sh        (production-shape, in molecule-controlplane)

   Cross-references reference_harness_pair_pattern (auto-memory) for
   the cross-repo design rationale. Documents the common safety
   pattern (cleanup trap, DRY_RUN, non-target guard,
   cleanup_*_failed events) and the heartbeat-trace caveat.

Refs: #2240, #2254, #2257, #2258, #2259, #2260; molecule-controlplane#321.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant