Skip to content

fix(plugins): preserve complete compressed recall citations - #5727

Open
ktz03 wants to merge 12 commits into
volcengine:mainfrom
ktz03:fix/compressed-citation-budget
Open

ktz03 wants to merge 12 commits into
volcengine:mainfrom
ktz03:fix/compressed-citation-budget

Conversation

@ktz03

@ktz03 ktz03 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Current verification — main synchronization (2026-11-24)

Head b771bf8e62f1550aa22d8d048a7e3339e12aa743 normally merges main 300ab8eb0746d917b7b968b7f739a28a5a5c04b5. The conflict resolution preserves the original fix and current upstream behavior.

Preserved served-citation validation before budgeting, complete citation suffixes, and the same finalizer for fresh and cached digests. Current-main controls give 10 passed/11 failed; this head passes all 21 focused citation cases. Five shared-delivery checks, generated-copy checks, paired metadata/locks and the actual-HEAD seven-plugin version gate pass. These scopes overlap and are not added together.

The current-head official workflows report action_required, with zero actual jobs at 2026-11-24 02:59:52 UTC. They have not executed and are not CI passes. Earlier verification sections below remain attached to their named historical heads.

Description

Client recall compression can truncate a served viking:// citation after URI repair when applying its 500-character bullet or 4,000-character digest limit. Matching-key cached digests also bypass citation repair. Fresh and cached output now share citation validation followed by budgeting that keeps the complete citation suffix.

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

Fixes #5722.

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

  • Validate citations before limiting output. Shorten only preceding fact text; discard the whole bullet if its complete suffix cannot fit. If none remain, use the existing failed-compression fallback to raw recall context.
  • Apply the same finalizer to legacy cached digests and recompress unrecoverable entries. Keep the existing near-match rules, initial bullet selection, cache key/schema, fresh no-relevant result and empty-served-set passthrough. Reject unmatched bare schemes while retaining exact served URIs, including those containing another viking:// substring.
  • Add 14 regression tests, regenerate the three committed shared copies and document the budgets/cache behavior in EN/ZH plugin-development guides.
  • Update the six affected plugin releases and paired metadata/locks: Claude 0.7.6, Codex 0.11.5, agent-hook 0.5.14, OpenCode 0.5.8, DSH 0.5.20 and Pi 0.4.13. Dependency ranges and lock entries retain current main's updates from fix(dsh-memory-plugin): accept every DSH 0.x release and check new hosts daily #5733.

Testing

Current verification — main 49f7780 synchronization (2026-10-09)

Current head a66b399b96a319c4709a160afde911f59c9ea027 ordinarily merges exact official main 49f778011ef4f0b556d6064d4ec90343643668cf into previous head b81c417375edfa478627173fbdde2fa324763421. The original fix and regression tests and every non-owned automatic-merge entry are preserved. Upstream #5459, #5661, #5790 OpenClaw/Pi transport fixes, the gateway rename and DSH changes are retained. Beyond the clean automatic merge, only 17 version fields in 15 owned metadata files change; dependency entries remain unchanged. The six owned releases are Claude 0.7.7, Codex 0.11.6, agent hooks 0.5.15, OpenCode 0.5.9, DSH 0.5.21, and Pi 0.4.14, each strictly newer than main. Paired host/package/config/runtime/lock versions align.

This PR's exact tree defeaf2cc98dcd9b02c9fbf0a713ba6558ba7db6 was tested separately on Windows and Ubuntu WSL with Node 24.21.0: recall compressor 21 passed, shared release config/sync/HTTP contracts 97 passed, and current Codex config/marketplace/usage 41 passed on each platform. Current-main DSH controls give 95 passed / 1 opt-in live-recall skip on each platform. These matrices overlap and are not added together. Existing cached dependencies were reused; no fresh dependency installation occurred.

The official generator leaves tracked output unchanged, relevant module syntax passes, and the unchanged version gate passes on the real committed HEAD. Independent reviews verified actual log byte/hash/TAP results, exact tested/prepared/committed tree linkage, ordinary commit parents, metadata-only edits, retained upstream entries and source cleanliness. Earlier broader Windows failures or skips below remain historical; this refresh does not assert Windows-wide or full repository success.

Current official CI

