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()