feat(notifications): direct BRD + Plane links in approve ping (ORCH-017) #37

Merged
admin merged 12 commits from feature/ORCH-017-brd-plane-telegram into main 2026-06-05 22:45:12 +03:00
Owner

Summary

  • notify_approve_requested now embeds two clickable HTML <a> links in the single notifying approve-gate Telegram message: a Gitea branch-view link to 01-brd.md and a Plane issue browser link.
  • New setting ORCH_PLANE_WEB_URL (external browser web URL of Plane; falls back to plane_api_url). Loopback-guard: if the resolved Plane web-base is localhost/127.0.0.1/0.0.0.0/::1 or empty, the Plane link is omitted (no broken localhost URLs in prod).
  • Graceful degradation: each link is built independently and omitted when its data is missing; the message and the «Переведите задачу в статус Approved …» call to action are always sent as exactly one ping. Shared send_telegram left untouched (minimal blast radius for the self-hosting prod container). Dynamic labels html.escaped; parse_mode=HTML preserved. QG registry / stages / :approved: handler unchanged.

Implements ADR docs/work-items/ORCH-017/06-adr/ADR-001-telegram-approve-links.md.

Docs (golden source, same PR)

  • CHANGELOG.md, .env.example (ORCH_PLANE_WEB_URL), docs/operations/INFRA.md env map.

Test plan

  • tests/test_notify_approve_links.py — TC-01..TC-08
  • tests/test_analysis_approve_flow_links.py — TC-10 integration
  • Regression test_telegram_tracker.py, test_notify_done_regression.py green
  • Full suite pytest tests/ -q → 434 passed
## Summary - `notify_approve_requested` now embeds two clickable HTML `<a>` links in the single notifying approve-gate Telegram message: a **Gitea branch-view link to `01-brd.md`** and a **Plane issue browser link**. - New setting **`ORCH_PLANE_WEB_URL`** (external browser web URL of Plane; falls back to `plane_api_url`). **Loopback-guard:** if the resolved Plane web-base is `localhost`/`127.0.0.1`/`0.0.0.0`/`::1` or empty, the Plane link is omitted (no broken localhost URLs in prod). - Graceful degradation: each link is built independently and omitted when its data is missing; the message and the «Переведите задачу в статус Approved …» call to action are always sent as **exactly one** ping. Shared `send_telegram` left untouched (minimal blast radius for the self-hosting prod container). Dynamic labels `html.escape`d; `parse_mode=HTML` preserved. QG registry / stages / `:approved:` handler unchanged. Implements ADR `docs/work-items/ORCH-017/06-adr/ADR-001-telegram-approve-links.md`. ## Docs (golden source, same PR) - `CHANGELOG.md`, `.env.example` (`ORCH_PLANE_WEB_URL`), `docs/operations/INFRA.md` env map. ## Test plan - [x] `tests/test_notify_approve_links.py` — TC-01..TC-08 - [x] `tests/test_analysis_approve_flow_links.py` — TC-10 integration - [x] Regression `test_telegram_tracker.py`, `test_notify_done_regression.py` green - [x] Full suite `pytest tests/ -q` → 434 passed
admin added 4 commits 2026-06-05 20:58:42 +03:00
docs: init ORCH-017 business request
All checks were successful
CI / test (push) Successful in 13s
7f31d62a4d
analyst(ET): auto-commit from analyst run_id=112
All checks were successful
CI / test (push) Successful in 12s
08528b655e
architect(ET): auto-commit from architect run_id=115
All checks were successful
CI / test (push) Successful in 12s
c9b1195c0b
feat(notifications): direct BRD + Plane links in approve ping (ORCH-017)
All checks were successful
CI / test (push) Successful in 12s
CI / test (pull_request) Successful in 12s
69a4aaab99
notify_approve_requested now embeds two HTML <a> links into the single
notifying approve-gate message: a Gitea branch-view link to 01-brd.md and a
Plane issue browser link. Adds ORCH_PLANE_WEB_URL (external Plane web URL,
fallback to plane_api_url) with a loopback-guard that omits the Plane link
when the resolved base is localhost/empty (no broken localhost URLs in prod).

Each link is built independently and omitted on missing data; the message and
the "flip to Approved" call to action are always sent as exactly one ping. The
shared send_telegram helper is left untouched (min blast radius for the
self-hosting prod container). Dynamic labels are html.escaped; parse_mode=HTML
preserved. QG registry / stages / approve handler unchanged.

Docs updated in-PR: CHANGELOG, .env.example, INFRA env map.
Tests: test_notify_approve_links.py, test_analysis_approve_flow_links.py.

Refs: ORCH-017
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
admin added 1 commit 2026-06-05 21:18:43 +03:00
reviewer(ET): auto-commit from reviewer run_id=117
All checks were successful
CI / test (push) Successful in 13s
CI / test (pull_request) Successful in 11s
6509891f74
admin added 1 commit 2026-06-05 21:20:18 +03:00
tester(ET): auto-commit from tester run_id=118
All checks were successful
CI / test (push) Successful in 12s
CI / test (pull_request) Successful in 17s
950a86e4d8
admin added 1 commit 2026-06-05 21:25:03 +03:00
reviewer(ET): auto-commit from reviewer run_id=120
All checks were successful
CI / test (push) Successful in 12s
CI / test (pull_request) Successful in 11s
0e999d289d
admin added 1 commit 2026-06-05 21:34:30 +03:00
fix(qg): testing gate reads documented tester result: frontmatter key (ORCH-017)
All checks were successful
CI / test (push) Successful in 12s
CI / test (pull_request) Successful in 11s
e62d51aa77
check_tests_passed/_parse_tests_verdict gated the testing -> deploy-staging
transition on `verdict:`/`status:` in 13-test-report.md, but the tester agent
prompt (.openclaw/agents/tester*) documents `result: PASS | FAIL` as THE
machine-readable field. A report that followed the contract literally
(ORCH-017: only `result: PASS`, no verdict:/status:) was bounced back to
development with a misleading "Tests FAILED". ORCH-016 only passed because its
report redundantly carried both `verdict:` and `result:`.

Treat `result:` as a first-class machine field alongside verdict/status; a
negative token in any field stays authoritative (ET-013 contract preserved).
Self-hosting QG fix: unblocks every project whose tester emits only `result:`.

Docs updated in-PR: CHANGELOG, architecture README machine-keys note.
Tests: test_qg.py::TestCheckTestsPassed::test_result_pass_only_passes / _fail_only_fails.

Refs: ORCH-017
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
admin added 1 commit 2026-06-05 21:40:53 +03:00
reviewer(ET): auto-commit from reviewer run_id=123
All checks were successful
CI / test (push) Successful in 12s
CI / test (pull_request) Successful in 12s
c91eb7f82b
admin added 1 commit 2026-06-05 22:28:34 +03:00
revert(ORCH-017): drop shared check_tests_passed gate change — moved to ORCH-47 (own ADR); keep only approve-ping links
All checks were successful
CI / test (push) Successful in 12s
CI / test (pull_request) Successful in 11s
d615747d53
admin added 1 commit 2026-06-05 22:32:34 +03:00
reviewer(ET): auto-commit from reviewer run_id=124
All checks were successful
CI / test (push) Successful in 15s
CI / test (pull_request) Successful in 13s
9c28431167
admin added 1 commit 2026-06-05 22:35:42 +03:00
docs(ORCH-017): drop check_tests_passed/result gate notes (belong to ORCH-47); keep only approve-ping link docs
All checks were successful
CI / test (push) Successful in 12s
CI / test (pull_request) Successful in 12s
43ef160f40
admin merged commit 26c6f2676f into main 2026-06-05 22:45:12 +03:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/orchestrator#37