39 KiB
baseline_commit
| baseline_commit |
|---|
c30461cc92 |
Story 1.2: Зафиксировать фактический baseline существующих flows
Status: done
Story
As a владелец продукта, I want получить проверенный baseline всех существующих возможностей Crank, so that функциональные недоработки и регрессии видны до начала расширения продукта.
Acceptance Criteria
-
Полный machine-readable inventory. Given validator и schema из Story 1.1, when выполняется инвентаризация текущего brownfield-продукта, then canonical inventory перечисляет все известные пользовательские и протокольные flows UI, Admin API и MCP для Operations, Agents, Auth Profiles/Upstreams/Secrets, MCP- и approval-ключей, approvals, test execution, YAML/OpenAPI import/export, Logs и Usage; каждый flow имеет стабильный ID, observable contract,
FR-*, owner, implementation status и ссылки на текущее evidence. Все FR-1…FR-54 представлены: существующие flows описаны детально и честно, будущие Resources/Prompts/Tasks/Load Runs и другие target flows остаютсяplanned,gapилиblocked, но неimplementedбез доказательств. -
Проверенный REST→MCP happy path. Given текущий Community stack, when администратор создаёт простую REST Operation, выполняет Admin test-run, публикует полученную из API точную версию, привязывает её к полученной из API Agent revision, публикует Agent, создаёт MCP key и вызывает Tool из MCP-клиента, then весь путь завершается успешно хотя бы в одном реальном запуске на текущем Community stack. Evidence фиксирует только безопасные operation ID/version, Agent ID/revision, команды/предусловия и нормализованный outcome; credential, raw key, cookie, sensitive header/query/body, приватный payload и host path не попадают в stdout, error, evidence или документацию.
not_run/blockedдопустимы как честный промежуточный baseline, но Story остаётся незавершённой до реального успешного запуска. -
Автоматизированное evidence без ложного pass. Given существующие suites, when trusted collector запускает allowlisted commands либо принимает bounded machine report, then targeted Rust tests,
just verify, UI build и применимый Playwright smoke связываются с конкретными flow IDs и содержат command identity, source revision/environment class, source-report SHA-256 и вычисленный verdict. Canonicalpassнельзя вводить вручную.failed, retry-pass/flaky,skipped,not_run, missing result или malformed evidence никогда не нормализуются вpass. -
Ограниченный exploratory UI baseline. Given основные Community-экраны, when выполняется bounded exploratory pass, then для каждого применимого flow зафиксированы happy, loading, empty, error и доступный recovery state. Отсутствующий state отмечается
gap/not_run, а stale-response, RU/EN/localization и unsafe-output проблемы получают стабильный finding ID и связь с flow; этот pass не выдаётся за полный manual regression Epic 8. -
Дефекты блокируют честно. Given найденный дефект, when он добавляется в baseline results, then запись содержит стабильный ID, severity, bounded reproducible steps, affected observable contract, flow IDs, owner и next evidence/action. Critical или High автоматически требует
blockedу каждого связанного flow; агрегированный статус Epic или зелёный unrelated suite не может скрыть блокировку. -
Implementation status и evidence verdict разделены. Given отсутствие automated evidence, then flow получает
evidence_mode=manual_onlyс retained manual result иnext_evidenceлибоimplementation_status=gapс названным next evidence. Closed axes:implementation_status=implemented|planned|gap|blocked;execution_verdict=pass|fail|blocked|skipped|flaky|not_run;evidence_mode=automated|manual_only.manual_onlyне является implementation status,gapне является execution verdict, и толькоimplemented + automated + passсчитается полным baseline pass. -
Baseline заморожен и проверяем. Given завершённая инвентаризация, then inventory, required-surface contract, outcome taxonomy, manual checklist и results имеют общий
baseline_versionи lowercase SHA-256 exact tracked file bytes в canonical manifest; validator fail-closed проверяет version parity, schema, checksums, cross-links, verdict/status/defect invariants и bounded/redacted diagnostics. Story 1.2 гарантирует self-consistency одного snapshot; immutable predecessor chain/signature принадлежит 8.1. Любое последующее изменение snapshot требует новой baseline version, нового evidence и пересчитанного manifest. Story 1.2 не заменяет RC-wide CI gates (8.2) или полный manual regression (8.3).
Tasks / Subtasks
-
Task 1 — Зафиксировать baseline contract до сбора результатов (AC: #1, #3, #5, #6, #7)
- Создать
docs/capability-baseline/outcome-taxonomy.jsonс тремя независимыми closed axes и truth table: implementation status, execution verdict и evidence mode; полный pass толькоimplemented + automated + pass. - Создать
docs/capability-baseline/required-surfaces.json: нормативный closed список обязательных surface groups/stable flow IDs и минимальной гранулярности. Включить Operations lifecycle/test/import/export, Agents/catalog/bindings, Auth Profiles, Upstreams, Secrets, MCP keys, approval keys, approvals, Logs, Usage, auth/workspace и MCP transport/list/call. - Создать
docs/schemas/capability-baseline.schema.jsonс Draft 2020-12, закрытыми объектами, обязательными полями и численными bounds для taxonomy, results, defects, commands, paths, strings и коллекций. Не добавлять новую dependency и не писать универсальный JSON Schema engine. - Создать
docs/capability-baseline/manual-checklist.mdс versioned bounded checklist (10–16 charters) для актуальных основных UI flows и состояний happy/loading/empty/error/recovery/stale/RU-EN/safe-output. Для N/A требуется причина; пустое поле не является pass. - Создать
docs/capability-baseline/results.jsonс version, source revision/environment class, command results, flow mappings, manual results и defect ledger. Хранить summary/verdict, а не raw console/network/payload dump. - Создать
docs/capability-baseline/manifest.jsonс общим baseline version, normalized repo-relative paths и lowercase SHA-256 exact tracked bytes для inventory, required-surfaces, taxonomy, checklist и results; manifest не хеширует сам себя.
- Создать
-
Task 2 — Реализовать fail-closed baseline validator (AC: #1, #3, #5, #6, #7)
- Создать stdlib-only
scripts/validate-capability-baseline.py; reuse path, JSON, deterministic-report и redaction patterns изscripts/validate-capability-inventory.py, не дублировать Community scanner или product runtime. - Проверять Draft 2020-12 baseline contract, duplicate JSON keys, strict UTF-8, repo-relative normalized existing regular non-symlink paths, manifest SHA-256, unique IDs, known inventory flow IDs и normative required-surfaces completeness/granularity.
- Проверять invariants: Critical/High ⇒ все affected flows
blocked; axes не смешиваются; unknown/missing/flaky/skipped/not-run не pass; полный pass толькоimplemented + automated + pass; manual-only требует retained result/next_evidence; planned target не получает fabricated pass. - Ограничить каждый JSON input 4 MiB, checklist 1 MiB, diagnostics 1000 и итоговый stderr 65,536 bytes; задать bounds в schema, ловить
OSError,UnicodeDecodeError,JSONDecodeError,ValueError,RecursionError; не печатать raw invalid value, resolved host path или пользовательский payload. - Выдавать стабильные machine codes и JSON pointers. Минимальный набор:
INVALID_JSON,INVALID_SCHEMA_CONTRACT,INPUT_TOO_LARGE,BROKEN_ARTIFACT_LINK,CHECKSUM_MISMATCH,UNKNOWN_FLOW_ID,MISSING_FLOW_EVIDENCE,NON_PASS_RECORDED_AS_PASS,SEVERE_DEFECT_FLOW_NOT_BLOCKED,UNSAFE_EVIDENCE,BASELINE_VERSION_MISMATCH.
- Создать stdlib-only
-
Task 3 — Создать RED→GREEN unit/contract tests baseline tooling (AC: #1, #3, #5, #6, #7)
- Создать
tests/unit/test_validate_capability_baseline.pyпо stdlibunittest/temporary-root pattern Story 1.1; никаких оставшихсяskip(RED_PHASE). - Покрыть canonical success, missing/unknown flow, stale checksum, version mismatch, duplicate IDs/keys, malformed/oversized/deep JSON, symlink/traversal/absolute/control-character paths, unknown schema keyword и schema/semantic drift.
- Покрыть exact verdict semantics: fail/flaky/skipped/not_run/missing не pass; manual-only требует retained manual result и next evidence; Critical/High defect при non-blocked flow fail-closed; Medium/Low остаются traceable.
- Покрыть deterministic sorting, bounded/redacted output, canary credentials/headers/query/JSON/YAML/host paths, limit-1/limit/limit+1 и отсутствие traceback.
- Обновить
tests/unit/test_validate_capability_inventory.py: canonical inventory покрывает FR-1…FR-54, обязательные surface groups и только tracked regular evidence paths; существующие Story 1.1 regression tests сохранить.
- Создать
-
Task 4 — Реализовать trusted collector/sanitizer evidence (AC: #3, #6, #7)
- Создать stdlib-only
scripts/collect-capability-baseline.py: запускать только closed allowlist command IDs либо принимать bounded source reports; flow mappings берутся из reviewed config, canonical verdict вычисляется из exit/status/retries/skips, не из hand-authoredpass. - Playwright JSON писать в ignored temporary path, проверять размер/UTF-8/JSON, вычислять source-report SHA-256 и переносить только sanitized counts/statuses. Retry-pass классифицировать
flaky; raw stdout/errors/attachments/screenshots/trace/video/host paths не переносить. - Для Rust/Python/build/smoke фиксировать command ID, bounded exit summary, source revision/environment class и flow IDs. Missing report/command, signal, timeout и non-zero exit дают non-pass.
- Создать
tests/unit/test_collect_capability_baseline.py: allowlist, exit/retry/skip truth table, missing/malformed/oversized reports, deterministic sanitized output, secret/URL/host-path canaries и запрет hand-authored pass. - Collector пишет candidate results; manifest пересчитывается отдельным шагом только после review candidate. Collector не получает credentials и не печатает environment values.
- Создать stdlib-only
-
Task 5 — Инвентаризировать фактические flows без исправления продукта (AC: #1, #5, #6)
- Обновить
docs/capability-inventory.json: детальные current UI/API/MCP flows для Operations lifecycle/test/YAML/OpenAPI, Agents/catalog/bindings, Auth Profiles/Upstreams/Secrets, MCP/approval keys, approvals, Logs/Usage и auth/workspace settings; сохранить четыре существующие planned entries. - Моделировать flow как пользовательский/протокольный outcome, не как строку на каждый HTTP endpoint. Operations/Agents/approvals/history/import относятся к capability family
tools; не расширять enumtools|resources|prompts|tasks|load_runsдоменными псевдо-capabilities. - Сопоставить существующие contracts с FR-1…FR-6, не объявляя эти FR полностью hardened. FR-7…FR-54 связать с минимальными честными target/gap/planned/blocked entries только для traceability; детальная декомпозиция и feature implementation остаются owning stories.
- Для каждого existing flow задать owner, observable outcome и links на конкретные tests/results/checklist. Suite-level ссылка без contract-level mapping не считается достаточной.
- Все обнаруженные функциональные проблемы записать в results/defect ledger; production
apps/**,crates/**, migrations и UI behavior в этой Story не чинить.
- Обновить
-
Task 6 — Дополнить существующий brownfield product smoke (AC: #2, #3)
- Обновить
scripts/authenticated-product-smoke.py, не создавать второй smoke: после create Operation выполнить/operations/{id}/test-runs, проверить safe success outcome, затем publish exact version, bind/publish exact Agent revision и MCPtools/list/tools/call. - Получать Operation version и Agent revision из create/publish/get API responses и передавать через helper return values; hard-coded
1в publish/bind/evidence запрещён. - Ввести единый bounded redacting error formatter для HTTP, MCP и cleanup: только stable stage/code/status; никогда full URL, response body, tool list или raw MCP error. Safe summary содержит IDs/revisions/stages/verdict/command identity, но не key/session/payload.
- Выполнять cleanup в
finallyпосле создания первого asset; сохранитьCRANK_PRODUCT_SMOKE_KEEP_ASSETS. Cleanup warning не подменяет основной verdict и проходит через safe formatter. - Обновить
tests/unit/test_authenticated_product_smoke.py: request ordering, test-run contract, exact revisions, safe summary и redaction canaries. Не обращаться к внешнему публичному API. - Запустить smoke на текущем Community stack. Отсутствие окружения/credential фиксируется
not_run/blocked, но является HALT для завершения Story до реального успешного запуска.
- Обновить
-
Task 7 — Собрать automated evidence и выполнить bounded UI pass (AC: #3, #4, #5, #6)
- Запустить targeted Admin API/MCP/Rust tests и связать test cases с flow IDs; отдельно выполнить
just verify. - Выполнить UI build. Playwright запускать с pinned
@playwright/test1.61.1,--forbid-only, JSON result в ignored temp file и fail-on-flaky semantics; collector переносит sanitized summary/report SHA, raw report/build output не коммитить. - Выполнить применимые smoke specs: login, operations/wizard, agents, keys, secrets/auth configuration, logs/usage и workspace/settings. Skip/retry-pass с flaky classification не записывать как pass.
- Пройти manual checklist. Decision table: observed success/failure ⇒ pass/fail; применимый, но не выполненный state ⇒ not_run; отсутствующий обязательный contract ⇒ implementation gap; N/A допустим только для неприменимого by-design state с bounded reason. Проверить stale responses, RU/EN и safe DOM/error sinks.
- Обновить defect ledger и implementation statuses по severity invariant; не исправлять найденные product gaps в рамках этой Story.
- Запустить targeted Admin API/MCP/Rust tests и связать test cases с flow IDs; отдельно выполнить
-
Task 8 — Подключить canonical baseline gate (AC: #1, #3, #7)
- Обновить
justfile:capability-inventory-checkтребует FR-1…FR-54 и запускает оба validator; сохранить порядок и все существующиеjust verifygates. - Обновить
.gitea/workflows/ci.yml: Python tooling tests → inventory validator → baseline validator → Community scope → существующие Rust/UI gates. Не полагаться только наjust verify. - Обновить
.gitea/workflows/release.yml:python3 --version, tooling/inventory/baseline/scope gates выполняются до build/package/publish; failed evidence или checksum drift блокирует release. - Не добавлять Cargo/npm dependency, не менять Rust toolchain, package/lock files, DB schema или wire contract. Существующий owner-approved
Cargo.lockdiff Story 1.1 не расширять.
- Обновить
-
Task 9 — Документация и handoff (AC: #1, #4, #6, #7)
- Обновить
README.md,docs/README.md,docs/intro.md,docs/en/README.md,CONTRIBUTING.md,scripts/README.md: baseline paths, команды, status-versus-verdict semantics, checksum regeneration/verification и правило evidence-backed status changes. - User-facing утверждения синхронизировать RU/EN. Не рекламировать planned Resources/Prompts/Tasks/Load Runs или отсутствующий UI state как реализованные.
- Локально обновить ignored
_bmad-output/project-context.mdустойчивыми правилами, но не делать его CI prerequisite и не force-add. - Явно просканировать каждый NEW/UPDATE tracked path через Community scope checker; canonical artifacts/schema/validator целиком не исключать.
- Обновить
-
Task 10 — Финальная проверка и честный completion record (AC: #1–#7)
- Выполнить targeted Python tests, smoke unit tests, targeted Rust tests, UI build/Playwright, оба canonical validators, explicit Community scope scan и
just verify. - Финализировать inventory/required-surfaces/taxonomy/checklist/results, проверить общий baseline version, затем хешировать exact bytes и записать manifest последним; любое content change требует bump version. Повторно проверить checksum и deterministic output.
- Проверить
git diff --check, полный file list и отсутствие случайных dependency/toolchain/runtime/DB изменений, generated reports, screenshots, credentials и raw payloads. - В Dev Agent Record перечислить фактически выполненные команды и verdict. Недоступное окружение, skipped/flaky/missing evidence и найденные блокеры оставить явно non-pass.
- Выполнить targeted Python tests, smoke unit tests, targeted Rust tests, UI build/Playwright, оба canonical validators, explicit Community scope scan и
Review Findings
- [Review][Patch][High] Выполнить bounded exploratory UI baseline сейчас: пройдены все 12 charters; observed verdicts, next evidence и найденные defects сохранены без raw browser artifacts. [docs/capability-baseline/manual-checklist.md]
- [Review][Patch][High] Versioned schema contract и exact
full_passвалидируются fail-closed; semantic/schema drift покрыт regressions. [docs/schemas/capability-baseline.schema.json] - [Review][Patch][High] Required surfaces закрыты exact group/flow membership, uniqueness, union и полнотой всех current flows. [scripts/validate-capability-baseline.py]
- [Review][Patch][High] Checklist и
manual_resultsсвязаны exact IDs/flows, axes, retained result иnext_evidence. [scripts/validate-capability-baseline.py] - [Review][Patch][High] Accepted evidence ограничено command allowlist, unique IDs/hashes, common provenance, typed known flows и только implemented status. [scripts/validate-capability-baseline.py]
- [Review][Patch][High] Collector всегда пишет
evidence_mode, а fatal/malformed/non-object Playwright results классифицирует non-pass. [scripts/collect-capability-baseline.py] - [Review][Patch][High]
just-verifyбольше не выдаётся за UI evidence; UI flow mapping оставлен только у UI build/Playwright runs. [docs/capability-baseline/results.json] - [Review][Patch][High] Smoke требует
isError=falseи ожидаемый safe mapped health outcome. [scripts/authenticated-product-smoke.py] - [Review][Patch][High] Smoke не печатает base URL/private endpoint. [scripts/authenticated-product-smoke.py]
- [Review][Patch][Medium] Malformed workspace/key/tools responses проходят через bounded stable errors без traceback. [scripts/authenticated-product-smoke.py]
- [Review][Patch][Medium] Stateful MCP session завершается DELETE в
finally; реальный run подтвердил нулевой остаток sessions/assets. [scripts/authenticated-product-smoke.py] - [Review][Patch][Medium] Canonical manifest artifacts обязаны быть tracked в Git и воспроизводимы в clean checkout. [scripts/validate-capability-baseline.py]
- [Review][Patch][Medium] Все фактически выполненные subtasks синхронизированы с completed parent Tasks. [_bmad-output/implementation-artifacts/1-2-baseline-flows.md]
Dev Notes
Scope Boundary
- Story 1.2 — evidence/tooling-only Wave 0. Она наблюдает и замораживает текущий brownfield baseline, но не исправляет product defects и не меняет production Rust/UI/Admin API/MCP/DB surfaces.
- Hard prerequisite Story 1.1 завершён: использовать его canonical inventory, strict schema validator, deterministic bounded diagnostics и Community scope guardrail. Не ослаблять существующие validations ради заполнения baseline.
- Строгий порядок Epic 1:
1.1 → 1.2 → 1.3 → 1.4 → 1.5 → 1.6. Typed config, migration authority, canonical correlation и typed metrics начинаются только после принятого baseline. - Story 1.2 не завершает весь gate «Baseline Frozen»: Reference Workload и initial/signed Evidence Manifest имеют отдельную downstream ownership. Она также не заменяет 8.1, 8.2 и 8.3.
Canonical Artifact Design
docs/capability-inventory.json
│ flow IDs / implementation status / FR / owner
▼
docs/capability-baseline/results.json ─── defects + automated/manual verdicts
│
├── required-surfaces.json
├── outcome-taxonomy.json
├── manual-checklist.md
└── manifest.json ── SHA-256 всех пяти canonical inputs
- Сохранить inventory
schema_version: 1и существующий closed schema, если AC можно выразить companion artifacts. Не добавлять evidence verdict/checksum поля в inventory и не превращатьmanual_onlyв implementation status. - Manifest — единственный checksum index; lowercase SHA-256 вычисляется по exact tracked bytes, manifest не self-hash. Общий
baseline_versionимеет boundedYYYY.MM.DD.Nformat и совпадает во всех baseline artifacts; любое content change требует нового version и manifest. Immutable predecessor/signature добавляются только в 8.1. - Canonical evidence links только repo-relative, tracked, existing, regular, non-symlink. Запрещены
_bmad-output,/tmp,target,node_modules, generated Playwright HTML/trace/video/screenshot и absolute host paths. required-surfaces.jsonявляется normative completeness contract. Current flows достаточно мелкие, чтобы один failing contract не скрывался общей записью «Admin API работает», но не дублируют каждый route. Stable flow ID отражает outcome, напримерapi-operation-test-run,mcp-published-tool-call,ui-operation-yaml-import.
Existing Surfaces and Reuse Map
- UI: login/logout; Operations catalog/filter/delete; OpenAPI preview/create; wizard create/edit/version/test/publish/archive, sample upload/draft generation, YAML import/export; Agents CRUD/bind/publish/unpublish/archive/tool-search; MCP/approval keys create/list/revoke/delete/one-time reveal; Secrets; Auth Profiles/Upstreams within wizard; Logs/detail + approvals; Usage; workspace/profile/password/settings.
- Admin API: authoritative routes in
apps/admin-api/src/app.rs; cover auth/session/profile/password, capabilities/workspaces, Operations lifecycle/test/samples/draft/quality/YAML/OpenAPI, Agents/bindings/catalog/keys, Auth Profiles/Upstreams/Secrets, export, logs/approvals/usage. - MCP: current Streamable HTTP GET/POST/DELETE; initialize/initialized/ping;
tools/list,tools/call; session/SSE/JSON negotiation; scoped catalog/tool-search; approval list/get/approve/deny and elicitation. Inventory observed revisions only; do not broaden protocol implementation. - Existing smoke: extend
scripts/authenticated-product-smoke.py; it already handles login, workspace resolution, Operation create/publish, Agent bind/publish, one-time MCP key, initialize, list, call and cleanup. Missing Admin test-run and explicit Operation version/Agent revision evidence are the Story 1.2 gaps. - Automated evidence: Admin Operation/Agent tests in
apps/admin-api/tests/integration/operations_agents.rs; secret/import/auth insecrets_import_auth.rs; OpenAPI inopenapi_import.rs; access/keys/logs/usage incommunity_access_usage.rs; MCP transport/catalog/approvals/search inapps/mcp-server/tests/integration/**; UI specs inapps/ui/tests/e2e/.
Security, Reliability and Compatibility Guardrails
- Applicable NFRs: NFR-S1, S2, S4, S6, S7, S8, O5 and C1. Baseline capture must remain default-deny, secret-safe, bounded, closed-contour and fail-closed where mandatory evidence is absent.
- Never store credentials, raw one-time keys, auth cookies, sensitive request/response payloads, private endpoint query data or resolved host paths. Commands use environment-variable names/placeholders, never values.
- Preserve Story 1.1 limits/patterns: strict UTF-8 and duplicate-key detection; bounded JSON/report; deterministic sorting; safe machine codes/pointers; validate paths before exclusions; reject absolute/traversal/control/symlink paths; catch malformed/deep JSON without traceback.
- Preserve Rust 1.96.1, Edition 2024, pinned npm packages including
@playwright/test1.61.1, current workspace/crate direction, Alpine concatenation andwindow.Crank*UI contract. No new dependency is required. - Playwright baseline must distinguish retry-pass/flaky from stable pass. Use existing CLI/report capabilities; do not upgrade Playwright in this Story.
just verifydoes not run UI build/E2E, so both remain explicit completion evidence. - PostgreSQL remains durable source of truth; Valkey is optional/rebuildable. Baseline records observed behavior and gaps but does not alter persistence or failure semantics.
Test and Evidence Commands
Targeted first; exact Rust test filters may be adjusted only after listing current test names, and any missing filter is non-pass evidence:
python3 -m unittest discover -s tests/unit -p 'test_validate_capability_inventory.py' -v
python3 -m unittest discover -s tests/unit -p 'test_validate_capability_baseline.py' -v
python3 -m unittest discover -s tests/unit -p 'test_authenticated_product_smoke.py' -v
cargo test -p admin-api --test integration
cargo test -p mcp-server --test integration
cd apps/ui && npm ci && npm run build
tmp_report="$(mktemp)" && cd apps/ui && npx playwright test \
login.spec.js operations.spec.js wizard.spec.js agents.spec.js \
api-keys.spec.js secrets.spec.js logs-usage.spec.js workspace-settings.spec.js \
--project=chromium --workers=1 --forbid-only --fail-on-flaky-tests --reporter=json >"$tmp_report"
cd ../.. && python3 scripts/collect-capability-baseline.py \
--playwright-report "$tmp_report" --output <candidate-results>
# CRANK_STAGING_ADMIN_EMAIL/CRANK_STAGING_ADMIN_PASSWORD already provisioned
just authenticated-product-smoke <community-base-url>
python3 scripts/validate-capability-inventory.py --root . \
--inventory docs/capability-inventory.json \
--schema docs/schemas/capability-inventory.schema.json \
$(for n in $(seq 1 54); do printf -- '--required-fr FR-%s ' "$n"; done)
python3 scripts/validate-capability-baseline.py --root . \
--manifest docs/capability-baseline/manifest.json \
--schema docs/schemas/capability-baseline.schema.json
python3 scripts/check-community-scope.py --root . --files <every NEW/UPDATE tracked path>
just verify
git diff --check
Do not paste secret values into shell history or committed results. Collector records environment variable names only. Delete the temporary raw Playwright report after the sanitized candidate is verified.
Project Structure Notes
Expected NEW tracked files:
docs/capability-baseline/outcome-taxonomy.jsondocs/capability-baseline/required-surfaces.jsondocs/capability-baseline/manual-checklist.mddocs/capability-baseline/results.jsondocs/capability-baseline/manifest.jsondocs/schemas/capability-baseline.schema.jsonscripts/validate-capability-baseline.pyscripts/collect-capability-baseline.pytests/unit/test_validate_capability_baseline.pytests/unit/test_collect_capability_baseline.py
Expected UPDATE tracked files:
docs/capability-inventory.jsontests/unit/test_validate_capability_inventory.pyscripts/authenticated-product-smoke.pytests/unit/test_authenticated_product_smoke.pyjustfile.gitea/workflows/ci.yml.gitea/workflows/release.ymlREADME.mddocs/README.mddocs/intro.mddocs/en/README.mdCONTRIBUTING.mdscripts/README.md
Local ignored update: _bmad-output/project-context.md; не force-add и не использовать как canonical/CI evidence.
Do not modify for this Story: docs/schemas/capability-inventory.schema.json, production apps/** кроме existing smoke script outside apps, crates/**, migrations, Cargo/npm manifests or locks, Rust toolchain and runtime/wire/DB/UI behavior. Если фактическая реализация требует такой change, остановиться и оформить correct-course/downstream defect вместо скрытого scope expansion.
Previous Story Intelligence
- Story 1.1 завершилась двумя adversarial review rounds. Сохранить её fixes: strict schema-key allowlist, exact integer version (boolean invalid), duplicate JSON rejection, bounded one-line/file scans, fail-closed path resolution, correct truncation accounting, whitespace rejection и no traceback.
- Текущий inventory содержит четыре target entries и
pass=0; это seed, а не доказательство отсутствия shipped Tools. Story 1.2 должна добавить фактические current flows и не удалять future Community intent. just verify, CI и release вызывают inventory guardrails напрямую; новый baseline validator подключается аналогично, а не заменяет существующий gate.- Story 1.1 имеет owner-approved unrelated
Cargo.locksecurity remediation. Это исключение не является разрешением расширять lockfile diff в Story 1.2. - Рабочее дерево содержит незакоммиченные изменения Story 1.1. Preserve их; не перезаписывать и не откатывать чужие изменения.
Latest Technical Information
- Использовать pinned Playwright 1.61.1. JSON reporter даёт structured result,
--forbid-onlyзапрещает случайные focused tests,--fail-on-flaky-testsделает retry-pass non-green; retries/statuses необходимо перенести в taxonomy без потери смысла. - Official references: Playwright CLI, Reporters, Retries. Не менять package version в рамках Story.
References
- [Source:
_bmad-output/planning-artifacts/epics.md— Epic 1, Cross-Epic Dependencies, Story 1.2] - [Source:
_bmad-output/planning-artifacts/prds/prd-crank-2026-08-03/prd.md— FR-1…FR-6, FR-46, §§5.3–5.5, §§6–7] - [Source:
_bmad-output/planning-artifacts/prds/prd-crank-2026-08-03/addendum.md— Community scope and evidence contract] - [Source:
_bmad-output/planning-artifacts/architecture/architecture-crank-2026-08-03/ARCHITECTURE-SPINE.md— AD-1, AD-19, AD-20, testing/security conventions] - [Source:
_bmad-output/planning-artifacts/implementation-readiness-report-2026-08-08.md— Required Actions 3–4] - [Source:
_bmad-output/implementation-artifacts/1-1-capability-inventory.md— completed contract, review findings, handoff] - [Source:
_bmad-output/project-context.md— Community boundaries, testing and artifact rules] - [Source:
docs/capability-inventory.json,docs/schemas/capability-inventory.schema.json,scripts/validate-capability-inventory.py] - [Source:
apps/admin-api/src/app.rs,scripts/authenticated-product-smoke.py,apps/ui/playwright.config.js]
Dev Agent Record
Agent Model Used
GPT-5 Codex
Debug Log References
- Baseline source revision:
c30461cc92491ebe3d527e125a1657b73fa67006. - Default Playwright stack exposed two Medium harness defects: premature PostgreSQL readiness and incomplete child-process cleanup. Both are retained as
DEF-BL-001/DEF-BL-002; the accepted run used the existing external-PostgreSQL mode after database readiness. - Bounded manual exploration reproduced
DEF-UI-001(stale response),DEF-UI-002(mixed localization) and HighDEF-UI-003(credential-shaped API error rendered into browser DOM). The five affected flows are honestlyblocked; remediation remains in their owning hardening stories.
Completion Notes List
- Frozen baseline
2026.08.09.1: 30 inventory flows, 18 currentimplemented, 5 currentblockedby HighDEF-UI-003, and 7 future target flows keptplanned; FR-1…FR-54 and every normative surface group are represented. - Added separate implementation/evidence axes, normative required surfaces, bounded manual checklist/results, exact-byte SHA-256 manifest, strict Draft 2020-12 contract, fail-closed validator and trusted report collector.
- Extended the existing authenticated product smoke with Admin test-run, API-derived Operation version/Agent revision, safe bounded errors, cleanup in
finally, and sanitized summary. A real Community-stack REST→MCP create/test/publish/bind/list/call run passed. - Automated evidence passed: Admin API integration 30/30, MCP integration 31/31, UI build, selected Chromium Playwright 21/21 with no retry/skip, and complete
just verify. All 12 bounded manual charters were executed; 3 passed and 9 failed with traceable next evidence. This baseline does not replace Epic 8 regression. - Final gates passed after review patches: 86 Python tooling tests, inventory validator with FR-1…FR-54, baseline checksum/schema validator, 29-file explicit Community scan, repository-wide 484-file Community scan, dependency/security audit with 0 vulnerabilities, fmt, Clippy and all Rust tests. UI build and
git diff --checkpassed. - Raw Playwright/smoke/collector temporary reports and the exact test PostgreSQL container were removed after sanitized hashes/results were frozen. No Story 1.2 Cargo/npm/toolchain/runtime/DB change was introduced; the pre-existing Story 1.1 lockfile/security diff was preserved unchanged.
File List
.gitea/workflows/ci.yml.gitea/workflows/release.ymlCONTRIBUTING.mdREADME.mddocs/README.mddocs/capability-baseline/manifest.jsondocs/capability-baseline/manual-checklist.mddocs/capability-baseline/outcome-taxonomy.jsondocs/capability-baseline/required-surfaces.jsondocs/capability-baseline/results.jsondocs/capability-inventory.jsondocs/en/README.mddocs/intro.mddocs/schemas/capability-baseline.schema.jsonjustfilescripts/README.mdscripts/authenticated-product-smoke.pyscripts/collect-capability-baseline.pyscripts/validate-capability-baseline.pytests/unit/test_authenticated_product_smoke.pytests/unit/test_collect_capability_baseline.pytests/unit/test_validate_capability_baseline.pytests/unit/test_validate_capability_inventory.py_bmad-output/project-context.md(local ignored update only)
Change Log
- 2026-08-09: Implemented and froze Story 1.2 capability baseline; added validated evidence contracts/collector, expanded current-flow inventory, hardened authenticated product smoke, wired CI/release gates, recorded real automated evidence and moved Story to review.
- 2026-08-09: Applied all code-review patches, executed all 12 manual charters, recorded High
DEF-UI-003and blocked affected flows, reran a clean REST→MCP smoke and every mandatory gate, then moved Story to done.