From 8781618dd561fb4aba0e7064f102485e0063a067 Mon Sep 17 00:00:00 2001 From: mandiau-matthias Date: Mon, 16 Nov 2026 17:50:52 +0100 Subject: [PATCH] Ignore a UTF-8 BOM in robots.txt and refresh status A leading BOM made the first User-agent line unrecognized, so a blanket disallow could be missed. Strip it before parsing and pin the case in the probe harness.\n\nAdd the browser workflow badge to the README and update the maintainer continuity paragraph from 143 to 146 unit tests, including the new browser check. No UI behavior changes in this commit. --- CHANGELOG.md | 2 +- README.md | 1 + docs/LAUNCH-STATUS.md | 12 ++++++++---- src/probe.mjs | 2 +- test/probe.test.mjs | 8 ++++++++ 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60fe9ca..6a49565 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ * Expanded the synthetic corpus to six cases: blog 100, legacy 60, shop 45, settings 40, sign-in 80 and invoice 40; mean 60.8/100, 2/6 at the 80 threshold. Each fixture records the contract fields inference cannot establish. * Recorded a maintainer-run Codex CLI 0.145.0 protocol check with synthetic data; an independent outside report remains open. * Audited the experiment by keyboard, fixed redundant live-region writes while preserving repeated error announcements, and added `npm run test:browser` with a Chrome CI workflow for playground tab order, focus, experiment journeys, film playback, reduced motion and narrow layouts. -* Inference now ignores inert template and textarea markup. The probe applies RFC 9309 specificity to root allow/disallow rules before capping a robots.txt disallow, and private-host screening rejects mapped, translated, NAT64, site-local and reserved IPv6 literals. +* Inference now ignores inert template and textarea markup. The probe applies RFC 9309 specificity to root allow/disallow rules before capping a robots.txt disallow, ignores a leading UTF-8 BOM, and private-host screening rejects mapped, translated, NAT64, site-local and reserved IPv6 literals. * Added a daily maintainer guide, a scoped work queue and standalone coding assistant instructions. * Added `npm run dev` and `npm run check:quick`; full package and bundle verification remains required before merging. * Configured weekly dependency update proposals and made independent first run completion explicit in the feedback form. diff --git a/README.md b/README.md index 4916758..4ae8a27 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ checks. Your application supplies the authorized handler. ยท [Ask a question](https://github.com/Automatron-workflows/hardwire/discussions/categories/q-a) [![Tests](https://github.com/Automatron-workflows/hardwire/actions/workflows/test.yml/badge.svg)](https://github.com/Automatron-workflows/hardwire/actions/workflows/test.yml) +[![Browser](https://github.com/Automatron-workflows/hardwire/actions/workflows/browser.yml/badge.svg)](https://github.com/Automatron-workflows/hardwire/actions/workflows/browser.yml) [![Sign in, invoice payment and settings: interface navigation compared with direct actions](docs/assets/demo.gif)](https://automatron-workflows.github.io/hardwire/) diff --git a/docs/LAUNCH-STATUS.md b/docs/LAUNCH-STATUS.md index 917e5ef..953ec07 100644 --- a/docs/LAUNCH-STATUS.md +++ b/docs/LAUNCH-STATUS.md @@ -111,10 +111,14 @@ Desktop bundles and installed entry points avoid startup downloads. Native deskt The source checkout now includes `AGENTS.md`, a daily workflow, an ordered queue and release recovery instructions. `npm run check:quick` runs the local suite; `npm run check` adds the fresh installation and bundle checks. Both passed on -16 November, including 143 unit tests, five HTTP integration tests and actual -MCP calls. The settings, sign-in and invoice corpus fixtures add regression tests -and keep the six-case baseline visible. The new `npm run dev -- --port 0` entry -point was started and both page routes returned successfully. No UI code was changed or new browser review claimed. +16 November, including 146 unit tests, five HTTP integration tests and actual +MCP calls. The browser workflow runs the playground tab-order, experiment and +film checks in headless Chrome; the local Chrome 157 check and the Ubuntu job +passed. The settings, sign-in and invoice corpus fixtures add regression tests +and keep the six-case baseline visible. The `npm run dev -- --port 0` entry point +was started and both page routes returned successfully. No screen reader, real +Windows machine or outside user was involved, so those evidence gates remain +open. Weekly dependency proposals and completion feedback fields are configured. The published 0.9.0 artifacts remain immutable; maintainer changes live on main and diff --git a/src/probe.mjs b/src/probe.mjs index 126deea..571e04d 100644 --- a/src/probe.mjs +++ b/src/probe.mjs @@ -148,7 +148,7 @@ function rootCoveringLength(value) { } function robotsBlocksAllAgents(body) { - const lines = body.split(/\r?\n/).map((line) => line.replace(/#.*$/, "").trim()); + const lines = body.replace(/^\uFEFF/, "").split(/\r?\n/).map((line) => line.replace(/#.*$/, "").trim()); let inAll = false; let disallowLength = 0; let allowLength = 0; diff --git a/test/probe.test.mjs b/test/probe.test.mjs index e7ced71..3e24e8b 100644 --- a/test/probe.test.mjs +++ b/test/probe.test.mjs @@ -127,3 +127,11 @@ test("private hosts are refused unless explicitly allowed, and near-misses are p const local = await probeOrigin("http://localhost:3000", { fetchImpl: site({}), allowPrivate: true }); assert.equal(local.origin, "http://localhost:3000"); }); + +test("a UTF-8 BOM does not hide a blanket robots disallow", async () => { + const routes = { ...cooperative(), "/robots.txt": { body: "\uFEFFUser-agent: *\nDisallow: /\n", type: "text/plain" } }; + const report = await probeOrigin("https://shop.example.com", { fetchImpl: site(routes) }); + assert.equal(report.blockedByRobots, true); + assert.equal(report.cappedByRobots, true); + assert.equal(report.score, 25); +});