Эпик 9 ревью: ownership :own-KU склада + admin/board access #10
Closed
ant
wants to merge 1 commits from
chore/review-E9-sklad-fixes into marketplace2
pull from: chore/review-E9-sklad-fixes
merge into: C9S:marketplace2
C9S:main
C9S:dev
C9S:testnet
C9S:marketplace2
C9S:fix/598-51-membership-fee-and-type-cleanup
C9S:feat/capital-canon
C9S:feat/598-supplier-registry
C9S:feature/capital-cpp-private-data-templates
C9S:fix/soviet-install-validation
C9S:feat/ku-selforg
C9S:feat/membership-exit
C9S:feat/marketplace-admin-orders
C9S:fix/capital-share-onproject-event
C9S:ci/independent-env-deploy
C9S:fix/registration-pending-display
C9S:coopID
C9S:feat/expense-chassis-mvp
C9S:fix/zip-utf8-flag
C9S:feat/coopid-auth-ui
C9S:feat/coopid-7-signing-bridge
C9S:feat/coopid-12-recovery-account-from-confirm
C9S:feat/coopid-epic-9-metrics
C9S:feat/coopid-epic-6-access-rules-cleanup
C9S:feat/coopid-epic-12
C9S:feat/coopid-epic-11
C9S:feat/coopid-epic-7
C9S:feat/coopid-epic-9
C9S:feat/coopid-epic-6
C9S:feat/marketplace-process-registry
C9S:feat/marketplace-notifications-map
C9S:feat/marketplace-ku-economy
C9S:savanna
C9S:feat/apps-catalog-finish
C9S:feat/epic-13-billing-package-powerup
C9S:feat/coopid-epic-4
C9S:feat/coopid-epic-3
C9S:feat/blagorost-on-chassis
C9S:feat/coopid-epic-1
C9S:feat/marketplace-coop-stock
C9S:feat/marketplace-live-catalog
C9S:feat/coop-invest-blagorost
C9S:feat/ff-release-flow
C9S:fix/marketplace-offer-instance-not-template
C9S:fix/extension-config-lost-update
C9S:feature/C28-28-email-relay
C9S:feat/E16-onsite-sign-gate
C9S:feat/pwa-version-watch
C9S:fix/participants-registry-status-badges
C9S:feat/E16-coop-categories
C9S:fix/sanitize-blockchain-error-toast
C9S:fix/wallet-withdraw-no-phantom-payment
C9S:fix/agenda-program-offer-links
C9S:feat/notification-center-dc-v3
C9S:fix/chatcoop-livekit-room-name
C9S:feat/delete-inactive-participant
C9S:feat/registration-ledger2-suspense
C9S:feat/registration-refund
C9S:feat/registration-payment-dedup
C9S:perf/factory-parallel-fetch
C9S:feat/E16-sklad-rework
C9S:fix/decision-createproject-tsc
C9S:perf/factory-weasyprint-warm-pool
C9S:feat/E16-korzina-zakaz-agregat
C9S:fix/agenda-pending-new-question
C9S:feat/soviet-negative-consensus
C9S:feat/registration-payment-decline
C9S:feat/coop-standards-audit
C9S:parser2
C9S:feat/mkt-return-chairman-cosign
C9S:feat/registration-fsm
C9S:feat/pwa-reliable-update
C9S:parser2-block-time-and-version
C9S:fix/gorozhane-phantom-cleanup
C9S:fix/remove-bank-kpp
C9S:feat/E9-3b-sub-subscribe
C9S:feat/E9-9-approve-moderation
C9S:feat/E10-5-on-chain-watcher
C9S:feat/E10-4-install-pipeline
C9S:feat/E9-3b-ui-publish-package
C9S:feat/E1-tspp-docs-real-text
C9S:feat/E10-3b-dynamic-supergraph
C9S:apps-catalog
C9S:feat/E9-9-3-b-publish-mutation
C9S:feat/sig-v2-export
C9S:feat/E10-1-federation-subgraph
C9S:parser2-epic-4-forks
C9S:feat/decision-authorize-backend
C9S:feat/blagorost-program-expenses-ui
C9S:parser2-epic-6-canonical-storage
C9S:wip/pre-e16-desktop-docs
C9S:feat/E15-min-volume-per-ku
C9S:feat/blagorost-E2-E5-program-expenses
C9S:feat/epic-14-billing-notifications
C9S:blagorost
C9S:feat/E14-explicit-shipment
C9S:feat/marketplace-collective-supply
C9S:feat/blagorost-E1-contract
C9S:feat/C28-21-pg-signed-documents
C9S:provider-billing
C9S:fix/desktop-format-asset-errors
C9S:feat/marketplace-docs
C9S:feat/epic-12-billing-subscriptions
C9S:fix/min-soviet-members-3
C9S:parser2-epic-3-transport
C9S:feat/marketplace2-drop-blocked
C9S:worktree-design-wave1
C9S:feat/notif-mobile-canon
C9S:fix/vue-tsc-desktop
C9S:worktree-marketplace-docs-impl
C9S:feat/chatcoop-hide-matrix-room-id
C9S:feat/epic-8-coop-registry-provider
C9S:parser2-epic-2-idempotency
C9S:feat/chatcoop-secretary-rooms
C9S:feat/remove-l3-blocked
C9S:ci-trial-typecheck-2026-05-23
C9S:fix/controller-revert-transpileonly
C9S:chore/mongo-standalone-local
C9S:chore/ci-unify-release-workflows
C9S:feat/controller-swc-builder
C9S:feat/chatcoop-transcription-memo
C9S:fix/mono-base-ca-certificates
C9S:fix/wallet-withdraw-gateway-timing
C9S:feat/ledger2-burn-blocked-withdraw
C9S:fix/boot-tests-wallet-signagree-v2
C9S:chore/trustees-ownership
C9S:feat/capital-w-cap-gen-cooperative
C9S:chore/re-review-E5-apl-fail-fast
C9S:chore/re-review-E4-fail-fast-tx-hash
C9S:chore/re-review-E3-fix-withdraw-stub
C9S:chore/review-E3-vitrina-fixes
C9S:chore/review-E10-design-fixes
C9S:chore/review-E8-spisanie-fixes
C9S:chore/review-E7-vozvrat-fixes
C9S:chore/review-E6-vydacha-fixes
C9S:chore/review-E5-postavka-fixes
C9S:chore/review-E4-order-fixes
C9S:feat/epic0-onboarding-harness
C9S:chore/marketplace2-sync-dev-and-controller-di
C9S:feat/E11-stol-zakazov-frontend-and-tests
C9S:feat/E11-stol-zakazov-final
C9S:feat/capital-artifacts-access
C9S:fix/floor-asset-display
C9S:feat/epic-9-warehouse-reporting
C9S:feat/598-11-epic-8-writeoff
C9S:feat/E7-garantiynyy-vozvrat
C9S:design
C9S:fix/capital-revert-394-generation-convert-refs
C9S:fix/is-unioned-zod-string-parse
C9S:fix/capital-rename-generation-convert-to-money-invest
C9S:feat/E6-vydacha-payshchiku
C9S:worktree-remove-1081-1082-rename-1080
C9S:feat/init-by-server-from-provider
C9S:feat/E5-postavka-priemka
C9S:feat/E11-techdebt-L12-split-payout
C9S:feat/E4-zakaz
C9S:gh-pages
C9S:feat/E3-vitrina-canon
C9S:feat/E11-S1-ledger2-marketplace-ops
C9S:file-storage
C9S:feat/1-10-marketplace-registration-offer-status
C9S:feat/1-9-marketplace-board-acceptance
C9S:feat/1-8-marketplace-access-matrix
C9S:feat/1-7-marketplace-template-registry
C9S:feat/1-6-marketplace-role-guard
C9S:feat/1-5-marketplace-member-wallet
C9S:feat/1-4-marketplace-onboarding-gate
C9S:feat/1-3-marketplace-access-by-membership
C9S:feat/1-1-install-from-catalog
C9S:ci/lock-tags-only
C9S:onboarding
C9S:reports
C9S:ledger3
C9S:graph-standarts
C9S:feat/ledger-double-entry
C9S:feat/docs-enrichment
C9S:feat/documentation
C9S:feat/marketplace-orders
C9S:feat/interops-extension-system
C9S:cursor/development-environment-setup-2882
C9S:feat/unified-test-pipeline
C9S:fix/security-vulnerabilities
C9S:audio-stream
C9S:project-authorization-on-create
C9S:refactoring
C9S:capital
C9S:element
C9S:ledger
C9S:marketplace
C9S:notifications2
C9S:notifications
C9S:document2
C9S:TSK-900
C9S:TSK-878
C9S:dacom-dark-sun/sprint-4
C9S:uniconstructor/sprint-5
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.
Delete Branch "chore/review-E9-sklad-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Эпик 9 ревью «Склад и отчётность» — фиксы CRITICAL
CRITICAL fix
marketplaceListInventoryresolver: был@RequireMarketplaceAccess('Warehouse', 'read:own-KU')— этот action есть только у operator. admin/board_readonly сread:allотбивались guard'ом →AdminWarehouseSummaryPageфронт сломан (admin не мог загрузить сводный склад).@RequireMarketplaceRole('admin', 'board_readonly', 'operator')+ runtime ownership-проверка:data.braname === member.username(MVP-приближение к chairman lookup);Story coverage
p.mkt.supply/p.mkt.return/p.mkt.wroff(lines 124-126), интегрити-чек активен. Реализовано, без правок.Known limitations (Phase 2)
marketplaceListInventoryбез пагинации (нарушение CLAUDE.md «Пагинация — стандартный паттерн»).EXCESS_RETURNED_TO_WAREHOUSEдля излишков из Story 6.4.coop_ku.chairman_accountвместо MVP fallbackusername == braname.Test plan
AdminWarehouseSummaryPage— данные приходят.OperatorOwnWarehousePageбез braname → подставляется свой username.🤖 Generated with Claude Code
CRITICAL: - resolver: marketplaceListInventory был guarded только `read:own-KU`, что отбивало admin/board_readonly (их matrix capability — `read:all`). Frontend AdminWarehouseSummaryPage был сломан — admin не мог получить инвентарь. Заменён на @RequireMarketplaceRole admin/ board_readonly/operator с runtime ownership-проверкой: - admin/board → весь склад без braname-фильтра; - operator → enforce `data.braname === member.username` либо подстановка своего braname при отсутствии (MVP-приближение к chairman lookup, полная интеграция coop_ku.chairman_account — Phase 2); - прочие роли → ForbiddenException. Story coverage: - Story 9.1 — операторский мини-склад (теперь ownership-safe). - Story 9.2 — сводный склад админа (admin теперь проходит guard). - Story 9.3 — process-hash-locator уже содержит p.mkt.supply/return/wroff (lines 124-126 process-hash-locator.ts), интегрити-чек активен. Known limitations (Phase 2): - AdminWarehouseSummaryPage делает full-list load + 4 client-side aggregations через computed. На прод-объёме (10k+ inventories) UI повиснет. Нужны server-side агрегации + пагинация. - marketplaceListInventory без пагинации (нарушение CLAUDE.md «Пагинация — стандартный паттерн»). - enum MarketplaceInventoryStatus = {LABELED, ISSUED, RETURNED, WRITTEN_OFF}. AC Story 9.1 требует 5: добавить EXCESS_RETURNED_TO_WAREHOUSE для излишков из Эпика 6.4. - ownership operator → membership chairman lookup через coop_ku.chairman_account вместо MVP fallback `username == braname`. - Story 9.4 (federation registry) и 9.5 (history по process_hash) — не реализованы (UI и backend отсутствуют). - Story 9.6 (bookkeeping API годовой формы) — техдолг core, не marketplace MVP. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>Закрываю как устаревший.
В
marketplace2уже мерженный коммит46f5269b89794371df416f842283cd8d070ba495([review][@ant] fix(marketplace): ownership :own-KU учитывает trustees председателя КУ) делает тот же role-fork admin/board_readonly/operator дляmarketplaceListInventory, но:MarketplaceBranchOwnershipService.assertCanActAsBraname(...)с учётомbranch.trusted[], не упрощённоеmember.username === braname.braname(throw ForbiddenException('Оператор обязан указать кооперативный участок для чтения склада.')), без implicit fallbackbranameFilter = member.username, как в этом PR.Resolve конфликта в пользу feature-ветки деградирует ownership и меняет семантику (вернёт implicit fallback). Resolve в пользу base — no-op merge. Закрываю без merge, ветку
chore/review-E9-sklad-fixesудаляю.Если в семантике implicit-fallback есть умысел (UX-причина) — обсудим отдельно, починим в новом PR.
Pull request closed