Skip to content

fix(mcp): name the Ticket remainder that lowered a run's cap - #1244

Merged
Birfy merged 6 commits into
mainfrom
agent/1241-ticket-remainder
Nov 24, 2026
Merged

Birfy merged 6 commits into
mainfrom
agent/1241-ticket-remainder

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #1241.

What changed

start() launches the child with min(caller, remaining), so when an operator Ticket's remainder is what lowered the number the run starts below the ceiling. _clamped_max_calls only labelled a run whose applied value equals the ceiling, so that run printed the bare max_calls: 1 call(s) made, cap 1 — byte-identical to a caller who asked for 1 — while the reply said source: AGENTDESCENT_MAX_CALLS.

  • runstore.py: AGENTDESCENT_MAX_CALLS_REMAINDER carries the applied remainder across the detach boundary, and _clamped_max_calls labels on it when it is below the ceiling and is the number the child was given. Label only — nothing enforced moves.
  • mcp.py: _ticket_env writes that remainder when the applied number is the Ticket remainder — the start path and the external resume — alongside the requested value it already carried. A registered resume of a run this server started applies prior + remaining, so it never equals the remainder and still prints bare against a reply that says the ceiling bound it: that is #1247, not this PR.
  • tests/test_mcp_ticket_remainder_label.py: twelve tests — the four original rows (remainder with a caller cap, the caller-capped control, the caller-named-none remainder, the unchanged enforced number / Ticket spend), the two inherited-pair shapes with their 5/5 control, the run-scoped marker row in both directions (scoped from a remainder launch, absent from a non-clamped one), and the descendant row.
  • changelog.d/1241-ticket-remainder-label.md.

Acceptance rows: (1) the remainder names the ceiling and still reports cap 1; (2) the caller-capped control stays bare (ceiling 5, spent 1, caller asks 1); (3) a caller that names no cap on a spent Ticket names the ceiling too; (4) enforced numbers and reply.call_limit are unchanged; (5) tests/test_operator_run_cap.py and tests/test_mcp_ticket_cap.py pass without edits to their assertions.

Complementarity with #1242, verified at this tip rather than assumed: an unreadable ledger already refuses before any remainder is granted — _ticket_spent turns it into run … cannot be accounted: its status cannot be read …. #1242 makes the read raise RunStoreError, which _ticket_spent catches alongside ValueError, so the two do not fight.

Verification — round 1 evidence (red at b4647375, green at dd5f2828)

Tip SHA: 2f52c4a
Ran:

  • red first, at b4647375, same test file → 2 failed, 2 passed in 13.04s (…the_remainder_that_lowered_the_cap_is_named, …a_caller_that_names_no_cap_is_still_labelled_by_the_remainder; the control and the spend row pass).
  • pytest tests/test_mcp_ticket_remainder_label.py tests/test_mcp_ticket_cap.py tests/test_operator_run_cap.py -o addopts="" -q → 32 passed; the new file alone → 4 passed.
  • pytest tests/test_mcp.py tests/test_mcp_call_limit.py tests/test_mcp_plan_probe.py tests/test_mcp_meta.py tests/test_resume.py tests/test_resume_solved_run.py tests/test_resume_quota_exhausted.py tests/test_resume_round_numbering.py tests/test_runstore_cli.py tests/test_runstore_tilde.py -o addopts="" -q → 141 passed, 6 skipped.
  • pytest tests/test_resume_host_cli.py tests/test_diagnose.py -o addopts="" -q → 31 passed.
  • python3 -m tools.gen_api_docs --check → docs/api.md is up to date.
  • python3 -m tools.changelog_fragments check → 30 changelog fragment(s) OK.
    Not run:
  • full pytest -q — CI runs it on 3.9–3.13; the files above are the ones this change touches.
  • mkdocs build --strict — no docs/ or mkdocs.yml change.

Labels: agent-pr, bug, area:plugins.

Written-by: AgentDescent Dev-2
Bot: AgentDescent Dev-2

Round 2 — the inherited marker (same PR, head dd5f2828)

