Skip to content

test(integrations): check the prompt-privacy, bootstrap, and transport copies - #2251

Merged
hidb4ai merged 1 commit into
oceanbase:masterfrom
Fengzdadi:test/shared-plugin-copies
Oct 27, 2026
Merged

hidb4ai merged 1 commit into
oceanbase:masterfrom
Fengzdadi:test/shared-plugin-copies

Conversation

@Fengzdadi

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Part of #2250 (plan step 1, "Guard what is already shared"). Related to #2084 (R14).

Rationale for this change

Several hosts ship the same source file, copied into each plugin:

File Copies
hooks/prompt_privacy.py Claude Code, Codex, WorkBuddy
hooks/bootstrap_context.py Claude Code, Codex
shared/prompt-privacy.mjs Kimi Code, ZCode
src/transport.ts DSH, OpenClaw, OpenCode, Pi

#2148 added tests/test_integration_shared_files.py for the shared-file drift that #2084 lists under R14. It compares only powercontext_client_config.py and hooks/prepared_context.py, so one copy of a file above could change without the others:

What changes are included in this PR?

  • tests/test_integration_shared_files.py also checks the four files above.
    • It searches integrations/*/plugins/* instead of integrations/*/plugins/powercontext, because the OpenClaw plugin lives in plugins/memory-powercontext.
    • It skips files under node_modules and .venv, so an installed dependency with the same file name is not counted as a copy.
  • The two copies of hooks/bootstrap_context.py differed only in the indentation of one license-header line. The Claude Code copy now uses the form the Codex copy and most of the repository use.
  • Not included: OpenCode and Pi also share src/memory-operations.ts and src/secrets.ts, but DSH has its own file under each name, and the two secrets.ts copies differ in two comments and one variable name.

Are there any user-facing changes?

No. The change adds test coverage and changes whitespace in one license header.

How was this change tested?

  • tests/test_integration_shared_files.py: 6 passed.
  • Mutation check: appending one line to the Codex hooks/prompt_privacy.py, the Claude Code hooks/bootstrap_context.py, the ZCode shared/prompt-privacy.mjs, or the OpenClaw src/transport.ts fails the matching case each time.
  • make check passed.
  • make unit-test: 6235 passed, 300 skipped, and 1 timing failure in tests/builtin/runtime/test_processing_scheduler.py::test_terminal_cache_overflow_does_not_launch_blocked_workers_or_starve_healthy_tail[automatic], which waited 20 seconds for a worker. It passed in three runs on its own, and this PR does not touch the processing scheduler.

AI usage statement

Claude Code (Claude Opus 5.5) was used to write the change, review it with an independent agent, and draft this description. I reviewed the change.

…t copies

Claude Code, Codex, and WorkBuddy ship the same prompt-privacy helper, Claude Code and
Codex the same bootstrap-context validator, Kimi Code and ZCode the same JavaScript
prompt-privacy module, and DSH, OpenClaw, OpenCode, and Pi the same TypeScript transport.
The shared-files test compared only the client configuration and the prepared-context
helper, so any of these copies could change without the others. The privacy copies run
the shared privacy fixture, which notices a difference only on its cases.

The two bootstrap-context copies differed only in the indentation of one license-header
line; the Claude Code copy now uses the form most of the repository uses. The plugin glob
covers every package directory, because the OpenClaw plugin lives in
plugins/memory-powercontext, and skips installed dependencies.
Copilot AI balanced review requested due to automatic review settings October 26, 2026 19:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@AlexStocks AlexStocks added the 1.5.0 v1.5.0 release tracking label Oct 27, 2026

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hidb4ai
hidb4ai merged commit 3a2b6de into oceanbase:master Oct 27, 2026
52 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.5.0 v1.5.0 release tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants