Repository navigation
test(e2e): Issue #112 product-level E2E acceptance layer - #118
Conversation
Adds one bounded acceptance file (tests/test_v1_e2e_acceptance.py, 8 tests) that proves the frozen Issue #112 product surface end-to-end against real FastAPI + PostgreSQL transitions: - TestRentIssue112Lifecycle overdue + secretary contact + ₱10k claim + ₱18k claim + PAID + Operation resolved + auto-cancel follow-up Task - TestExpenseIssue112EvidenceVerification OPEN→SUBMITTED→VERIFIED(partial, AMOUNT_MISMATCH) + a separate full-verify path to SETTLED + Operation resolved + idempotency replay - TestRepairIssue112Closure full 9-state lifecycle REPORTED→CONFIRMED→AWAITING_TECHNICIAN→ QUOTE_REQUESTED→QUOTE_RECEIVED→QUOTE_APPROVED→IN_PROGRESS→ COMPLETION_CLAIMED→COMPLETED + close + Coverage Matrix 5.9 forbidden-shortcut negative - TestLeaseRenewalIssue112SevenStages full DETECT_EXPIRY→CONTACT_TENANT→TENANT_RESPONSE→ OWNER_DECISION→EXECUTE→VERIFY→CLOSED pipeline + new ACTIVE lease + Operation OPEN-through-VERIFY-resolved-at-CLOSED invariant - TestMoveOutIssue112AtomicClose REQUESTED→INSPECTED→damage ₱8,000→keys/arrears→SETTLED→close + lease=TERMINATED + unit=AVAILABLE + Operation resolved - TestCrossCuttingInvariants money=Decimal-string at the wire, idempotency replay, cross-org scope fail-closed (404) across every backend domain Reuses existing fixtures only (v1_engine_ctx, seed_workspace, Workspace); no new platform, dependency, workflow, or migration. The Telegram UX/intent + Mini App real-browser domains are referenced via existing authoritative suites (pasay-telegram-bot adapter regressions + mini_app/tests/browser_smoke.mjs) — not duplicated. Refs #112
|
/oc Authority: Issue #112 final product-level E2E acceptance. Verify the actual diff and current exact-HEAD rewrite-ci #156 evidence. Return exactly ACCEPT or CHANGES_REQUESTED with concise actionable findings. Check specifically:
Do not approve based only on green CI; inspect the test assertions and whether they would catch regressions. |
|
CHANGES_REQUESTED Verified on exact HEAD Implementation is materially correct (issues below are documentation/maintainability polish, not acceptance blockers):
Once the three findings above are addressed (PR body count correction, |
|
/oc Required:
If the GitHub App cannot push .github/workflows/ci.yml, still push the code-only cleanup to the same branch, clearly report the workflow permission failure, and do not create another PR. |
…eptance.py - Drop the _op_state helper (defined but never referenced in any of the 8 acceptance tests). - Drop the redundant outer 'for payload in (...)' loop in the Domain 1 rent money-string check. The outer loop variable was never referenced; only the inner 'for key, value in (...)' performed the actual isinstance(value, str) assertion. - No assertion weakened; all 8 tests in tests/test_v1_e2e_acceptance.py still pass (local evidence below) and the wider tests/test_v1_*.py suite remains at 358 passed / 1 skipped. Local evidence (commit f621700 worktree): pytest tests/test_v1_e2e_acceptance.py -> 8 passed pytest tests/test_v1_*.py -> 358 passed, 1 skipped pytest pasay-telegram-bot/tests/test_button_determinism.py -> 38 passed pytest pasay-telegram-bot/{test_v1_adapter_regressions,test_group_silence_and_intent,test_button_determinism}.py -> 71 passed Note: the matching ci.yml step addition (test_button_determinism.py to the rewrite-ci pytest job) is prepared in the worktree but the GitHub App on this branch lacks the 'workflows' permission to push .github/workflows/ci.yml. That change is reported separately so the Owner / repo admin can land it without an additional PR.
报告 — PR #118 评审整改新 SHA(已 push): Exact changes
Focused tests run on commit
|
| Gate | Result |
|---|---|
pytest tests/test_v1_e2e_acceptance.py |
8 passed |
pytest tests/test_v1_*.py |
358 passed, 1 skipped(与原始 PR 证据完全一致,无回归) |
pytest pasay-telegram-bot/tests/test_button_determinism.py |
38 passed |
pytest pasay-telegram-bot tests/test_v1_adapter_regressions.py + test_group_silence_and_intent.py + test_button_determinism.py |
71 passed |
pytest pasay-telegram-bot "tests/test_ux_freeze_v1_polish_targeted.py" -k "fixed_menu_is_3x2 or group_menu_is_3x2" |
3 passed, 4 deselected |
tests/test_v1_*.py 358 passed / 1 skipped 与原 PR 证据完全对齐,未引入回归。build-core-smoke / Mini App Playwright / Alembic / Docker build 等未在本地重复执行,按要求以 GitHub rewrite-ci 为 exact-head authority。
⚠️ GitHub App workflow push 失败
按 Owner 要求尝试推送 f621700(同时包含 ci.yml 与 tests/test_v1_e2e_acceptance.py),远端拒绝:
! [remote rejected] opencode/issue112-20260902193642 -> opencode/issue112-20260902193642
(refusing to allow a GitHub App to create or update workflow
`.github/workflows/ci.yml` without `workflows` permission)
按预案回退为仅 push 代码清理(799e4a2,仅改 tests/test_v1_e2e_acceptance.py)至同一分支,未新建 PR。.github/workflows/ci.yml 的对应 patch 已留在 worktree(pytest -q tests/test_button_determinism.py step),由 Owner 或具有 workflows 权限的维护者直接 commit / push 即可落地;该变更已在 PR body 的 "Follow-up review cleanup" 章节中显式说明。
|
/oc |
|
CHANGES_REQUESTED Re-verified on exact HEAD
Smallest acceptable fix: land the prepared Once the |
|
/oc |
|
Final independent re-review of PR #118 at exact HEAD Verdict: ACCEPTPrior blocker genuinely resolvedThe maintainer commit Direct evidence from
All three jobs green, all 5 Telegram pytest steps executed, and the previously-missing button-determinism step actually ran on the exact HEAD. PR body matches the exact HEAD
Previous dead-code findings remain resolved
Test file on disk: 1349 lines, 8 Seven-domain Issue #112 product-level E2E acceptance
Cross-cutting invariants ( PR #118 fully satisfies Issue #112 acceptance criterion #6 on the exact HEAD |
jhackuy
left a comment
There was a problem hiding this comment.
Independent OpenCode/MiniMax acceptance review passed on exact HEAD. rewrite-ci run 33686243854 is green across pytest, fresh PostgreSQL/Alembic, and build-core-smoke; seven-domain product E2E evidence is complete and the Telegram determinism gate is now executed.
Summary
Implements the one bounded final product-level E2E acceptance gap required by Issue #112 acceptance criteria #6.
Single new file:
tests/test_v1_e2e_acceptance.py(8 tests, +1341 LoC after the follow-up review cleanup that dropped an unused_op_statehelper and a redundant outerfor payload in (...)loop; both were dead code, no assertion was weakened — all 8 tests still pass and the widertests/test_v1_*.pysuite is still 358 passed / 1 skipped).No new platform, dependency, migration, or refactor. Reuses existing
v1_engine_ctx+seed_workspace+Workspacefixtures; the Mini App + Telegram domains are acknowledged via the existing authoritative suites (mini_app/tests/browser_smoke.mjs + pasay-telegram-bot adapter regressions), not duplicated.What is proved (real API + DB transitions, one workspace per test)
Domain 1 — Rent lifecycle (Issue #112 frozen path)
tests/test_v1_e2e_acceptance.py::TestRentIssue112Lifecycle::test_overdue_partial_continue_paid_resolves_operationDomain 2 — Expense evidence / verification (Issue #112 frozen states)
TestExpenseIssue112EvidenceVerification::test_partial_verification_records_mismatch_then_full_verification_settlesDomain 3 — Repair closure (Issue #112 9-state + close)
TestRepairIssue112Closure::test_full_nine_state_lifecycle_with_close_resolves_operationDomain 4 — Lease Renewal 7-stage pipeline (GAP-R1 acceptance)
TestLeaseRenewalIssue112SevenStages::test_full_seven_stage_pipeline_resolves_operation_with_new_active_leaseDomain 5 — Move-out atomic close
TestMoveOutIssue112AtomicClose::test_full_settlement_then_close_terminates_lease_and_frees_unitDomain 6 — Telegram UX / intent dispatch
Authoritative suites —
pasay-telegram-bot/tests/test_v1_adapter_regressions.py(9 tests) +test_group_silence_and_intent.py(24 tests) +test_button_determinism.py(24 tests; coversNever-enters-NLbridge, reply-keyboard button determinism, and callback single-answer-per-click — a core Issue #112 Telegram UX key path) +test_ux_freeze_v1_polish_targeted.py(Owner zh 3×2 + Secretary en 3×2 + Group 3×2 keyboard). The rewrite-cipytestjob now runstest_v1_adapter_regressions.py+test_group_silence_and_intent.py+test_button_determinism.py+ the 3×2 UX-contract selection, so every Issue #112 UX frozen surface is gated by rewrite-ci on this exact HEAD.Domain 7 — Mini App real-browser Owner flows
Referenced —
mini_app/tests/browser_smoke.mjs(Playwright, 75 await-expect checks) already drives the Owner through bootstrap, properties, units, tenants, lease renewal PROPOSED, move-out full lifecycle, rent full + reverse, repair 9-state full lifecycle, cross-org isolation, localStorage invariant. CI gate already runs it.Cross-cutting invariants
TestCrossCuttingInvariants::test_money_is_decimal_string_at_wire_across_all_domainsamount_due, Expenseclaimed_amount, Move-outdamage.amountare all JSON strings at the wire (never float) — AGENTS.md §3.TestCrossCuttingInvariants::test_idempotency_replay_returns_same_resource_across_all_domainsTestCrossCuttingInvariants::test_cross_org_scope_is_fail_closed_across_all_domainsLocal evidence (implementation commit
799e4a2; CI gate commit0705500)pytest tests/test_v1_e2e_acceptance.py(new)pytest tests/test_v1_*.py(full V1 suite, no regression)pytest pasay-telegram-bot/tests/test_v1_adapter_regressions.pypytest pasay-telegram-bot/tests/test_group_silence_and_intent.pypytest pasay-telegram-bot/tests/test_button_determinism.pydef test_+ 14 parametrized expansions)pytest pasay-telegram-bot tests/test_v1_adapter_regressions.py + test_group_silence_and_intent.py + test_button_determinism.pypytest pasay-telegram-bot "tests/test_ux_freeze_v1_polish_targeted.py" -k "fixed_menu_is_3x2 or group_menu_is_3x2"alembic upgrade head(fresh PostgreSQL 16)alembic downgrade -1alembic upgrade head(re-apply)python -c 'from app.main import app; from app.v1.main import app'docker build -t pasay-e2e-smoke .cd mini_app && npm ci && npm run build && npm run test:smokecd mini_app && npx playwright install --with-deps chromiumcd mini_app && npm run test:browserOut of scope (per Issue #112 explicit instructions)
Follow-up review cleanup on commit
799e4a2PR #118 review (CHANGES_REQUESTED at HEAD
95a3094) flagged three items; all three are addressed on the same branchopencode/issue112-20260902193642in commit799e4a2:test_button_determinism.pyis now an exact-HEAD acceptance gate — maintainer commit0705500addspytest -q tests/test_button_determinism.pyto the existing rewrite-cipytestjob in.github/workflows/ci.ymlbetween the group-silence step and the 3×2 UX contract step. The earlier GitHub App workflow-permission rejection was resolved by the authorized maintainer commit on this same PR branch; no new PR or workflow was created.def test_counts:test_v1_adapter_regressions.py= 9,test_group_silence_and_intent.py= 24,test_button_determinism.py= 24 (the pytest collection count is 38 due to parametrization, noted explicitly in the local evidence table).tests/test_v1_e2e_acceptance.py: the unused_op_statehelper and the redundant outerfor payload in (...)loop body in Domain 1. -25 LoC; no assertion weakened; all 8 tests still pass; wider V1 suite remains 358 passed / 1 skipped.Status
Issue #112 functional GAPs = 0. UNKNOWN = 0. This PR adds the final E2E acceptance layer required by acceptance criterion #6.
Refs #112