Skip to content

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

Merged
scttbnsn merged 1 commit into
dev/v1.6from
fix/v1.6-soak-edge-url
Aug 27, 2026
Merged

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

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Backport of dcd211a3 (#870) from dev/v1.7. Straight cherry-pick, 2 files, 19 insertions, no conflicts.

What broke

portwing v0.9.9 (CodesWhat/portwing#201) added a fail-closed check: edge mode refuses to start when DRYDOCK_URL uses a plaintext http:// or ws:// scheme, unless ALLOW_INSECURE_EDGE_URL=true is also set.

scripts/portwing-fleet-soak.mjs spawns its agents against http://127.0.0.1:<port> by design. Since that release every agent process exits at config parse, before attempting a WebSocket handshake, and the run times out with initialConnections: 0.

Why this is v1.6's problem independently of v1.7

The workflow checks out CodesWhat/portwing at ref: main, a floating ref, so the gate arrived on a branch nobody was changing. Two things pin the cause to portwing rather than to anything here:

dev/v1.7 took the opt-in on 2026-08-25 and has been green since. dev/v1.6 never got it, so the soak has been deterministically red here since 2026-08-23.

Not a user-facing break

portwing has always documented edge mode's controller trust as TLS-only, and the supported form is DRYDOCK_URL=https://.... Anyone running drydock behind TLS sees no change on either line. The soak's loopback dial is what trips the new gate, which makes this a harness fix, not a compatibility fix.

The 16 lines in portwing-fleet-soak.test.mjs are a source assertion so the opt-in can't be dropped silently later.

Worth doing separately

ref: main on a cross-repo checkout means a green run only proves compatibility with whatever portwing was at that minute, and a red one can't distinguish "we broke it" from "they shipped". That cost a diagnosis here and, separately, one in sockguard from the same portwing change. Tracked for follow-up; out of scope for a backport.

Changelog

  • 🔧 Changed scripts/portwing-fleet-soak.mjs to set ALLOW_INSECURE_EDGE_URL: 'true' for spawned agents.
  • 🐛 Fixed soak-agent startup failures caused by plaintext loopback edge URLs being rejected by portwing v0.9.9+.
  • ✨ Added a source-level test that verifies the opt-in remains paired with the loopback controller URL.

…RL gate

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)
@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

Deployment failed for project drydock-website with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/codeswhat?upgradeToPro=build-rate-limit

@coderabbitai

coderabbitai Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Review Change Stack

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: 47247b1b-1d8b-4899-a8fc-3e98afe076ee

📥 Commits

Reviewing files that changed from the base of the PR and between 733598e and 440ea3f.

📒 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

spawnAgent now sets ALLOW_INSECURE_EDGE_URL: 'true' for portwing agents. This permits connections to the plaintext loopback controller URL in edge mode. A source-level test verifies that the setting appears in the DRYDOCK_URL environment block.

Merge Risk: ⚪ Minimal · up to 440ea

This localized test-harness change enables the fleet-soak agents to use the required loopback URL opt-in and adds a source assertion to preserve that behavior; no actionable merge-blocking risk remains.

🚥 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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 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.6-soak-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.

@scttbnsn

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

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 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Straight cherry-pick of dcd211a, verified against the file rather than the diff: the opt-in is at portwing-fleet-soak.mjs:318 and the source assertion at portwing-fleet-soak.test.mjs:64,67. The soak itself is green on this PR, which is the part that matters here since the workflow is in its own paths filter and so actually ran.

@ALARGECOMPANY ALARGECOMPANY left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agreed this is a harness fix and not a compatibility one. portwing has documented edge mode as TLS-only since well before v0.9.9, so the gate only bites the soak's loopback dial and no supported deployment changes behaviour. Checked the failure was pre-existing on dev/v1.6 independently of #895.

@scttbnsn
scttbnsn merged commit 412f8f1 into dev/v1.6 Aug 27, 2026
31 of 33 checks passed
@scttbnsn
scttbnsn deleted the fix/v1.6-soak-edge-url branch August 27, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants