Skip to content

feat(applications): stage/outcome model — RFC, design and backend cutover (#108) - #117

Merged
hugoalves-dev merged 23 commits into
mainfrom
hugo/intelligent-wozniak-krhlwh
Dec 2, 2026
Merged

hugoalves-dev merged 23 commits into
mainfrom
hugo/intelligent-wozniak-krhlwh

Conversation

@hugoalves-dev

@hugoalves-dev hugoalves-dev commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Refs #108. RFC, design e implementação do backend da virada para o modelo etapa + resultado + aguardando. O frontend vem em PR separado no React-JobApplyTracker.

Documentos

  • RFC: docs/superpowers/specs/2026-11-30-application-status-model-rfc.md
  • Design aprovado: docs/superpowers/specs/2026-12-01-application-status-cutover-design.md
  • Planos: docs/superpowers/plans/2026-12-01-stage-outcome-cutover-{backend,frontend}.md

O que muda

  • V40: colunas stage, outcome, waiting_on, legacy_status. A coluna status não é apagada.
  • Conversão de melhor esforço no startup, idempotente, sem tocar updated_at, seguindo a tabela do design §3. O que não converte fica no formato antigo (legacy_status).
  • Escrita: API e MCP aceitam stage/outcome/waitingOn. Status antigo continua aceito quando converte. Status ambíguo devolve 400 pedindo etapa. Salvar uma edição de registro não convertido exige etapa. Arquivar, restaurar, lembrete, DM, excluir não exigem.
  • PATCH /applications/{id}/stage, GET /applications/stages (catálogo com rótulos PT-BR e critérios).
  • Ghosting calculado (aberta, aguardando a empresa, mais de 30 dias sem atualização, não arquivada). O scheduler noturno que gravava Ghosting e transformava rascunho em Rejected foi removido.
  • Dashboard, analytics do MCP, gamificação, contagem de entrevistas, filtros, busca, export, consultas do assistente e lembretes de DM e de rascunho leem o modelo novo.
  • MCP: Update-Application-Stage. List-Statuses devolve o catálogo. Regras de ciclo de vida reescritas (vaga cancelada ≠ rejeição; desistência = WITHDREW, não arquivo).

O que muda nos números do dashboard no deploy

  • Ghosting deixa de contar Rejected, Approved e arquivados, e passa a ser calculado.
  • Rejeições contam só REJECTED. Ghosting que o scheduler antigo gravou por cima de uma rejeição volta a contar como rejeição.
  • Aguardando resposta passa a ser "aberta e aguardando a empresa", não mais a lista de três status "Pending".
  • O export imprime DRAFT no lugar de TO_SEND_LATER, e chaves de etapa/resultado na coluna Status.

Compatibilidade durante o rollout

Uma gravação feita com status antigo mantém esse valor em status. Uma gravação feita com etapa grava em status um rótulo antigo aproximado, só para exibição (APPLIED→RH, HIRED→Approved, encerrada→Rejected…). Quando um cliente devolve o status armazenado sem mudança, a etapa e o resultado atuais ficam como estão. Assim o frontend atual não regride nem reabre registros entre os dois deploys.

Depois do deploy

  • Trocar o workflow n8n Candidaturas enviadas → Applywell de status: "RH" para stage: "APPLIED".

Verificação

  • Testes unitários: 506/506 localmente.
  • Revisão final do branch inteiro feita por um revisor separado. 1 crítico e 3 importantes corrigidos com teste. Os menores estão listados no ledger e não entraram nesta rodada.
  • ITs/E2E rodam no CI (Postgres).

https://claude.ai/code/session_01GfjfbQseka7Y3pN4sK32Pe


Generated by Claude Code

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Qodana for JVM

11 new problems were found

Inspection name Severity Problems
Constant values 🔶 Warning 5
Nullability and data flow problems 🔶 Warning 4
Non-atomic operation on 'volatile' field 🔶 Warning 2
View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2025.3.2
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

…acy status

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjfbQseka7Y3pN4sK32Pe
The nightly job turned week-old drafts into Rejected and any record untouched
for a month (Rejected, Approved and archived included) into Ghosting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjfbQseka7Y3pN4sK32Pe
…pose them in responses

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjfbQseka7Y3pN4sK32Pe
…r status values

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjfbQseka7Y3pN4sK32Pe
@hugoalves-dev hugoalves-dev changed the title docs: RFC do modelo de status do funil (#108) feat(applications): status model phase 1 — RFC, scheduler fix, stage/outcome dual-write (#108) Nov 30, 2026
…s from main

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjfbQseka7Y3pN4sK32Pe
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjfbQseka7Y3pN4sK32Pe
… a stage to be saved

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjfbQseka7Y3pN4sK32Pe
…d the stage model

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjfbQseka7Y3pN4sK32Pe
…acy status filters are translated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjfbQseka7Y3pN4sK32Pe
… and calculated ghosting

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjfbQseka7Y3pN4sK32Pe
…ols, analytics and rules

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjfbQseka7Y3pN4sK32Pe
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjfbQseka7Y3pN4sK32Pe
@hugoalves-dev hugoalves-dev changed the title feat(applications): status model phase 1 — RFC, scheduler fix, stage/outcome dual-write (#108) feat(applications): stage/outcome model — RFC, design and backend cutover (#108) Dec 1, 2026
…record; phase readers ignore the frozen column

- An unchanged legacy status sent back by a client keeps the current stage/outcome.
- Stage writes leave a display-only legacy label the previous frontend can echo.
- PUT with outcome/waitingOn but no stage keeps the current stage (400 on create).
- Assistant get and organization summary report the phase, not the legacy column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjfbQseka7Y3pN4sK32Pe
…ontrollerIT

Passkey ITs can leave challenge rows behind; depending on test order the
user cleanup then hit the webauthn_challenges foreign key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjfbQseka7Y3pN4sK32Pe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend configuration database documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants