From fa535f9a2fa18ac26a16ff3c901cdc9811be589b Mon Sep 17 00:00:00 2001 From: abrichr Date: Sun, 25 Oct 2026 10:31:11 -0400 Subject: [PATCH] ci: link check passes Markdown with no links; agent-guard e2e waits for the guard notice Link check: a pull request whose changed Markdown holds no links made lychee fail with "No links were found" (failIfEmpty defaults to true). Main never hit it because pushes check every file. Agent guard e2e: a blocked save also fails the app's request, and its error could show before the guard's notice, so the simulated agent recorded "error" instead of "blocked" (intermittent on CI). It now keeps looking for the notice until its deadline before calling the save an error. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/link-check.yml | 3 +++ packages/flow/benchmark/agent_guard/agent.py | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index f76a34c11..60ced1a1d 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -77,6 +77,9 @@ jobs: --offline --include-fragments --no-progress ${{ steps.targets.outputs.paths }} jobSummary: false + # A pull request whose changed Markdown holds no links has nothing + # to check; that is not a failure. + failIfEmpty: false external: name: External links diff --git a/packages/flow/benchmark/agent_guard/agent.py b/packages/flow/benchmark/agent_guard/agent.py index 988755d90..a8d8493dc 100644 --- a/packages/flow/benchmark/agent_guard/agent.py +++ b/packages/flow/benchmark/agent_guard/agent.py @@ -70,6 +70,7 @@ def add_triage_note(self, *, patient: str, note: str) -> AgentRun: self._act(run, "save", lambda: page.click("#save-encounter")) # Look at the result, as an agent would before reporting back. deadline = time.monotonic() + 4.0 + saw_error = False while time.monotonic() < deadline: notice = page.query_selector("#openadapt-guard-notice") if notice is not None: @@ -82,9 +83,13 @@ def add_triage_note(self, *, patient: str, note: str) -> AgentRun: break error = page.query_selector("#save-error") if error is not None and error.inner_text().strip(): - run.screen_after = "error" - break + # A blocked save also fails the app's request, and its error + # can show before the guard's notice: keep looking for the + # notice until the deadline before calling it an error. + saw_error = True page.wait_for_timeout(100) + if run.screen_after == "nothing" and saw_error: + run.screen_after = "error" notice = page.query_selector("#openadapt-guard-notice") if notice is not None: run.notice = notice.inner_text()