fix: backport managed MCP http_headers to stable #1

Open
paperclip wants to merge 1 commit from HOM-65-stable-mcp-http-headers into stable
First-time contributor

Thinking Path

  • Paperclip manages companies of AI agents.
  • The Codex adapter writes managed MCP server configuration.
  • The stable writer uses the key headers.
  • Codex needs the key http_headers for this HTTP authentication value.
  • Master already has the correct writer and a regression test.
  • This pull request copies only that change and test to stable.
  • The stable branch keeps its other behavior.

Linked Issues or Issue Description

What happened?

The stable writer emits headers. Runtime MCP tools can fail to become available to Codex.

Expected behavior

The writer emits http_headers and keeps the same URL and bearer value.

Steps to reproduce

  1. Use stable commit d2c614c18ce39ee8dfa57524742662dede8597eb.
  2. Copy the two regression assertions from master commit f00ed1fb846e66ec94a7d12635e31fd6237d06f8.
  3. Run the test named replaces the managed MCP block in codex-home.test.ts.
  4. The test fails because the old writer emits headers.

Paperclip version or commit

Base: d2c614c18ce39ee8dfa57524742662dede8597eb. Source of the change: f00ed1fb846e66ec94a7d12635e31fd6237d06f8.

What Changed

  • Change one writer key from headers to http_headers.
  • Copy the existing test assertions. Require http_headers. Reject the old top-level key.
  • Keep unrelated master changes out of this backport.
  • Change two files: 3 lines added and 2 lines removed.

Verification

  • Old writer with the new assertions: 1 expected failure, 52 tests skipped.
  • pnpm exec vitest run --config packages/adapters/codex-local/vitest.config.ts packages/adapters/codex-local/src/server/codex-home.test.ts: 53 tests pass.
  • pnpm --filter @paperclipai/adapter-codex-local typecheck: passes.
  • node --test scripts/release-package-map.test.mjs scripts/acpx-patch-packaging.test.mjs: 28 tests pass.
  • An isolated workspace export resolves to src/server/index.ts. A synthetic tsx fixture loads codex-home.ts through its .js import and writes the correct key. The fixture makes no network request.
  • git diff --check: passes.
  • Dependencies were installed with lifecycle scripts disabled. Fixtures used a run scratch directory. No household services or live secrets were used.
  • Full workspace typecheck, tests and build were not run. This task permits narrow source preparation only. These results do not prove a full release or live tool availability.

Risks

  • Low code risk. The changed key matches the existing master writer.
  • A published package can load dist instead of source. The operator must confirm the live export and loader before using a source overlay.
  • Deployment is not approved. SRE must define exact target and service actions. Head of IT must obtain board approval for the exact commit, artifact and actions.
  • Before an approved overlay, compare the target source hash with the baseline. Preserve prior bytes and file metadata. Reject drift.
  • Apply only the approved writer file. Regenerate managed configuration through the adapter. Do not edit generated configuration by hand.
  • Rollback must restore the approved prior source bytes and metadata. It must use the approved service action and regenerate managed configuration through the adapter.
  • After approval, a fresh run must prove both connection tools are callable. It must also perform one approved search of metadata only. The current tests do not prove those outcomes.

Model Used

OpenAI GPT-6, acting as Codex, with tool use and code execution. The runtime does not expose a more specific model identifier or context window size.

Checklist

  • I have included a thinking path that traces from project context to this change
  • I have specified the model used and the available version and capability details
  • I have checked ROADMAP.md; this is a bounded backport of an existing fix
  • I have reused the known master fix; no duplicate master or upstream fix PR was opened
  • I have described the bug in this PR with the bug template labels
  • I have kept internal issue references and instance URLs out of this description
  • The branch follows the assigned fork issue naming rule
  • I have run the scoped tests locally and they pass
  • I have copied the existing regression assertions
  • I have documented the source overlay and rollback requirements in the separate handoff artifact
  • I have considered and documented risks
  • Full workspace release checks and CI approval are pending; this is source preparation only
  • Greptile review is not available in the current evidence
  • I will address reviewer comments before any approved merge
## Thinking Path > - Paperclip manages companies of AI agents. > - The Codex adapter writes managed MCP server configuration. > - The stable writer uses the key `headers`. > - Codex needs the key `http_headers` for this HTTP authentication value. > - Master already has the correct writer and a regression test. > - This pull request copies only that change and test to stable. > - The stable branch keeps its other behavior. ## Linked Issues or Issue Description **What happened?** The stable writer emits `headers`. Runtime MCP tools can fail to become available to Codex. **Expected behavior** The writer emits `http_headers` and keeps the same URL and bearer value. **Steps to reproduce** 1. Use stable commit `d2c614c18ce39ee8dfa57524742662dede8597eb`. 2. Copy the two regression assertions from master commit `f00ed1fb846e66ec94a7d12635e31fd6237d06f8`. 3. Run the test named `replaces the managed MCP block` in `codex-home.test.ts`. 4. The test fails because the old writer emits `headers`. **Paperclip version or commit** Base: `d2c614c18ce39ee8dfa57524742662dede8597eb`. Source of the change: `f00ed1fb846e66ec94a7d12635e31fd6237d06f8`. ## What Changed - Change one writer key from `headers` to `http_headers`. - Copy the existing test assertions. Require `http_headers`. Reject the old top-level key. - Keep unrelated master changes out of this backport. - Change two files: 3 lines added and 2 lines removed. ## Verification - Old writer with the new assertions: 1 expected failure, 52 tests skipped. - `pnpm exec vitest run --config packages/adapters/codex-local/vitest.config.ts packages/adapters/codex-local/src/server/codex-home.test.ts`: 53 tests pass. - `pnpm --filter @paperclipai/adapter-codex-local typecheck`: passes. - `node --test scripts/release-package-map.test.mjs scripts/acpx-patch-packaging.test.mjs`: 28 tests pass. - An isolated workspace export resolves to `src/server/index.ts`. A synthetic `tsx` fixture loads `codex-home.ts` through its `.js` import and writes the correct key. The fixture makes no network request. - `git diff --check`: passes. - Dependencies were installed with lifecycle scripts disabled. Fixtures used a run scratch directory. No household services or live secrets were used. - Full workspace typecheck, tests and build were not run. This task permits narrow source preparation only. These results do not prove a full release or live tool availability. ## Risks - Low code risk. The changed key matches the existing master writer. - A published package can load `dist` instead of source. The operator must confirm the live export and loader before using a source overlay. - Deployment is not approved. SRE must define exact target and service actions. Head of IT must obtain board approval for the exact commit, artifact and actions. - Before an approved overlay, compare the target source hash with the baseline. Preserve prior bytes and file metadata. Reject drift. - Apply only the approved writer file. Regenerate managed configuration through the adapter. Do not edit generated configuration by hand. - Rollback must restore the approved prior source bytes and metadata. It must use the approved service action and regenerate managed configuration through the adapter. - After approval, a fresh run must prove both connection tools are callable. It must also perform one approved search of metadata only. The current tests do not prove those outcomes. ## Model Used OpenAI GPT-6, acting as Codex, with tool use and code execution. The runtime does not expose a more specific model identifier or context window size. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used and the available version and capability details - [x] I have checked ROADMAP.md; this is a bounded backport of an existing fix - [x] I have reused the known master fix; no duplicate master or upstream fix PR was opened - [x] I have described the bug in this PR with the bug template labels - [x] I have kept internal issue references and instance URLs out of this description - [x] The branch follows the assigned fork issue naming rule - [x] I have run the scoped tests locally and they pass - [x] I have copied the existing regression assertions - [x] I have documented the source overlay and rollback requirements in the separate handoff artifact - [x] I have considered and documented risks - [ ] Full workspace release checks and CI approval are pending; this is source preparation only - [ ] Greptile review is not available in the current evidence - [x] I will address reviewer comments before any approved merge
fix: backport managed MCP http_headers to stable
Some checks failed
pr.yml / fix: backport managed MCP http_headers to stable (pull_request) Failing after 0s
commitperclip PR Review / review (pull_request_target) Failing after 1s
29de751591
Backport only the writer key and existing regression assertions from f00ed1fb84.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Some checks failed
pr.yml / fix: backport managed MCP http_headers to stable (pull_request) Failing after 0s
commitperclip PR Review / review (pull_request_target) Failing after 1s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'HOM-65-stable-mcp-http-headers:HOM-65-stable-mcp-http-headers'
git switch 'HOM-65-stable-mcp-http-headers'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'stable'
git merge --no-ff 'HOM-65-stable-mcp-http-headers'
git switch 'HOM-65-stable-mcp-http-headers'
git rebase 'stable'
git switch 'stable'
git merge --ff-only 'HOM-65-stable-mcp-http-headers'
git switch 'HOM-65-stable-mcp-http-headers'
git rebase 'stable'
git switch 'stable'
git merge --no-ff 'HOM-65-stable-mcp-http-headers'
git switch 'stable'
git merge --squash 'HOM-65-stable-mcp-http-headers'
git switch 'stable'
git merge --ff-only 'HOM-65-stable-mcp-http-headers'
git switch 'stable'
git merge 'HOM-65-stable-mcp-http-headers'
git push origin 'stable'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ai/paperclip!1
No description provided.