Skip to content

docs: stop claiming a both-flags-off run is uncapped (#1268) - #1278

Merged
Birfy merged 1 commit into
mainfrom
agent/1268-start-caps-truth
Nov 25, 2026
Merged

Birfy merged 1 commit into
mainfrom
agent/1268-start-caps-truth

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

The caps section of docs/start.md closed with "Leave both flags off and the run behaves exactly as before", which AGENTDESCENT_MAX_CALLS (#1181) and the MCP per-Ticket budget (#1214) made false: an operator's ceiling clamps every run this process starts, including one that names no cap of its own.

  • docs/start.md:137-151: the closing sentence now says both-flags-off means this command names no cap, not an uncapped run; names AGENTDESCENT_MAX_CALLS=N, says a caller's --max-calls can lower it but never raise it, and that the clamp is per run.
  • The --max-calls 0 sentence is unchanged, verbatim.
  • The cumulative arithmetic appears only in the MCP clause: one worker session is one Ticket, call_limit carries ticket: {ceiling, spent, remaining}, and a spent Ticket refuses another start.
  • tests/test_start_caps_truth.py: three assertions — the false phrase is absent (negative, so rewording is allowed), the corrected claim is present (does not mean the run is\s+uncapped, whitespace-tolerant so a rewrap cannot fail it), and the zero-cap sentence survives byte-for-byte (a control, which passes at the base too by design).

Citation ranges: the issue's are stale. As the files read at this tip, the clamp is agentdescent/runstore.py:228-266 (_clamped_max_calls; 267-268 are blank lines) and the operator-ceiling bullet is docs/plugin-design.md:595-612 (the whole bullet, through the spent-Ticket refusal). The MCP numbers live at agentdescent/mcp.py:440-490 (_call_limit_payload).

Verification at 92b02d9

Tip SHA: 92b02d9

Red at that tip, with docs/start.md reverted to base 0a6e782f8f and the test as committed:

$ pytest tests/test_start_caps_truth.py -q -o addopts=""
E       assert 'behaves exactly as before' not in '`--max-call...y as before.'
2 failed, 1 passed in 0.36s

(the pass is the zero-cap control)

Green with the change: 3 passed in 0.35s.

Docs family (test_docs_links.py, test_site_navigation.py, test_docs_examples.py, test_start_caps_truth.py): 34 passed in 60.02s.
python -m tools.gen_api_docs --check: docs/api.md is up to date.
python -m tools.changelog_fragments check: 45 changelog fragment(s) OK.

Ran: the four files above and both tools. Not run: mkdocs build --strict (mkdocs is not installed on this box; the CI build leg covers the page, and the nav is unchanged), the full suite (docs-only change, CI runs it), and any model call (none needed, no code touched).

No UI surface: a documentation paragraph and one offline test; nothing renders differently.

Fixes #1268

@HugoXK HugoXK added area:docs Documentation site (docs/, mkdocs.yml) and README documentation Improvements or additions to documentation labels Nov 25, 2026
@HugoXK

HugoXK commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Pre-reporting one state change on this PR: field draft: true -> false.

Head is 92b02d9b9f28e552eaf5752cf9cc4adbc4289e0b (API read this run) and every number in the body was measured at that sha. Reason: the change is a documentation paragraph plus one offline test, labelled documentation / area:docs with risk:T1 on the issue, so it takes the T1 route — green required checks at the tip, then a PASS at that tip. No further push from me; a new commit would void the PASS, so any follow-up belongs in a comment or a separate card.

@HugoXK
HugoXK marked this pull request as ready for review November 25, 2026 04:37
@github-actions github-actions Bot added risk:T1 Risk tier T1 (tests, examples, changelog.d), set by the controller from the diff agent-pr Pull request opened by an agent labels Nov 25, 2026
@HugoXK

HugoXK commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Read at 92b02d9b9f28e552eaf5752cf9cc4adbc4289e0b (base 0a6e782f8f; mergeable_state: blocked, which is the review gate, not a conflict). Python 3.10.12, pytest 8.3.5, -o addopts="" -p no:cacheprovider, PYTHONPATH at the tree, AGENTDESCENT_HOME/TMPDIR in a scratch dir, real HOME.

Red is revert-based and content-shaped. Base docs/start.md + the committed test: 2 failed, 1 passed in 0.38s. Failures are tests/test_start_caps_truth.py:42 (assert 'behaves exactly as before' not in …) and :47 (assert 'AGENTDESCENT_MAX_CALLS' in …); the third (zero-cap control) passes. No collection error.

It cannot pass vacuously by the file going missing. Removing docs/start.md → 3 failed (errors, not passes). Changing the paragraph anchor → 3 failed. A reworded lie that drops the corrected claim → 1 failed, 2 passed (the positive assertion catches it). The disclosed "rewording is allowed" does mean a reworded lie added alongside the corrected claim would satisfy the negative line; that is the intended scope of a phrase ban, not a defect in this card.

The --max-calls 0 sentence is byte-identical to base: one occurrence in each, identical bytes, and ZERO_CAP_SENTENCE matches it exactly.

Cited ranges check out in this tree: agentdescent/runstore.py:228-266 is _clamped_max_calls (267-268 blank); docs/plugin-design.md:595-612 is the whole operator-ceiling bullet through the spent-Ticket refusal; agentdescent/mcp.py:440-490 is _call_limit_payload (491 blank). Behaviour matches the paragraph: min clamp, ticket: {ceiling, spent, remaining} once spent > 0, spent-Ticket refusal; tests/test_operator_run_cap.py → 11 passed.

Green 3 passed in 0.34s. Docs family: test_site_navigation.py test_docs_examples.py test_start_caps_truth.py → 12 passed in 2.02s, so the body's 34 = 22 (docs_links) + 12. python -m tools.gen_api_docs --check current; python -m tools.changelog_fragments check → 45 changelog fragment(s) OK.

Not run: tests/test_docs_links.py (ModuleNotFoundError: No module named 'markdown' here), mkdocs build --strict (not installed), full pytest -q (docs-only delta).

No UI surface: one documentation paragraph and one offline test; nothing renders differently.

No merge action from QA: this report is advisory, the merge gate is the repo's review decision on the head sha, and the merge itself is executed by the repo's merge process.

start.md closed the caps section with "the run behaves exactly as before", which AGENTDESCENT_MAX_CALLS (#1181) and the MCP per-Ticket budget (#1214) made false. State the per-run clamp, keep the --max-calls 0 sentence verbatim, and put the cumulative Ticket arithmetic only in the MCP clause. Cite runstore.py:228-266, plugin-design.md:595-612 and mcp.py:440-490.
@Birfy

Birfy commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Review (Birfy)

Tip SHA: 92b02d9
Ran:

  • .github/scripts/risk_gate.py --repo ThinkFlowLab/agentdescent --pr 1278 → T1
  • pytest -q -o addopts='' tests/test_start_caps_truth.py at this tip → 3 passed
  • Cited ranges on current main: agentdescent/runstore.py:228-266 is _clamped_max_calls, docs/plugin-design.md:595-612 is the operator-ceiling / Ticket bullet, agentdescent/mcp.py:440-490 is _call_limit_payload
  • python -m tools.changelog_fragments check → 45 changelog fragment(s) OK
  • python -m tools.gen_api_docs --check → docs/api.md is up to date
    Not run:
  • Full offline suite locally — required CI is green on this tip (test 3.9–3.13, build, otel-wire)
  • mkdocs build --strict — docs paragraph only; CI build covers the docs path
    Findings:
  • No actionable defects. The caps paragraph no longer promises that leaving both flags off "behaves exactly as before"; it states that naming no cap is not uncapped, and it names AGENTDESCENT_MAX_CALLS plus the MCP Ticket spend. The --max-calls 0 sentence is unchanged.
    Verdict: PASS

@Birfy
Birfy merged commit f2a6e55 into main Nov 25, 2026
14 checks passed
@Birfy
Birfy deleted the agent/1268-start-caps-truth branch November 25, 2026 10:28
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:docs Documentation site (docs/, mkdocs.yml) and README documentation Improvements or additions to documentation risk:T1 Risk tier T1 (tests, examples, changelog.d), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: start.md still calls a both-flags-off run unchanged, though AGENTDESCENT_MAX_CALLS caps every run

2 participants