fix(query): stale 실패를 렌더 중에 계산하고 실패 진단이 원인을 남긴다 #28
Closed
donghyeon.kang
wants to merge 0 commits from
donghyeon.kang/fix/r9-query-state-diagnostics AGit into main
pull from: donghyeon.kang/fix/r9-query-state-diagnostics
merge into: :main
:main
:fix/r9-structure-locale
:fix/r9-adapter-carryover
:test/shared-build-lock-order
:ci/dependency-cache-same-filesystem
:ci/release-tag-for-a11y-review
:ci/merge-dependency-cache
:fix/test-timeouts-measured
:fix/feature-residue-word-boundary
:fix/provider-wait-stderr
:fix/provider-job-host-requirements
:fix/ungated-vitest-spec
:fix/a11y-evidence-routes
:fix/verify-parts-diagnostics
:claude/w2-fe-ci-perf-dce080
:fix/child-process-test-timeouts
:chore/layout-rules-r2-r5
:claude/fe-b-docs-korean-645f55
:chore/ci-merge-jobs
:chore/layout-3-merge
:claude/fe-c-harness-0ae061
:chore/layout-2-sample-removal
:chore/layout-1-cleanup
:docs/review-guide-pointer
:fix/maturity-review-2026-11-06
:fix/maturity-review-2026-11-05-b
:docs/improvement-manual
:fix/maturity-review-2026-11-05
:fix/session-subject-required
:fix/ui-design-audit-2026-11-01
:fix/maturity-review-2026-09-25
:lane/D
:lane/B
:fix/src-review-round3
:refactor/domain-scalable
:develop
:feature-frontend-optional-adapter-recipes
:feature-frontend-supply-chain-verification
:feature-frontend-test-registry-evidence-hardening
:frontend-test-registry-evidence-hardening
:feature-frontend-diagnostics-telemetry-runtime
:feature-frontend-i18n-message-formatting-contract
:feature-frontend-design-system-platform
:feature-frontend-form-page-platform
:feature-frontend-reference-feature-vertical-slice
:feature-frontend-routing-release-recovery-runtime
:feature-frontend-http-query-contract-execution
:feature-frontend-application-boundary-runtime
:feature-frontend-typescript-tooling-foundation
:feature-frontend-platform-capability-review
:feature-frontend-performance-route-contract
:feature-frontend-starter-experience-quality-contract
:feature-frontend-responsive-theme-contract
:feature-frontend-ui-primitives-gallery-contract
:feature-frontend-app-shell-navigation-contract
:feature-frontend-runtime-composition-contract
:feature-frontend-ci-quality-gates-contract
:feature-web-vitals-performance-budget-contract
:feature-frontend-release-cache-rollback-contract
:feature-accessibility-baseline-contract
:feature-frontend-project-bootstrap-toolchain-contract
:feature-frontend-operational-runbook-contract
:feature-frontend-contract-compatibility-governance
:feature-frontend-contract-registry-governance
:feature-frontend-browser-security-boundary-contract
:feature-frontend-build-bundle-supply-chain-contract
:feature-tailwind-design-token-styling-contract
:feature-sample-feature-slice-contract-fixture
:feature-frontend-render-recovery-boundary-contract
:feature-routing-navigation-guard-contract
:feature-boundary-mapper-viewmodel-contract
:feature-async-ui-state-contract
:feature-frontend-observability-logging-trace-contract
:feature-frontend-storage-registry-contract
:feature-server-state-caching-contract
:feature-frontend-auth-session-integration-contract
:feature-frontend-error-classification-boundary-contract
:feature-runtime-schema-validation-contract
:feature-api-client-response-envelope-contract
:feature-frontend-env-runtime-config-contract
:feature-frontend-architecture-enforcement-lint-contract
:feature-frontend-test-taxonomy-contract
:feature-frontend-clean-architecture-layering-contract
No Reviewers
Labels
No items
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
donghyeon.kang (동현 강)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: donghyeon.kang/clean-architecture-frontend-template#28
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
무엇을, 왜
useApplicationQuery가 「데이터가 있고 마지막 조회가 실패했다」는 파생 값을 effect로 state에 복사한다. 다시 시도가 그 값을 지우고 refetch해도 조회 중에 effect가 다시 돌아 true로 되돌린다. 그래서 낡은 데이터의 다시 시도가 진행 중에도 지난 실패(stale-degraded)를 보인다(1112/01-05).onError가 모든 실패를cache.operation.failed로 남기는데ApplicationQueryError에kind가 없어 이름(APPLICATION_QUERY_ERROR)이 남는다. 404, 필드 거절, abort가 한 가지로 남는다. 예상 밖 throw는 정의 이름 대신 고정 문자열을 쓴다(1112/01-04).고른 방법과 버린 대안
staleFailure를query.isError && hasData && !query.isFetching으로 렌더 중에 계산하고 state와 effect를 지운다. 다시 시도 중은 refreshing이다.ApplicationQueryError가failure.kind를kind로 싣는다.APPLICATION_MUTATION)을 둔다.onError가ApplicationQueryError를 아예 세지 않기(서버 실패를 cache 진단에서 잃는다).위험과 영향
error_kind값이 바뀐다. 그 값을 읽는 대시보드가 있으면 바꿔야 한다(템플릿 안에는 없다). round9 마지막 CHANGELOG에 적는다.검증
desktop, CI env,
scripts/verify.sh(flock).5250ff95에 새 시험만):tests/component/application-query-bridge.test.tsx새 시험 셋 실패(3 failed, 8 passed). 로그/tmp/claude-gates/r9f2c-red/.application-query-bridge·application-mutation-optimistic-cache·application-query44 passed. 로그/tmp/claude-gates/r9f2c-green/.submit이 쓰기 시작한failureOperationId가 useCallback 의존성 배열에 없었다(react-hooks/exhaustive-deps). 배열에 더해 같은 커밋에 합쳤다.ade515ef= head 트리): FE-GATE-002·003·006 모두 rc=0. 로그/tmp/claude-gates/r9f2c-gates2/. 이 파일을 읽는 시험은 component 층뿐이다(git grep).리뷰어가 볼 곳
src/presentation/adapters/query/application-query.ts의staleFailure,ApplicationQueryError.kind,failureOperationId.관련
docs/reviews/2026-11-round9-01-react.md01-04·01-05(PR #23)#40으로 병합됐다(main
ee47480c). 이 PR의 head78938e8f가 #40 브랜치에 merge 커밋으로 들어 있고, #40의 runner merge job 셋이 그 합친 트리로 초록이었다. runner 대기를 줄이려고 이번만 쓴 방식이다(소유자 승인, 2026-11-13).Pull request closed