[Bug] Сохранить approved screener constraints в published OpenAPI #70

Closed
opened 2026-10-11 21:47:21 +03:00 by codex-bot · 0 comments
Owner

Problem

Published Criteria теряет additionalProperties:false, Item lot — minimum:1. Generator/runtime parity и frontend copies согласованы между собой, но не с target. Runtime unknown-field/invalid-lot outcome не воспроизводился; published schema drift подтверждён.

Expected Behavior

Оба constraints сохранены либо target owner явно reapproves изменение; consumer получает соответствующий artifact.

Evidence

Audit date 2026-10-11; 15, SPEC-005. Backend revision 0ad84ff4f0b4712abc7e69dc299856f14af6eadd; specs fcdc805f6c1b3be6a20a7e858e3e80cbd83a9121; frontend c8821200ce699dab1ce65360d1968d5877a2e78b. Confidence High drift; Verification status static/runtime-unverified outcomes.
Affected: stock.dto.ts:29–105; target:92–120, :174–177; frontend snapshot:7495–7573.

Scope

In scope

Два schema nodes, owner semantic comparison, configured HTTP boundary и explicit artifact delivery.

Out of scope

Registry/новый generator, mandatory sibling checkout CI, manual generated TS edits, автоматическая Finalization stock-screener.

Proposed Approach

Restore metadata/нужную runtime boundary либо explicit target reapproval. Existing raw-body allowlist не удалять: global/local pipe order важен.

Acceptance Criteria

  • Fresh published criteria/item constraints совпадают с approved target либо каждое отклонение имеет reapproval.
  • Unknown property и nullable/positive lot boundary различаются controlled HTTP/source cases; malformed lot не silently выдаётся как approved valid.
  • Existing stable pages/owner/revision/empty semantics прежние; runtime parity и frontend snapshot/type check проходят на delivered artifact.

Verification

Existing stocks.e2e-spec.ts, stock-screener/service tests, openapi-contract suite и consumer openapi:check. Сравнить target nodes явно: equality двух generated copies недостаточна.

Dependencies

Нет; contract decision нужен до закрытия active change, но этот Issue не делает archive.

Traceability

Campaign WealthLedger/main#23 . Finding SPEC-005. WealthLedger/backend; T37.

<!-- wealthledger-audit:2026-10-11:screener-contract-constraints --> ## Problem Published Criteria теряет additionalProperties:false, Item lot — minimum:1. Generator/runtime parity и frontend copies согласованы между собой, но не с target. Runtime unknown-field/invalid-lot outcome не воспроизводился; published schema drift подтверждён. ## Expected Behavior Оба constraints сохранены либо target owner явно reapproves изменение; consumer получает соответствующий artifact. ## Evidence Audit date `2026-10-11`; [15](https://git.personal.ksv741.ru/WealthLedger/main/src/commit/d07fbfabb1295780952a554185989d2d5b5c8349/audits/2026-10-11/reports/15-sdd-specs-and-documentation.md), SPEC-005. Backend revision `0ad84ff4f0b4712abc7e69dc299856f14af6eadd`; specs `fcdc805f6c1b3be6a20a7e858e3e80cbd83a9121`; frontend `c8821200ce699dab1ce65360d1968d5877a2e78b`. Confidence High drift; Verification status static/runtime-unverified outcomes. Affected: [stock.dto.ts:29–105](https://git.personal.ksv741.ru/WealthLedger/backend/src/commit/0ad84ff4f0b4712abc7e69dc299856f14af6eadd/src/modules/investments/instruments/stocks/presentation/stock.dto.ts#L29-L105); [target:92–120](https://git.personal.ksv741.ru/WealthLedger/specs/src/commit/fcdc805f6c1b3be6a20a7e858e3e80cbd83a9121/openspec/changes/stock-screener/system-analysis/contracts/stock-screener.openapi.yaml#L92-L120), :174–177; frontend snapshot:7495–7573. ## Scope ### In scope Два schema nodes, owner semantic comparison, configured HTTP boundary и explicit artifact delivery. ### Out of scope Registry/новый generator, mandatory sibling checkout CI, manual generated TS edits, автоматическая Finalization stock-screener. ## Proposed Approach Restore metadata/нужную runtime boundary либо explicit target reapproval. Existing raw-body allowlist не удалять: global/local pipe order важен. ## Acceptance Criteria - [ ] Fresh published criteria/item constraints совпадают с approved target либо каждое отклонение имеет reapproval. - [ ] Unknown property и nullable/positive lot boundary различаются controlled HTTP/source cases; malformed lot не silently выдаётся как approved valid. - [ ] Existing stable pages/owner/revision/empty semantics прежние; runtime parity и frontend snapshot/type check проходят на delivered artifact. ## Verification Existing stocks.e2e-spec.ts, stock-screener/service tests, openapi-contract suite и consumer openapi:check. Сравнить target nodes явно: equality двух generated copies недостаточна. ## Dependencies Нет; contract decision нужен до закрытия active change, но этот Issue не делает archive. ## Traceability Campaign https://git.personal.ksv741.ru/WealthLedger/main/issues/23 . Finding SPEC-005. WealthLedger/backend; T37.
codex-bot added this to the Technical Audit Remediation — 2026-10-11 milestone 2026-10-11 21:47:21 +03:00
codex-bot added the Kind/Bug
Priority
Medium
3
audit/2026-10-11
labels 2026-10-11 21:47:21 +03:00
codex-bot was assigned by hermes-agent 2026-10-12 00:04:21 +03:00
hermes-agent added this to the WealthLedger — Delivery Board project 2026-10-12 00:04:21 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WealthLedger/backend#70