The remainder variable is inherited, not scoped: a process that was itself launched below its ceiling passes that number to every later child, so a caller who legitimately asked for exactly that number was labelled ceiling-clamped. runstore.launch now drops the value after the scrub and restores it only from the env this launch was given, and _clamped_max_calls additionally requires the parent recorded request — a matching number alone is no longer enough.

Red before this round, at b41a1a99 with the extended file: 3 failed, 4 passed in 15.79s (test_an_inherited_remainder_cannot_label_a_caller_capped_run, test_a_stale_remainder_cannot_label_a_foreground_run, test_launch_drops_an_inherited_remainder_from_the_child_environment).

Green at the new tip (dd5f2828): pytest tests/test_mcp_ticket_remainder_label.py tests/test_mcp_ticket_cap.py tests/test_operator_run_cap.py tests/test_resume_host_cli.py tests/test_runstore_cli.py tests/test_diagnose.py -o addopts="" -q → 117 passed, 9 warnings in 71.75s.

Round-1 evidence stays as recorded above: red at b4647375 → 2 failed, 2 passed in 13.04s; that base is still main.

Round 4 — the marker names the run (same PR, head bd4c062d)

Round 3's boolean handoff was inherited too: scrub_host_env keeps AGENTDESCENT_*, so a genuinely remainder-launched run passed it to every descendant and a descendant's execute still labelled. The marker now carries the identity of the run it was applied to: launch writes AGENTDESCENT_MAX_CALLS_REMAINDER = "<run id>:<n>", and _remainder_calls(run_id) accepts only a value whose prefix is the run being clamped. execute and launch both pass rd.run_id, execute no longer mutates os.environ, and there is no fourth variable.

Red at 3c6d415b with the extended file: 3 failed, 9 passed in 15.70s — test_a_launch_scopes_the_remainder_to_the_run_it_starts (assert '2' == '20261123-233422-8e4c28:2'), test_a_descendant_cannot_inherit_its_ancestors_handoff, test_an_inherited_marker_cannot_label_through_a_boolean_handoff (E AssertionError: max_calls (AGENTDESCENT_MAX_CALLS): 1 call(s) made, cap 1).

Green at bd4c062d: the file alone 12 passed in 17.03s; the six affected files 122 passed, 9 warnings in 74.17s. tests/test_operator_run_cap.py and tests/test_mcp_ticket_cap.py remain unedited (git status shows only runstore.py and the new test file). python3 -m tools.gen_api_docs --check -> docs/api.md is up to date; python3 -m tools.changelog_fragments check -> 30 changelog fragment(s) OK.

One row was dropped, not weakened: the one that set the marker with no REQUESTED describes a state mcp.py:721 cannot produce (it always writes REQUESTED first), so the reachable pair carries the same assertion.

Round 5 — CI caught an ordering regression (same PR, head a282a6a4)

CI at bd4c062d went red on the test legs, all five with one test, verbatim:
FAILED tests/test_max_usd_refusal_hint.py::test_a_python_caller_is_told_to_set_the_field_not_a_flag - AttributeError: 'PosixPath' object has no attribute 'run_id' (run 45286209556, all five test legs, jobs 138083077246/…077600/…077640/…077731/…077777).

That is this PR's regression, not a flake: launch read rd.run_id at the top, before build_call_limit had refused a max_usd with no usd_per_call, and that row calls runstore.launch(store, max_usd=1.0) with only a path on purpose — #1196 pins that the refusal precedes any store write, which is what makes "nothing was created" assertable. The refusal now runs first and the clamp, the only thing that needs the run's identity, runs after it. build_call_limit is validation only on that line (the applied value is the clamped one), and round 6 below narrows that line so the caller's number is never validated in place of the clamped one.

Green at a282a6a4d9bf42a921e8fe140403e276baee215f: the nine affected files 162 passed; the wider launch-adjacent set (test_mcp*, test_resume*, test_runstore_tilde, test_dsh_superagent_run, the two cap files, test_max_usd_refusal_hint) 136 passed, 10 skipped; python3 -m tools.gen_api_docs --check -> docs/api.md is up to date; python3 -m tools.changelog_fragments check -> 30 changelog fragment(s) OK. tests/test_operator_run_cap.py and tests/test_mcp_ticket_cap.py are still byte-identical to b4647375 (blobs a58866f3… / 283cd0d1…), and this commit touches runstore.py alone.

Round 6 — the round-5 order was wider than the fix (same PR, head 2f52c4a9)

Reviewer and Test both measured at a282a6a4 a second consequence of validating the caller's number instead of the clamped one, and it is not one this PR needs to carry: at a ceiling of 3, base started launch(max_calls=float("inf")) with --max-calls 3, while a282a6a4 raised a raw OverflowError: cannot convert float infinity to integer — _cap_value runs int(value) at evolvespec.py:1107, before the isfinite check at :1110. 3.5 and Decimal("3.5") likewise started at base and were refused at a282a6a4. A traceback on a refusal path is a worse failure mode than the silent clamp it replaced, and nothing in the repo passes a non-integer cap (--max-calls is type=int at cli.py:6364/6384; MCP pre-validates in build_call_limit), so the order is narrowed to what #1196 actually pins:

require_budget_pair -> build_call_limit(max_usd=, usd_per_call=) (the money pair alone, because the max_usd needs usd_per_call message is raised there and nowhere earlier) -> _clamped_max_calls(max_calls, rd.run_id) -> build_call_limit(max_calls=<clamped>, ...), all inside the one SpecError -> RunStoreError conversion.

execute has had that order since base (b4647375: :921 require_budget_pair -> :922 clamp -> :933 build_call_limit(<clamped>)); #1241 is what made the clamp need the run's identity, so this is launch being moved onto the order execute already had, not a new rule. Behaviour against b4647375 is equal on every input measured — 3.5, Decimal("3.5") and float("inf") start with --max-calls 3 again, the 5 control is unchanged, and the diff against a282a6a4 is agentdescent/runstore.py alone, +7/-5.

Evidence at 2f52c4a9: the six affected files 105 passed, 9 warnings in 72.78s.

One delta class remains, measured on a 1440-cell matrix (5 ceilings x 9 caps x 4 max_usd x 4 usd_per_call x 2 budget_usd): 0 started/refused flips and 0 applied-number changes, but when an invalid money pair arrives together with an invalid cap input, or with a malformed ambient ceiling, the refusal now reports the money pair where base reported the cap. Nothing pinned depends on which of two refusals is named, no run is accepted or rejected differently, and where base raised a raw TypeError/OverflowError on such a combination this raises the clean RunStoreError.

One refusal-quality detail of the same family, recorded because it is measured rather than argued: since the clamp reads rd.run_id, launch(<non-RunDir>, max_calls=<invalid>) with no ambient ceiling (or a ceiling above the cap) raises AttributeError where base refused the cap cleanly in build_call_limit; at a ceiling that bites, base raised AttributeError('status') for that same call. Doubly out-of-contract, nothing pinned, no store created either way — recorded, not fixed here.

No UI surface: the diff is runstore.py, mcp.py, one test file and one changelog fragment; no interface files.

@HugoXK HugoXK added bug Something isn't working area:plugins Host plugins and installers: Claude Code, Codex, DSH, OpenCode, MCP server agent-pr Pull request opened by an agent labels Nov 23, 2026
@HugoXK

HugoXK commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator Author

Pre-report, head moved for the inheritance hole: b41a1a99… → dd5f2828016fed9724565cf2c46f3fda403ca67b on the same branch (one push, no force, no amend).

Red at b41a1a99 with the extended file: 3 failed, 4 passed in 15.79s — test_an_inherited_remainder_cannot_label_a_caller_capped_run, test_a_stale_remainder_cannot_label_a_foreground_run, test_launch_drops_an_inherited_remainder_from_the_child_environment.

Fix, in runstore.launch as prescribed: after the scrub, child_env.pop(OPERATOR_MAX_CALLS_REMAINDER_ENV, None), then restore it only from this call's env (the MCP server's _ticket_env). _clamped_max_calls additionally requires the parent's recorded request, so a matching number alone is not enough. _ticket_env still writes the key only for the remainder case, which keeps test_resume_host_cli's exact-env assertion untouched.

Green at the new tip: 117 passed, 9 warnings in 71.75s over the seven affected files. Body is being updated with the new tip; nothing is being flipped ready.

@HugoXK

HugoXK commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator Author

Pre-report, head moved once more on the same branch: dd5f2828… → 3c6d415b0fffe8cd9c51d6f2cf4dbdcfe5f1ab19 (no force, no amend), still draft.

Test's foreground shape was real. execute is reached two ways — the in-process evolve and the detached cli run child (cli.py:2916 cmd_run) — so an unconditional pop there would have killed acceptance rows 1 and 3. The handoff is now marked: launch sets AGENTDESCENT_MAX_CALLS_FROM_LAUNCH only when it restores a remainder from this call's env, and execute drops the remainder when that marker is absent (that is the pop site: the first statement of the clamp block, before _clamped_max_calls). AGENTDESCENT_MAX_CALLS_REQUESTED is untouched.

Red at dd5f2828 with the extended file: 2 failed, 8 passed in 13.85s — test_an_inherited_pair_cannot_label_a_foreground_run (E AssertionError: max_calls (AGENTDESCENT_MAX_CALLS): 1 call(s) made, cap 1), test_an_inherited_pair_cannot_label_a_foreground_run_at_two. The control (REQUESTED=5/REMAINDER=5, execute(5)) is bare in both runs.

Green at 3c6d415b: same file alone 11 passed in 13.96s; the six affected files 121 passed, 9 warnings in 80.76s. tests/test_operator_run_cap.py and tests/test_mcp_ticket_cap.py are unedited (git status shows only runstore.py and the new test file). python3 -m tools.gen_api_docs --check → docs/api.md is up to date; python3 -m tools.changelog_fragments check → 30 changelog fragment(s) OK.

start() launches a run with min(caller, remaining), so when a Ticket's
remainder is what lowered the number the child is started *below* the
ceiling. _clamped_max_calls only labelled a run whose applied value equals
the ceiling, so that run printed the same bare "cap N" as a caller who
had asked for that very number, while the reply said source:
AGENTDESCENT_MAX_CALLS.

Carry the applied remainder across the detach boundary (label only, like
the requested value) and label on it when it is below the ceiling and
matches what the child was given. The caller-capped control stays bare,
and nothing enforced or payload-shaped moves (#1241).
The remainder marker is inherited, not scoped: a process that was itself
launched below its ceiling hands that number to every later child, so a
caller who legitimately asks for exactly that number was labelled
ceiling-clamped. launch() now pops the variable after the scrub and
restores it only from the env this launch was given, which is how the MCP
server says "this launch is a remainder"; _clamped_max_calls also
requires the parent's recorded request, not just a matching number.

Rows: an inherited marker with ceiling 5 and caller 4 stays bare, the
same coincidence in-process through execute, and the detach boundary
itself drops the ambient value (#1241).
A foreground execute has no env parameter, so a consistent (requested,
remainder) pair it inherited from the ambient environment describes
another run's clamp. launch now marks the pair it hands over, and
execute drops the remainder when that marker is absent, the same
rationale as launch's pop from the other side.
An inherited copy names the run an ancestor launched below its ceiling, and
a self-consistent requested/remainder pair is indistinguishable from a real
handoff by its numbers alone. launch now writes '<run id>:<n>' and
_remainder_calls accepts only the run it is asked about, so a descendant
labels nothing; the boolean handoff of the previous commit is gone, and
execute no longer touches os.environ.
`launch` read `rd.run_id` at the top, before `build_call_limit` had refused a
`max_usd` with no `usd_per_call`, so `runstore.launch(store, max_usd=1.0)` —
the call #1196 pins, passing only a path because the refusal precedes any
store write — raised `AttributeError: 'PosixPath' object has no attribute
'run_id'` instead of the named refusal. CI caught it on all five legs at
bd4c062.

The refusal now runs first; the clamp, which is the only thing that needs the
run's identity, runs after it. `build_call_limit` is validation only here (the
applied value is the clamped one on the next line), so validating the caller's
number rather than the clamped one changes no refusal a caller can reach.

Red: CI `test (3.10)`/`(3.11)`/`(3.12)`/`(3.13)` at bd4c062, verbatim
`FAILED tests/test_max_usd_refusal_hint.py::test_a_python_caller_is_told_to_set_the_field_not_a_flag - AttributeError: 'PosixPath' object has no attribute 'run_id'`.
Green at this commit: the nine affected files `162 passed`; the wider
launch-adjacent set `136 passed, 10 skipped`.
@HugoXK

HugoXK commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

Pre-report for the draft -> ready flip, so the state change is on the record before it happens.

Tip SHA: 2f52c4a
Base: b464737
State change: draft -> ready. No label, assignee or reviewer change.

Gates at this tip, read from the API:

  • test (3.9) success (job 138107411213), test (3.10) 138107411274, test (3.11) 138107411447, test (3.12) 138107411246, test (3.13) 138107410882
  • build 138107412227, otel-wire 138107411314, risk tier (report only) 138107411546, reviewed tip (report only) 138107410231 all success; deploy 138108347427 skipped
  • Test read at this sha, no blocking finding: both Path refusals are the usd_per_call RunStoreError of base's class with nothing created; at ceiling 3 3.5, Decimal("3.5"), float("inf") and the 5 control all start with --max-calls 3, verbatim base-equal, no RunStoreError and no OverflowError among them; 40 passed on the label file plus the two cap files, tests/test_max_usd_refusal_hint.py 6 passed; execute's body has no os.environ reference.
  • Reviewer read at this sha, Blocking: none: 1440-cell matrix, 0 started/refused flips and 0 applied-number changes; the one delta class is which refusal is named when an invalid money pair meets an invalid cap input or a malformed ambient ceiling, and it is recorded in the body together with the Path/cap refusal-quality note.

Round 6 is the only change since the previous tip. Round 5 validated the caller's cap instead of the clamped value, which turned launch(max_calls=float("inf")) into a raw OverflowError where base started with --max-calls 3; the order is now: refuse the money pair -> clamp on rd.run_id -> validate the clamped value, which is execute's order since base. Diff against a282a6a4: agentdescent/runstore.py alone, +7/-5, cap validation back on the applied number.

No UI surface: runstore.py, mcp.py, one test file, one changelog fragment.

No full-suite claim is made here; the evidence is the files above plus CI's five legs on this tip.

Written-by: AgentDescent Lead

@HugoXK
HugoXK marked this pull request as ready for review November 24, 2026 00:23
@HugoXK
HugoXK requested a review from Birfy November 24, 2026 00:23
@github-actions github-actions Bot added the risk:T3 Risk tier T3 (core loop, release, process; needs Danyang's click), set by the controller label Nov 24, 2026
@HugoXK

HugoXK commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

@Birfy: review request for #1244 at tip 2f52c4a9170e341fa949f7882c979373b5c59b77 (base b4647375).

@Birfy

Birfy commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Review (Birfy)

Tip SHA: 2f52c4a
Ran:

  • .github/scripts/risk_gate.py --repo ThinkFlowLab/agentdescent --pr 1244 → T3 (path agentdescent/runstore.py; 440 lines / 4 files)
  • pytest -q -o addopts='' tests/test_mcp_ticket_remainder_label.py at this tip → first three acceptance rows passed (remainder named; caller's own cap stays bare; no-cap caller labelled). Later rows in the same file were not finished locally because this box ran out of inodes mid-run; required CI is the line.
  • python -m tools.changelog_fragments check → 30 changelog fragment(s) OK
  • python -m tools.gen_api_docs --check → docs/api.md is up to date
  • Required CI at this tip (build, test 3.9–3.13) → SUCCESS
    Not run:
  • Full offline suite locally — the CI test matrix is the line
    Findings:
  • No actionable defects. When a Ticket remainder is what lowered the applied cap, launch now carries a run-scoped remainder marker so stop_detail names AGENTDESCENT_MAX_CALLS instead of a bare cap N. The marker is dropped at the detach boundary unless this launch was given one, and an inherited marker naming another run cannot label a later child. Enforcement and the call_limit payload are unchanged.
    Verdict: PASS

@Birfy
Birfy merged commit eb9acd5 into main Nov 24, 2026
12 checks passed
@Birfy
Birfy deleted the agent/1241-ticket-remainder branch November 24, 2026 04:33
Birfy pushed a commit that referenced this pull request Nov 24, 2026
…1239) (#1250)

Closes #1239.

## What changed

Four files, docs plus the test that pins them:

- `docs/bench-index.md` (new) — one table for the sixteen `bench/*.py`
modules
that carry `if __name__ == "__main__"`, split into the eight that run
offline
and the eight that make live model calls. Every row gives what the
module
measures, its command, and the committed artefact under `bench/results/`
when
  one exists (`—` where the module writes a file you name yourself).
- The split is by what a run actually needs, and the key-gated rows name
the
key rather than gesturing at one: `--provider openai` and `--provider
glm`
read **`OPENAI_API_KEY`**, `--provider claude` reads
**`ANTHROPIC_API_KEY`**
(`agentdescent/agents.py:737`), and the `metasearch_*` pair is offline
under
`--dry-run`, so it needs no key at all. That distinction is the part a
reader
  acts on, so it is in the page and repeated in the PR body.
- `mkdocs.yml` — one nav line, `Benchmarks you can run — the index:
bench-index.md`, inside **Examples and results**, immediately above the
two
  bench pages it indexes.
- `tests/test_bench_index.py` (new) — the page ↔ tree pin: the set of
`bench/*.py` with a top-level `if __name__ == "__main__"` (read from the
AST,
  not by grepping) must equal the set of modules the page gives a
  `python -m bench.<module>` command for, checked in both directions.
- `changelog.d/1239-bench-index.md` — category `Added`.

Nothing else moved: no `bench/` change, no `agentdescent/` change, no
results
file, no page besides the new one.

## Red first

The new test is red on today's tree by construction, since the page does
not
exist. Measured at this PR's base `b4647375` in a fresh worktree with
only the new
test file copied in:

```
$ pytest tests/test_bench_index.py
FAILED tests/test_bench_index.py::test_index_page_exists
FAILED tests/test_bench_index.py::test_every_runnable_bench_module_has_a_row
E  AssertionError: bench modules with a __main__ block but no row in docs/bench-index.md:
   ['ab_allocator', 'ab_replay', 'ab_run', 'baselines_run', 'candidate_methods',
    'candidate_methods_merge', 'candidate_methods_report', 'long_horizon',
    'matrix_report', 'matrix_run', 'metasearch_algotune', 'metasearch_slots',
    'openevolve_agentdescent', 'population_engine', 'run', 'self_evolution'].
   Add a row (what it measures, command, offline or key-gated, evidence file) in
   the same change as the module.
2 failed, 1 passed in 3.54s
```

With the page in place: `3 passed in 0.50s`.

## Acceptance loop

Sixteen `--help` invocations, no `FAIL` line:

```
$ for m in ab_allocator ab_replay ab_run baselines_run candidate_methods \
           candidate_methods_merge candidate_methods_report long_horizon \
           matrix_report matrix_run metasearch_algotune metasearch_slots \
           openevolve_agentdescent population_engine run self_evolution; do
    python3 -m bench.$m --help >/dev/null 2>&1 || echo FAIL $m
  done
(no output — every module exits 0)
```

`bench/` is byte-identical between `d6c59ed9` and this PR's base
`b4647375`
(`git diff --stat d6c59ed b464737 -- bench/` is empty), so the sixteen
`--help` reads and the flag check below were re-run once and still hold
at the
base.

That loop needs two environment facts, both written into the page and
both
reproduced here rather than hidden:

- `HOME` must be writable. `agentdescent/dataloader.py:40` hardcodes
  `~/.cache/agentdescent`, so on a box with a read-only `$HOME` the two
  `candidate_methods*` modules die at import with
`OSError: [Errno 30] Read-only file system:
'/home/xuke/.cache/agentdescent'`.
  The loop above ran with `HOME` pointed at a scratch directory.
- `bench/candidate_methods.py` and `bench/candidate_methods_merge.py`
build
  their algorithm registry at import time from the GSM8K splits, so even
`--help` loads the dataset. With no network and no `pyarrow` the
loader's own
message names the way out: `AGENTDESCENT_GSM8K_SAMPLE=1` (bundled 96-row
sample). The loop ran with it set; the other fourteen modules are
unaffected
  by it.

## Other gates

- Every flag on the page exists in the module's own `--help`: the
sixteen rows
  were extracted from the Markdown and each `--flag` compared against
  `python3 -m bench.<module> --help` — `16 rows, 0 missing flags`.
- `python3 -m tools.changelog_fragments check` → `30 changelog
fragment(s) OK`
- `python3 -m tools.gen_api_docs --check` → `docs/api.md is up to date`
- `pytest tests/test_site_navigation.py tests/test_bench_index.py` → `6
passed`

Tip SHA: `1f1d7db701740643a25fea6837084bf5f5fadacc`

Not run:

- `mkdocs build --strict` — this box has no `mkdocs` and no network to
install
  it (`pip download mkdocs` produces no wheel; `import mkdocs` raises
`ModuleNotFoundError`), so the strict build cannot be produced locally.
The
  nav change is covered by `tests/test_site_navigation.py` (reads
`mkdocs.yml` and passes) and by the required `build` check in CI, which
runs
  the same strict build on the tip.

One correction to the card's measurement, no action needed: `bench/`
holds
**19** `.py` files at `b4647375`, not 20 — the sixteen with `__main__`
plus
`harness.py`, `rsi_bench.py` and `__init__.py`. The sixteen-module list
in the
card is exactly right and is what the test and the page carry; the test
derives
the set from the tree either way, so the count in prose cannot rot.


## Forward-merge to the live main

`#1243` (`de3624fab6df`) and `#1244` (`eb9acd5e8e41`) landed, so this
branch was
forward-merged with `git merge origin/main` (no rebase, no force-push)
onto
`eb9acd5e8e417241cec2a60517c7f89272b0d5be`. Nothing in this PR
conflicted and no
file of this PR changed: the merge brought `agentdescent/`,
`tests/test_apply_non_regular_leaf.py`,
`tests/test_mcp_ticket_remainder_label.py` and two changelog fragments.

Re-measured at the merge head
`ab75f2e8062ca3bb8c70d91faded244b222df850`:

- `pytest tests/test_bench_index.py tests/test_site_navigation.py` → `6
passed in 0.68s`
- sixteen-module `--help` loop (`HOME` writable,
  `AGENTDESCENT_GSM8K_SAMPLE=1`) → `fails=0`
- page ↔ help flag check → `16 rows, 0 missing flags`
- `python3 -m tools.changelog_fragments check` → `32 changelog
fragment(s) OK`
  (30 at the old base, plus `changelog.d/1225-non-regular-leaf.md` and
  `changelog.d/1241-ticket-remainder-label.md` from the merge)
- `python3 -m tools.gen_api_docs --check` → `docs/api.md is up to date`

The red-first block above was measured at the old base `b4647375` and
stays as
that record; `docs/bench-index.md` and `tests/test_bench_index.py` are
byte-identical before and after the merge.

Citation fix at `1f1d7db701740643a25fea6837084bf5f5fadacc`: the `claude`
key
now cites `agentdescent/agents.py:737`, not `agentdescent/backends.py`,
which
never names that provider. Re-measured at that head: `6 passed in
0.85s`,
`16 rows, 0 missing flags`.

ready at ab75f2e (flip: ready_for_review 2026-11-24T04:43:26Z)

## Correction (appended; branch updated to main)

- Live tip: `aac952f73ef923f02eda0b0f1b2b395a3ab1ac47`
- Base: `22ea7528915a761c579dc4c7f47d8444c159cd8a`
- The merge commit only moved the base onto `main`; the diff is
unchanged
  (`4 files, +156/−0`). It supersedes `1f1d7db7…` as the tip this PR is
  judged at; the `Tip SHA:` line above is left as written.

---------

Co-authored-by: AgentDescent Dev-4 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-pr Pull request opened by an agent area:plugins Host plugins and installers: Claude Code, Codex, DSH, OpenCode, MCP server bug Something isn't working risk:T3 Risk tier T3 (core loop, release, process; needs Danyang's click), set by the controller

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcp: a run clamped to the Ticket remainder cannot name the ceiling in its stop_detail

2 participants