Skip to content

perf(harness): place the skill catalog before conversation history - #4248

Merged
Buktal merged 1 commit into
agentscope-ai:mainfrom
Buktal:codex/skill-catalog-prefix
Nov 19, 2026
Merged

Buktal merged 1 commit into
agentscope-ai:mainfrom
Buktal:codex/skill-catalog-prefix

Conversation

@Buktal

@Buktal Buktal commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Closes #4247.

AgentScope-Java Version

2.1.0-SNAPSHOT

Description

Follow-up to #3691. Place the Harness skill catalog where the shared request prefix can include it as conversation history grows.

Summary

main      System -> history -> runtime materials (including skills) and task state -> references
fork/kst  System -> runtime materials (including skills) -> history -> task state -> references
Proposed  System -> skill catalog -> history -> other runtime materials and task state -> references

The earlier fork groups the catalog with session facts and per-call values from ContextBlock.runtime(...). A changing value can end the shared prefix before the conversation. Fork commit eb50ccd96

HarnessContextBuilder uses the existing harness:skills source ID to render the catalog as a request-only User message. The catalog remains required during compaction. If putting it before history would leave an Assistant message last, Harness places the catalog at the end as a User message.

Evidence

  • Before skillCatalogPrecedesGrowingHistoryAndChangingRuntimeState fails on main (c1d482900) because the catalog follows history.
  • After The ordering, empty-input continuation, and compaction regressions pass. System text matches across all three requests. The first two share the same catalog text, and the third reflects the changed skill description. Changing runtime values follow history. Provider cache hits and savings remain unmeasured.
  • Maven Spotless and the full reactor pass with the Windows CI command below. Harness reports 1,841 tests, 39 skipped, and zero failures or errors.
  • Docs All 20 docs tests pass, and npm run validate passes. The npm run broken-links report matches the baseline's 2,750 existing broken links.
mvn -B -T1C "-Dmaven.javadoc.skip=true" "-Dmaven.source.skip=true" "-Djacoco.skip=true" "-DskipDurableWindowsTests=true" clean verify

Merge Danger

Door Two-way. Reverting restores the previous message order.

Blast radius Harness model requests with a visible skill catalog.

Checklist

  • Spotless formatting checked.
  • Regression tests and Windows CI build pass.
  • Javadoc and the English and Chinese Harness guides describe the request layout.
  • Tracking issue linked.

@mintlify

mintlify Bot commented Nov 18, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit bb996ba.

Approve preview

@Buktal
Buktal merged commit f4e6a07 into agentscope-ai:main Nov 19, 2026
7 checks passed
xzxiaoshan added a commit to xzxiaoshan/agentscope-java that referenced this pull request Nov 23, 2026
…tract serving rules

Plain repositories are no longer enumerated without an explicit
SkillFilter.only selection, so the shared workspace/skills layer (a plain
FileSystemSkillRepository) served an empty catalog and the two skill-catalog
placement tests added by agentscope-ai#4248 saw no <available_skills> block — a
serving-rule artifact, not a placement defect. Both tests now pass an
explicit LocalFilesystem so the skill is served through the
context-scoped WorkspaceSkillRepository; assertions are unchanged.
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.

[Feature]: Keep the Harness skill catalog in the reusable request prefix

2 participants