Skip to content

feat(wo-020): laboratório de retenção - #67

Merged
KayzenRoot merged 5 commits into
mainfrom
feat/dif-v2-wo-020
Nov 20, 2026
Merged

KayzenRoot merged 5 commits into
mainfrom
feat/dif-v2-wo-020

Conversation

@KayzenRoot

@KayzenRoot KayzenRoot commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

DIF-V2-WO-020 (#37)

Laboratório de retenção privado com métricas agregadas fornecidas manualmente/CSV, comparação A/B observacional e export/delete owner-only.

Entregue

  • 6 tabelas owner-read/service-write: published_posts, published_post_versions, creative_variants, analytics_snapshots, retention_imports, retention_experiments.
  • Posts versionados com plataforma, URL validada (nunca fetched), data e vínculo a hook APPLIED / capa e final APPROVED do mesmo episódio.
  • Snapshots imutáveis, idempotentes por (post, snapshot_hash), com revisão, supersedes, origem MANUAL/CSV, duração/métrica pinadas e métricas nuláveis (ausente ≠ zero).
  • Interações parciais geram PARTIAL_INTERACTIONS; comparação com cobertura diferente retorna INSUFFICIENT.
  • Comparação A/B só com mesma plataforma, janelas ±20%, views ≥1000 e snapshots pinados; senão NOT_COMPARABLE/INSUFFICIENT, sempre descritiva.
  • /app/retention: cadastro, snapshots, import CSV com números estritos e erros por linha, gráficos SVG, histórico/retificação, experimentos A/B, export CSV/JSON e remoção.
  • CSV export cita e prefixa fórmulas por linha; JSON inclui histórico paginado e as 20 importações recentes.
  • Backup/restore e policy incluem as 6 tabelas; 37 tabelas / 34 invariantes.

Evidência

  • Code/test head 02d9cae; CI 44694433465 PASS: 318+3 unit, PgTAP 229/229, E2E 18/18, Sonar PASS; docs-only f22a4f7 CI 44696127263 PASS.
  • Auditoria independente: rodada 1 CORRECTION REQUIRED (H1–H4, AC3); rodada 2 CORRECTION REQUIRED (gráfico NULL→0, cap 1000); rodada final APPROVED WITH RESIDUALS, sem HIGH.
  • E2E: TikTok+Reels com snapshots, A/B observacional, cross-platform NOT_COMPARABLE, CSV com NULL e sem barra 0%, export/anônimo/delete, screenshots 360/768/1440.

Limites aceitos

  • Sem APIs sociais, scraping ou leitura de dashboards; todos os números são manuais/CSV.
  • Sem significância estatística/atribuição de tráfego; comparação descritiva.
  • Experimentos criados antes de snapshots não ficam pinados; sem teste >1000 snapshots; fórmula versionada só v1.
  • CSV exporta o último snapshot por post; JSON tem histórico paginado e 20 imports.
  • import_id nulo nos snapshots CSV; import repetido cria versão de post; sem UI de edição de variante/poda.

Closes #37

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dif-studio Ready Ready Preview Nov 20, 2026 7:36am UTC

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / Security Evidence

Commit: 06044153da72f7ba09f12abb82a047ac1a863944

Security evidence gate passed (success)

No security-sensitive scanner-evidence gap detected.

Mode: enforce

Scanned 21 changed file(s). No missing scanner-evidence signal was detected.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / PR Risk Taxonomy

Commit: 06044153da72f7ba09f12abb82a047ac1a863944

PR taxonomy review recommended (neutral)

Detected 1 PR taxonomy bucket(s): CI/CD Recommendation.

Scanned 21 changed file(s).

Roadmap taxonomy buckets:

CI/CD Recommendation

CI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work.

Signals:

  • API implementation changes may ship without contract artifact updates
  • 2 CI or workflow path(s) changed

Paths:

  • e2e/retention.spec.ts
  • src/lib/domain/retention.test.ts
  • scripts/audit-policy.mjs
  • scripts/backup-metadata.mjs
  • scripts/restore-metadata.mjs
  • src/lib/components/WorkspaceNav.svelte
  • src/lib/domain/retention.ts
  • src/lib/schemas/retention.ts

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / Reference Set Readiness

Commit: 06044153da72f7ba09f12abb82a047ac1a863944

Reference set readiness gaps detected (neutral)

Reference evidence present for 1/7 areas (14%) across 21 changed file(s).

This check is based on files changed in this PR. Repository-level readiness is still reported by /ecc-tools analyze comments and generated manifests.

Area Status Evidence / Next Step
Deep analyzer corpus Missing Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions.
RAG/evaluator comparison Missing Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior.
PR salvage/review corpus Missing Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation.
Discussion triage corpus Missing Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications.
Harness compatibility Missing Add cross-harness, adapter-compliance, or harness-audit evidence for Claude, Codex, OpenCode, Zed, dmux, and agent surfaces.
Security evidence Present scripts/audit-policy.mjs
CI failure-mode evidence Missing Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / Hosted Promotion Readiness

Commit: 06044153da72f7ba09f12abb82a047ac1a863944

Hosted promotion readiness passed (success)

No hosted promotion evidence gaps detected across 21 changed file(s); 0 corpus scenarios had matching evidence.

This check compares PR file changes against the evaluator/RAG promotion corpus in src/analyzers/fixtures/evaluator-rag-corpus.ts.
Hosted output scoring inspected 0 completed cached hosted job results.

No evaluator corpus scenarios matched this PR.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / Security Evidence

Commit: 474ebc8d37290d49d407fed93426676466c631f9

Security evidence gate passed (success)

No security-sensitive scanner-evidence gap detected.

Mode: enforce

Scanned 21 changed file(s). No missing scanner-evidence signal was detected.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / PR Risk Taxonomy

Commit: 474ebc8d37290d49d407fed93426676466c631f9

PR taxonomy review recommended (neutral)

Detected 1 PR taxonomy bucket(s): CI/CD Recommendation.

Scanned 21 changed file(s).

Roadmap taxonomy buckets:

CI/CD Recommendation

CI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work.

Signals:

  • API implementation changes may ship without contract artifact updates
  • 2 CI or workflow path(s) changed

Paths:

  • e2e/retention.spec.ts
  • src/lib/domain/retention.test.ts
  • scripts/audit-policy.mjs
  • scripts/backup-metadata.mjs
  • scripts/restore-metadata.mjs
  • src/lib/components/WorkspaceNav.svelte
  • src/lib/domain/retention.ts
  • src/lib/schemas/retention.ts

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / Reference Set Readiness

Commit: 474ebc8d37290d49d407fed93426676466c631f9

Reference set readiness gaps detected (neutral)

Reference evidence present for 1/7 areas (14%) across 21 changed file(s).

This check is based on files changed in this PR. Repository-level readiness is still reported by /ecc-tools analyze comments and generated manifests.

Area Status Evidence / Next Step
Deep analyzer corpus Missing Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions.
RAG/evaluator comparison Missing Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior.
PR salvage/review corpus Missing Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation.
Discussion triage corpus Missing Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications.
Harness compatibility Missing Add cross-harness, adapter-compliance, or harness-audit evidence for Claude, Codex, OpenCode, Zed, dmux, and agent surfaces.
Security evidence Present scripts/audit-policy.mjs
CI failure-mode evidence Missing Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / Hosted Promotion Readiness

Commit: 474ebc8d37290d49d407fed93426676466c631f9

Hosted promotion readiness passed (success)

No hosted promotion evidence gaps detected across 21 changed file(s); 0 corpus scenarios had matching evidence.

This check compares PR file changes against the evaluator/RAG promotion corpus in src/analyzers/fixtures/evaluator-rag-corpus.ts.
Hosted output scoring inspected 0 completed cached hosted job results.

No evaluator corpus scenarios matched this PR.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / Security Evidence

Commit: 1d644309fa5c3dc7a7b4efc9fbd74951fe4316d6

Security evidence gate passed (success)

No security-sensitive scanner-evidence gap detected.

Mode: enforce

Scanned 21 changed file(s). No missing scanner-evidence signal was detected.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / PR Risk Taxonomy

Commit: 1d644309fa5c3dc7a7b4efc9fbd74951fe4316d6

PR taxonomy review recommended (neutral)

Detected 1 PR taxonomy bucket(s): CI/CD Recommendation.

Scanned 21 changed file(s).

Roadmap taxonomy buckets:

CI/CD Recommendation

CI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work.

Signals:

  • API implementation changes may ship without contract artifact updates
  • 2 CI or workflow path(s) changed

Paths:

  • e2e/retention.spec.ts
  • src/lib/domain/retention.test.ts
  • scripts/audit-policy.mjs
  • scripts/backup-metadata.mjs
  • scripts/restore-metadata.mjs
  • src/lib/components/WorkspaceNav.svelte
  • src/lib/domain/retention.ts
  • src/lib/schemas/retention.ts

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / Reference Set Readiness

Commit: 1d644309fa5c3dc7a7b4efc9fbd74951fe4316d6

Reference set readiness gaps detected (neutral)

Reference evidence present for 1/7 areas (14%) across 21 changed file(s).

This check is based on files changed in this PR. Repository-level readiness is still reported by /ecc-tools analyze comments and generated manifests.

Area Status Evidence / Next Step
Deep analyzer corpus Missing Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions.
RAG/evaluator comparison Missing Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior.
PR salvage/review corpus Missing Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation.
Discussion triage corpus Missing Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications.
Harness compatibility Missing Add cross-harness, adapter-compliance, or harness-audit evidence for Claude, Codex, OpenCode, Zed, dmux, and agent surfaces.
Security evidence Present scripts/audit-policy.mjs
CI failure-mode evidence Missing Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / Hosted Promotion Readiness

Commit: 1d644309fa5c3dc7a7b4efc9fbd74951fe4316d6

Hosted promotion readiness passed (success)

No hosted promotion evidence gaps detected across 21 changed file(s); 0 corpus scenarios had matching evidence.

This check compares PR file changes against the evaluator/RAG promotion corpus in src/analyzers/fixtures/evaluator-rag-corpus.ts.
Hosted output scoring inspected 0 completed cached hosted job results.

No evaluator corpus scenarios matched this PR.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / Security Evidence

Commit: 02d9cae032c1d852017aeb8de87b6c2971260557

Security evidence gate passed (success)

No security-sensitive scanner-evidence gap detected.

Mode: enforce

Scanned 21 changed file(s). No missing scanner-evidence signal was detected.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / PR Risk Taxonomy

Commit: 02d9cae032c1d852017aeb8de87b6c2971260557

PR taxonomy review recommended (neutral)

Detected 1 PR taxonomy bucket(s): CI/CD Recommendation.

Scanned 21 changed file(s).

Roadmap taxonomy buckets:

CI/CD Recommendation

CI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work.

Signals:

  • API implementation changes may ship without contract artifact updates
  • 2 CI or workflow path(s) changed

Paths:

  • e2e/retention.spec.ts
  • src/lib/domain/retention.test.ts
  • scripts/audit-policy.mjs
  • scripts/backup-metadata.mjs
  • scripts/restore-metadata.mjs
  • src/lib/components/WorkspaceNav.svelte
  • src/lib/domain/retention.ts
  • src/lib/schemas/retention.ts

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / Reference Set Readiness

Commit: 02d9cae032c1d852017aeb8de87b6c2971260557

Reference set readiness gaps detected (neutral)

Reference evidence present for 1/7 areas (14%) across 21 changed file(s).

This check is based on files changed in this PR. Repository-level readiness is still reported by /ecc-tools analyze comments and generated manifests.

Area Status Evidence / Next Step
Deep analyzer corpus Missing Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions.
RAG/evaluator comparison Missing Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior.
PR salvage/review corpus Missing Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation.
Discussion triage corpus Missing Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications.
Harness compatibility Missing Add cross-harness, adapter-compliance, or harness-audit evidence for Claude, Codex, OpenCode, Zed, dmux, and agent surfaces.
Security evidence Present scripts/audit-policy.mjs
CI failure-mode evidence Missing Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / Hosted Promotion Readiness

Commit: 02d9cae032c1d852017aeb8de87b6c2971260557

Hosted promotion readiness passed (success)

No hosted promotion evidence gaps detected across 21 changed file(s); 0 corpus scenarios had matching evidence.

This check compares PR file changes against the evaluator/RAG promotion corpus in src/analyzers/fixtures/evaluator-rag-corpus.ts.
Hosted output scoring inspected 0 completed cached hosted job results.

No evaluator corpus scenarios matched this PR.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / Security Evidence

Commit: f22a4f78afc059141e7b80b90640fba89ea86263

Security evidence gate passed (success)

No security-sensitive scanner-evidence gap detected.

Mode: enforce

Scanned 21 changed file(s). No missing scanner-evidence signal was detected.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / PR Risk Taxonomy

Commit: f22a4f78afc059141e7b80b90640fba89ea86263

PR taxonomy review recommended (neutral)

Detected 1 PR taxonomy bucket(s): CI/CD Recommendation.

Scanned 21 changed file(s).

Roadmap taxonomy buckets:

CI/CD Recommendation

CI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work.

Signals:

  • API implementation changes may ship without contract artifact updates
  • 2 CI or workflow path(s) changed

Paths:

  • e2e/retention.spec.ts
  • src/lib/domain/retention.test.ts
  • scripts/audit-policy.mjs
  • scripts/backup-metadata.mjs
  • scripts/restore-metadata.mjs
  • src/lib/components/WorkspaceNav.svelte
  • src/lib/domain/retention.ts
  • src/lib/schemas/retention.ts

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / Reference Set Readiness

Commit: f22a4f78afc059141e7b80b90640fba89ea86263

Reference set readiness gaps detected (neutral)

Reference evidence present for 1/7 areas (14%) across 21 changed file(s).

This check is based on files changed in this PR. Repository-level readiness is still reported by /ecc-tools analyze comments and generated manifests.

Area Status Evidence / Next Step
Deep analyzer corpus Missing Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions.
RAG/evaluator comparison Missing Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior.
PR salvage/review corpus Missing Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation.
Discussion triage corpus Missing Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications.
Harness compatibility Missing Add cross-harness, adapter-compliance, or harness-audit evidence for Claude, Codex, OpenCode, Zed, dmux, and agent surfaces.
Security evidence Present scripts/audit-policy.mjs
CI failure-mode evidence Missing Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Nov 20, 2026

Copy link
Copy Markdown

ECC Tools / Hosted Promotion Readiness

Commit: f22a4f78afc059141e7b80b90640fba89ea86263

Hosted promotion readiness passed (success)

No hosted promotion evidence gaps detected across 21 changed file(s); 0 corpus scenarios had matching evidence.

This check compares PR file changes against the evaluator/RAG promotion corpus in src/analyzers/fixtures/evaluator-rag-corpus.ts.
Hosted output scoring inspected 0 completed cached hosted job results.

No evaluator corpus scenarios matched this PR.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@sonarqubecloud

Copy link
Copy Markdown

@KayzenRoot
KayzenRoot marked this pull request as ready for review November 20, 2026 07:57
Copilot AI lite review requested due to automatic review settings November 20, 2026 07:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@KayzenRoot
KayzenRoot merged commit d9dd82b into main Nov 20, 2026
6 checks passed
@KayzenRoot
KayzenRoot deleted the feat/dif-v2-wo-020 branch November 20, 2026 07:57
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.

[DIF-V2-WO-020] Laboratório de retenção com métricas reais e variantes A/B

2 participants