Skip to content

[fix] isolate example binding from lifecycle tests (PKG-32) - #26

Draft
vt128 wants to merge 3 commits into
masterfrom
codex/pkg32-network-free-example-20261107
Draft

vt128 wants to merge 3 commits into
masterfrom
codex/pkg32-network-free-example-20261107

Conversation

@vt128

@vt128 vt128 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Running two web test processes concurrently can make Example_basicWebServer panic on localhost:8080 with address already in use. The example prints only a configuration result, then unnecessarily binds a shared fixed port. A controlled run with 8080 already occupied reproduces the same failure on unchanged master without the L1 replacement.

Keep the example focused on public server construction and route registration. Move successful script-facing lifecycle coverage into the existing server tests: inject a real wrapper backed by an OS-assigned loopback port, call start, is_running and stop through a Starlet Machine, assert all state transitions and clean up on failure. Production code, type mapping, Go 1.25.0, interpreter and dependencies remain unchanged.

Validation:

  • With 8080 held by another listener, the original example fails; the corrected example and real script lifecycle test pass with race/count=2.
  • Full build, race/count=2 with atomic coverage, and vet pass on host Go 1.27.3 and Docker Go 1.25.0, each with existing dependencies and with only the reviewed L1 candidate replaced (four concurrent-pair legs).
  • Covered statements increase from host 1359 to 1360/1615 and floor 1360 to 1361/1615; both L1 comparison legs match. The original pre-commit hook passes.
  • Docker test clones are writable for an existing relative fixture write; shared source/candidate mounts stay read-only. The initial read-only fixture failures and original fixed-port failure are retained separately rather than reported as successful runs.

Refs PKG-32 / LOCAL-013. This PR directly targets master and supersedes #25, whose complete supported-runner and stacked-PR CI changes are included unchanged. Production code, dependencies and the existing validation scope remain unchanged. It stays Draft/HOLD until all required exact-head CI and coverage gates pass; separate security remediation is not resolved by these test changes. No merge or tag is included.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@vt128
vt128 force-pushed the codex/pkg32-network-free-example-20261107 branch from e8a26b6 to 43faf4b Compare November 7, 2026 15:38
@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@vt128
vt128 changed the base branch from codex/ci-macos15-adoption-20261107 to master November 12, 2026 01:36
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.

1 participant