Skip to content

test(scripts): opt fleet-soak agents into portwing's plaintext edge URL gate - #870

Merged
scttbnsn merged 1 commit into
dev/v1.7from
fix/v1.7-soak-insecure-edge-url
Aug 25, 2026
Merged

scttbnsn merged 1 commit into
dev/v1.7from
fix/v1.7-soak-insecure-edge-url

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

The scheduled Portwing fleet soak has been failing deterministically at 0/8 agents registered since portwing v0.9.9. Root cause: portwing PR CodesWhat/portwing#201 (correct, intentional hardening) fails closed on http:// and ws:// controller URLs in edge mode unless ALLOW_INSECURE_EDGE_URL=true. The soak spawns agents against http://127.0.0.1 by design, so every agent exited at config load before dialing the controller. Bisection: soak runs against portwing 0a57a91 (v0.9.8) passed; runs against edf7394 (v0.9.9) fail identically. Verified directly by building portwing at edf7394 and running it with the soak's exact env, with and without the opt-in.

Fix: set ALLOW_INSECURE_EDGE_URL in spawnAgent's env with a comment, plus a source-level regression test so the opt-in can't be dropped silently. Not a product defect in drydock; nothing in the rc.3 line is implicated and this doesn't gate the GA cut.

Verified: script tests green, biome clean, full pre-push gate green.

Changelog

  • 🐛 Fixed fleet-soak agents exiting when Portwing rejects plaintext loopback controller URLs.
  • 🔧 Changed spawnAgent to set ALLOW_INSECURE_EDGE_URL: 'true'.
  • ✨ Added a source-level regression test for the environment configuration.

Validation

  • Script tests passed.
  • Biome passed.
  • Full pre-push gate passed.

…RL gate

portwing v0.9.9 (CodesWhat/portwing#201) fails closed on http:// and ws://
controller URLs in edge mode unless ALLOW_INSECURE_EDGE_URL=true. The soak
spawns agents against http://127.0.0.1 by design, so since that release
every agent exited at config load and the scheduled soak timed out at 0/8
registered. Set the opt-in in spawnAgent's env and guard it with a source
assertion so it can't be dropped silently. Portwing's hardening is correct
and intentional; the harness just hadn't caught up.
@scttbnsn

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@vercel

vercel Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
drydock-website Ready Ready Preview Aug 25, 2026 12:26pm
drydockdemo-website Ready Ready Preview Aug 25, 2026 12:26pm

@coderabbitai

coderabbitai Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bc7ab588-0ff8-4f3e-9492-6d5f753acef8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 70bceb1b-6d55-4aa9-9973-ddb824af5f90

📥 Commits

Reviewing files that changed from the base of the PR and between da1f6cb and fa27c3b.

📒 Files selected for processing (2)
  • scripts/portwing-fleet-soak.mjs
  • scripts/portwing-fleet-soak.test.mjs

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The soak script now sets ALLOW_INSECURE_EDGE_URL=true when it starts agents with the loopback plaintext DRYDOCK_URL. A new test reads the script source, verifies the setting, and confirms that it follows the DRYDOCK_URL configuration.

Suggested labels: second-opinion

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/v1.7-soak-insecure-edge-url

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the second-opinion Summon Greptile for a second-opinion review label Aug 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@greptileai Review exact head fa27c3b9c78f3c82536e421703765209b5a5c406. Review for correctness, security issues, and cross-file regressions.

@coderabbitai

coderabbitai Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttbnsn
scttbnsn merged commit dcd211a into dev/v1.7 Aug 25, 2026
35 checks passed
@scttbnsn
scttbnsn deleted the fix/v1.7-soak-insecure-edge-url branch August 26, 2026 17:47
scttbnsn added a commit that referenced this pull request Aug 27, 2026
…RL gate (#898)

Backport of dcd211a (#870) from dev/v1.7.

portwing v0.9.9 (CodesWhat/portwing#201) fails closed on http:// and ws://
controller URLs in edge mode unless ALLOW_INSECURE_EDGE_URL=true. The soak
spawns agents against http://127.0.0.1 by design, so since that release
every agent exited at config load and the run timed out at 0/8 registered.
Set the opt-in in spawnAgent's env and guard it with a source assertion so
it can't be dropped silently. Portwing's hardening is correct and
intentional; the harness just hadn't caught up.

v1.6 needs this independently of v1.7. Dispatching the soak on unmodified
dev/v1.6 reproduces the failure byte-for-byte against portwing edf7394e,
and it stayed red on #895 where the only diff was three display-name
strings. Not a protocol break and not user-facing: portwing has always
documented edge mode's controller trust as TLS-only, so this only bites the
harness's loopback dial.

(cherry picked from commit dcd211a)

This branch was successfully deployed

2 active deployments
Preview – drydock-website — fa27c3b9 Deployed Aug 25, 2026 by vercel[bot]
Preview – drydockdemo-website — fa27c3b9 Deployed Aug 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

second-opinion Summon Greptile for a second-opinion review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants