Repository navigation
test(office): cover /api/eco proxy serving upstream data (DL-17a7) - #102
Conversation
The eco side panel was reported empty, but the live chain works: office daemon /api/eco-raw -> rtunnel :8788 -> OFFICE_ECO_URL -> hub /api/eco -> #eco panel. The only gap was coverage: test_hub.py only asserted the disabled case (ECO_URL unset). Add an integration test that stands up a real upstream HTTP server serving an eco payload, points OFFICE_ECO_URL at it, and asserts GET /api/eco returns that payload under the "eco" key alongside the office state. Plus a fallback test for an unreachable upstream. Generated with [Devin](https://devin.ai) & QA Engineer Icaro Galvao Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Static scan (advisory) — result: Deterministic scan of 1 changed file(s) — gitleaks 8.30.1 · semgrep 1.182.1 · ruff 0.17.3. Findings are advisory evidence for the judge, not a lane verdict. gitleaks — 0 finding(s) semgrep — 0 finding(s) ruff (E9,F,S) — 6 finding(s)
|
|
devin-judge (ACP, high model): |
Addresses Devin Review finding: CONTRIBUTING.md requires a CHANGELOG entry for every PR. Generated with [Devin](https://devin.ai) & QA Engineer Icaro Galvao Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Static scan (advisory) — result: Deterministic scan of 2 changed file(s) — gitleaks 8.30.1 · semgrep 1.182.1 · ruff 0.17.3. Findings are advisory evidence for the judge, not a lane verdict. gitleaks — 0 finding(s) semgrep — 0 finding(s) ruff (E9,F,S) — 6 finding(s)
|
|
devin-judge (ACP, high model): |
|
gate-resolved-via: fallback — 1 blocking thread(s) cleared by replies citing verified fix commits, with the Devin Review status on 85a0c46 re-verified clean:
Threads left unresolved — the findings stay visible. |
DL-17a7 — Office eco panel
Diagnóstico
O painel eco do devin-office (
#econo index.html) já está operacional na VM. A cadeia completa funciona:devin-officedaemon no laptop coleta viaecomon.collect_eco()→ serve/api/eco-rawna :8788devin-vm-rtunnel.servicefaz-R 8788:localhost:8788→ VM alcança o daemon no loopback (sshdescutando :8788)OFFICE_ECO_URL=http://127.0.0.1:8788/api/eco-rawno env PM2 dodevin-office→ hub.py faz proxy em/api/ecofetch("/api/eco")→applyEco(data?.eco)→renderEcoPanel+toolRows(arms do canvas)Verificado ao vivo na VM:
GET http://127.0.0.1:8790/api/ecoretorna{"eco": {"icaro-hpelitebookfolio1040g3": {probes, tools, units, meta}}, "office": {...}}comprobe.live=true. Screenshot do painel renderizado com dados reais anexado na sessão.O gap real
A missão DL-17a7 (backlog de antes do fix de 2026-11-06) reportava "nada serve esse endpoint" — resolvido na época pelo rtunnel+daemon. O que faltava era cobertura de teste:
test_hub.pysó assertava o caso disabled (ECO_URLvazio →eco=None). Nenhum teste travava a regressão do proxy funcionando.O que este PR adiciona
test_ecosystem_proxy_returns_upstream_data— sobe um servidor HTTP upstream real servindo um payload eco, apontaOFFICE_ECO_URLpara ele, e assert queGET /api/ecoretorna esse payload sob a chave"eco"junto ao office state. Teste de integração do caminho real (não mock interno).test_ecosystem_proxy_reports_unreachable_upstream— fallback quando o upstream está fora:eco = {"error": "ecosystem API unreachable"}._eco_upstream(payload)—ThreadingHTTPServerque serve JSON fixo (substituto do daemon/api/eco-raw).Testes
Sem mudança de código de produção — só testes. Deploy VM não afetado (hub.py/index.html já corretos e divergentes de propósito: flat vs
devin_office.*).