chore(bmad): preserve planning and acceptance artifacts in Git

This commit is contained in:
bsodfather committed 2026-10-03 16:10:35 +03:00
1 parent fed5b7dfb3
commit ea3b71cb5e
93 files changed
+20696

No files matched your search

@@ -0,0 +1,43 @@
# Reviewer Gate — Adversarial unit compatibility
## Verdict
**GO после трёх исправлений.** Построены пары независимо реализуемых units; найденные shared-data/ownership holes закрыты в AD-10, AD-12 и AD-13.
## Critical / High
Нет открытых Critical/High findings.
## Constructed incompatible pairs and disposition
### Admin capability publisher vs artifact store
До исправления обе стороны могли соблюдать AD-10, но выбрать противоположный порядок записи bytes/metadata и оставить dangling refs после crash.
**Исправлено:** bytes пишутся и проверяются идемпотентно первыми; metadata/owner refs коммитятся после; orphan sweep имеет grace period, delete учитывает durable refs/retention.
### Admin/MCP product event producers vs registry rollup
До исправления разные apps могли придумать одинаково допустимые, но несовместимые event names/payload versions.
**Исправлено:** `crank-core` является единственным владельцем versioned `ProductEvent` vocabulary; apps только эмитят typed events, registry сохраняет и сворачивает.
### Per-process telemetry spool vs PostgreSQL incident sink
До исправления каждый app мог выбрать свой deduplication key и создать дубли или потерять loss record при недоступной БД.
**Исправлено:** `crank-core::TelemetryLossSink`; durable local tombstone живёт до acknowledgement, registry uniqueness использует service + destination + spool-record ID.
## Pairs checked without findings
- Capability publishers vs MCP catalog reader: exact Published refs, typed binding tables and atomic catalog revision converge.
- MCP version adapters vs Task engine: protocol state cannot alter internal Task semantics; unsupported clients use published fallback/error.
- Sync runtime vs Task worker: both pass the same admission policy and unified runtime pipeline; Execution Attempt remains separate from Task.
- Admin approval writer vs worker recovery: full-scope uniqueness and conditional PostgreSQL transitions prevent competing records.
- Load control vs saturated runner: signed plan, reserved control capacity, heartbeat and local kill path converge on one stop authority.
- Migrator N vs service N-1: ledger consolidation plus expand/migrate/contract and N/N-1 read window define compatible ownership.
## Medium / Low tail
- Canonical serialization/signature details for `LoadAuthorizationPlan` and Evidence Manifest belong in their feature specs; both must include schema version, digest and key identity to satisfy the existing signed-contract Rules.
- Concrete Task fairness algorithm can differ internally only if it meets one policy snapshot and PRD SLO evidence; cross-unit surface is already fixed.
@@ -0,0 +1,30 @@
# Reviewer Gate — Technology and reality check
## Verdict
**GO.** Все binding technology claims либо подтверждены текущим репозиторием, либо проверены по первичным официальным источникам; изменяемые внешние версии не превращены в постоянный архитектурный контракт.
## Critical / High
Нет открытых Critical/High findings.
## Verified against repository
- Rust 1.96.1, Edition 2024/MSRV 1.96 и версии Axum/Tokio/SQLx/Reqwest/OpenTelemetry/Sentry/metrics подтверждены root `Cargo.toml` и project context.
- PostgreSQL 16, Valkey 8, Node 22, Alpine.js 3.15.12 и Playwright 1.61.1 подтверждены deployment/UI manifests и project context.
- Текущий MCP server действительно принимает `2025-03-26`, `2025-06-18`, `2025-11-25`; это отражено без преждевременного удаления старой ревизии.
- Реальные module/dependency constraints подтверждены обоими boundary scripts и manifests; архитектура больше не разрешает `registry -> observability`.
- Legacy core/MCP/extension migration ledgers и absolute `file://` refs учтены переходными правилами.
## Verified against official primary sources
- PostgreSQL 16 документирует `FOR UPDATE SKIP LOCKED` как подходящий механизм для queue-like consumers и transaction advisory locks для application-defined serialization.
- MCP official material подтверждает stateless `2026-07-28` direction и `io.modelcontextprotocol/tasks`; spine корректно считает их candidate inputs до stable verification at feature freeze.
- GlitchTip официально принимает performance transactions/spans через Sentry-compatible envelopes и не является raw OTLP receiver; AD-12 использует отдельную projection.
- Prometheus pull model, low-cardinality instrumentation и Grafana exemplar/external-link flow согласуются с выбранным topology.
## Medium / Low tail
- Stable MCP matrix и container image versions обязательно перепроверяются в день feature freeze; это уже fail-closed input Evidence Manifest.
- k6-compatible обозначает сменный runner contract, а не непроверенную обязательную библиотеку; конкретный engine требует benchmark/evidence до реализации.
- Custom 30-hour spool является собственным компонентом Crank и требует fault/capacity tests; наличие OpenTelemetry Collector persistent queue не считается доказательством этого контракта.
@@ -0,0 +1,74 @@
# Reviewer Gate — Good-Spine Rubric
## Verdict
**PASS WITH FIXES.** The spine is unusually complete for initiative altitude: the paradigm is named, brownfield boundaries are mostly ratified, all FR/NFR areas are mapped, AD rules are generally enforceable, and Deferred does not hide a major architectural choice. The fixes below remove three real cross-unit divergences before finalization.
Lint evidence: `lint_spine.py` passed with zero mechanical findings.
## Critical
None.
## High
### H-1 — Durable telemetry has no bound persistence envelope
- **Touches:** AD-12, AD-18, AD-25, topology; FR-31 / NFR-O2a.
- **Problem:** AD-12 mandates a per-process durable disk spool, while AD-25 permits read-only container filesystems and AD-18 gives the correctness set a shared 100 GB disk/headroom envelope. The topology shows logical spools but does not bind persistent mounts, quota reservation, crash-consistent acknowledgement, permissions/encryption, or separation from PostgreSQL/artifact safety reserve. Independent app implementations can therefore be “durable” in incompatible ways, and an ephemeral/container-local spool would violate restart completeness.
- **Disposition:** **Autofix.** Bind either dedicated quota-reserved persistent volumes per process or one explicitly owned local collector/WAL boundary; state write-before-accept/recovery semantics, filesystem compatibility, and that the measured 30-hour budget is outside PostgreSQL/artifact reserve.
### H-2 — Emergency Load Run stop is not independently reachable
- **Touches:** AD-14, AD-19, deployment topology; FR-38..FR-39.
- **Problem:** AD-14 requires an independent local kill path and reserved control capacity, but AD-19 routes UI product state only through Admin API and the topology exposes no operator endpoint/CLI/signal path to `load-runner`. Builders can choose incompatible stop mechanisms, including one that fails exactly when Admin/worker pools saturate.
- **Disposition:** **Autofix.** Bind the independent operator surface and trust boundary (for example, local CLI/Unix socket or authenticated runner control listener), its authorization/audit behavior, and stop semantics for new versus in-flight work; show it in topology.
### H-3 — UI ↔ GlitchTip trace navigation is mapped but not invariant
- **Touches:** AD-11..AD-13, AD-19; FR-27..FR-30, especially FR-28.
- **Problem:** IDs are persisted and boundary errors carry them, but no AD requires Logs/Task/Load Run UI to search/copy a local Trace ID, generate a configured deep link, or suppress a false “available in GlitchTip” claim when a Telemetry Loss Record exists. The capability map is not an enforceable rule, so UI and backend units can satisfy their local contracts while the user's principal diagnosis path remains broken.
- **Disposition:** **Autofix.** Add this end-to-end navigation contract to AD-11 or AD-19, including backend-unavailable/loss-record behavior and the required cross-boundary E2E evidence.
## Medium
### M-1 — Admission policy timing for queued Tasks is ambiguous
AD-23 does not say whether the persisted `ExecutionAdmission` snapshot is authoritative at enqueue, revalidated at claim, or both. Bind which changes (revocation, capability archive, limits, deadlines) invalidate queued work. **Disposition: discuss/autofix.**
### M-2 — Topology contradicts the UI boundary
The topology includes `UI --> MCP`, while AD-19 says UI accesses product state only through Admin API. Clarify whether this is merely reverse-proxy routing for external MCP clients or remove the edge. **Disposition: autofix.**
### M-3 — Evidence signatures lack a trust-root owner
AD-20 binds signatures and fail-closed verification but not who owns the signing key, how the verifier obtains/trusts it, or how rotation/revocation is represented. Two CI/release units could produce mutually unverifiable manifests. **Disposition: autofix in AD-20/AD-25.**
## Low
### L-1 — Current-technology evidence should be normalized
The MCP Tasks source path in frontmatter is not the canonical extension host, and the 2026-07-28 line is still treated as an RC candidate at authoring. Preserve the safe feature-freeze gate, but record canonical official URLs/status and the verified-at date in the evidence/memlog. **Disposition: autofix metadata.**
## Checklist Summary
- Real divergence points: **pass with H-1..H-3 fixes**.
- Enforceability of ADs: **pass**, except the three contracts above and M-1.
- Deferred safety: **pass**; deferred tuning and later HA/adapters are bounded by existing invariants.
- Brownfield fit: **pass**; existing crate boundaries, MCP revisions, UI model and migration ledgers are acknowledged rather than erased.
- PRD coverage: **broadly pass**; FR-1..FR-54 and NFR families are mapped, with FR-28 requiring an actual invariant.
- Initiative operational dimensions: **pass** for deployment, offline operation, security, migrations, backup/restore, upgrade, observability, capacity and release evidence, subject to the physical spool and kill-path fixes.
## Finalizer resolution
Все findings применены до handoff:
- **H-1:** AD-12 теперь фиксирует отдельные persistent quota-reserved volumes, write-ahead fsync/recovery/ack, permissions/encryption и изоляцию safety reserve.
- **H-2:** AD-14 и topology фиксируют local operator CLI → permission-restricted Unix socket → reserved runner control runtime, audit и stop semantics.
- **H-3:** AD-19 фиксирует search/copy/deep-link/loss-record behavior и обязательный cross-boundary E2E.
- **M-1:** AD-23 разделяет pinned enqueue semantics и claim-time authorization/publication/revocation/deadline/capacity revalidation.
- **M-2:** topology маркирует UI→MCP только как reverse-proxy route для MCP client, browser state идёт в Admin API.
- **M-3:** AD-20 фиксирует repository-pinned `release-trust.json`, protected private keys и rotation/revocation semantics.
- **L-1:** frontmatter содержит canonical Tasks extension URL; RC status остаётся non-binding до feature-freeze verification.
**Post-fix verdict: GO.**