Current head a66b399b96a319c4709a160afde911f59c9ea027: 6 SUCCESS / 5 conditional SKIPPED / 0 FAILURE. All 3 current-head parent runs completed (checked 2026-10-09T06:44:50.916257+00:00). Conditional jobs did not execute.

API/CLI job 113686797060 completed 2026-10-09T05:55:32Z: SUCCESS; filesystem API 14 passed, basic API 54 passed / 1 skipped, released CLI v0.4.4 compatibility 16 passed, source CLI 25 passed / 21 skipped, with zero test failures. Skipped cases are not counted as executed coverage.

The basic-API skip is a Find request returning 401 because PR CI cannot access VLM/Embedding API keys. The 21 source-CLI skips comprise 19 unavailable upstream-authentication cases, one existing CLI/server timeout-parameter mismatch, and one unavailable skill fixture for show. These skips do not establish complete authentication or model coverage.

Conditional skips: Build and Deploy Docs, build, sdk-python-tests, langchain-tests, cuvs-tests. These jobs did not execute.

The newly completed API/CLI job's full 551,749-byte log was read. Prior full-log evidence for the other 5 completed non-skipped jobs (373,070 bytes) is reused for the unchanged run/job metadata signatures; those old logs were not downloaded or read again. Dependency and version jobs are static checks.

The API/CLI log records official checkout b05234062ed6ef88d2d83ab5a744b9ba5a2b00d1, with exact main 49f778011ef4f0b556d6064d4ec90343643668cf and this head as parents. Its tree defeaf2cc98dcd9b02c9fbf0a713ba6558ba7db6 matches this PR's reviewed and locally tested tree.

These checks do not establish complete authentication or model coverage, a deployed OpenViking service, real host UI/IM, macOS or performance coverage. Historical results retain their named heads and platform limits.

Historical verification — main 961fb46 synchronization (2026-10-08)

Current head b81c417375edfa478627173fbdde2fa324763421 normally merges main 961fb4639505cff3051cc8faf74c757d50e085f0 into c943681bacd4a4c62534e8b7e895fb66506c6728. The original fix and regressions are retained, including the upstream #5738 usage/configuration changes and #5733 dependency ranges and lock entries. Beyond the automatic merge, only 13 version fields in 12 metadata files advance the five affected releases. Versions are Claude 0.7.6, Codex 0.11.5, agent hooks 0.5.14, OpenCode 0.5.8, DSH 0.5.20, and Pi 0.4.13; paired/config/lock versions align and all six strictly exceed main. DSH 0.5.20 is unchanged by this second refresh.

Windows/WSL Node 24.21.0: citation regressions 21 passed, DSH 95 passed / 1 opt-in live-recall skip, shared config/sync 74 passed, and current Codex config/marketplace/usage 72 passed on each platform. Existing dependency installations were reused. Full plugin/installer/OpenClaw/server suites were not repeated for this scoped refresh.

The generator and version gate on the real committed HEAD pass. Matrices overlap and are not added together. Eight full-plugin skips mean one live recall, four optional Pi SessionManager cases, and three optional Pi transcript-helper cases. No full local server/API, live authentication/models, deployed OpenViking server, real host UI/IM, macOS or performance validation is claimed.

Historical official CI — before head a66b399

Official checks rechecked at 2026-10-08T11:58:13.647975+00:00 for head b81c417375edfa478627173fbdde2fa324763421: 6 SUCCESS / 5 SKIPPED / 0 failures. All 3 parent runs and all actual jobs are completed.

  • Plugin job 113262676210: 1289 passed / 8 skipped / 0 failed; installer 22 passed / 0 skipped / 0 failed. The eight plugin skips are one opt-in live recall, four optional Pi SessionManager cases and three optional Pi transcript-helper cases.
  • API/CLI job 113262673727: filesystem 14 passed; basic API 54 passed / 1 skipped; released CLI 0.4.4 compatibility 16 passed; source CLI 25 passed / 21 skipped. The basic Find test skips after a 401 because embedding credentials are unavailable. Source CLI skips are 19 upstream-authentication cases, one existing timeout-parameter mismatch, and one missing show-skill fixture.
  • OpenClaw job 113264903864: 42 files / 746 tests passed. The official command excludes architecture-boundaries.test.ts; it was not executed.
  • Docs job 113262677739: 61 tests passed / 0 failed / 0 skipped, with the docs build and built-link/anchor checks successful. Deployment is conditionally skipped.
  • check-deps 113262676163 and plugin-versions 113262675831 succeed; these are static dependency/version checks.

Conditional skips: Build and Deploy Docs, build, cuvs-tests, langchain-tests, sdk-python-tests. These jobs were not executed.

All 6 completed non-skipped job logs / 928,320 bytes were read in full and verified against fresh complete run/job metadata. Every log records checkout fdc98a0193e0499c66560fffa66f932544b59bc1; its REST-confirmed parents are main 961fb4639505cff3051cc8faf74c757d50e085f0 and head b81c417375edfa478627173fbdde2fa324763421, and tree 7b8da69dcf70ab4f2f9f8fdd25fd91935813ad04 exactly matches the reviewed/committed tree.

These results cover the recorded main 961fb463 checkout. They do not establish results for a later complete main merge, full authentication/VLM/Embedding, a deployed OpenViking service, real-host UI/IM, online-model behavior, macOS or performance. Historical results below remain attached to their named heads.

Historical local validation — before head b81c417

  • 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

Historical verification — c943681 before main 961fb46

Current head c943681bacd4a4c62534e8b7e895fb66506c6728 is an ordinary merge of main 57a6ea5fdef4f62456996d3dac5583ba36fe1420 into a9ec74b92c5f44c97fdcd51b84df81725b541a80. The original implementation, regressions and generated copies are unchanged; upstream changes, including #5733 dependency ranges and lock entries, are retained. Beyond the automatic merge, only the four DSH version fields in config/package/lock metadata advance from 0.5.19 to 0.5.20. The six releases are Claude Code 0.7.5, Codex 0.11.4, agent hooks 0.5.13, OpenCode 0.5.7, DSH 0.5.20, and Pi 0.4.12, with paired/config/lock versions aligned and all six strictly newer than main. Generator, syntax and the version gate on the real committed HEAD pass.

On Windows and WSL with Node 24.21.0, citation regressions: 21 passed on each platform; DSH: 95 passed / 1 opt-in live-recall skip on each; shared plugin-config and synchronization: 74 passed on each. Existing locked dependencies were reused, without a fresh installation. The local DSH dependency junction is ignored by Git. These scopes overlap and are not added together. Full plugin/installer/OpenClaw/server suites were not repeated for this release synchronization; their earlier results below belong to the named historical heads. This scoped check does not establish Windows-wide success, live authentication/models, real host UI/IM, a deployed OpenViking server, macOS or performance coverage.

Latest main 35fa35bea39cd60503060f0f82de111e21a50844 differs only in .github/workflows/docs-tos.yml. The actual merge is clean and the product scopes match this reviewed/tested tree; the complete later main merge tree was not tested locally. A later landing still needs a fresh version comparison.

Historical synchronization — a9ec74b / 55c3493 (2026-10-08)

Current head a9ec74b92c5f44c97fdcd51b84df81725b541a80 is an ordinary merge of main 55c34934e7b61a8755303e0df1da7a4d4cffcc53 into the previous citation head. The citation implementation, its original seven assertions and fourteen added regressions are unchanged. Upstream #5733 dependency ranges and #5737 Windows bypass changes are retained. All six affected releases are strictly newer than current main, with paired metadata/config/lock versions matching.

The complete tracked Linux source tree d8f3144207af4095798d7300b30dd00905400287 was tested with fresh locked DSH/Pi dependencies: official plugin file list at concurrency 1 1288 passed / 8 skipped / 0 failed, installer 22 passed. Windows: citation tests 21 passed, six related suites 86 passed, Codex config suite 16 passed, and the existing directory-bypass subprocess/loopback-HTTP test 1 passed. These matrices overlap and are not added together. Generator checks and the version gate against real main passed, including a gate on the actual committed merge tree. The eight plugin skips remain one live recall, four optional Pi SessionManager and three optional Pi transcript-helper tests.

These are local plugin results. They do not establish full server, live authentication/model, real host UI/IM, macOS or performance coverage.

Original submission validation with Node.js 24.21.0 against main 6e1030d9951c4c19048e4758ef130be5da4abfe0:

  • Final 21 canonical tests: the byte-exact original module has 10 passed / 11 failed, and the patch has 21 passed on Windows and WSL. The original seven test assertions are preserved.
  • Six complete related suites: 86 passed / 0 failed / 0 skipped on each platform, including the canonical tests.
  • Linux full tracked source snapshot with fresh locked DSH/Pi dependencies: the official plugin file list, concurrency 1, 1287 passed / 8 skipped / 0 failed; installer 22 passed. Skips are one opt-in live recall, four optional Pi SessionManager checks and three optional Pi transcript helpers.
  • Independent public fresh/cache/budget/fallback controls: baseline 20 normal / 19 failed to fixed 39/39 on each platform. These overlap the suites and are not added to their totals.
  • Syntax, generated-copy consistency, lock metadata, git diff --check and all six version gates passed.

These results use controlled compressors/HTTP responses. They do not cover live models, deployed OpenViking, authorization, real host UI/IM, macOS or performance. Empty served-URI sets retain the legacy passthrough and do not establish citation validity. The Windows complete shared-suite attempt stopped in bootstrap/WSL setup and is not counted as a completed suite. That original Windows run predates the upstream directory-bypass fix in #5737; the current synchronized tree includes that upstream fix. Local results are separate from official CI.

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

Additional Notes

The citation-validation contracts introduced in #3534 and #4445 retain their original author credit. #5022 owns server provenance rewriting and #5697 changes a host compressor invocation option; this patch changes client digest budgeting and cached finalization. It does not change retrieval ranking, identity rewriting or server behavior.

Historical official CI — c943681 before main 961fb46

Actual jobs collected at 2026-10-08T09:27:46.157104+00:00 for head c943681bacd4a4c62534e8b7e895fb66506c6728: 3 SUCCESS / 2 QUEUED / 1 IN_PROGRESS / 5 SKIPPED. All associated parent runs remain unfinished; this is not a completed CI result.

No completed parent run has full-log coverage in this snapshot. Successful job metadata is listed separately from full-log evidence; dependency/version checks are static checks.

API/CLI is still unfinished, so current-head API/released-CLI/source-CLI pass counts are not claimed. Other successful job metadata without a completed parent run and full log does not establish test counts. Earlier full logs and successful API/CLI counts below remain historical and do not establish this new head's results.

Historical official CI — a9ec74b / 55c3493

All three current-head runs have completed. Fresh actual jobs at 2026-10-08T06:01:11.428829+00:00 on head a9ec74b92c5f44c97fdcd51b84df81725b541a80: 6 SUCCESS / 5 conditional SKIP / 0 failed / 0 unfinished. All six completed non-skipped job logs were read in full (950408 bytes). Plugin 1288 passed / 8 skipped, installer 22 passed; OpenClaw 42 files / 746 tests passed, with architecture-boundaries.test.ts excluded by the official command; Docs theme 61 passed, documentation build and link checks passed; version and dependency checks succeeded. The eight plugin skips are one live recall, four optional Pi SessionManager and three optional Pi transcript-helper tests.

API/CLI run 37732623518, job 113164986521, completed successfully at 2026-10-08T05:55:34Z. Its 579426-byte complete log (SHA256 9e8243fbef4769d5fb58ba52bbebdfe7fa0fc176b1138d8c998d708576f1c2a8) records filesystem 14 passed, basic API 54 passed / 1 skipped, released CLI 0.4.4 compatibility: 16 passed, and source CLI 25 passed / 21 skipped. The basic Find API skip returned 401 because embedding credentials were unavailable. Source CLI skips are 19 unavailable upstream-auth cases, one existing CLI/server timeout-parameter mismatch, and one missing show-skill fixture. These results do not establish complete authentication, VLM/Embedding, real host UI/IM, deployed production OpenViking, macOS or performance coverage.

Official checkout 42630d1fd has parents [55c34934e7b61a8755303e0df1da7a4d4cffcc53, a9ec74b92c5f44c97fdcd51b84df81725b541a80] and tree d8f3144207af4095798d7300b30dd00905400287, matching the actual merge and locally tested source tree. PR checks and Docs also completed successfully. These are automatic runs triggered by the necessary new-head push. No workflow, timeout or assertion was changed, and no run was manually rerun.

Historical CI on the previous citation head

As of 2026-10-07 20:36 UTC, head 69533cad has 5 successful checks / 5 conditional skips / 1 cancelled check, with no unfinished runs. Full completed logs show official Ubuntu plugin tests 1287 passed / 8 skipped, installer 22 passed, OpenClaw 746 passed across 42 files, and Docs 61 passed with site build/link/anchor checks passed. Plugin-version and dependency checks succeeded. Plugin skips are one opt-in live recall, four optional Pi SessionManager checks and three optional Pi transcript helpers; OpenClaw excludes architecture-boundaries.test.ts. These logs use checkout e0ff02cb7, with parents main 6e1030d9 + this head and the tested tree c4d0ba70.

The API/CLI job was cancelled at 20:04 UTC while running the Ubuntu system-dependency installation command. Its official annotation states that the job exceeded the 60-minute execution limit; the workflow is unchanged from main. The log last shows APT index fetches and repeated Ign entries before cancellation, but does not establish why installation stopped progressing. API tests, released-CLI compatibility tests and source-CLI integration tests were skipped and did not run; there are no test-report artifacts. The successful checks above do not establish API/CLI completion. No rerun or workflow change was made.

Maintenance validation (2026-10-12, main 9093583)

Synchronized this existing branch with upstream 9093583b34050619ba6f5a6a11b003b0adca15e7 after the upstream plugin releases changed. The affected release versions are now Claude 0.7.9, Codex 0.11.8, agent-hook 0.5.17, OpenCode 0.5.11, DSH 0.5.23, and Pi 0.4.16, strictly above that main. Paired manifests, configuration, and lock metadata remain consistent.

Windows and Linux each pass 21 focused regressions, 97 release/configuration checks, and 41 Codex configuration/marketplace checks. The DSH suite passes 95 checks and skips one live-host check on each platform. Syntax, generated-copy consistency, and the version gate also pass on the actual commit. These suites overlap and their counts are not added. Ignored runtime dependencies are cached; this validation does not cover a live host, model, deployment, or the full server.

For current head 37ec0e8bae893909b6491455d622cff4c76cb6e6, the actual official jobs read at 2026-10-12T05:40:27.859186+00:00 report 4 in_progress, 1 queued, 1 skipped. Conditional skips are not executions; queued or running jobs are not passes. Earlier CI/validation sections describe their earlier heads.

Maintenance validation (2026-10-12, main 2e706d7)

Synchronized this existing branch with upstream 2e706d7193aa47c05d986e68b61b3b994d41fa55 after the upstream plugin releases changed. The affected release versions are now Claude 0.7.10, Codex 0.11.9, agent-hook 0.5.18, OpenCode 0.5.12, DSH 0.5.24, and Pi 0.4.17, strictly above that main. Paired manifests, configuration, and lock metadata remain consistent.

Windows and Linux each pass 51 focused regressions (including the 30 current-main capture-text regressions), 97 release/configuration checks, and 41 Codex configuration/marketplace checks. The DSH suite passes 95 checks and skips one live-host check on each platform. Syntax, generated-copy consistency, and the version gate also pass on the actual commit. These suites overlap and their counts are not added. Ignored runtime dependencies are cached; this validation does not cover a live host, model, deployment, or the full server.

For current head 5373a607f09d1ea4e1c66514018091535f35a5e7, the actual official job payloads collected between 2026-10-12T07:06:53.910804+00:00 and 2026-10-12T07:06:56.584253+00:00 report 4 in_progress, 1 queued, 1 skipped. Conditional skips are not executions; queued or running jobs are not passes. Earlier CI/validation sections describe their earlier heads.

@ZaynJarvis ZaynJarvis added the agent-plugins Agent harness and plugin integrations label Oct 8, 2026
@ktz03
ktz03 marked this pull request as ready for review October 9, 2026 02:30
oliver-mee added a commit to oliver-mee/OpenViking that referenced this pull request Nov 18, 2026
Backport the canonical digest finalizer and regression tests from volcengine#5727.

Co-authored-by: ktz03 <241894163+ktz03@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-plugins Agent harness and plugin integrations

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

[Bug]: Client recall compression truncates served citations after URI repair

2 participants