Skip to content

fix(session): unify archive context abstracts#1104

Merged
qin-ctx merged 1 commit intomainfrom
fix/session-context-archive-abstracts
Mar 31, 2026
Merged

fix(session): unify archive context abstracts#1104
qin-ctx merged 1 commit intomainfrom
fix/session-context-archive-abstracts

Conversation

@qin-ctx
Copy link
Copy Markdown
Collaborator

@qin-ctx qin-ctx commented Mar 31, 2026

Description

Update session context assembly so completed archive abstracts are exposed through a single pre_archive_abstracts list and the separate latest_archive_id field is removed.

Related Issue

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Remove latest_archive_id from session context responses and include the latest archive summary entry in pre_archive_abstracts.
  • Update session context stats, CLI rendering, and the OpenClaw example plugin to consume the unified archive abstract list.
  • Refresh API docs and affected tests to match the new response shape and archive index behavior.

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Ran:

  • .venv/bin/python -m pytest -q tests/server/test_api_sessions.py tests/server/test_http_client_sdk.py
  • pnpm -C examples/openclaw-plugin test -- --run __tests__/context-engine-assemble.test.ts

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Additional Notes

  • tests/session/test_session_context.py still hits an existing mock AGFS append/setup failure when run directly in the current environment, so it is not included in the passing local test claim above.

Return the latest archive through pre_archive_abstracts and drop the
separate latest_archive_id field so session context consumers only need
one archive index path.
@github-actions
Copy link
Copy Markdown

Failed to generate code suggestions for PR

@qin-ctx qin-ctx changed the title fix(session): unify archive context abstracts wip fix(session): unify archive context abstracts Mar 31, 2026
@qin-ctx qin-ctx changed the title wip fix(session): unify archive context abstracts fix(session): unify archive context abstracts Mar 31, 2026
@qin-ctx qin-ctx merged commit 0502a99 into main Mar 31, 2026
15 of 16 checks passed
@qin-ctx qin-ctx deleted the fix/session-context-archive-abstracts branch March 31, 2026 07:06
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants