Skip to content

chore(release): prepare 0.13.0 — bump version, update changelog, cut docs snapshot - #197

Closed
xfgong wants to merge 7 commits into
mainfrom
2026-07-05-tool-batch-fault-isolation
Closed

chore(release): prepare 0.13.0 — bump version, update changelog, cut docs snapshot#197
xfgong wants to merge 7 commits into
mainfrom
2026-07-05-tool-batch-fault-isolation

Conversation

@xfgong

@xfgong xfgong commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Release preparation for CubePi v0.13.0 with comprehensive changelog, version bump, and documentation snapshot.

Changes

  • Version bump: 0.12.0 → 0.13.0
  • CHANGELOG.md: Complete [0.13.0] section documenting all major features and fixes
  • Docs snapshot: Frozen version-0.13 (en + zh-Hans) with:
    • All current documentation copied
    • Generated API reference included
    • Versioned navigation and config updated
    • Locale parity verified

Features in 0.13.0

  • Reasoning capability primitives & provider controls
  • Run-scoped compaction with real-token triggering
  • Tool-batch fault isolation with checkpoint preservation
  • Parallel HITL approval replay durability
  • Checkpointer corruption detection & recovery

Ready to merge

After merge:

  1. Tag as v0.13.0
  2. Push tag to trigger PyPI publish
  3. Create GitHub Release

claude added 5 commits July 5, 2026 02:59
…ruption

One escaping exception in a parallel tool batch (HitlControlException from
a tool body, CancelledError, or a BaseException from after_tool_call) used
to abort the bare-await collection loop: every ToolResultMessage in the
batch was dropped — including succeeded siblings — leaving dangling
tool_calls in the checkpoint (providers 400 on every later turn) and
leaking still-running sibling tasks whose side effects then get duplicated
on resume.

- _execute_parallel now settles every task via gather(return_exceptions=
  True), synthesizes per-call error results (with paired End events) for
  ordinary failures, and for HITL/outer-cancel emits all settled sibling
  results BEFORE re-raising, so the suspend/backfill contracts keep working
  on an intact transcript.
- _execute_prepared/_finalize catch BaseException (re-raising HITL/Cancel/
  KeyboardInterrupt/SystemExit) so hook and tool failures degrade to error
  results at the source.
- Checkpointer load paths (sqlite/postgres/mysql) wrap per-row
  deserialization in CheckpointCorruptionError carrying thread_id/backend/
  row_ref; unknown roles are now corruption in all three backends
  (sqlite previously passed raw dicts through silently).

Spec: dev/specs/2026-07-05-tool-batch-fault-isolation.md
…pend persistence, propagate emitter failures

- HitlControlException gains partial_tool_results; both executors attach
  the already-persisted sibling ToolResultMessages, and the stateless
  loop HITL handlers append them to the returned message lists, so
  callers persisting run_agent_loop*'s return value keep completed
  siblings' results across a suspend.
- Sibling persistence before a suspend is no longer best-effort: an
  emit/checkpoint failure propagates (run fails rather than durably
  suspending with completed work missing). The cancel salvage path stays
  best-effort — CancelledError must reach the Agent backfill.
- Non-control exceptions reaching batch classification are framework
  failures (emit_fn raising in a worker), not tool failures: re-raised
  after all tasks settle instead of being masked as synthetic
  tool_results.
…docs snapshot

- Bump pyproject.toml to version 0.13.0
- Update CHANGELOG.md with comprehensive 0.13.0 changes:
  - Reasoning capability primitives & provider rendering
  - Run-scoped compaction with real-token triggering
  - Tool-batch fault isolation + typed checkpoint corruption handling
  - Parallel HITL approval replay fixes
  - Checkpointer corruption detection improvements
- Cut documentation snapshot for 0.13:
  - Create versioned_docs/version-0.13 with all current docs + generated API ref
  - Create versioned i18n/zh-Hans locale mirror (version-0.13)
  - Update docusaurus.config.ts: lastVersion='0.13', add version config entries
  - Add /docs/0.12/** to sitemap ignorePatterns
  - Create versioned_sidebars/version-0.13-sidebars.json
  - Prepend 0.13 to versions.json
  - Add missing api/index.mdx to zh-Hans current locale
- Revert intro.mdx (en + zh-Hans) to "Next 🚧" for unreleased channel
Comment thread cubepi/agent/tools.py
):
raise
except Exception as exc:
except BaseException as exc:
Comment thread cubepi/agent/tools.py
SystemExit,
):
raise
except BaseException as exc:
prompt_task.cancel()
with pytest.raises(asyncio.CancelledError):
await agent.prompt("Run the blocking tool")
await prompt_task
prompt_task.cancel()
with pytest.raises(asyncio.CancelledError):
await agent.prompt("second")
await prompt_task
Comment thread tests/agent/test_tools.py
await asyncio.sleep(0.02) # let fast_ok finish
runner.cancel()
with pytest.raises(asyncio.CancelledError):
await runner
Comment thread tests/agent/test_tools.py
await asyncio.sleep(0.02)
runner.cancel()
with pytest.raises(asyncio.CancelledError):
await runner
Comment thread tests/agent/test_tools.py
await asyncio.sleep(0.02)
runner.cancel()
with pytest.raises(asyncio.CancelledError):
await runner
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.38710% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cubepi/agent/loop.py 75.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

claude added 2 commits July 5, 2026 16:07
….mdx

The frozen version-0.13 snapshot must use hardcoded version strings,
not PackageVersion component which reads pyproject.toml at build time.
After the next release bumps the version, the snapshot would render
the wrong version without this fix.
Docusaurus expects version strings to match the versioned_docs/version-X
directory names and docusaurus.config.ts version keys. Change from
0.13.0 to 0.13 for consistency.
@xfgong xfgong closed this Jul 5, 2026
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.

2 participants