Skip to content

test(proxy): keep managed proxy cert fixture in temp dir#77061

Closed
mjamiv wants to merge 2 commits into
openclaw:debug-proxy-managed-proxyfrom
mjamiv:fix/77010-temp-ca-fixture
Closed

test(proxy): keep managed proxy cert fixture in temp dir#77061
mjamiv wants to merge 2 commits into
openclaw:debug-proxy-managed-proxyfrom
mjamiv:fix/77010-temp-ca-fixture

Conversation

@mjamiv

@mjamiv mjamiv commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • stack on fix: guard debug proxy CONNECT under managed proxy #77010 to address the test-fixture review finding
  • allocate the managed-proxy debug proxy blob/cert fixture under os.tmpdir()
  • remove the per-test temp root during cleanup so generated root-ca-key.pem is not created under the checkout

Test

  • pnpm exec oxfmt --check --threads=1 src/proxy-capture/proxy-server.managed-proxy.test.ts
  • OPENCLAW_LOCAL_CHECK=0 pnpm test src/proxy-capture/proxy-server.managed-proxy.test.ts src/proxy-capture/proxy-server.test.ts src/proxy-capture/runtime.test.ts src/proxy-capture/env.test.ts
  • OPENCLAW_LOCAL_CHECK=0 pnpm check:changed -- --base upstream/main --head HEAD

Stacked on #77010.

@clawsweeper

clawsweeper Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Summary
This PR changes the managed-proxy debug proxy test fixture to create blob and cert directories under an os.tmpdir() root and remove that root during cleanup.

Reproducibility: not applicable. as a PR cleanup rather than a current-main bug. Source inspection shows the debug proxy CA helper writes generated cert material under settings.certDir, so the parent branch's repo-relative test cert fixture is the relevant behavior being cleaned up.

Next step before merge
This is a clean stacked test-only PR, but it depends on the open draft parent #77010, so the next action is maintainer review and landing order rather than an automated repair.

Security
Cleared: The diff is test-only and does not change dependencies, workflows, package resolution, production code execution, or secret handling.

Review details

Best possible solution:

Keep the fixture cleanup paired with #77010 and land it after or with the parent if the managed-proxy policy change is accepted.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a PR cleanup rather than a current-main bug. Source inspection shows the debug proxy CA helper writes generated cert material under settings.certDir, so the parent branch's repo-relative test cert fixture is the relevant behavior being cleaned up.

Is this the best way to solve the issue?

Yes, the proposed direction is the narrowest maintainable fix for the test-fixture concern: allocate a per-test temp root under os.tmpdir() and remove it during cleanup. The merge path should remain tied to the parent PR rather than handled as an independent main-branch change.

What I checked:

Likely related people:

  • Vincent Koc: Current-main blame and git log -S for the debug proxy server and CA helper point to commit d5ecee2 for the relevant implementation path. (role: current debug proxy history owner; confidence: medium; commits: d5ecee2cf332; files: src/proxy-capture/proxy-server.ts, src/proxy-capture/ca.ts, src/proxy-capture/proxy-server.test.ts)
  • jesse-merhi: The current PR is explicitly stacked on fix: guard debug proxy CONNECT under managed proxy #77010, which introduces the managed-proxy CONNECT policy and the test fixture this PR adjusts. (role: parent PR owner; confidence: medium; commits: f1f7ffce2c7a; files: src/proxy-capture/proxy-server.managed-proxy.test.ts, src/proxy-capture/proxy-server.ts, docs/cli/proxy.md)

Remaining risk / open question:

Codex review notes: model gpt-5.5, reasoning high; reviewed against 11c600cf1993.

@clawsweeper clawsweeper Bot force-pushed the debug-proxy-managed-proxy branch from f1f7ffc to aaa52a7 Compare May 4, 2026 03:48
@clawsweeper clawsweeper Bot requested a review from a team as a code owner May 4, 2026 03:48
@clawsweeper clawsweeper Bot deleted the branch openclaw:debug-proxy-managed-proxy May 4, 2026 03:54
@clawsweeper clawsweeper Bot closed this May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants