Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions skills/deploy-to-vibestack/scripts/vibestack_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,9 +691,9 @@ def deploy(args: argparse.Namespace) -> None:
print(json.dumps(status.get("error") or status, indent=2))
app_id = status.get("appId") or (status.get("app") or {}).get("id") or created.get("appId") or args.app_id
if app_id:
doctor = fetch_doctor(endpoint, args.token, str(app_id), args.insecure_tls, args.diagnostics_tail)
if doctor:
print_doctor_guidance(doctor)
doctor_packet = fetch_doctor(endpoint, args.token, str(app_id), args.insecure_tls, args.diagnostics_tail)
if doctor_packet:
print_doctor_guidance(doctor_packet)
raise SystemExit(1)

time.sleep(args.poll_interval)
Expand Down
28 changes: 28 additions & 0 deletions skills/deploy-to-vibestack/scripts/vibestack_deploy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,34 @@ def fake_http_json(method, url, token, body=None, content_type=None, insecure_tl
self.assertEqual(calls, ["https://vibestack.local.test/api/v1/apps/app-1/doctor?tail=25"])
self.assertIn('"rootCauseCategory": "missing_health_route"', output.getvalue())

def test_deploy_dispatches_doctor_without_local_shadowing(self) -> None:
module = load_helper_module()
calls: list[str] = []

def fake_http_json(method, url, token, body=None, content_type=None, insecure_tls=False):
calls.append(url)
return {"doctor": {"summary": "health route is missing", "rootCauseCategory": "missing_health_route"}}

module.http_json = fake_http_json
args = module.build_parser().parse_args(
[
"--doctor",
"--api-url",
"https://vibestack.local.test",
"--token",
"test-token",
"--app-id",
"app-1",
]
)

output = StringIO()
with redirect_stdout(output):
module.deploy(args)

self.assertEqual(calls, ["https://vibestack.local.test/api/v1/apps/app-1/doctor?tail=300"])
self.assertIn('"summary": "health route is missing"', output.getvalue())

def test_print_doctor_guidance_prefers_ai_enhancement(self) -> None:
module = load_helper_module()
output = StringIO()
Expand Down
Loading