Skip to content

feat(spike): T-008 — validate Gemini API real metrics, resolve OI-001#75

Closed
renatobardi wants to merge 1 commit intomainfrom
agent/backend-dev/13ae30a1
Closed

feat(spike): T-008 — validate Gemini API real metrics, resolve OI-001#75
renatobardi wants to merge 1 commit intomainfrom
agent/backend-dev/13ae30a1

Conversation

@renatobardi
Copy link
Copy Markdown
Owner

Summary

  • Story: REN-13 T-008: OI-001 — Validar métricas reais Gemini API (BLOCKER)
  • Ran SP-01 spike with real GEMINI_API_KEY (ensi project, 2026-04-18)
  • Verdict: GO — 100% compliance on both models, NFR PASS

Real metrics (replacing SP-01 dry-run estimates)

Model Schema Compliance p50 p95
gemini-2.5-flash BriefArtifact 10/10 6,361ms 7,980ms
gemini-2.5-pro PrdArtifact 5/5 42,754ms 50,285ms

NFR: Typical pipeline ~125s total, worst-case p95 ~165s — well within 5-min limit.

Key findings

  • gemini-2.0-flash is deprecated for new accounts (404 on first run) → updated to gemini-2.5-flash
  • maxOutputTokens must be 8192 — 4096 truncates Pro-stage responses at ~192 lines
  • responseSchema overrides contradictory prompts — retry loop not triggered in 15 runs (safety net only)

Files changed

  • _bmad/spikes/sp-01/src/main.rs — dual-model runner (flash for Brief, pro for PRD)
  • _bmad/spikes/sp-01/src/gemini.rs — maxOutputTokens 4096 → 8192
  • _bmad/spikes/sp-01/results/runs.json — real 16-entry dataset
  • _bmad/spikes/sp-01-result.md — verdict updated GO (was GO WITH CONSTRAINTS)
  • _bmad/docs/architecture-artifact.json — model names, real latency, OI-001 resolved, ADR-002/003 updated

Acceptance criteria coverage

  • ✅ 10 calls executed and results in results/runs.json
  • ✅ Compliance rate documented (BriefArtifact 10/10, PrdArtifact 5/5)
  • ✅ p50/p95 latency measured and compared against NFR (PASS)
  • ✅ Retry loop tested (not triggered — responseSchema forces compliance)
  • ✅ Verdict: GO
  • ✅ Architecture impact documented and architecture-artifact.json updated

- Run SP-01 spike with real GEMINI_API_KEY (ensi project, 2026-04-18)
- gemini-2.5-flash: 10/10 BriefArtifact compliance, p50=6361ms p95=7980ms
- gemini-2.5-pro: 5/5 PrdArtifact compliance, p50=42754ms p95=50285ms
- NFR PASS: typical pipeline ~125s, worst-case p95 ~165s (within 5min limit)
- Discovered: gemini-2.0-flash deprecated for new accounts → updated to gemini-2.5-flash
- Discovered: maxOutputTokens must be 8192 (4096 truncates Pro-stage responses)
- responseSchema overrides contradictory prompts — retry loop not triggered in 15 runs
- Update architecture-artifact.json: real latency, model names, OI-001 resolved
- Update sp-01-result.md: verdict GO (was GO WITH CONSTRAINTS from dry run)
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant