Skip to content

fix: stabilize extension turns, transcript hydration, and reasoning controls - #1431

Open
effortprogrammer wants to merge 13 commits into
code-yeongyu:mainfrom
effortprogrammer:fix/verified-four-issues
Open

fix: stabilize extension turns, transcript hydration, and reasoning controls#1431
effortprogrammer wants to merge 13 commits into
code-yeongyu:mainfrom
effortprogrammer:fix/verified-four-issues

Conversation

@effortprogrammer

@effortprogrammer effortprogrammer commented Sep 7, 2026

Copy link
Copy Markdown

Summary

Fixes #1329, #1076, and #891. Addresses the numeric-counter near-repeat case in #1330 with progress and code-safety guards.

  • Run and apply before_agent_start for idle custom-trigger turns. Preserve final admission, cancel held hooks without a ghost provider call, and wait for deferred recovery before print-mode output.
  • Separate warmed transcript caches from visible history. Incomplete renders keep their initial boundary; the complete prefix is published once hydration finishes.
  • Detect bounded numeric paragraph drift while preserving tool progress, identifiers, lists, and nested fenced examples. This is intentionally not semantic paraphrase detection.
  • Give retained affected built-in models explicit reasoning maps matching their implemented controls, preserve graded models, and remove the stale Xiaomi disabled-thinking override.
  • Add provider-scoped generation with own-key selector validation so unrelated provider data remains byte-identical.

The fork was synchronized with upstream 89a06b08, and that commit is merged here as 758ee7a0. Upstream-retired Moonshot models were not restored: the affected capability table now covers 52 retained entries, with explicit tests for the retired rows.

Verification

  • bun run check and the complete workspace build passed on the latest integration.
  • Affected integration regressions: 249 passed across AI, coding-agent, and codemode.
  • Retired-catalog contrast: the old catalog exposes the 12 retired provider/model pairs; the current catalog exposes none.
  • Real source CLI/RPC hook QA: 13/13.
  • Real source CLI numeric-loop recovery and code/progress controls: 13/13.
  • Real native-PTY transcript resume: 80-to-120 and 120-to-80 passed, with an observed incomplete render retaining the same history boundary.
  • Real source RPC reasoning/wire QA: 15/15.
  • Real native-PTY reasoning commands, persistence, and restart QA: 13/13.
  • Five fresh terminal captures were replayed through actual Chrome/xterm.js and visually inspected. Captures use PTY output events, not keyboard-input substitutions.
  • All QA used isolated local providers and sandboxes. No real model credentials or paid provider calls were used; PTYs, servers, browsers, and temporary state were cleaned up.

One local full-workspace run on macOS/Node 26 recorded failures in 12 coding-agent files, dominated by test/hook timeouts and a child-process completion failure. The same 12 files then passed 109 tests in an isolated single-worker run on unchanged code, without increasing timeouts or skipping tests. The broad-run log is retained; it is not being presented as a full-suite pass. Linux/Node 24 PR CI is a separate verification gate.

Reproducible drivers are included under .agents/skills/senpi-qa/scripts/scenarios/:

node .agents/skills/senpi-qa/scripts/scenarios/issue-1329-qa.mjs --evidence issue-1329
node .agents/skills/senpi-qa/scripts/scenarios/issue-1330-qa.mjs --evidence issue-1330
node .agents/skills/senpi-qa/scripts/scenarios/issue-1076-qa.mjs --evidence issue-1076 --self-test
node .agents/skills/senpi-qa/scripts/scenarios/issue-891-qa.mjs --evidence issue-891
node .agents/skills/senpi-qa/scripts/scenarios/issue-891-tui-qa.mjs --evidence issue-891-tui

The last driver requires Bun >=1.4 on PATH (or selected through SENPI_QA_BUN) and the skill-local node-pty dependency.

Maintainer note

