Skip to content

Browse daemon skips port 10080, which Chromium refuses, and a process-census test stops flaking - #4554

Merged
capy-ai[bot] merged 4 commits into
mainfrom
flaky-fix-2026-11-20-port-and-census
Nov 20, 2026
Merged

capy-ai[bot] merged 4 commits into
mainfrom
flaky-fix-2026-11-20-port-and-census

Conversation

@garrytan

@garrytan garrytan commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

The browse daemon no longer picks port 10080, which Chromium refuses to open, so its welcome page can't fail with net::ERR_UNSAFE_PORT.
This fixes two flaky free tests at their cause: the xvfb welcome test and the paid-shard retention check.
Nothing for the reader to do.

What changed
  • browse/src/port-allocator.ts: a random draw that lands on a port Chromium blocks (CHROMIUM_UNSAFE_PORTS, from kRestrictedPorts in Chromium's net/base/port_util.cc; 10080 is the only one inside 10000-49151) is drawn again. Explicit BROWSE_PORT values are unchanged.
  • test/bootstrap-retention.test.ts: a new test covers a same-user process that denies its fd table and exits during the census. It fails against main's helper and passes here.
  • ARCHITECTURE.md: the port-selection paragraph says a draw on 10080 is redrawn.
  • changelog.d/flaky-fix-2026-11-20-port-and-census.md: the release-note fragment.
  • test/helpers/bootstrap-retention.ts: when the process census at scope creation gets EACCES/EPERM on a same-user process and that process has already exited, it skips it instead of throwing. A live uninspectable process is still recorded as before, and every other error still throws. Skipping can only shorten the tolerated list, so the later quiet check is as strict as before.
Evidence
  • Free Tests 44539190714 (main 1730386), browse/test/xvfb.test.ts "welcome: startup settles welcome before publishing daemon readiness": the daemon log tail printed Failed to navigate to welcome page: goto: net::ERR_UNSAFE_PORT at http://127.0.0.1:10080/welcome. The new allocator test is red on main (Expected: not 10080) and green here.
  • Free Tests 44548125960 (PR Pre-commit /verify fails on a timeout, and the review collector stops reading reviewers' scope lists as findings (GST-3201) #4527 @ 2c67625), test/bootstrap-retention-shard.test.ts "ack-failure preserves the real attempt through runner cleanup": the controller exited 1 with EACCES: permission denied, readlink '/proc/60805/cwd' at createBootstrapRetentionScope (bootstrap-retention.ts:158). Stress repro (8 loops forking children that call prctl(PR_SET_DUMPABLE, 0) and exit, while creating 3,000 scopes): main 9 of 3,000 failed (4 readlink cwd, 5 scandir fd); this branch 0 of 3,000.
  • Focused: terminal-agent-port-range + findport 16/16; bootstrap-retention + bootstrap-retention-shard 40/40; typecheck clean.
Agent notes

Daily flaky pass 2026-11-20 (GSTA-668, GST-3276). Ledger: handoffs/flaky-ledger.md.

Approvals

No approvals recorded for branch flaky-fix-2026-11-20-port-and-census.
Plan: exempt: flaky
Plan check: exempt flaky

Review (one pass, light depth, one fix round): the batched specialist found one INFORMATIONAL test gap at test/helpers/bootstrap-retention.ts:163, fixed in f048b78. The adversarial reader raised three Low notes, left noted: an explicit BROWSE_PORT=10080 is still accepted (pre-existing); the unsafe-port set is copied by hand from Chromium's list; the changelog's "one in 39,000" rounds 39,151.

Gate edits: none detected (gate scan tagged 0 hunks)

Exploratory QA smoke: 2 probes, pass (port-range tests and bootstrap-retention tests at head).

Run note: the first /ship preflight ran with the full-suite lane before CI had finished, which started bun run test locally by mistake. It was killed after about 7 minutes; preflight reran with the targeted lane, and the full lane is carried from CI run 44755725292.

Paid probes selected by eval-select (browse-basic, browse-snapshot, diagram-triplet, qa-bootstrap) were not dispatched, per the lane's decision.

{
  "schema_version": 1,
  "pr": 4554,
  "head": "2e3fa0a107ca9fe246714f369f593e50b41cdbff",
  "version": "1.102.0.0",
  "base": "main",
  "gate": {
    "targeted": {
      "pass": 44,
      "fail": 0,
      "skip": 0
    },
    "test": {
      "pass": 1718,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 44755725292,
      "attempt": 1,
      "tree": "45e6ab26d93dcd387fe045c90c89d25a0138ac03"
    }
  ],
  "calls": 19,
  "session_kind": "unattended",
  "run": "ship-4554",
  "head_tree": "45e6ab26d93dcd387fe045c90c89d25a0138ac03",
  "product_patch_id": "b903f32210a58e0147bd813c67c8607345b5bbbc",
  "gstack_version": "1.102.0.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 12,
    "rules": "3e7e9d5d0a0d8879",
    "base": "bd0428974aaf2caa89e878e593c6505b35ad82ab",
    "registry": "bd0428974aaf2caa89e878e593c6505b35ad82ab",
    "gate_scan": {
      "tagged": 0,
      "head": "2e3fa0a107ca9fe246714f369f593e50b41cdbff"
    },
    "reasons": [
      "runtime=12"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @45e6ab26d93d (8 checks, current for 2e3fa0a107ca)",
  "requires_remote": [
    "free-tests.yml/cso-macos-launcher: https://github.com/garrytan/gstack/actions/runs/44755725292/attempts/1",
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44755725292/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44755725071/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=45e6ab26d93d tests=38505 skipped=67 runs=44755725292/1 profiles=ci-reuse/free-tests heads=2e3fa0a107ca verified=2026-11-20T14:49:24.006Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "ARCHITECTURE.md, BROWSER.md, docs/TESTING_INTERNALS.md, CLAUDE.md, README.md, docs/, browse/README.md and the changelog fragment"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 3,
    "fixed": 1,
    "scope": "frozen",
    "rounds": 1,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "gate_dispositions": []
}

Open in Capy

…-census test stops flaking

A random browse or terminal-agent port that lands on 10080 is drawn again, because
Chromium refuses that port and the welcome page failed with net::ERR_UNSAFE_PORT
(Free Tests 44539190714). The bootstrap retention census skips a same-user
process that was unreadable and has already exited, instead of throwing
(Free Tests 44548125960).

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 3 commits November 20, 2026 14:33
… access

Review-Finding: p1/specialist-batched#1 reader=testing
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit 5f3aa5b into main Nov 20, 2026
54 checks passed
@garrytan garrytan mentioned this pull request Nov 20, 2026
capy-ai Bot added a commit that referenced this pull request Nov 20, 2026
- Two /ship approval records stop needing workarounds. (#4549)
- For contributors: the paid auto-decide check counts a start step that ran while the skill loaded. (#4543)
- The destructive-command check closes three ways past its disk-wipe and force-push blocks. (#4534)
- A green CI run still counts when the repository's artifact storage is full. (#4536)
- `/cso` now audits repositories that track symlinks. (#4567)
- A doc-sync eval stops failing when the audit child drops one field from its result line. (#4555)
- The browse daemon no longer picks port 10080, which Chromium refuses to open. (#4554)
- Opted-in telemetry now says why a skill run ended, which coding agent and model family ran it, and whether an upgrade worked. (#4542)
- A preregistration with only its write-up and plain data now gets the write-up review: one reviewer, one round. (#4544)
- When owner rulings don't clear a stopped review, `gstack-review-read` now says which findings are left. (#4553)
- The prompt-routing hook now names your installed bug-fix skill on bug reports, alone, and never puts /verify ahead of it. (#4539)
- Owner rulings now close a stopped review whose findings were logged in a findings file. (#4568)
- /ship can finish after the owner accepts a stopped review's findings as open notes. (#4552)
- /ship no longer starts the full test suite on your machine when CI's earlier run can't be reused (GST-3277). (#4565)
- The prompt-routing hook no longer acts on words inside backticks. (#4566)
- In Claude Code, a gstack skill's start step now runs when the skill loads, so the model can't skip it. (#4509)
- gstack's telemetry backend only accepts writes through its own validated endpoint, and the community dashboard now counts real use. (#4537)
- gstack now says what it's adding before it adds a background job or a browser extension. (#4538)
- For contributors: every flaky pass in Free Tests is now recorded. (#4572)
- For contributors: Free Tests on pull requests starts its test shards one round of small jobs sooner. (#4570)
- Secret values written as `name=value` at the end of a path are now hidden. (#4571)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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