Skip to content

fix(mcp): clarify application lifecycle and add restore support - #67

Merged
vitorhugo-dotnet merged 11 commits into
mainfrom
fix/mcp-application-lifecycle-rules
Jul 29, 2026
Merged

fix(mcp): clarify application lifecycle and add restore support#67
vitorhugo-dotnet merged 11 commits into
mainfrom
fix/mcp-application-lifecycle-rules

Conversation

@vitorhugo-dotnet

@vitorhugo-dotnet vitorhugo-dotnet commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Problem

MCP clients could infer that a terminal application status such as Rejected should also archive the record because hiring-process status and record visibility were not explicitly separated.

Changes

  • adds resource://job-apply-tracker/application-lifecycle-rules as the authoritative lifecycle policy;
  • reinforces the same safeguards in Update-Application-Status, Archive-Application, and Delete-Application descriptions;
  • defines rejection phrases and dar baixa with a rejection message as a status-only update to Rejected;
  • forbids automatic archival after Rejected or Approved;
  • adds Restore-Application, backed by ApplicationService.restore(UUID), preserving status and clearing only archived/archivedAt;
  • updates the global MCP server instructions to reference the lifecycle resource;
  • documents the design and implementation plan under docs/superpowers/.

Safety rules

  • status and archive state remain independent;
  • archive is a soft-delete and requires explicit or clearly established archive intent;
  • ambiguous archive intent does not archive;
  • permanent deletion requires an explicit request;
  • archive state must not be changed through delete/recreate;
  • the least destructive mutation is always preferred.

Tests

TDD red/green cycle verified:

  • the initial CI run failed on the intentionally missing lifecycle implementation;
  • ApplicationServiceTest covers restoration and status/archive independence;
  • McpApplicationToolsTest covers mutation descriptions and restore delegation;
  • McpApplicationLifecycleRulesResourceTest covers mandatory policy wording;
  • final mvn clean verify: 290 tests, 0 failures;
  • Qodana: passed.

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests labels Jul 29, 2026
@github-actions

Copy link
Copy Markdown

Qodana for JVM

3 new problems were found

Inspection name Severity Problems
Nullability and data flow problems 🔶 Warning 1
Mismatched query and update of 'StringBuilder' 🔶 Warning 1
Simplifiable conditional expression 🔶 Warning 1
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

@vitorhugo-dotnet
vitorhugo-dotnet marked this pull request as ready for review July 29, 2026 01:51
@vitorhugo-dotnet
vitorhugo-dotnet merged commit 188e6dc into main Jul 29, 2026
6 checks passed
@vitorhugo-dotnet
vitorhugo-dotnet deleted the fix/mcp-application-lifecycle-rules branch July 29, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend configuration documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant