Skip to content

docs(pi): document verified total-cap semantics and answer-room constraint - #56

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/loop-rootcause-total-cap
Aug 30, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/loop-rootcause-total-cap

Conversation

@atrawog

@atrawog atrawog commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the probe-verified semantics to the root-cause section in .pi/APPEND_SYSTEM.md (PR #55 established the 65536 cap; this PR documents how it behaves):

  • max_tokens is the TOTAL cap (thinking + answer), not the answer budget. Proven by pi -p probes: maxTokens=49152 truncated at exactly 49152 output tokens; maxTokens=65536 at exactly 65536. The "maxTokens = 65536 - thinking" formula is therefore wrong for this provider — it reduces total room and truncates sooner. (It would be correct for Anthropic-style providers where max_tokens is the answer budget.)
  • The thinking budget (16384 for high) is not hard-enforced: a probe generated ~60K thinking against it, leaving ~5K for the answer. The harness's resolveClampedThinkingBudget clamps thinking to leave only 1024 answer tokens — the design gap.
  • Practical constraint: with high thinking, the answer room is ~5K tokens (~20K chars). Tool calls must stay under that; heavy work must be delegated to subagents.

How tested

  • Live probes (pi -p, 2026-08-30): maxTokens=49152 → session log shows "output":49152 + stopReason:"length" (truncated at exactly 49152). maxTokens=65536 → "output":65536 + stopReason:"length". Probe 3 (long tool call) → ~60K thinking against the 16384 budget.
  • git commit pre-commit gate: pre-commit: OK.

Rulebook compliance

  • R1: every claim in this PR is empirically verified (probe session logs quoted), not guessed.
  • R4: documents the real constraint; no workaround.
  • R5: the section is extended, not contradicted; no stale claims.

Change classification

  • Change class: documentation (harness guidance doc).
  • Verification gate: pre-commit gate passed; claims proven by live probe session logs.
  • Attribution tier: analysed on a live system.

Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (analysed on a live system)

…raint

pi -p probes proved max_tokens is the TOTAL cap (thinking + answer), not the
answer budget: maxTokens=49152 truncated at exactly 49152 output tokens,
maxTokens=65536 at exactly 65536. The "maxTokens = 65536 - thinking" formula
is therefore wrong for this provider (it reduces total room). The thinking
budget (16384 for high) is not hard-enforced: a probe generated ~60K thinking
against it, leaving ~5K for the answer. Document the practical constraint:
with high thinking the answer room is ~5K tokens, so tool calls must stay
under that and heavy work must be delegated.
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: e307f96ba801 (branch: docs/pi-total-cap-semantics)

Security screen: PASS — docs-only change to .pi/APPEND_SYSTEM.md; no code, no secrets, no scope mismatch, no embedded directives, no guardrail changes.

Checklist: All applicable rules PASS or NA.

  • Change class: documentation (1 file, +17/−0). No bed required; body correctly classifies as docs and supplies live-probe evidence.
  • A1/A3: Body accounts for the full diff, names the docs gate, and the analysed on a live system tier is justified (not inflated) by the quoted probe session logs. Attribution footer present in the exact required form.
  • R1: Claims are empirically grounded in probe output; no forbidden framing.
  • R2/R4/R5/R10/B13–B18: NA or satisfied — no code/candy/config touched, single atomic commit, no duplication, no workarounds, no stale claims.

Comment intake: No comments on the thread.

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) August 30, 2026 10:55
@github-actions
github-actions Bot merged commit 4c6e078 into main Aug 30, 2026
1 check passed
charly-auto-merge Bot added a commit that referenced this pull request Aug 30, 2026
atrawog added a commit that referenced this pull request Aug 31, 2026
…in batch (#83)

Produced by task sync, not hand-pinned. Four gitlinks:

    charly           0e4d026d -> 8b194ed8   (its default branch)
    distro-omarchy   b82ed69e -> 2081960d   (policy B: exactly what charly pins)
    distro-cachyos   db2199a9 -> 677dbbe0   (policy B)
    distro-fedora    47cac269 -> 53bd54c0   (policy B)

Policy B verified independently of the script: each distro pin equals THE COMMIT CHARLY PINS,
which for cachyos and fedora is NOT their latest main - tag-on-merge added a CHANGELOG commit
past the tree charly composes, and pinning that would break the invariant.

## What it brings in

    charly          #508  the parse-time prescan never read an imported project's plugin pins,
                          plus box/omarchy, box/cachyos, box/fedora and plugin-check
    distro-omarchy  #11   check-omarchy-desktop-vm - the first bed proving the DESKTOP comes up
    distro-cachyos  #55   pin the cstream verb plugin so the bed parses when composed
                    #56   complete the pin advance charly#506 started
    distro-fedora   #47   the second copy of the same pin list

Two are worth naming. charly's main was RED: a bed that validated at exit 0 from its own repo
root failed at exit 1 the moment charly composed it, because the prescan walked the root
manifest and discover: paths but never import:. And charly#506 advanced 11 candy pins in one
copy of a list that exists as three independent copies, so three candies resolved at two
versions until every copy moved.

## Why only four gitlinks and not the 89 task sync moved

task sync advances EVERY submodule to its default-branch HEAD, and this run moved 89. The other
85 are unrelated to this work and #66 is already in flight covering that ground;
landing both would collide.

The four committed here are the values task sync produced - not hand-picked - and they are
exactly what Policy B requires: charly moved, so its distro pins must follow. The remaining 85
are left to #66 rather than raced.

## How tested

    task verify
    check-policy-b: OK - 6 distro pins equal charly's gitlinks
    verify-pins: OK - 349 submodules, policy B holds
    exit 0

Claude-Session: https://claude.ai/code/session_01YKF2VLqeHHbrBDz8XftaD3

Co-authored-by: atrawog <[email protected]>
@aitrawog
aitrawog deleted the feat/loop-rootcause-total-cap branch September 25, 2026 18:27
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