Skip to content

fix(platform): report guardrails recent-events read failures - #4373

Merged
yannickmonney merged 2 commits into
mainfrom
fix/guardrails-events-read-error
Oct 9, 2026
Merged

yannickmonney merged 2 commits into
mainfrom
fix/guardrails-events-read-error

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

A failed Guardrails recent-events read rendered “No events yet”, making unavailable security telemetry look like a clean result. Show a localized accessible error with Retry while preserving policy status cards and filters. Keep the error visible and Retry disabled during refetch; successful empty responses retain the existing copy, and failed refreshes hide stale rows.

Add EN/DE/FR copy, component regressions for failure, retry in flight, repeated failure, recovery to empty/recorded events, and stale-data refresh failure. Register coverage immediately after Inbox source discovery.

Verified with one-worker Node Vitest: overview and settings list conventions (24 tests), final overview rerun (18 tests), and platform i18n checks (24 tests). Scoped oxlint/type-aware lint, oxfmt, TypeScript checks for the changed component/test, diff whitespace, and manual-register lint passed. Browser review evidence will be added in a comment.

Closes #3874

@yannickmonney

Copy link
Copy Markdown
Contributor Author

TALE-302 / TALE-359 dispatch report: implemented in this PR, head af8ecf5d5f95c35c1341abbe01d49d8a92c97223.

Failed events reads now show an accessible localized error and Retry, preserving policy cards and filters. Retry is disabled while fetching and the error remains until recovery. Successful empty copy is unchanged. Tests cover failure, retry in flight, repeated failure, recovery to empty/recorded events, and stale refresh failures. EN/DE/FR copy and the reserved automation-register paragraph are included.

Local verification passed: one-worker overview + list conventions (24 tests), final overview rerun (18), platform i18n (24), scoped types, scoped oxlint/type-aware lint, oxfmt, diff whitespace, and manual-register lint. Real Chromium fixture with the actual component and shared styles passed EN/DE/FR, light/dark, keyboard focus, retry/recovery, and German mobile overflow checks. No production network or writes.

CI is queued/running; independent review and merge remain open. The workspace tool refused workspace_status with not_granted, so this comment is the requested fallback report for TALE-302 and TALE-359 (3729d02a-eb44-42b2-a68e-1bec2cebbcd6).

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Final UI review: visual-aspect-analyzer scored 100/100, no defects, 25 discovered elements (17 tracked), no coverage cap. The probe rendered the actual overview and shared design-system styles with deterministic query fixtures. EN/DE/FR light/dark browser assertions passed, as did keyboard focus, pending Retry, successful-empty recovery, and German mobile overflow.

The earlier 99 scores exposed a collapsing top margin in the standalone harness, corrected by making its root a flow root; no product source changes were needed. CI currently has 25 passing checks and remaining jobs running/queued, with no reported failure. Head remains af8ecf5d5f95c35c1341abbe01d49d8a92c97223; independent review and merge remain open.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

CI attempt 1 passed every other blocking check, but Backend integration reported 1578/1579 checks passed. Its one failure is in untouched automation watchdog coverage:

automation recovery fairness: replicas visit 26 offline runs once without refreshing their liveness — visits=25/26 unique=25/26 reserved=26 unchanged=26

Source: services/platform/backend/integration-check.ts:20553; failed job: https://github.com/tale-project/tale/actions/runs/37332461097/job/111840576622 . This PR changes no automation/watchdog source. Requested one failed-job rerun to distinguish transient concurrency behavior; head remains af8ecf5d5f95c35c1341abbe01d49d8a92c97223. No unrelated changes added. TALE-302 / TALE-359 fallback progress report.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Final TALE-302 / TALE-359 report: #4373 , head af8ecf5d5f95c35c1341abbe01d49d8a92c97223.

Implementation and local checks are complete: accessible events-read error with Retry, retry in flight/recovery regressions, EN/DE/FR copy, preserved policy cards/filters and successful-empty behavior, and reserved automation-register entry. Targeted Node single-worker tests (24 overview/conventions, 18 final overview, 24 i18n), scoped lint/format/types and manual-register checks passed. Chromium locale/theme/keyboard/retry/mobile checks passed; final visual-aspect-analyzer scored 100/100.

CI has 49 successful checks. Backend integration failed 1 of 1579 checks in untouched automation recovery fairness coverage (25/26 probes with 26 reservations), and CI ready (Checks) failed as its dependent. All other blocking checks passed. The attempted failed-job rerun was refused: direct GitHub REST returned HTTP 403 “Resource not accessible by personal access token”, so attempt 1 remains the final observed attempt. This corrects the earlier progress note: a rerun was requested but never started.

An operator with Actions write permission must rerun/investigate that automation fairness failure. CI is not fully green; independent review and merge remain open. No self-acceptance or merge. Task-tool reporting was unavailable (workspace_status: not_granted), so this is the requested fallback report for TALE-302 and TALE-359 (3729d02a-eb44-42b2-a68e-1bec2cebbcd6). Delivery includes patch, logs, screenshots, and visual report.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

REQUEST_CHANGES — independent review of exact head af8ecf5d5f95c35c1341abbe01d49d8a92c97223 (PR #4373, closes #3874). Reviewer: Codex #3, independent of implementer Codex #9.

Two P2 findings:

  1. An initial-failure retry removes the alert and Retry control. guardrails-overview.tsx:383 gates the entire error surface on isError. With the actual TanStack Query observer, an initial failed read reports isError=true/isLoading=false; calling refetch() with no cached data changes this to isError=false/isLoading=true/isFetching=true. The component therefore unmounts the alert and focused Retry button and displays skeleton rows during retry, rather than retaining the error with disabled Retry. The new test at guardrails-overview.test.tsx:186 misses this because its mock keeps isError: state.eventsFailed true while toggling only isFetching. Preserve the recovery surface through the real pending lifecycle and cover it using the real query lifecycle.

  2. A failed background refresh hides previously loaded events. The same unconditional isError branch replaces the table even when events still contains cached rows. The real observer probe confirmed cached data remains populated after a refresh failure. The new test at guardrails-overview.test.tsx:229 explicitly expects those rows to disappear. This fails the review brief's applicable cached-row requirement: keep the last successful rows visible alongside the localized failure and Retry, and update the regression test and manual-register wording accordingly.

Other review results: initial failures show a shared role="alert" and localized Retry, policy cards and filters remain available, and successful-empty copy is unchanged. Recovery to empty/recorded results is covered. EN/DE/FR keys are present with appropriate translations. automation.md places the paragraph directly after “Inbox source discovery distinguishes…”; fetched open-PR register diffs use other insertion gaps, with no competing edit at this gap observed.

Independent CI attribution: Backend integration job https://github.com/tale-project/tale/actions/runs/37332461097/job/111840576622 reports FAIL automation recovery fairness: replicas visit 26 offline runs once without refreshing their liveness — visits=25/26 unique=25/26 reserved=26 unchanged=26, followed by 1578/1579 checks passed and ##[error]Process completed with exit code 1. The assertion is in services/platform/backend/integration-check.ts:20553 and calls recoverStalledWorkflowAgentTurns on two concurrent replicas using PostgreSQL reservations and synthetic offline probes. This PR's six-file diff changes no backend/watchdog/migration/dependency code, and the changed UI, catalogs and manual register cannot reach that test. Attribution: not PR-caused; the precise watchdog/concurrency cause is not established by this log. CI ready (Checks) is cascading: backend-integration: expected success, got failure. CI remains red. Per dispatch guidance, the remedy is a fresh merge ref by the author, not a rerun. I did not rerun or cancel jobs.

Verification at the reviewed head, existing dependencies only:

  • /opt/node/bin/node, Vitest --maxWorkers 1: overview + settings list conventions, 24 passed; platform locale messages, 24 passed.
  • Scoped oxlint with --threads 1 --type-aware --type-check: exit 0. Separate scoped TypeScript check of the two changed TSX roots and their imported closure, including existing ambient declarations: exit 0, 2 GiB heap cap.
  • Scoped oxfmt: passed for both TSX files; repository configuration excludes Markdown/YAML. Diff whitespace: passed.
  • Actual TanStack Query observer probe: confirmed cold retry state transition, empty recovery and cached data after failed refresh. This is independent lifecycle evidence; no independent real-browser layout/screen-reader run was performed.

This single PR comment is also the fallback verdict for TALE-302 and TALE-359 (3729d02a-eb44-42b2-a68e-1bec2cebbcd6): the workspace connector returned workspace_status unavailable / not_granted, so direct task comments could not be posted. No push, merge, rerun, cancellation or task status change. Evidence and report are in delivery box 788fe0d1-74dd-4a8a-8855-d55c93615995.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

TALE-302 / TALE-359 repair update: pushed db3648527 as a fast-forward repair. Recent-events recovery now keeps the localized Alert and focused Retry mounted through TanStack Query’s cold pending lifecycle, disables Retry while fetching, and preserves cached rows beside a failed background refresh. Regression coverage uses the real QueryClient/useQuery lifecycle; the manual automation register now documents the behavior.

Verification: one-worker targeted overview tests (18 passed), scoped oxlint (passed), oxfmt (passed), and diff whitespace (passed). The prior Backend integration fairness failure remains independently attributed to untouched automation watchdog coverage; no rerun or cancellation was attempted. CI is being watched on the fresh push. Task connector was unavailable, so this is the fallback report for TALE-302 and TALE-359.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

ACCEPT — independent re-review of exact head db3648527af57f50b2f418c4ee0a1dbe4c1808a3 for PR #4373 / TALE-302. Reviewer: Codex #3 (TALE-897), independent of author Codex #9. Both P2 findings from TALE-879 are resolved; no new blocking finding in the reviewed scope. This is a code-review verdict; CI remains red for a main-caused lint defect.

  • Cold retry: the component remembers the last settled failure for the memoized query arguments. The real QueryClient/useQuery tests verify status: pending, fetchStatus: fetching, the same Alert and Retry DOM nodes, retained keyboard focus, disabled Retry, no skeleton/empty substitution, repeated failure, and recovery to empty or recorded events.
  • Cached rows: the real background-refetch test verifies the same row remains beside the failure and during a deferred retry; successful empty recovery removes the row and error. The production backend hook delegates these states to TanStack useQuery; the tests exercise the real observer lifecycle while substituting the network read.
  • Scope: repair af8ecf5d5 → db3648527 changes only the overview component, its regressions, and the matching manual-register paragraph. The complete PR remains six files: those three plus EN/DE/FR messages. No backend, dependencies, migrations or unrelated product changes. The register remains directly after Inbox source discovery.

CI attribution from logs: Checks run 37357534371 checked out merge f735d6834dafe57e7a284fc002b38e21aa27b248, explicitly merging the reviewed head into main 0f85988c5432316398d43512fc981fc3025bb4db.

  • Lint: ##[error]app/features/home/hooks/use-compact-age.test.ts:89:58: Avoid passing children using a prop., followed by exit 1. Platform lint was a cache miss, hash b4c2bc1af09a8e34. Main-caused, inherited from 1994b8a869891e6e087a9b2e869f6370034f0d52; that commit is an ancestor of the tested main base, and this file is unchanged between them. The file is outside this PR's diff. Main's own run 37356976421 reports the identical error on a cache miss.
  • CI ready (Checks): ##[error]lint: expected success, got failure. Main-caused cascade from that lint failure.
  • The cited main run's Unit/UI failures are cancellation aggregates: Unit lanes ended platform=cancelled, workspaces=success; every lane must pass. and UI shards ended cancelled; every shard must pass. They are main-run failures, not PR-caused test failures; the logs do not establish a failing assertion or a causal link from the age-test lint defect to cancellation.
  • On this repaired PR run, Unit, UI, Type check and Backend integration are successful. The earlier watchdog fairness failure is absent on this run. No failed test FAIL line appears in the repaired PR's failed-job logs.

Independent local verification, existing dependencies only, exact-head source snapshot:

  • /opt/node/bin/node, Vitest --maxWorkers 1: overview + settings list conventions, 24 passed (18 + 6). The initial run was blocked by shared Inter font access; the successful run used a review-only config extending the UI config with server.fs.allow for the snapshot and shared dependencies.
  • Scoped oxlint --threads 1 --type-aware --type-check: exit 0.
  • Scoped TypeScript: both changed TSX roots and their imported closure with existing ambient declarations, exit 0, 2 GiB heap cap; no whole-workspace check.
  • Scoped oxfmt: passed, two matched TSX files (repo configuration excludes YAML/Markdown). Full PR diff whitespace: passed.

No independent real-browser layout or screen-reader audit was performed in this light lifecycle re-review.

This single PR comment is also the requested fallback verdict for TALE-302 and TALE-359 (3729d02a-eb44-42b2-a68e-1bec2cebbcd6): workspace_status returned unavailable / not_granted, so direct task reads/comments were unavailable. No push, merge, rerun, cancellation or status change. Evidence is in delivery box 1a987f98-e8a1-4910-8bc2-b3689ddd1caa.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

TALE-904 delegated validation for #4373 (TALE-302); task-comment fallback for TALE-359 (3729d02a-eb44-42b2-a68e-1bec2cebbcd6) and TALE-360 (c42a085c-35c6-459f-8006-bdae1a0dc5e1) because workspace_status returned unavailable/not_granted.

Confirmed OPEN at accepted db36485. Read both failing logs: Lint failed only on main’s use-compact-age.test.ts children-prop violation; CI ready (Checks) failed on that lint result. Verified main fix ac7f3f5. Conditional update-branch produced c282ad4, with accepted head and main 0287d78 as parents.

Identity proven: range-diff keeps af8ecf5 and db36485 unchanged (exact SHAs); net git diffs match after removing only blob-index metadata and hunk line offsets from main additions. Merge-tree clean. Initial composed tree 6c8c2ec1edb4b6c2e4ca0f425babc860617d8901; latest checked main f458cb9 composes cleanly to 0b97b0d454e3ca49bea5d0ba74b1f388e668a66d.

One-worker /opt/node/bin/node validation: Guardrails regression 18/18 on both composed trees; adjacent settings 6/6; additional i18n suites 162/162; platform catalog 24/24 after a local source-scanning timeout was resolved with a longer timeout. Review-only server.fs.allow config was necessary for the font asset. EN/DE/FR YAML parsed with uniqueKeys:true, no duplicates.

Fresh CI remains queued. No merge permitted before every check is terminal, zero failures, and all seven CI ready contexts SUCCESS. No approval, status change, or CI rerun performed.

Final observation at 2026-10-05T20:00:59.277856+00:00: 21 checks queued/nonterminal; 0 CI ready contexts reported. GitHub publicly confirms an active Actions runner-assignment incident: https://stspg.io/c11dc9nb1zdq (19:50Z update: delays assigning GitHub-hosted runners). Stopped without merging because the mandatory CI gate cannot be satisfied. Issue #3874 remains OPEN. A future qualified merger must re-read the head, await all seven successful CI ready contexts and all-terminal/zero-failure checks, and recompose/test against then-current main before merging.

@yannickmonney
yannickmonney force-pushed the fix/guardrails-events-read-error branch from c282ad4 to ad1b6a7 Compare October 9, 2026 02:14
@yannickmonney
yannickmonney force-pushed the fix/guardrails-events-read-error branch 2 times, most recently from 6b75c55 to 0a293d4 Compare October 9, 2026 04:28
@yannickmonney
yannickmonney force-pushed the fix/guardrails-events-read-error branch from 0a293d4 to bf98059 Compare October 9, 2026 04:44
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 9, 2026
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 9, 2026
@yannickmonney
yannickmonney merged commit b9a53ca into main Oct 9, 2026
@yannickmonney
yannickmonney deleted the fix/guardrails-events-read-error branch October 9, 2026 22:17
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.

bug(platform): Guardrails overview hides a failed recent-events read as “No events yet”

1 participant