CONTRIBUTING.md reserves CHANGELOG.md entries for maintainers, so no contributor changelog edit is included. Exact nearest changes.md coverage is present. The runtime-change changelog gate needs the corresponding maintainer entry or explicit maintainer policy handling; this user-facing change is not being mislabeled as no-changelog.

Capability QA proves Senpi's catalog, UI, persistence, and request controls. It does not claim live account entitlement or provider availability for every retained model.


Summary by cubic

Fixes #1329, #1076, #891, and the numeric near-repeat case in #1330. Idle custom-trigger turns now run before_agent_start, print mode waits for recovery turns, and hydrated transcript history publishes atomically instead of exposing partial prefixes.

Behavior changes

  • Idle send_custom_message turns apply admission hooks and cancel without a ghost provider call.
  • Print mode waits for settled session work before selecting the final result.
  • Progressive transcript keeps its initial visible boundary until full history is warmed; unrelated renders and resizes no longer show partial history.
  • Numeric paragraph drift is detected with bounded normalization, while code fences and tool progress are preserved; this is not semantic paraphrase detection.
  • Reasoning maps now match each built-in adapter's controls, graded models stay graded, and Xiaomi's disabled-thinking support is no longer overridden.
  • Qwen3.8 Token Plan rows now send the documented graded effort values instead of clamped toggle-only controls.
  • generate-models.ts supports --providers for provider-scoped regeneration, leaving unselected files byte-identical.
  • The fork was re-synced with upstream main, bringing in overflow/SDK recovery, Astra context caps, and the RPC watchdog ownership repair; conflicting OpenCode data was regenerated in the process.
  • Upstream-retired Moonshot models remain removed from the catalog.

Verification and rollout

  • Added five reproducible QA scripts under .agents/skills/senpi-qa/scripts/scenarios/ plus regression tests in packages/ai and packages/coding-agent.
  • Inspector resume handoff tests now close each debugger only after its own resume acknowledgement.
  • QA used isolated local providers; no real credentials or paid provider calls.
  • Unreleased changelog entries record the reasoning controls, extension-turn hooks, and atomic transcript hydration; changes.md coverage is included.

Written for commit 762d19a. Summary will update on new commits.

Review in cubic

Fixes code-yeongyu#1329. Run and apply before_agent_start for idle custom-trigger turns, retain final admission, and prevent provider calls after cancellation during an awaited hook.
Fixes code-yeongyu#1330. Detect bounded numeric prose drift, retain tool-progress and code-fence guards, and wait for hooked recovery turns before printing their final result (code-yeongyu#1329).
Fixes code-yeongyu#1076. Keep incomplete renders on the initial visible boundary while warming caches, preserve live appends and resize, and publish full history once ready.
Fixes code-yeongyu#891. Constrain 58 built-in catalog entries to implemented controls, preserve graded models, remove the stale Xiaomi override, and regenerate only selected provider artifacts with validated selectors.
Integrate origin/main at 09611c6 and retain all four fixes. Align the remaining Xiaomi characterization with its documented disabled-thinking request.
Integrate upstream and fork main at 89a06b0. Preserve the four fixes, regenerate the retained Moonshot capability maps, and assert that upstream-retired model rows stay absent.
Preserve latest overflow and SDK recovery changes, Astra context caps, and the four verified issue fixes. Regenerate conflicting OpenCode data and retain both sets of tracker entries.
Include the upstream RPC watchdog ownership repair and current workspace tooling. Preserve both transcript and report-bug tracker entries. Standard quality, full build, and 58 related regressions passed before this integration commit.
Close each debugger only after its own resume acknowledgement and preserve the two-session fixed-port handoff assertions. Include the erasable-syntax correction in this verified increment.
Preserve the trust, image-compaction and script updates while restoring the correct tracker section boundaries. Quality, full build and 45 related tests passed with one existing platform skip.
Document the verified reasoning controls, extension-turn hooks and atomic transcript hydration under Unreleased without changing released history or weakening policy gates.
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.

Extension-triggered turns bypass before_agent_start, so proactive compaction never runs in goal/wake-driven sessions

1 participant