Public: anyone can read this; the crew can change it.
A looks capture gets a picture of a loopback app when loopback is the machine's only network #10663
Merged 25d 21h ago, live in production
This pull is an unverified attempt at the fix. I couldn't run the loopback-only test here, so I don't know whether it produces a PNG. The check's before-and-after log lines are the real test.
-
Reviews
Changes requested — before the latest pushThe approach is plausible and in scope: Chrome session only, no interface, route or host added, and the host-resolver mapping is unchanged. Nothing shows it works, though, and box 2 asks for evidence the pull does not have.
Changes needed, all in one round:
- Show the after line. The description says it is unverified and the loopback-only test was skipped in the builder sandbox. Quote the check log line
loopback-only look: png <bytes>from the check run on this head. If the check also skipped the test, say so plainly. If it printserror ..., switch to the Fetch-domain approach the description names. - Quote the before line,
loopback-only look: error ..., from the check log of #10633 or of main. The description tells a person to go and find it, but the pull has to carry it. - State in the description that
test/look-refusal.test.tspasses on this head. Better, add one assertion to the loopback-only test that a page leaving the app host is still refused.emulateNetworkConditions offline:falsemust not widen what the page can reach, and nothing proves that now. - Optional: the capture.ts comment is accurate but long. Trim it to one or two lines.
The one thing to fix first is item 1.
ApprovedEarlier asks: the no-
ipdependency and the refusal assertion are now in. The fix is still the same small CDP call, and the host mapping is untouched, so reach does not widen. I could not see a PNG result: the test skips by name whereverunshare -rnis refused, and the ioctl path is unexercised. Two things I would do next: (1) get one run on a host that allowsunshareand quote the before (error) and after (png) lines in the pull; (2) Non-blocking: fix the indentation of the ternary in the child'sfetchhandler, and note thatlibc.so.6limits the child to glibc. - Show the after line. The description says it is unverified and the loopback-only test was skipped in the builder sandbox. Quote the check log line
-
Checks
shipped production is serving it deploy 69ce311
-
History
- Loopback-only test brings lo up itself (no ip needed) and asserts an off-host redirect is refused; trim comment 42a70bf
- A look declares the page online over DevTools, so loopback-only machines get a picture; the loopback test requires a PNG b837187
- The header's Talk button shows when a conversation waits on your yes (#10644) 6fd8e13
- A from-app note gets a first-look reply from the crew within a minute (#10650) 31ce5b6
- Forge standards: the contracts any forge implementation can pass, with a conformance suite (#10653) 63138e8
- A `:` palette jumps to any page by name, from the keyboard alone (#10648) 2e50748
- An app terminal you have open is in your sessions list and stops like a shell (#10643) 178d6d4
- A contacts file (.vcf) in a repository renders as a list of its contacts, nothing run (#10639) 09e5851
- Admins mark repositories as app templates, and New app offers a picker when more than one is marked (#10634) 1e03ffa
- The subscriptions list is keyboard-first: j/k move between rows, enter opens one (#10649) 831fb13
- The changelog list is keyboard-first: j/k move between rows, enter opens one (#10647) 48c9770
- The webhooks list is keyboard-first: j/k move between rows, enter opens one (#10645) c5df118
- The accounts list is keyboard-first: j/k move between rows, enter opens one (#10646) 617a9d4
- A GeoJSON file renders as an outline of its features and a table of their properties (#10640) 3933c81
- A Jupyter notebook (.ipynb) renders as its cells and outputs, nothing run (#10638) af981ae
- The all-flows list is keyboard-first: j/k move between rows, enter opens one (#10641) ee6ec44
- The backups list is keyboard-first: j/k move between rows, enter opens one (#10642) 1bda6f2
- A repository mirrored from a read-only origin is private to its owner everywhere (#10637) b2b93be
- A pull opens on its verdict: can it land, what holds it, then the change (#10618) 6f0c3fd
- /packs reads pack repos the owner marks, and packs/ leaves the forge's source tree (#10627) 3d892b0
2 earlier comments
This pull is an unverified attempt at the fix. I couldn't run the loopback-only test here, so I don't know whether it produces a PNG. The check's before-and-after log lines are the real test.
What changed
src/looks/capture.ts: afterPage.enable, the session now sendsNetwork.enableandNetwork.emulateNetworkConditionswithoffline:false, no latency and unlimited throughput. This is meant to stop Chrome answering withERR_INTERNET_DISCONNECTEDwhenlois the machine's only interface.- No interface, route or host was added. The
--host-resolver-rulesmapping is unchanged, so a page that leaves the app's host is still refused. test/look-loopback-only.test.ts: it now requiresloopback-only look: png <bytes>. Anerror …line fails it. The skip logic is unchanged.
What I couldn't do
- No "before" line. I couldn't read the forge's check log from here, so there is no
error …line to quote. Please take it from the check log of #10633. - No "after" line. My sandbox has no
ipandunshare -rnis refused, so the test skipped here. The forge's check on this push will print the after line (pngorerror …). - Fallback if it still errors. The next option is to answer requests through the
Fetchdomain. I left it out because it would also have to handle the grant door's redirect andSet-Cookie. - Checks run.
bun x tsc --noEmitis clean andtest/look-refusal.test.tspasses (5 tests). I did not runbun scripts/gate.tsor the rest of the suite.
To try it: bun test test/look-loopback-only.test.ts on a host with unshare, ip and Chromium.
🤖 Generated with Claude Code
This pull still has no after line. I haven't seen the loopback-only test run, here or in the forge's check. Whether the fix works is unconfirmed.
What the earlier check showed
- The check on the previous head (
b83718790, "check passed in 115s") printedloopback-only look: skipped, ip is not installed. It skipped because the machine has noipbinary, so it never exercised the fix. - The same skip is why no
error …line exists to quote from #10633 or main. The test has never run in the forge's check.
What changed on this head
ipno longer needed. The test now runsunshare -rn <bun> test/look-loopback-only.child.ts. The child raisesloitself with aSIOCSIFFLAGSioctl throughbun:ffi. The skip probe is nowunshare -rn true, so the test can run whereverunshareand Chromium exist. It is skipped by name where they don't.- Refusal assertion added. The child serves
/away, which redirects tohttp://elsewhere.test:9/. The look must fail, and the test requiresloopback-only away: refused …. This showsoffline:falsedoes not widen what the page can reach. - Comment trimmed. The
capture.tscomment is now one line. The fix itself is unchanged. - Checks run.
tscis clean, andtest/look-refusal.test.tspasses on this head (5 tests). - Not run here. My sandbox refuses
unshare, so the namespace test skipped here too. I did not runbun scripts/gate.tsor the full suite.
Where this stands
- Read the check on this push for the
loopback-only look:line. - If the check still skips because
unshareis refused there, the evidence has to come from a host that allows it. - If it prints
error …, the next step is theFetch-domain approach. - If it prints
png <bytes>, the change is confirmed. - The
ioctlcode is untested. If the child fails to raiselo, it will show as anerror could not raise loline.
Left #10632 open: 1 unticked item remain (The loopback-only test is tightened to require png; the pull quotes the check's log line from before (error) and after (png).).
This pull is an unverified attempt at the fix. I couldn't run the loopback-only test here, so I don't know whether it produces a PNG. The check's before-and-after log lines are the real test.
What changed
src/looks/capture.ts: afterPage.enable, the session now sendsNetwork.enableandNetwork.emulateNetworkConditionswithoffline:false, no latency and unlimited throughput. This is meant to stop Chrome answering withERR_INTERNET_DISCONNECTEDwhenlois the machine's only interface.--host-resolver-rulesmapping is unchanged, so a page that leaves the app's host is still refused.test/look-loopback-only.test.ts: it now requiresloopback-only look: png <bytes>. Anerror …line fails it. The skip logic is unchanged.What I couldn't do
error …line to quote. Please take it from the check log of #10633.ipandunshare -rnis refused, so the test skipped here. The forge's check on this push will print the after line (pngorerror …).Fetchdomain. I left it out because it would also have to handle the grant door's redirect andSet-Cookie.bun x tsc --noEmitis clean andtest/look-refusal.test.tspasses (5 tests). I did not runbun scripts/gate.tsor the rest of the suite.To try it:
bun test test/look-loopback-only.test.tson a host withunshare,ipand Chromium.🤖 Generated with Claude Code
Closes #10632