Skip to content

Commit 72b538a

Browse files
hossameldinmiclaude
andcommitted
Add deploy_check marker to /api/v1/health for CD verification
Temporary canary field to confirm the staging pipeline deploys what lands on the branch. Verify with: curl https://api-stg-balsm-health.mosalam.com/api/v1/health | grep cd-canary Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Hshqj5eFfJNWCX6XNMxCh
1 parent 9d41198 commit 72b538a

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

src/Balsm.API/Controllers/HealthController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ public IActionResult Get()
2020
ready = gate.IsReady,
2121
version = typeof(HealthController).Assembly.GetName().Version?.ToString() ?? "0.0.0",
2222
uptime_seconds = uptimeSeconds,
23-
not_ready_reason = gate.IsReady ? null : gate.Reason
23+
not_ready_reason = gate.IsReady ? null : gate.Reason,
24+
deploy_check = "cd-canary-2026-07-06"
2425
});
2526
}
2627
}

tests/Balsm.API.Tests/Controllers/HealthControllerTests.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ public void Get_ReturnsOkWithHealthyStatus()
2828
statusProperty.Should().NotBeNull();
2929
}
3030

31+
[Fact]
32+
public void Get_ReturnsDeployCheckMarker()
33+
{
34+
var controller = CreateController();
35+
36+
var result = controller.Get();
37+
38+
var okResult = result.Should().BeOfType<OkObjectResult>().Subject;
39+
var value = okResult.Value;
40+
var marker = value!.GetType().GetProperty("deploy_check")?.GetValue(value);
41+
marker.Should().Be("cd-canary-2026-07-06");
42+
}
43+
3144
[Fact]
3245
public void Get_ReturnsTimestamp()
3346
{

0 commit comments

Comments
 (0)