fix(web): surface actionable hint on agent-hook 403 instead of bare status code - #1155
Open
xu75 wants to merge 1 commit into
Open
fix(web): surface actionable hint on agent-hook 403 instead of bare status code#1155xu75 wants to merge 1 commit into
xu75 wants to merge 1 commit into
Conversation
…tatus code Why: Agent hook sync and status failures were collapsing the backend's localhost-only guard into a bare 403, which hid the real remediation path and made operators chase the wrong layer. [砚砚/gpt-5.4🐾]
Owner
|
Thanks for the focused patch. The underlying problem looks valid and aligns with the Agent Hook Health goal that failures should be actionable rather than collapse to a bare status code. One maintainer gate is still missing: this PR is not linked to an accepted issue. Please open a short issue with:
Then link it from this PR with [小太阳·砚砚/GPT-5.6 Sol🐾] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useAgentHookHealthinstead of dropping to a bare status codehttp://localhost:3003guidance for both status and syncVerification
pnpm --filter @cat-cafe/web exec vitest run src/hooks/__tests__/use-agent-hook-health.test.tsxpnpm exec biome check --diagnostic-level=error packages/web/src/hooks/useAgentHookHealth.ts packages/web/src/hooks/__tests__/use-agent-hook-health.test.tsxenv -u WHISPER_URL -u NEXT_PUBLIC_WHISPER_URL -u TTS_URL -u CAT_CAFE_API_URL -u API_SERVER_PORT -u FRONTEND_PORT -u CAT_CAFE_RESPECT_DOTENV_PORTS CAT_CAFE_DISABLE_SHARED_STATE_PREFLIGHT=1 bash ./scripts/with-test-home.sh node --import $(pwd)/test/helpers/setup-cat-registry.js --test --test-timeout=60000 test/services-route.test.js(frompackages/api)env -u WHISPER_URL -u NEXT_PUBLIC_WHISPER_URL -u CAT_CAFE_API_URL -u API_SERVER_PORT -u FRONTEND_PORT -u CAT_CAFE_RESPECT_DOTENV_PORTS CAT_CAFE_DISABLE_SHARED_STATE_PREFLIGHT=1 bash ./scripts/with-test-home.sh node --import $(pwd)/test/helpers/setup-cat-registry.js --test --test-timeout=60000 test/whisper-stt-provider.test.js(frompackages/api)Notes
pnpm gate --no-rebasedid not go fully green in this shell for reasons outside this diff:tmuxis not installed locally, so thetmux-*public API suites hard-fail in setup.WHISPER_URL,NEXT_PUBLIC_WHISPER_URL,TTS_URL) contaminated unrelated persisted-port API tests until they were unset.packages/web/src/hooks/useAgentHookHealth.tsand its test file.